You are not logged in.

#1 2018-11-25 00:32:24

BluCode
Member
Registered: 2018-11-25
Posts: 13

systemctl suspend fails

After doing a system upgrade about a week ago, I found that when I tried to suspend my computer, it rebooted. I could not debug it,
but after doing another upgrade a few days ago it now tries to suspend three times and then gives up.

The output of `sudo journalctl -b 0` after suspending is available at https://pastebin.com/wWSZagKH.
As you can see it errors with `kernel: PM: Some devices failed to suspend, or early wake event detected` right after stopping the disks,
and then suspend exists with `Failed to suspend system. System resumed again: Device or resource busy`.

I have tried a number of things to debug this:
Unloading xhci_pci and xhci_hcd with modprobe before suspending, no change.
Suspending via `echo -n "mem" | sudo tee /sys/power/state`, which results in a shutdown as it was originally.
Echoing EHC1, EHC2 and XHC to /proc/acpi/wakeup (none of which are listed there when I cat it), no change.
Echoing USB4 to /proc/acpi/wakeup, no change.

However I have run out of ideas and am turning to the community.

Offline

#2 2018-11-25 11:08:49

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,209

Re: systemctl suspend fails

This should give you more ideas https://01.org/node/3721

Offline

#3 2018-12-06 12:27:04

BluCode
Member
Registered: 2018-11-25
Posts: 13

Re: systemctl suspend fails

I have unfortunately not been able to work it out using that resource.
Here is the log with initcall_debug and no_console_suspend enabled: https://pastebin.com/LARMMMFc
Any other ideas would be greatly appreciated.

Offline

#4 2018-12-06 13:27:45

seth
Member
Registered: 2012-09-03
Posts: 10,286

Re: systemctl suspend fails

Let's first see what's there:

cat /proc/acpi/wakeup
lsusb

Offline

#5 2018-12-06 20:02:20

BluCode
Member
Registered: 2018-11-25
Posts: 13

Re: systemctl suspend fails

Sorry for the slow reply, I was at school. Here are those two: https://pastebin.com/JRcjZaNS.

Offline

#6 2018-12-06 22:22:23

seth
Member
Registered: 2012-09-03
Posts: 10,286

Re: systemctl suspend fails

You saw all the fancy UHC* entries in the wakeup file?
Your USB devices - try to disable them (echoing the ID into the file toggles the state) until things work. My money is on the UPS. My *cyber*money, that is… ;-)

Offline

#7 2018-12-06 22:40:17

BluCode
Member
Registered: 2018-11-25
Posts: 13

Re: systemctl suspend fails

Unfortunately that did not do it. After leaving everything disabled in /proc/acpi/wakeup I still get the same issue.

Offline

#8 2018-12-14 03:54:07

BluCode
Member
Registered: 2018-11-25
Posts: 13

Re: systemctl suspend fails

Are there any further steps I could take to debug this?

Offline

#9 2018-12-14 13:58:51

seth
Member
Registered: 2012-09-03
Posts: 10,286

Re: systemctl suspend fails

Try to eliminate variables as possible.
Eg. seek to S3 from the multi-user.target (ie. no GUI) and w/o network (disconnect and stop the service, eg. NetworkManager)
Unplug everything you can (external readers, mouse, usb keys of all kinds, …)
If you manage to S3, start adding stuff until things fail again.

Offline

#10 2018-12-15 14:54:38

BluCode
Member
Registered: 2018-11-25
Posts: 13

Re: systemctl suspend fails

I tried from tty2 (no wm), unplugging everything, and disconnecting from the network via
ip link set enp3s0 down
but nothing changed. Could you elaborate on how I would go about seeking to it from multi-user.target?

Offline

#11 2018-12-15 14:58:43

seth
Member
Registered: 2012-09-03
Posts: 10,286

Offline

#12 2018-12-15 15:06:49

BluCode
Member
Registered: 2018-11-25
Posts: 13

Re: systemctl suspend fails

I added the kernel parameter systemd.unit=multi-user.target, but that didn't seem to help unfortunately.

Offline

#13 2018-12-27 15:02:21

BluCode
Member
Registered: 2018-11-25
Posts: 13

Re: systemctl suspend fails

After running
echo 1 | sudo tee /sys/power/pm_trace
and trying to suspend, I got the following in my log: https://pastebin.com/8kUZMGWw
I don't remember seeing this before, could it simply be caused by the above warning or could it be the root cause?
If so, how would I go about further debugging?

Offline

#14 2018-12-27 15:56:43

BluCode
Member
Registered: 2018-11-25
Posts: 13

Re: systemctl suspend fails

alarmtimer seems to be the thing to blame, looking in /sys/kernel/debug/suspend_stats I see that it failed with errno -16, even when I disable pm_trace.
I do not know how to proceed from here unfortunately.

Offline

#15 2018-12-27 17:10:55

seth
Member
Registered: 2012-09-03
Posts: 10,286

Re: systemctl suspend fails

This is the rtc and it's most likely the cause, can you suspend w/ the LTS kernel?
Do you have a parallel windows installation?

Offline

#16 2018-12-27 17:16:34

BluCode
Member
Registered: 2018-11-25
Posts: 13

Re: systemctl suspend fails

I do have a parallel windows install, although I haven't bothered to set up multiboot with grub, and I haven't booted into it in months.
I am looking into how to switch kernels, I will get back to you with that.

Offline

#17 2018-12-27 17:33:29

BluCode
Member
Registered: 2018-11-25
Posts: 13

Re: systemctl suspend fails

I just tried the LTS kernel, and I get the same symptom.

Offline

#18 2018-12-27 20:33:01

seth
Member
Registered: 2012-09-03
Posts: 10,286

Re: systemctl suspend fails

https://wiki.archlinux.org/index.php/Du … t_Start-Up

Ftr, please don't bup but just edit your posts unless somebody has responded.

Offline

#19 2018-12-27 20:35:52

BluCode
Member
Registered: 2018-11-25
Posts: 13

Re: systemctl suspend fails

I do not (and have not) had fast startup enabled on my windows installation, so that can't be it.

Offline

#20 2018-12-28 08:40:47

seth
Member
Registered: 2012-09-03
Posts: 10,286

Re: systemctl suspend fails

Sure? It's the default mode, you've to actively disable it and windows will casually re-enable it w/ updates.
Since this is an issue whe interacting w/ the BIOS/CMOS/RTC and a hibernating windows is über-prone to cause this, I strongly recommend to take a look. Notably since the kernel doesn't seem to matter (you could also try downgrading linux and util-linux (and out of tree kernel modules like nvidia)

Offline

#21 2018-12-28 22:58:30

BluCode
Member
Registered: 2018-11-25
Posts: 13

Re: systemctl suspend fails

I just booted back into windows to check, it is not enabled. I don't actually have the option, but I checked and hibernation is in general disabled.
If it makes any difference the time was wrong in windows, but after setting it correctly there it remains correct under arch so I'm not sure if it changed the RTC.
Suspending still wasn't fixed after booting into windows and shutting down again.

Offline

Board footer

Powered by FluxBB