I just installed a new SSD on my laptop (Acer Swift X) running Kubuntu 21.04 w/ kernel 5.13.14
Sleep was working perfectly until I installed a new SSD. Some important info:
There are two slots on the motherboard for hard drives, one PCIE/SATA port and one PCIE only. The OS was installed into a hard drive that was in the PCIE/SATA port, but I had to move this to the PCIE only port. The new hard drive took its place in the PCIE/SATA port.
Now when I put the laptop to sleep (either from closing lid, using gui option, or running pm-suspend) it will always turn the LED light off, turn the keyboard off, screen goes black, fans go off. When I try to resume, the keyboard will come back on as well as the LED indicator, but the screen will remain black (with no backlight at all). While the laptop does have a dedicated GPU, I've already ruled out all possible graphics problems through all the regular troubleshooting (messing w/ nvidia-prime, novoue.modeset=1 and whatnot).
I've tried to run PM_DEBUG=true pm_suspend, but can't see anything indicative of an issue. This is what is at the end of the /var/log/pm-suspend.log file:
+ [ Sat Jan 15 05:37:47 PM EST 2022: performing suspend = -n ]
+ printf %s\n Sat Jan 15 05:37:47 PM EST 2022: performing suspend
Sat Jan 15 05:37:47 PM EST 2022: performing suspend
+ sync
+ do_suspend
+ echo -n mem
and then nothing further.
Also note: the new SSD was previously installed into another laptop running the same version of Kubuntu, sleep also worked perfectly fine there - making me think it's not exactly a driver issue with the new SSD.
If anyone has any ideas on this that would be extremely helpful.
**UPDATE: After disabling the new hard drive (plugged into the PCIE/SATA slot) from the BIOS, sleep magically works again.
I've also found this line: Jan 15 21:12:04 OMEGASUPREME kernel: [ 40.165686] ahci 0000:05:00.0: port does not support device sleep
in my kern.log
**
** UPDATE 2: This will still happen even if the new hard drive is not mounted **
** UPDATE 3: This one is a weird one, but may give some insight into the potential problem. If I boot into windows with this hard drive disabled, no graphics card is detected at all. If I re-enable it and boot into windows, the graphics card is once again usable. Now this could be something as simple as Nvidia software expecting drivers to be on the hard drive in slot 1, or it may be something more complex. Do note, however, that windows works perfectly fine with sleep when the hard drive is enabled. **