My kubuntu
laptop very often (always?) wakes up when I disconnect it from its dock (a USB-C connector to a dock with external monitor, network cable and not much else). It also seems to wake up at other times but I haven't been able to reproduce. I first thought it was kalarm
causing the wakeups (I can hear the alarm messages), but the wake option is disabled and I haven't been able to reproduce.
And after it woke up in my bag, it won't go back to sleep, so it's boiling hot and it drains the battery. If I put it to sleep on the desk and leave it there, it stays suspended.
It's a very recent model, up to date BIOS, with a fresh kubuntu install:
$ inxi -b
System: Host: xxxx01234x Kernel: 5.11.0-31-generic x86_64 bits: 64 Desktop: KDE Plasma 5.21.4
Distro: Ubuntu 21.04 (Hirsute Hippo)
Machine: Type: Laptop System: Dell product: Latitude 7420 v: N/A serial: <superuser required>
Mobo: Dell model: 07MHG4 v: A00 serial: <superuser required> UEFI: Dell v: 1.7.1 date: 06/08/2021
Battery: ID-1: BAT0 charge: 61.9 Wh condition: 61.9/61.9 Wh (100%)
CPU: Info: Quad Core 11th Gen Intel Core i7-1185G7 [MT MCP] speed: 831 MHz min/max: 400/4800 MHz
Graphics: Device-1: Intel TigerLake GT2 [Iris Xe Graphics] driver: i915 v: kernel
Device-2: Sunplus Innovation Integrated_Webcam_FHD type: USB driver: uvcvideo
Display: x11 server: X.Org 1.20.11 driver: loaded: modesetting unloaded: fbdev,vesa resolution: 1920x1080~60Hz
OpenGL: renderer: Mesa Intel Xe Graphics (TGL GT2) v: 4.6 Mesa 21.0.3
Network: Device-1: Intel Wi-Fi 6 AX201 driver: iwlwifi
Drives: Local Storage: total: 953.87 GiB used: 617.4 GiB (64.7%)
Info: Processes: 318 Uptime: 1h 03m Memory: 15.36 GiB used: 4.58 GiB (29.8%) Shell: Bash inxi: 3.3.01
From the syslog I can't identify what caused the wakeup:
$ sort /proc/acpi/wakeup | grep -v disabled
Device S-state Status Sysfs node
AWAC S4 *enabled platform:ACPI000E:00
LID0 S3 *enabled platform:PNP0C0D:00
PBTN S3 *enabled platform:PNP0C0C:00
PEG0 S4 *enabled pci:0000:00:06.0
RP07 S4 *enabled pci:0000:00:1c.0
TDM0 S4 *enabled pci:0000:00:0d.2
TRP0 S4 *enabled pci:0000:00:07.0
TRP1 S4 *enabled pci:0000:00:07.1
TXHC S4 *enabled pci:0000:00:0d.0
XHCI S0 *enabled pci:0000:00:14.0
$ cat /var/log/syslog # (with some cleanup)
...
Aug 29 20:48:30 xxxx01234x systemd[1]: Reached target Sleep.
Aug 29 20:48:30 xxxx01234x systemd[1]: Starting Suspend...
Aug 29 20:48:30 xxxx01234x systemd[1]: Stopping Atop advanced performance monitor...
Aug 29 20:48:30 xxxx01234x systemd[1]: atop.service: Succeeded.
Aug 29 20:48:30 xxxx01234x systemd[1]: Stopped Atop advanced performance monitor.
Aug 29 20:48:30 xxxx01234x systemd-sleep[54424]: Suspending system...
Aug 29 20:48:30 xxxx01234x kernel: PM: suspend entry (s2idle)
Aug 29 20:48:30 xxxx01234x kernel: Filesystems sync: 0.005 seconds
Aug 29 20:48:30 xxxx01234x PackageKit: get-updates transaction /367_cadbbdec from uid 10705 finished with success after 265ms
And then it wakes up a few seconds later:
Aug 29 20:48:49 xxxx01234x kernel: Freezing user space processes ... (elapsed 0.002 seconds) done.
Aug 29 20:48:49 xxxx01234x kernel: OOM killer disabled.
Aug 29 20:48:49 xxxx01234x kernel: Freezing remaining freezable tasks ... (elapsed 0.000 seconds) done.
Aug 29 20:48:49 xxxx01234x kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Aug 29 20:48:49 xxxx01234x kernel: ACPI: EC: interrupt blocked
Aug 29 20:48:49 xxxx01234x kernel: ACPI: EC: interrupt unblocked
Aug 29 20:48:49 xxxx01234x kernel: ACPI Error: Thread 2516336000 cannot release Mutex [ECMX] acquired by thread 2266192960 (20201113/exmutex-378)
Aug 29 20:48:49 xxxx01234x kernel: No Local Variables are initialized for Method [_Q66]
Aug 29 20:48:49 xxxx01234x kernel: No Arguments are initialized for method [_Q66]
Aug 29 20:48:49 xxxx01234x kernel: ACPI Error: Aborting method \_SB.PC00.LPCB.ECDV._Q66 due to previous error (AE_AML_NOT_OWNER) (20201113/psparse-529)
Aug 29 20:48:49 xxxx01234x kernel: i915 0000:00:02.0: [drm] *ERROR* failed to enable link training
Aug 29 20:48:49 xxxx01234x kernel: OOM killer enabled.
Aug 29 20:48:49 xxxx01234x kernel: Restarting tasks ... done.
Aug 29 20:48:49 xxxx01234x kernel: usb 3-2: USB disconnect, device number 4
Aug 29 20:48:49 xxxx01234x kernel: usb 3-2.3: USB disconnect, device number 5
Aug 29 20:48:49 xxxx01234x kernel: mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
Aug 29 20:48:49 xxxx01234x kernel: usb 2-2: USB disconnect, device number 2
Aug 29 20:48:49 xxxx01234x org.kde.KScreen[1839]: kscreen.xcb.helper: RRNotify_OutputProperty (ignored)
...
Aug 29 20:48:49 xxxx01234x org.kde.KScreen[1839]: kscreen.xrandr: Output 71 : connected = false , enabled = true
Aug 29 20:48:49 xxxx01234x systemd[1]: Condition check resulted in Daily apt download activities being skipped.
Aug 29 20:48:49 xxxx01234x systemd[1]: Starting Message of the Day...
Aug 29 20:48:49 xxxx01234x systemd[1]: motd-news.service: Succeeded.
Aug 29 20:48:49 xxxx01234x systemd[1]: Finished Message of the Day.
Aug 29 20:48:49 xxxx01234x kernel: thermal thermal_zone6: failed to read out thermal zone (-61)
Aug 29 20:48:49 xxxx01234x acpid: input device has been disconnected, fd 27
Aug 29 20:48:49 xxxx01234x systemd-sleep[54424]: System resumed.
Aug 29 20:48:49 xxxx01234x bluetoothd[893]: Controller resume with wake event 0x0
Aug 29 20:48:49 xxxx01234x kernel: PM: suspend exit
Aug 29 20:48:49 xxxx01234x systemd[1]: Starting Atop advanced performance monitor...
Aug 29 20:48:49 xxxx01234x systemd[1]: Started Atop advanced performance monitor.
Aug 29 20:48:49 xxxx01234x systemd[1]: systemd-suspend.service: Succeeded.
Aug 29 20:48:49 xxxx01234x systemd[1]: Finished Suspend.
Aug 29 20:48:49 xxxx01234x systemd[1]: Stopped target Sleep.
Aug 29 20:48:49 xxxx01234x systemd[1]: Reached target Suspend.
Aug 29 20:48:49 xxxx01234x systemd[1]: Stopped target Suspend.
Aug 29 20:48:49 xxxx01234x ModemManager[1070]: <info> [sleep-monitor] system is resuming
Aug 29 20:48:49 xxxx01234x NetworkManager[896]: <info> manager: sleep: wake requested (sleeping: yes enabled: yes)
Aug 29 20:48:49 xxxx01234x NetworkManager[896]: <info> device (wlp0s20f3): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Aug 29 20:48:49 xxxx01234x acpid: input device has been disconnected, fd 28
Aug 29 20:48:49 xxxx01234x kernel: usb 3-2.4: USB disconnect, device number 6
Aug 29 20:48:49 xxxx01234x acpid: input device has been disconnected, fd 29
Aug 29 20:48:49 xxxx01234x kernel: usb 3-2.5: USB disconnect, device number 7
Aug 29 20:48:49 xxxx01234x NetworkManager[896]: <info> device (p2p-dev-wlp0s20f3): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
...
Aug 29 20:48:49 xxxx01234x NetworkManager[896]: <warn> sup-iface[4da570032317dfb3,2,wlp0s20f3]: call-p2p-cancel: failed with P2P cancel failed
Aug 29 20:48:49 xxxx01234x org.kde.KScreen[1839]: kscreen.xrandr: Emitting configChanged()
...
Aug 29 20:48:52 xxxx01234x org.kde.KScreen[1839]: kscreen.xrandr: Emitting configChanged()
Aug 29 20:48:53 xxxx01234x wpa_supplicant[960]: wlp0s20f3: CTRL-EVENT-REGDOM-CHANGE init=DRIVER type=COUNTRY alpha2=FR
Aug 29 20:48:53 xxxx01234x NetworkManager[896]: <info> policy: auto-activating connection 'DargaudWifiW' (5992f5f3-2312-4cc9-9bd7-07adbf68c46d)
...
What solved for me was to enable two checkboxes in the bios like this: