I have Ubuntu 16.04 on my Acer Aspire 7750G laptop connected to an external monitor with the built-in screen disabled. I also have an external keyboard and mouse connected to the laptop.
When I suspend the laptop with the laptop lid open I am able to wake the laptop by pressing the external keyboard.
However, if I suspend the laptop while the lid is closed, I am unable to wake it using the external keyboard. The same is true if I suspend the laptop with the lid open and then close the lid. The same is also true if I suspend the laptop with the lid open, close the lid, open the lid and try to wake it.
To summarize: I am unable to wake the laptop using the external keyboard if the lid has been close any time during hibernation. I am therefore unable to have my laptop lid constantly closed.
I've tried enabling all /sys/bus/usb/devices/usb*/power/wakeup
I've tried setting HandleLidSwitch=ignore
in /etc/systemd/logind.conf
I've tried setting IgnoreLid=true
in /etc/UPower/UPower.conf
How can I wake my laptop while the lid is closed?
EDIT
This might be good to know. Even though I am unable to wake the laptop with the lid closed, something is happening when I press a key on the keyboard. If I, while suspended with the lid closed, press a key on the kayboard, the LEDs on the laptop flash once and I can hear the fans winding up. After about 0.5 sec it stops. If I press a key again, nothing happens. If I then open the lid and wake the laptop by pressing ESC on the built-in keyboard, I can see that there is a stored character in the password field on the login screen. This means that there actually is a connection to the keyboard and that the key press registers while the laptop is suspended with the lid closed, but it does not wake the laptop.
This related answer might be helpful:
You don't mention if your keyboard is wired or wireless. The basic steps are:
And then (assuming 8 ports are returned) use:
See the accepted answer for all the steps.
Now it looks like waking up is working well, but the external display is still sleeping. You can try this for yourself: suspend and close the lid > press any key > type your password > hit enter > after you open the lid, you are on desktop
You are most likely running a Linux 4.4 kernel, while there is 4.15 available. You can install it by this command or by
dist-upgrade
which is a bit complicated in your case.Read more about LTS Enablement Stack
I believe that the actual thing going on here is that your display server graphics mode needs to be reset after wakeup (as for the kernel setup).
You can still try to start a new session from different TTY while the lid is closed to see whether the monitor wakes up or not (
ctrl
+alt
+F2
). If so, you can create a hotkey macro to run this script to reset the display mode manually.The complicated way
You can either upgrade your 16.04 to 17.04 then 18.04, which will take hours, or force the system to download the release candite from the update server.
To do this, you need to type
sudo do-release-upgrade -d
prior to 26.7.2018 and drop the-d
if you plan to upgrade after that date.If you mechanically remove the magnet from the display frame (at least that is the case for Acer ES1-533 and I suppose that applies for majority of laptops) that triggers the action that finds out if the laptop's lid is opened or closed, your issue will be gone...