Sleep and Wake
Éowyn, my lovely Dell XPS 15 9570, likes to give its Ubuntu (and Linux) users hell when it comes to going to sleep mode and waking up. As it stood, I couldn’t close my laptop and then resume working, which was rather problematic since closing the laptop should have theoretically only put the computer in sleep mode. Every time I closed the lid, I had to power off and power on my laptop.
Stuff that didn’t work
The first solution I looked up was command-line ways to put the computer to sleep. I tried using the
pm-suspend-hybrid command from
pm-utils as a superuser, which did nothing.
I also tried the
systemctl hibernate command, which had the same effect as closing the laptop, unfortunately.
The next step was checking out my BIOS setings. Here are the steps I followed:
- Get drivers (an
.exefile) from the Dell website (a truly dreadful experience), put the file on a USB drive, and mount the drive.
- Shut down the computer and enter the BIOS by pressing the F2.
- Once you’re there, go to Settings -> Power Management -> USB Wake Support and tick the
Enable USB Wake Supportbox. One website said that that box would be unchecked, but my BIOS was already in that state.
- Similarly, I went to Settings -> Power Management -> Block Sleep. It said that the
Block Sleepoption would be selected, but once again, my BIOS was already in that configuration.
- The next step was to update the BIOS:
- Repeatedly press F12 (I don’t actually know if doing it once suffices)
- Slecting the
BIOS Flash Update
- Navigating to and selecting that
.exefile we talked about earlier
- Waiting for a while
This did absolutely zilch to fix the issue, but it was a learning experience. Yay! I now know how to update my BIOS.
If you type
you’ll see the (default) response,
[s2idle] deep, meaning that the s2idle is selected.
To fix the issue, you’ll want to use the deep version instead. You could just go ahead and use the command
echo deep|sudo tee/sys/power/mem_sleep
which would temporarily fix the issue.
To make the change permanent, you’ll have to change the kernel parameters by editing the
/etc/default/grubfile as a superuser.
Since that was what I wanted, in the
GRUB_CMDLINE_LINUX_DEFAULT(the boot options) will be set to
quietpart just means “non-verbose.” Without this, a bazillion messages would be printed to the screen.
splashbit gives us something to look at while the real stuff loads in the background. Without this, we’d just be staring at a blank screen.
quiet splash, add the text
mem_sleep_default=deep, and write and quit.
Now type in
sudo grub-mkconfig -o /boot/grub/grub.cfg
Reboot, test, and we’re done!