It seems like you're experiencing an issue where your Linux system immediately goes back to sleep after waking up. Here are a few possible solutions to fix this problem:
- Update your system:
Keep your system updated with the latest packages and kernel. This can resolve potential conflicts or issues with power management.
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
- Disable USB wake-up:
Sometimes, USB devices can cause the system to wake up immediately after going to sleep. You can try disabling USB wake-up to see if it resolves the issue.
sudo nano /etc/default/grub
Find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT and add usbcore.autosuspend=-1 to the list of options. It should look like:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1"
Save and exit the file, then update the GRUB configuration:
sudo update-grub
Reboot your system and see if the problem persists.
- Check logs and ACPI events:
You can examine the system logs and ACPI events to identify any potential issues causing the system to immediately sleep after waking up.
sudo journalctl -b | grep -i "suspend\|resume"
- Tweak power management settings:
You can try adjusting power management settings using tools like TLP or PowerTOP. These tools can help you optimize power settings and may resolve the issue.
sudo apt install tlp
sudo apt install powertop
After installing these tools, you can use them to monitor power usage and adjust power-saving settings accordingly.
- Modify systemd settings:
You can try disabling the suspend feature to prevent the system from going to sleep.
- Create a file
/etc/systemd/sleep.conf if it doesn't exist:
sudo touch /etc/systemd/sleep.conf
sudo nano /etc/systemd/sleep.conf
- Add the following lines to the file:
[Sleep]
AllowSuspend=no
AllowHibernation=no
Save and exit the file. Reboot your system and see if the problem persists.
If none of these solutions work, you may want to consider submitting a bug report to your Linux distribution's bug tracker, as this could be an issue specific to your hardware or distribution