• 0 Posts
  • 13 Comments
Joined 1 year ago
cake
Cake day: June 18th, 2023

help-circle


  • Swap is only required if you want to hibernate your system, it’s the linux equivalent of hiberfil.sys on windows. When hibernating, the kernel freezes all processes and writes the contents of the RAM to swap (usually a separate partition on the disk), where it can be restored from on the next boot. Since you have issues with sleep/suspend, adding swap won’t help you here, and I also assume PopOS configures swap automatically during the install process anyway. (Also, swap is used as additional memoty in case the RAM is full, so it also functions as the pagefile.sys equivalent.)

    Anyway, suspend/sleep may fail due to various reasons. It doesn’t work on my desktop (same symptoms you also have), but works fine on my laptop. The command you executed (sudo kernelstub …) adds a kernel parameter to your bootloader, that advises your kernel to use S3 sleep instead of modern standby (S2Idle), see this wiki article for the differences: https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate

    Since the kernel is only loaded when you start the PC, my question is: Did you restart your PC after running the command? Check via cat /proc/cmdline, whether the parameter is present. You can also configure this while the system is running via echo deep > /sys/power/mem_sleep (needs to be run as root, i.e. login as root via sudo -i before running it). See also: https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Changing_suspend_method

    If you use a desktop PC I would honestly just disable automatic suspend via the PopOS system settings. If you use a laptop on the other hand, I can understand why you would want sleep to work. You can try reading the Arch Wiki article I linked, it contains a lot of information regarding sleep, but keep in mind that the instructions there are for Arch Linux, not for PopOS, so if the Arch Wiki advises you to change something, you’d have to look up the PopOS way of doing that. Unfortunately I don’t have any further hints I could give you, but I hope this information at least helped you to understand some of the terminology. Best of luck!