2

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.

Checking 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[1]: systemd-suspend.service: Main process exited, code=exited, status=1/FAILURE
Oct 06 19:54:57 xps systemd[1]: systemd-suspend.service: Failed with result 'exit-code'.
Oct 06 19:54:57 xps systemd[1]: 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?

1 Answer 1

1

I was also having another issue where my system would hang and lock up for a bit when I logged out (say a minute or two) but would then eventually recover. It was also slow to boot and slow to shutdown. Shutting down it would sit on a blinking cursor for a while before eventually shutting down.

In investigating that issue, it fixed this one. I had great spews of crash dump in journalctl and searching for various errors that came out, someone suggested to try booting with the nomodeset kernel parameter see if that makes a difference. Which fixed the issue, then I tried setting /sys/power/mem_sleep to deep and it worked like a charm (lost 3% battery in overnight test).

It appears that Ubuntu still needs nomodeset for NVIDIA GPUs in 18.04 from searching around. I don't understand why or what causes it, but it seems linked to the proprietary NVIDIA drivers. The fix I applied works for me but I have no idea if it's 'correct'.

To ensure these settings (nomodeset and deep sleep) persist after reboots I edited my grub config (/etc/default/grub) and changed

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.modeset=0 mem_sleep_default=deep"

I used nouveau.modeset=0 instead of nomodeset after reading this ask Ubuntu thread and this Reddit thread that suggest this is required using nouveau with dual GPUs.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .