10

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.

2
  • 1
    This appears to be a hardware issue on several different Aspire models, rather than a software issue. I would speculate it has something to do with these specific models having nonstandard behavior of the USB ports when the lid is closed, but to be honest, I have no evidence to support this. You might want to check in the BIOS for something related to the lid sensor, but keep in mind that any BIOS (or physical) fix will disable software support for turning off the built-in display when the lid is closed, because the closed lid will not be detected at all. Jul 21, 2018 at 19:57
  • 1
    I have just installed Lubuntu 20.04.1 on an Acer Aspire and am having exactly the same issue; wake on USB works fine until you close the lid. Then the first time, it wakes up very briefly before going back to sleep. It then won't wake up again until you open the lid and use the power button or laptop keyboard. There is nothing related in the BIOS and it seems to be an Acer hardware issue. Regardless, did anyone ever find a software-based solution to this? community.acer.com/en/discussion/319515/… Sep 13, 2020 at 1:58

3 Answers 3

3

This related answer might be helpful:

You don't mention if your keyboard is wired or wireless. The basic steps are:

grep . /sys/bus/usb/devices/*/power/wakeup

And then (assuming 8 ports are returned) use:

sudo su
echo enabled > /sys/bus/usb/devices/usb1/power/wakeup
echo enabled > /sys/bus/usb/devices/usb2/power/wakeup
echo enabled > /sys/bus/usb/devices/usb3/power/wakeup
echo enabled > /sys/bus/usb/devices/usb4/power/wakeup
echo enabled > /sys/bus/usb/devices/usb5/power/wakeup
echo enabled > /sys/bus/usb/devices/usb6/power/wakeup
echo enabled > /sys/bus/usb/devices/usb7/power/wakeup
echo enabled > /sys/bus/usb/devices/usb8/power/wakeup
exit

See the accepted answer for all the steps.

2
  • 3
    You can use tee, e.g. #echo "enabled" | tee /sys/bus/usb/devices/*/power/wakeup
    – Adam D.
    Sep 29, 2019 at 10:54
  • 1
    Or better yet: $>echo "enabled" | sudo tee /sys/bus/usb/devices/*/power/wakeup
    – Adam D.
    Sep 29, 2019 at 14:22
0

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


So I finally got to the point. This behavior is kernel-related. You can upgrade kernel from LTS version to the latest supported.

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.

sudo apt install --install-recommends linux-generic-hwe-16.04 xserver-xorg-hwe-16.04

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.

#!/bin/bash
xrandr --output HDMI2 --auto

I still suggest updating your kernel or the whole distro whenever possible, as it could resolve many other potential hardware > software issues.


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.

10
  • After shutdown/reboot, does these value would be again in the file? /sys/bus/usb/devices/YOURDEVICE/power/autosuspend and /sys/bus/usb/devices/YOURDEVICE/power/level can be reset
    – damadam
    Jul 23, 2018 at 14:13
  • @damadam I definitely don't think so. Even if you encounter this case, it's easy to run a self-made script after each boot. Jul 23, 2018 at 14:17
  • 1
    or you can add these command inside ~/.bashrc
    – damadam
    Jul 23, 2018 at 14:22
  • @TomášPánik Thanks for the suggestion but this did nothing for me. I've added some additional info in the question.
    – darksmurf
    Jul 23, 2018 at 17:02
  • So now it seems more like waking up works well but the display is still sleeping. First led blink could indicate the system wake, while second keypress is then going to the password field. You can try this yourself. Suspend > press any key > type in your password and press enter > bum your desktop. Now I am entering home... Jul 23, 2018 at 17:33
0

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...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.