PC on? Make a coffee? PC sleeping when you return? Infuriating… I’d already fixed this once after hours of googling, then installed some updates and it’s back to doze-town should I not constantly pay attention to the machine. Here’s how to fix it:
- Launch regedit as Administrator (right-click “Run as administrator”).
- Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0
- Double click on the Attributes key give it the value 2.
- Go to Advanced power settings (click on Windows button, write “power options”, click on “Power & sleep settings”, in the selected plan click on “Change plan settings” then “Change advanced power settings”.
- Find the Sleep | System unattended sleep timeout option then change the value from 2 Minutes to 20 minutes or such (or indeed 9999).
Every time I’d put my LMDE-running machine to sleep the wireless wouldn’t come up for maybe a minute or so, which isn’t ideal. This could be caused by a variety of conditions, but in my case it turned out that the IPv6 “Automatic” setting was trying to use IPv6 DHCP, and was waiting for this to time-out before accepting the IPv4 DHCP lease.
To change this behaviour, you can modify the IPv6 settings from Automatic to Ignore, like this:
If you’re not using Gnome Shell (like in the above screenshot), then maybe try modifying /etc/network/interfaces – really, it’ll depend on your Linux distro where the config is located.
Once IPv6 was disabled the IPv4 DHCP lease was accepted immediately on resume – and it could be the case that if you’ve got the same symptom that it’s caused by the same issue. Regardless, it’s certainly one of the easier things worth trying before you go looking into more involved solutions.