Just installed fresh Kubuntu 18.04 on a new Dell XPS 15 (9570). Disk is encrypted and secure boot is on (if this makes any difference? some things I've read seem to suggest it might).
I'm struggling to get it to suspend correctly, if I shut the lid and leave it, it'll just drain the battery.
I started looking into it and found a few things to try, I started trying things here and as the output of
cat /sys/power/mem_sleep for me was
[s2idle] deep I assume that it's draining the battery as it's not in deep sleep?
I tried changing to to deep sleep (
echo deep > /sys/power/mem_sleep) which does change it okay, but when trying to suspend with
pm-suspend, the screen goes dark but after about 15 seconds wakes up again.
journalctl -xe I see this:
... Oct 06 19:54:57 xps kernel: Suspending console(s) (use no_console_suspend to debug) Oct 06 19:54:57 xps kernel: nouveau 0000:01:00.0: DRM: failed to idle channel 1 [DRM] Oct 06 19:54:57 xps kernel: pci_pm_suspend(): nouveau_pmops_suspend+0x0/0x80 [nouveau] returns -16 Oct 06 19:54:57 xps kernel: dpm_run_callback(): pci_pm_suspend+0x0/0x150 returns -16 Oct 06 19:54:57 xps kernel: PM: Device 0000:01:00.0 failed to suspend async: error -16 Oct 06 19:54:57 xps kernel: do_IRQ: 0.35 No irq handler for vector Oct 06 19:54:57 xps kernel: PM: Some devices failed to suspend, or early wake event detected Oct 06 19:54:57 xps kernel: OOM killer enabled. Oct 06 19:54:57 xps kernel: Restarting tasks ... done. Oct 06 19:54:57 xps kernel: [drm] RC6 on ... Oct 06 19:54:57 xps systemd: systemd-suspend.service: Main process exited, code=exited, status=1/FAILURE Oct 06 19:54:57 xps systemd: systemd-suspend.service: Failed with result 'exit-code'. Oct 06 19:54:57 xps systemd: Failed to start Suspend. ...
Suggests that the PCI device
0000:01:00.0 is causing suspend to fail, which is my GPU by the looks:
$ lspci -s 0000:01:00.0 01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1)
But I don't understand: a) Why is the GPU causing sleep to fail? b) How do I stop it causing sleep to fail?
I tried looking in
/proc/acpi/wakeup but I can't see it in there:
$ cat /proc/acpi/wakeup | grep enabled LID0 S3 *enabled platform:PNP0C0D:00 PBTN S3 *enabled platform:PNP0C0C:00
Initally, there was also an XHC entry that was set to enabled but I disabled it - made no difference at all however :(
Not sure what to try next?