Laptop freeze after unplug power-AC (USB-C)

Bug #1870140 reported by mCoRN
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

## Power adapter plugged in, charging goes well

[ 1018.621820] asus_wmi: Unknown key cf pressed

## Power adapter unplugged, after few moments system freeze

[ 567.444810] BUG: kernel NULL pointer dereference, address: 0000000000000080
[ 567.444819] #PF: supervisor read access in kernel mode
[ 567.444823] #PF: error_code(0x0000) - not-present page
[ 567.444827] PGD 0 P4D 0
[ 567.444834] Oops: 0000 [#1] PREEMPT SMP PTI
[ 567.444841] CPU: 0 PID: 2873 Comm: kworker/0:0 Not tainted 5.5.11-151.current #1
[ 567.444845] Hardware name: ASUSTeK COMPUTER INC. UX370UAR/UX370UAR, BIOS UX370UAR.310 04/17/2019
[ 567.444857] Workqueue: events ucsi_handle_connector_change [typec_ucsi]
[ 567.444868] RIP: 0010:ucsi_displayport_remove_partner+0xa/0x20 [typec_ucsi]
[ 567.444874] Code: 38 00 c7 43 28 00 00 00 00 48 83 c7 10 5b e9 6d cd 75 e1 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00 00 48 85 ff 74 0f <48> 8b 47 78 48 c7 00 00 00 00 00 c6 40 3d 00 c3 66 0f 1f 44 00 00
[ 567.444878] RSP: 0018:ffffc90000477df0 EFLAGS: 00010202
[ 567.444883] RAX: 0000000000000008 RBX: ffff88844685c418 RCX: 00000000000efd00
[ 567.444886] RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000008
[ 567.444889] RBP: 0000000000000000 R08: 0000000000000000 R09: ffffc90000477ce0
[ 567.444892] R10: ffff888443e9f218 R11: ffff88844edeb478 R12: ffff88844685c418
[ 567.444895] R13: 0000000000000001 R14: ffff88844685c2a8 R15: 0000000000000000
[ 567.444900] FS: 0000000000000000(0000) GS:ffff88844ec00000(0000) knlGS:0000000000000000
[ 567.444903] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 567.444906] CR2: 0000000000000080 CR3: 000000000240a006 CR4: 00000000003606f0
[ 567.444909] Call Trace:
[ 567.444921] ucsi_unregister_altmodes+0x7b/0x90 [typec_ucsi]
[ 567.444930] ucsi_unregister_partner.part.0+0x13/0x30 [typec_ucsi]
[ 567.444938] ucsi_handle_connector_change+0x231/0x310 [typec_ucsi]
[ 567.444949] ? kmem_cache_free+0x22a/0x290
[ 567.444960] process_one_work+0x1e1/0x3d0
[ 567.444968] worker_thread+0x4a/0x3d0
[ 567.444976] kthread+0xfb/0x130
[ 567.444983] ? process_one_work+0x3d0/0x3d0
[ 567.444988] ? kthread_park+0x90/0x90
[ 567.444998] ret_from_fork+0x35/0x40
[ 567.445006] Modules linked in: typec_displayport hidp rfcomm ccm cmac fuse snd_hda_codec_hdmi joydev snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio bnep intel_rapl_msr snd_soc_skl snd_soc_hdac_hda snd_hda_ext_core snd_soc_sst_ipc snd_soc_sst_dsp snd_soc_acpi_intel_match snd_soc_acpi iTCO_wdt hid_multitouch iTCO_vendor_support mei_hdcp iwlmvm intel_rapl_common snd_soc_core mac80211 snd_compress libarc4 x86_pkg_temp_thermal intel_powerclamp snd_pcm_dmaengine uvcvideo ac97_bus coretemp videobuf2_vmalloc videobuf2_memops i915 snd_hda_intel videobuf2_v4l2 snd_intel_dspcfg iwlwifi kvm_intel videobuf2_common hid_sensor_accel_3d i2c_algo_bit videodev snd_hda_codec btusb hid_sensor_trigger kvm industrialio_triggered_buffer snd_hda_core drm_kms_helper kfifo_buf btrtl btbcm syscopyarea snd_hwdep sysfillrect btintel industrialio asus_nb_wmi irqbypass mc wmi_bmof asus_wmi evdev sysimgblt hid_sensor_iio_common bluetooth cfg80211 sparse_keymap snd_pcm fb_sys_fops i2c_i801 ucsi_acpi snd_timer
[ 567.445072] typec_ucsi efivars snd soundcore spi_pxa2xx_platform mei_me dw_dmac rfkill thermal typec i2c_designware_platform mei i2c_designware_core drm elan_i2c ac tpm_tis tpm_tis_core pinctrl_sunrisepoint tpm pinctrl_intel rng_core asus_wireless acpi_pad button hid_sensor_hub hid_generic intel_ishtp_hid xhci_pci serio_raw xhci_hcd intel_ish_ipc usbcore intel_ishtp usb_common wmi i2c_hid hid battery video
[ 567.445112] CR2: 0000000000000080
[ 567.445117] ---[ end trace a50cf550f0b4969a ]---
[ 567.445126] RIP: 0010:ucsi_displayport_remove_partner+0xa/0x20 [typec_ucsi]
[ 567.445132] Code: 38 00 c7 43 28 00 00 00 00 48 83 c7 10 5b e9 6d cd 75 e1 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00 00 48 85 ff 74 0f <48> 8b 47 78 48 c7 00 00 00 00 00 c6 40 3d 00 c3 66 0f 1f 44 00 00
[ 567.445136] RSP: 0018:ffffc90000477df0 EFLAGS: 00010202
[ 567.445140] RAX: 0000000000000008 RBX: ffff88844685c418 RCX: 00000000000efd00
[ 567.445143] RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000008
[ 567.445146] RBP: 0000000000000000 R08: 0000000000000000 R09: ffffc90000477ce0
[ 567.445149] R10: ffff888443e9f218 R11: ffff88844edeb478 R12: ffff88844685c418
[ 567.445152] R13: 0000000000000001 R14: ffff88844685c2a8 R15: 0000000000000000
[ 567.445156] FS: 0000000000000000(0000) GS:ffff88844ec00000(0000) knlGS:0000000000000000
[ 567.445159] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 567.445163] CR2: 0000000000000080 CR3: 000000000240a006 CR4: 00000000003606f0

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1870140/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → linux (Ubuntu)
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

commit d16e7b62c5adcd13832c6b0ba364c3468d21b856
Author: Heikki Krogerus <email address hidden>
Date: Wed Mar 11 16:00:05 2020 +0300

    usb: typec: ucsi: displayport: Fix NULL pointer dereference

It has "Cc: <email address hidden>" so every stable kernel will get the fix soon.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1870140

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
mCoRN (metall-corn) wrote :

Thanks for your answer,

Here is the link to the RadHat bugzilla with same issue
https://bugzilla.redhat.com/show_bug.cgi?id=1785972

It's affected on many ASUS laptops

Last comment contains useful information IMHO
"As far as I know, the issue isn't present in 4.x kernels, though I've only tested that in other distros. Solus is the only distro I've tested that didn't crash in a 5.x kernel."

I tested Solus os, and get this BUG, But solus not freeze permanently.
After you unplug power adapted, dmesg show the same error, and after 5-10minutes touchpad and touchscreen became unavailable, new applications won't start, lsusb not return any output, and after 5 more minutes system freeze

If i trying to connect USB-C universal dock-station, notebook even wont get power, dmesg show connection and after few seconds - disconnection.

Revision history for this message
mCoRN (metall-corn) wrote :

This is log after unplugging power supply

Revision history for this message
mCoRN (metall-corn) wrote :

This is log after i'm pligging-in USB-C universal dock station

I tested this dock with my Dell XPS 9360 (Ubuntu 19.10) and al work properly

I can't send information using Apport, because Ubuntu freezes instantly

If you need any additional information, just ask what do you need, and i provide you this information =)

Revision history for this message
mCoRN (metall-corn) wrote :

Ubuntu 19.-4 returs the same error

in attachment all dmesg log from livecd boot
from boot till freeze

mCoRN (metall-corn)
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
mCoRN (metall-corn) wrote :

i'm also have a bug with my universal usb-c dock ASUS AH001-1A

and it's affect only ASUS notebook.
i tested Dell XPS 13 9360 with installed Ubuntu 19.04, all works fine
Power - OK
HDMI - OK
Sound Device - OK
USB Mouuse and keyboard - OK

also i tested it on my Windows laptop (ThinkPad X390), MacBook 12, and dock station works correct everywhere

but, if i connect it to my Asus UX370UA notebook - it's not works
all devices is discovered in dmesg, but disconnecting automatically in a few maments

in attachment is a log-file of dmesg, during plugging-in/out operations for Dell and Asus laptops

Revision history for this message
mCoRN (metall-corn) wrote :

I tried to install Xubuntu 16.04 on my ASUS UX390UA laptop, and everything begin to work correct.
kernel version is "Linux mcorn-UX370UAR 4.4.0-176-generic # 206-Ubuntu SMP Fri Feb 28 05:02:04 UTC 2020 x86_64 x86_64 x86_64 GNU / Linux"

I connect laptop to ASUS AH001-1A dock-station and all works fine
Power - OK
HDMI - OK
Sound Device - OK
USB Mouse and keyboard - OK

The problem is same as in a redhat bug tracker.
usb-c devices work properly on 4.x kernels, and don't on 5.x kernels.

but i'm not going to using Xenial release, because it's too old.
is anyone see any opportunities to solve the problem?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Just wait for that commit lands in Ubuntu kernel...

Revision history for this message
mCoRN (metall-corn) wrote :

Hi guys, more than months is passed, but Bug is still present even in the latest Ubuntu 20.04
The same thing
 BUG: kernel NULL pointer dereference, address: 0000000000000080

In redhat bug tracker text about the patch, eliminating this bug (probably) https://bugzilla.redhat.com/show_bug.cgi?id=1785972.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

It'll be fixed by Ubuntu-5.4.0-32.36.

Revision history for this message
Michael (mxmaster) wrote :
Download full text (5.7 KiB)

Hi there, I have upgraded to Kubuntu 20.04 and the bug still occurs with Kernel 5.4.0-37-generic
Is there anything I can do to provide more information? Or is there another kernel I should use?

$ uname -a
Linux 5.4.0-37-generic #41-Ubuntu SMP Wed Jun 3 18:57:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal

kernel: [ 559.983153] BUG: kernel NULL pointer dereference, address: 00000000000002de
kernel: [ 559.983162] #PF: supervisor read access in kernel mode
kernel: [ 559.983165] #PF: error_code(0x0000) - not-present page
kernel: [ 559.983168] PGD 0 P4D 0
kernel: [ 559.983176] Oops: 0000 [#1] SMP NOPTI
kernel: [ 559.983182] CPU: 0 PID: 7 Comm: kworker/0:1 Not tainted 5.4.0-37-generic #41-Ubuntu
kernel: [ 559.983185] Hardware name: LENOVO 20N80029GE/20N80029GE, BIOS R0YET43W (1.26 ) 03/30/2020
kernel: [ 559.983198] Workqueue: events ucsi_connector_change [typec_ucsi]
kernel: [ 559.983211] RIP: 0010:typec_altmode_update_active+0x1f/0x100 [typec]
kernel: [ 559.983216] Code: 0f 1f 84 00 00 00 00 00 0f 1f 00 0f 1f 44 00 00 55 48 89 e5 41 54 53 48 83 ec 10 65 48 8b 04 25 28 00 00 00 48 89 45 e8 31 c0 <0f> b6 87 dc 02 00 00 83 e0 01 40 38 f0 0f 84 95 00 00 00 48 8b 47
kernel: [ 559.983220] RSP: 0018:ffffbde7400b7db8 EFLAGS: 00010246
kernel: [ 559.983224] RAX: 0000000000000000 RBX: ffff99ad0da16270 RCX: 0000000000000000
kernel: [ 559.983227] RDX: ffff99ad0c2d3628 RSI: 0000000000000000 RDI: 0000000000000002
kernel: [ 559.983231] RBP: ffffbde7400b7dd8 R08: 0000000000000219 R09: 000000000042061e
kernel: [ 559.983234] R10: 0000000000001168 R11: 0000000000000000 R12: 0000000000000000
kernel: [ 559.983237] R13: ffff99ad0da16010 R14: ffff99ad0da16000 R15: ffff99ad0da162c0
kernel: [ 559.983241] FS: 0000000000000000(0000) GS:ffff99ad21200000(0000) knlGS:0000000000000000
kernel: [ 559.983245] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: [ 559.983248] CR2: 00000000000002de CR3: 00000004bd80a001 CR4: 00000000003606f0
kernel: [ 559.983251] Call Trace:
kernel: [ 559.983263] ucsi_altmode_update_active+0xab/0xf0 [typec_ucsi]
kernel: [ 559.983271] ucsi_connector_change+0x1ae/0x340 [typec_ucsi]
kernel: [ 559.983282] process_one_work+0x1eb/0x3b0
kernel: [ 559.983288] worker_thread+0x4d/0x400
kernel: [ 559.983295] kthread+0x104/0x140
kernel: [ 559.983301] ? process_one_work+0x3b0/0x3b0
kernel: [ 559.983305] ? kthread_park+0x90/0x90
kernel: [ 559.983314] ret_from_fork+0x1f/0x40
kernel: [ 559.983319] Modules linked in: typec_displayport uas usb_storage vmw_vsock_vmci_transport vsock vmw_vmci rfcomm cdc_ether usbnet snd_usb_audio snd_usbmidi_lib r8152 mii cmac algif_hash algif_skcipher af_alg bnep uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common btusb btrtl btbcm btintel bluetooth ecdh_generic ecc binfmt_misc nls_iso8859_1 mei_hdcp intel_rapl_msr snd_sof_pci snd_sof_intel_hda_common snd_soc_hdac_hda snd_sof_intel_hda snd_sof_intel_byt snd_sof_intel_ipc snd_sof snd_sof_xtensa_dsp x86_pkg_temp_thermal iwlmvm snd_hda_ext_core intel_powerclamp snd_soc_acpi_intel_match kvm_intel snd_soc_acpi ...

Read more...

Revision history for this message
mCoRN (metall-corn) wrote :

Hi @mxmaster, i'm also subscribed on Fedora bug tracking to receive more information about this issue.

As usual Fedora's users more active =)

I found the message from 2020-04-30 about fix for 5.6.8 kernels
https://bugzilla.redhat.com/show_bug.cgi?id=1785972#c48

I'm not checked this information, because i'm not Fedora user, but it sounds good )

Revision history for this message
mCoRN (metall-corn) wrote :

BTW
Yesterday i tested Fedora 33 and Ubutnu 20.10 Daily image
And problem solved. Finally, kernel 5.8 is not affected this bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.