Awake immediately after suspend, kernel error

When I manually suspend my laptop using systemctl suspend, the screen turns blank for a bit and then turns back on. When I close my laptop, which should suspend it, it gets very hot, and checking journalctl it seems like it’s entering and exiting suspend about every 30 seconds. When I look in detail between each of these events, it looks like a totally normal suspend until I get the following kernel error

Jun 24 16:31:12 luna kernel: Disabling non-boot CPUs ...
Jun 24 16:31:12 luna kernel: smpboot: CPU 1 is now offline
Jun 24 16:31:12 luna kernel: smpboot: CPU 2 is now offline
Jun 24 16:31:12 luna kernel: smpboot: CPU 3 is now offline
Jun 24 16:31:12 luna kernel: smpboot: CPU 4 is now offline
Jun 24 16:31:12 luna kernel: smpboot: CPU 5 is now offline
Jun 24 16:31:12 luna kernel: smpboot: CPU 6 is now offline
Jun 24 16:31:12 luna kernel: smpboot: CPU 7 is now offline
Jun 24 16:31:12 luna kernel: unchecked MSR access error: WRMSR to 0x123 (tried to write 0x0000000000000000) at rIP: 0xffffffffa3090b34 (native_write_msr+0x4/0x20)
Jun 24 16:31:12 luna kernel: Call Trace:
Jun 24 16:31:12 luna kernel:  <TASK>
Jun 24 16:31:12 luna kernel:  ? __restore_processor_state.constprop.0+0x179/0x200
Jun 24 16:31:12 luna kernel:  restore_processor_state+0x9/0x10
Jun 24 16:31:12 luna kernel:  x86_acpi_suspend_lowlevel+0x133/0x1a0
Jun 24 16:31:12 luna kernel:  acpi_suspend_enter+0x53/0x1c0
Jun 24 16:31:12 luna kernel:  suspend_enter+0x28c/0x340
Jun 24 16:31:12 luna kernel:  suspend_devices_and_enter+0x12b/0x240
Jun 24 16:31:12 luna kernel:  enter_state+0x1d2/0x430
Jun 24 16:31:12 luna kernel:  pm_suspend+0x4e/0xc0
Jun 24 16:31:12 luna kernel:  state_store+0x81/0xe0
Jun 24 16:31:12 luna kernel:  kobj_attr_store+0xf/0x20
Jun 24 16:31:12 luna kernel:  sysfs_kf_write+0x3b/0x50
Jun 24 16:31:12 luna kernel:  kernfs_fop_write_iter+0x134/0x1c0
Jun 24 16:31:12 luna kernel:  new_sync_write+0x114/0x1a0
Jun 24 16:31:12 luna kernel:  vfs_write+0x1cd/0x260
Jun 24 16:31:12 luna kernel:  ksys_write+0x67/0xe0
Jun 24 16:31:12 luna kernel:  __x64_sys_write+0x19/0x20
Jun 24 16:31:12 luna kernel:  do_syscall_64+0x59/0xc0
Jun 24 16:31:12 luna kernel:  ? irqentry_exit+0x19/0x30
Jun 24 16:31:12 luna kernel:  ? exc_page_fault+0x89/0x160
Jun 24 16:31:12 luna kernel:  ? asm_exc_page_fault+0x8/0x30
Jun 24 16:31:12 luna kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xae
Jun 24 16:31:12 luna kernel: RIP: 0033:0x7fdc05762a37
Jun 24 16:31:12 luna kernel: Code: 10 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 24
Jun 24 16:31:12 luna kernel: RSP: 002b:00007fffd8270778 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Jun 24 16:31:12 luna kernel: RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007fdc05762a37
Jun 24 16:31:12 luna kernel: RDX: 0000000000000004 RSI: 00007fffd8270830 RDI: 0000000000000004
Jun 24 16:31:12 luna kernel: RBP: 00007fffd8270830 R08: 0000000000000004 R09: 000000007fffffff
Jun 24 16:31:12 luna kernel: R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004
Jun 24 16:31:12 luna kernel: R13: 000055c8c46572d0 R14: 00007fdc05863a00 R15: 0000000000000004
Jun 24 16:31:12 luna kernel:  </TASK>
Jun 24 16:31:12 luna kernel: ACPI: PM: Low-level resume complete
Jun 24 16:31:12 luna kernel: ACPI: EC: EC started
Jun 24 16:31:12 luna kernel: ACPI: PM: Restoring platform NVS memory
Jun 24 16:31:12 luna kernel: Enabling non-boot CPUs ...

(luna is the name of the machine)
I’m running Ubuntu 22.04 LTS, i7-1185G7, 2TB SN850 NVMe, 64 GB DDR4-3200 RAM. I updated my kernel version to 5.15.0 0-40-generic using apt dist-upgrade and it didn’t make a difference. I’ve installed powertop and tlp and the services seem to be running fine.

Anyone know what’s going on? I’ve tried googling unchecked MSR access error: WRMSR to 0x123 and it didn’t have anything from the past year.

Thanks!

I’d first check if some trigger is forcing your laptop out of suspend as soon as it sleeps.

Also found a related kernel bug.

Yeah I saw that bug report, but they mainlined the patch already, so I figured it wasn’t relevant. Although rereading the title of the patch “Avoid evaluating methods too early during system resume” it sounds like the error is in reaction to the resume, not causing it, which is annoying.

I’ll look into those triggers.

1 Like

Okay what it ended up being was that powertop was enabling wake on all the usb ports, and for some reason having the laptop charger plugged in caused a wake event.

3 Likes