kernel NULL pointer dereference when plugging/unpluggin USB-c (power or hub)

Asked by Victor

Asus Zenbook Flip S (UX-370UAR). Intel Core i7-8550U CPU).
The X freezes and doesnt even allow to start a console session.

Only happening on Ubuntu 18.04 and 20.04.
Does not happen in the same computer under Ubuntu 16.04 or Windows 10.

Can be replicated easily. Every time I plug/unplug the power USB-C or the USB-c hub. Mostly, on any interaction with the USB-c or I/O ports.

If I plug/unplug the USB-c without X in a console session (CTRL+ALT+F3) I get the following:
 BUG: kernel NULL point dereference, address: 0000000000000080
 ...
 Workqueue: events ucsi_connector_change [typec_usci]
 RIP: 0010:ucsi_displayport_remove_partner+0xe/0x30 [typec_usci]
 ...

Find a picture of the full error in console:
https://ibb.co/qdsStJy

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Victor
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you boot with the device attached is it OK?

Revision history for this message
Victor (vvaquero) said :
#2

Starting with the laptop charger IN, there is no problem, though it would freeze if once starte I unplug it.

The USB-C hub connected and a HDMI connected to it, sometimes would work, sometimes not. It seems just matter of re-start enough times... Once the screen is working, I can unplug and plug the HDMI and it will work, but If I unplug the USB-C hub it freezes again.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Does it happen with other USB C ports? Might be a bad port

Revision history for this message
Victor (vvaquero) said :
#4

No, the laptop only has two USB C ports, and both fail in the same way in Ubuntu 18.04 and Ubuntu 20.04. It does work perfectly on Ubuntu 16.04 and Windows 10. So definitely not a USB C or motherboard error.

Revision history for this message
Victor (vvaquero) said :
#5

No, the laptop only has two USB C ports, and both fail in the same way in Ubuntu 18.04 and Ubuntu 20.04.
It does work perfectly on Ubuntu 16.04 and Windows 10. So definitely not a USB C or motherboard error. Maybe some kernel changes from 16.04 to 18.04?

Revision history for this message
Victor (vvaquero) said :
#6

Sorry I dont understand how it got tagged as solved...

Revision history for this message
Victor (vvaquero) said :
#7

Solved with a tweaked version of the kernel, as shown in the linked bug report.