Lenovo Thinkpad X1 Carbon Gen10 (intel) does not work after lid shut/open (no powersave or suspend)

Problem

Laptop displays properly (almost every time), but only the mouse pointer moves. Mouse clicks and all keyboard events (internal, USB external and BT) do not function. Hard reset required to regain functionality.
Cause

Not exactly sure, but every time it happens, this is in the kernel log:

Mar 17 17:34:42 carbon-x1-g10 systemd[1]: Starting systemd-hostnamed.service - Hostname Service...
Mar 17 17:34:42 carbon-x1-g10 systemd[1]: Started systemd-hostnamed.service - Hostname Service.
Mar 17 17:34:42 carbon-x1-g10 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-hostnamed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 17 17:34:42 carbon-x1-g10 NetworkManager[1117]: <info>  [1679092482.5930] agent-manager: agent[dae3ff64e06a9a8d,:1.84/org.gnome.Shell.NetworkAgent/1000]: agent registered
Mar 17 17:34:42 carbon-x1-g10 kernel: BUG: kernel NULL pointer dereference, address: 0000000000000398
Mar 17 17:34:42 carbon-x1-g10 kernel: #PF: supervisor write access in kernel mode
Mar 17 17:34:42 carbon-x1-g10 kernel: #PF: error_code(0x0002) - not-present page
Mar 17 17:34:42 carbon-x1-g10 kernel: PGD 0 P4D 0 
Mar 17 17:34:42 carbon-x1-g10 kernel: Oops: 0002 [#1] PREEMPT SMP NOPTI
Mar 17 17:34:42 carbon-x1-g10 kernel: CPU: 0 PID: 7 Comm: kworker/0:0 Not tainted 6.1.18-200.fc37.x86_64 #1
Mar 17 17:34:42 carbon-x1-g10 kernel: Hardware name: LENOVO 21CBCTO1WW/21CBCTO1WW, BIOS N3AET71W (1.36 ) 01/31/2023
Mar 17 17:34:42 carbon-x1-g10 kernel: Workqueue: kacpi_notify acpi_os_execute_deferred
Mar 17 17:34:42 carbon-x1-g10 kernel: RIP: 0010:queue_work_on+0x15/0x40
Mar 17 17:34:42 carbon-x1-g10 kernel: Code: ff ff ff e9 9a fe ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00 00 53 9c 58 0f 1f 40 00 48 89 c3 fa 0f 1f 44 00 00 <f0> 48 0f ba 2a 00 73 15 31 c9 80 e7 02 74 06 fb 0f 1f 44 00 00 89
Mar 17 17:34:42 carbon-x1-g10 kernel: RSP: 0018:ffffb81b000fbe40 EFLAGS: 00010002
Mar 17 17:34:42 carbon-x1-g10 kernel: RAX: 0000000000000202 RBX: 0000000000000202 RCX: 0000000000000000
Mar 17 17:34:42 carbon-x1-g10 kernel: RDX: 0000000000000398 RSI: ffff9c0ac0051000 RDI: 0000000000002000
Mar 17 17:34:42 carbon-x1-g10 kernel: RBP: 0000000000000004 R08: ffff9c0b68305618 R09: ffff9c0b68305600
Mar 17 17:34:42 carbon-x1-g10 kernel: R10: ffffffff8f9d17c0 R11: 000000000000000f R12: ffff9c0e0f43b200
Mar 17 17:34:42 carbon-x1-g10 kernel: R13: 0000000000000000 R14: ffff9c0ac0202c00 R15: ffff9c0b18f41a18
Mar 17 17:34:42 carbon-x1-g10 kernel: FS:  0000000000000000(0000) GS:ffff9c0e0f400000(0000) knlGS:0000000000000000
Mar 17 17:34:42 carbon-x1-g10 kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Mar 17 17:34:42 carbon-x1-g10 kernel: CR2: 0000000000000398 CR3: 0000000313010002 CR4: 0000000000770ef0
Mar 17 17:34:42 carbon-x1-g10 kernel: PKRU: 55555554
Mar 17 17:34:42 carbon-x1-g10 kernel: Call Trace:
Mar 17 17:34:42 carbon-x1-g10 kernel:  <TASK>
Mar 17 17:34:42 carbon-x1-g10 kernel:  ucsi_acpi_notify+0x69/0x90 [ucsi_acpi]
Mar 17 17:34:42 carbon-x1-g10 kernel:  acpi_ev_notify_dispatch+0x42/0x60
Mar 17 17:34:42 carbon-x1-g10 kernel:  acpi_os_execute_deferred+0x13/0x20
Mar 17 17:34:42 carbon-x1-g10 kernel:  process_one_work+0x1c4/0x380
Mar 17 17:34:42 carbon-x1-g10 kernel:  worker_thread+0x4d/0x380
Mar 17 17:34:42 carbon-x1-g10 kernel:  ? rescuer_thread+0x380/0x380
Mar 17 17:34:42 carbon-x1-g10 kernel:  kthread+0xe6/0x110
Mar 17 17:34:42 carbon-x1-g10 kernel:  ? kthread_complete_and_exit+0x20/0x20
Mar 17 17:34:42 carbon-x1-g10 kernel:  ret_from_fork+0x1f/0x30
Mar 17 17:34:42 carbon-x1-g10 kernel:  </TASK>
Mar 17 17:34:42 carbon-x1-g10 kernel: Modules linked in: uhid rfcomm snd_seq_dummy snd_hrtimer bridge stp llc nft_objref nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables nfnetlink qrtr bnep sunrpc binfmt_misc snd_ctl_led snd_soc_skl_hda_dsp snd_soc_intel_hda_dsp_common snd_soc_hdac_hdmi snd_sof_probes snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_soc_dmic iwlmvm snd_sof_pci_intel_tgl snd_sof_intel_hda_common soundwire_intel soundwire_generic_allocation soundwire_cadence snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp mac80211 snd_sof snd_sof_utils snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi soundwire_bus intel_tcc_cooling x86_pkg_temp_thermal intel_powerclamp snd_soc_core coretemp vfat fat libarc4 kvm_intel snd_compress ac97_bus snd_pcm_dmaengine snd_hda_intel kvm

Looks acpi related to me… Latest firmware from Lenovo loaded. I am using the “ignore suspend on lid switch” extension. Also, it is much easier to replicate by having a TB or USB-C dongle attached. When I pull the dongle from the system with the lid closed, it crashes immediately. I had the 8th gen of the same laptop (both bought from Lenovo with Linux on them) prior to this one, but obviously upgraded them myself. The 8th gen does not have this issue, but I just sold and shipped it. Also, I have a E11Gen4 model with the exact software without this issue (bought with Windows and overwrote with Linux).

Let me know if something I can provide would help. Everything my google’fu turned up is blaming the graphics driver. Intel Iris Pro in this case - no additional GPUs except what is included in the CPU.

Related Issues

Bugzilla report: #NNNN

Workarounds

None yet.

Common Issues is not the right place to report bugs. Please report it in https://bugzilla.redhat.com/ under kernel, thanks.

OK - sorry for that - not used to not posting directly to LKML, but did not think this was appropriate material for that.

Anyhow, after some more searching today, it is a known issue and patches were posted to LKML a couple weeks ago and just waiting for mainline acceptance. They were CC’ed to “stable”, so hopefully we will see a kernel soon with them. There appears to be no easy workaround except patching the kernel ourselves. It affect (2) of my 12th gen intel Thinkpads, but not the 10th gen Intel Thinkpad.

Just FYI for anyone else searching:

https://lore.kernel.org/stable/09ae066c-7306-1cb3-7cb0-f3ca597290f6@redhat.com/T/

1 Like