
Ubuntu is a popular operating system, and while it has many advantages, some users have reported issues with their computers not waking up after sleep. This issue has been observed on various versions of Ubuntu, including 12.10, 18.04, 20.04, and 22.04. The problem occurs on different laptop models, such as Dell, Lenovo, and ASUS, indicating that it is not limited to specific hardware configurations. In this topic, we will explore the possible reasons for Ubuntu not waking up from sleep and provide potential solutions or workarounds to address this issue.
Explore related products
What You'll Learn

Check your hardware and BIOS settings
If your Ubuntu computer does not wake up from sleep as expected, it could be because your hardware does not support suspend properly. When you suspend your computer and then try to resume it by pressing a key or clicking the mouse, it should wake up and ask for your password. If this does not happen, you can try a few things: press the power button once (not hold), ensure your monitor is on and try pressing a key again, or as a last resort, force shut down your computer by holding the power button for 5-10 seconds and then turn it on again. If these basic steps do not work, you may need to check your hardware and BIOS settings.
The BIOS (Basic Input/Output System) is a program that your computer's microprocessor uses to start the computer. It also manages the interface between your computer's operating system and the hardware. The BIOS is responsible for handling wakeup signals from hardware devices like the laptop lid or power switches. If your Ubuntu computer is not waking up from sleep, you may need to check and adjust your BIOS settings.
To check your BIOS settings, you can access the BIOS menu by pressing a specific key or keys during the boot process. This key is usually displayed on the screen during startup, and it could be F1, F2, F10, F12, or Del. Once you are in the BIOS menu, you can review and modify the settings. Look for power management settings, which can be configured to check for activity on attached devices and trigger a CPU wake-up. You can also set a wake-up time from the BIOS and UEFI menus, but this may only be possible once a day.
Additionally, you can use the pm-utils package to perform actions at sleep/wakeup or prevent unwanted sleep. You can also use tools like ethtool to configure your network card to wake your system from sleep or shutdown when traffic is detected.
It is important to note that making changes to your BIOS settings can be complex and may have unintended consequences. If you are unsure, it is recommended to seek further guidance or assistance from a technical support source.
Understanding Sleep-Wake: Covering the Basics of Sleep Science
You may want to see also
Explore related products

Try a key press or mouse click
If you have suspended your Ubuntu PC and are trying to wake it up, the first thing you should try is pressing any key on the keyboard or clicking the mouse. This should wake up your computer and display a screen asking for your password. If this does not happen, try pressing the power button once. If this still does not work, make sure that your computer monitor is switched on and try pressing a key on the keyboard again.
If your Ubuntu PC is not waking up from sleep mode with a key press or mouse click, it could be because suspend is not supported properly by your hardware. In this case, you may need to try other methods to wake up your computer, such as pressing the power button or, as a last resort, turning off the computer by holding down the power button for 5-10 seconds. However, be aware that doing this will cause you to lose any unsaved work.
If you are looking to wake up your Ubuntu PC with a specific key sequence, rather than just any key press, this may not be possible without special motherboard or keyboard firmware. By default, Ubuntu PCs wake from sleep mode with any key press or mouse movement or click, and it is not possible to change this from within the operating system. Wake on Keyboard is handled by hardware (motherboard, ACPI) so you are limited to what your BIOS offers. Check your BIOS settings for possible options, but it is likely that only one key press (any key on the keyboard, or just the spacebar or ESC) will be enough to wake the computer.
If you are having issues with your Ubuntu PC not waking up from sleep mode at all, even with a key press or mouse click, there are a few potential solutions you can try. First, make sure that your hardware supports suspend mode properly. If it does not, you may need to try hibernating your computer instead, as this requires the 'power on' button to wake up. You can also try disabling the lid open waking up feature, although this may not work on all laptops.
Waking Up a Dell Inspiron Tablet: Troubleshooting Guide
You may want to see also
Explore related products

Check your power settings
If you're having trouble waking your Ubuntu device from sleep mode, it may be due to the default power-saving settings. This can be frustrating, as you're forced to use the power button to wake the device and repeatedly enter your password. To address this issue, you can change the power settings by following these steps:
Firstly, identify the cause of the problem. It could be related to the system, hardware interfaces, or the network card. For example, if you're using an Ubuntu server, it comes with 'power management' enabled by default, which may be the reason for unexpected sleep mode.
Next, you can try masking and unmasking services. Masking a service tells it not to run, and you can do this for services that are not necessary for the system to function properly. To mask services, run the following command:
> # systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
Then, open the /etc/systemd/logind.conf file for editing. You can do this by finding the line #HandleLidSwitch=suspend and removing the # character at the beginning of the line. Change this line to one of the following settings:
- HandleLidSwitch=poweroff: This will shut down the computer when the lid is closed.
- HandleLidSwitch=hibernate: This will hibernate the computer when the lid is closed.
- HandleLidSwitch=suspend: This will suspend the computer when the lid is closed.
- HandleLidSwitch=ignore: This will do nothing when the lid is closed.
After making your desired changes, save the file and restart the service to apply the updates by typing:
> # systemctl restart systemd-logind
Additionally, you can explore other power management tools like gnome-power-manager, powerdevil, or sleepd, which trigger power management actions. The pm-utils package is another option, offering various tools and customization hooks to perform actions at sleep/wakeup or prevent unwanted sleep operations.
By following these steps, you should be able to adjust the power settings and prevent your Ubuntu device from unexpectedly entering sleep mode.
Sleep Better, Wake Up Early: Mastering Your Sleep Schedule
You may want to see also

Update your drivers
In Ubuntu, drivers are typically updated automatically when the kernel is updated. This is because, in Linux, most drivers are built directly into the kernel. However, there are some exceptions, particularly for WiFi and graphical hardware devices, where you may need to update the drivers manually.
To update your drivers in Ubuntu, you can use one of four methods: through the "Additional Drivers" menu, via the Terminal, using the ubuntu-drivers tool, or by updating the kernel.
Through the "Additional Drivers" Menu:
- Open the App Launcher and select "Software and Updates." You can also directly open "Additional Drivers."
- Go to the "Additional Drivers" section. Here, you can see the recommended driver for your hardware.
- If you want to install a different driver version or an open-source driver, select it and click "Apply Changes."
- Restart your computer for the changes to take effect.
Via the Terminal:
- Open the Terminal by pressing "Ctrl + Alt + T" or through the app launcher.
- Run the command to list the drivers. For example, on some computers, this command will display the Nvidia graphics card.
- Choose the driver you want to install. For instance, to install the latest recommended Nvidia driver, run the appropriate command.
- Alternatively, you can run a command to install all recommended drivers automatically.
Using the ubuntu-drivers Tool:
The ubuntu-drivers tool provides more flexibility, especially for computers with Secure Boot. It can automatically detect and install the best-matched driver for your hardware, or you can specify the driver version you want to install.
Updating the Kernel:
Since most drivers are part of the kernel in Linux, updating the kernel will also update the drivers. You can download and install new kernel packages from the Ubuntu kernel PPA.
Unleashing the Blackout Sleeper Agent: Strategies for Activation
You may want to see also

Check your screen saver settings
If you're having trouble waking your Ubuntu computer from sleep, there are several fixes you can try. Firstly, check your screensaver settings. Go to System > Preferences > Screensaver and see if "Activate screensaver when the computer is idle" is checked. Additionally, you can hit Alt + F2, enter gconf-editor, and navigate to /apps/gnome-power-manager/lock to check if the "blank screen" option is selected.
If your Ubuntu computer is not waking up from sleep, it could be due to a faulty screensaver setting. To rectify this, you can try pressing the function ("Fn") key, which has been known to wake the screen up when other methods fail. If this doesn't work, you can try a soft reboot by holding down Ctrl + Alt + PrScr (you may need to add the Fn key if your laptop requires it for the PrScr button to work), then pressing R, E, I, S, U, and B one at a time while holding the first three keys down.
If you're using Nvidia drivers, you can try disabling certain services and disabling or purging Nvidia packages. Open the terminal and use the following commands:
Sudo systemctl stop nvidia-suspend.service
Sudo systemctl stop nvidia-hibernate.service
Sudo systemctl stop nvidia-resume.service
Sudo systemctl disable nvidia-suspend.service
Sudo systemctl disable nvidia-hibernate.service
Sudo systemctl disable nvidia-resume.service
Then, move the Nvidia folder to a backup location:
Sudo mv /lib/systemd/system-sleep/nvidia ~/nvidia.bak
If the above methods don't work, you can try editing the GRUB file. Open the terminal and use the following command to open the GRUB file in the Vi editor:
Sudo vi /etc/default/grub
Add the following line to the file:
Nouveau.modeset=0
Then, save and exit the file by pressing Ctrl + O, followed by Enter, and then Ctrl + X. After making these changes, reboot your system to see if it wakes up from sleep as expected.
Adjusting Computer Sleep Settings for a Better Wake-Up
You may want to see also
Frequently asked questions
Disabling the systemctl nvidia services and then removing the script file seems to fix the issue.
This may be due to limiting c-states, which is known to kill the battery.
This could be because suspend is not supported by your hardware. Try pressing the power button once. If this does not work, ensure that your computer monitor is on and try pressing a key on the keyboard.
Look in the system logs and the X logs for errors. If this happens again, try switching to a new virtual screen (Ctrl-Alt-1).
This could be because you are running xscreensaver.


















