Need help with desktop locking up on suspend (sleep)

I am having an intermittent problem with my desktop locking up when going into sleep mode (suspend to ram). I have been thinking for 2 months that the problem was a new mechanical keyboard (Corsair K70 LUX non-rgb). When I got this keyboard I began having problems on my laptop first, and then moved the keyboard to my desktop and the problem followed. However, I have now given up on the keyboard, disconnected it, removed any references to it in config files (ie wakeup rules) and still my computer locked up.

Exact symptom: (as best as I can explain)
Whether I put the computer to sleep mode via menu options or just leave the computer to go into sleep on its own, everything seems to be going well until the very last moment when the CPU fan starts going full speed. At that point monitors are off, keyboard is unresponsive, all other LEDs are off; the only thing I can do is press the power button on the pc to restart it. This has been an intermittent problem, but getting more frequent, although still not everytime.

Equipment and OS:
I first got the Corsair keyboard at Christmas 2019 and connected it to my laptop while away from home.
Acer Aspire E1-572P-6616 running Mint 19.1 / Cinnamon. Since moving the keyboard to my desktop I no longer had any power issues on the laptop.

Desktop: AMD FX-6300, 8GB, Radeon HD 7850, Asus M5A99X EVO (Yes, it’s old. But has been working great (till now) for me except when it struggled to run Cities: Skylines on steam.) I have had this power issue with both Debian 10 / KDE and now Manjaro / KDE.
Backup keyboard: trusty old HP PS/2 keyboard.

Steps taken so far:
Internet searches: couldn’t find much other than installing the community version of the driver (ckb-next)
USB wake up rules - both enabled or disabled for the keyboard
Switching USB ports (does that actually do anything?)
Installing ckb-next from aur
Updating keyboard firmware (through the official Corsair software via Windows)
Setting keyboard poling rate to different settings and trying BIOS mode on the keyboard (and wow the desktop did not like that - wouldn’t suspend at all)
Unplugging keyboard from pc before going to sleep mode (sometimes seemed to work).

I have now undone most of the above steps and still had the issue today. (Having had several boots without even connecting the keyboard).

At least one of the results online for similar problems had responders asking to see journal entries. I could post that, but there can be 30-40 lines per second and I’m not sure what is relevant and what isn’t.
One thing I did notice is that the very last entry after a successful sleep would be something like:
Feb 21 10:46:29 sd40-desktop-manjaro kernel: Filesystems sync: 0.863 seconds

After any failed sleep, that line would not be there.

Today, after the failed sleep, I noticed this:
Feb 28 15:10:28 sd40-desktop-manjaro kernel: Filesystems sync: 0.251 seconds
Feb 28 15:10:28 sd40-desktop-manjaro kernel: [drm:si_dpm_set_power_state [radeon]] ERROR si_restrict_performance_levels_before_switch failed

I’m at my wits’ end on this one. Is it a hardware issue? Or maybe I should re-install Manjaro (last resort)? Maybe I’m now looking at a completely separate cause from the keyboard issue? Maybe it was never on account of the keyboard (but no problems until getting that keyboard)?


The bruteforce approach.

  • Formulate the most simplistic full proof way of reproducing the problem.
    Example: Right after booting the problem will always occur within the first 3 times of recovering from suspend one try after another.
  • Install a clean distro to a memory stick.
  • Apply the full proof test:
    • If it succeeds: begin to configure and install things to turn it into the same environment as the one with the problem and redo the test after each change till you break it.
    • If it fails: you have a more fundamental problem but at least you’ve dramatically narrowed down where the bad interaction is coming from, do future testing on this clean installation.

Thank you for your reply. TLDR: It seems as though having power wakeup enabled on my wireless logitech mouse was also to blame. I will give it a bit more time before calling the problem solved, to make sure sleep doesn’t fail again.

Any reason / thoughts on why enabling USB devices to wakeup would cause the problem of not properly suspending?

So following your advice, I went through 3 cycles of reboot and sleep/wakeup until failure. Each time the sleep failed on the third sleep.
I had Mint 19.3 on a USB, so booted from that. Performed 4 sleep/wakeup cycles with no problem. As I had already been wondering about having USB wakeup enabled on the mechanical keyboard (that was one of the potential fixes in my first post) I had now also been wondering about the same for the mouse.

Since this experiment with the live usb boot was Mint, not Manjaro I realized one difference. In my experience with Ubuntu, Mint and Debian, USB devices by default were disabled for power wakeup. However on Manjaro, they were enabled by default. So within the live usb Mint environment, I used
echo enabled > /sys/bus/usb/devices/4-3/power/wakeup (4-3 for the mouse on my machine) and sure enough sleep failed on the next try.

Going back to my regular Manjaro install, I explicitly disabled wakeup from the mouse and was able to get to 4 sleep/wakeups with no failure.

So now I will give it a bit more time to call the problem solved, and maybe, fingers crossed, I might be able to go back to my other keyboard as well, leaving both USB devices disabled for wakeup. (missing my Cherry MX Red switches right now after typing this reply). If so, I guess I still keep the PS/2 keyboard attached just for waking up the pc. ( or power button for wakeup).

1 Like