0

I am aware this issue has been asked before, but I have tried the common solutions like changing HandleLidSwitch=Ignore and removing GNOME screensaver and installing xscreensaver with no splash.

I am trying to use my laptop with two monitors and currently have the laptop set up so the internal screen is off. This setup works fine when I leave the lid open; but the open windows stop responding when I close the lid, although the cursor still moves and some tasks can still be performed (e.g. dragging windows).

Laptop is a Dell E7240.

Version: Ubuntu 18.04.2 LTS

  • See also: askubuntu.com/questions/1138957/lapop-wont-wake-from-suspend I have as similar problem also, with no solution so far. – FedonKadifeli Jun 2 at 9:08
  • I have disabled the lid switch at a kernel level by adding the node corresponding to the lid switch, found using cat /proc/acpi/wakeup, to /sys/bus/acpi/drivers/button/unbind. This has solved the issue with the screens reversing and clearly the kernel is now ignoring lid switching. However, it seems GNOME is still detecting the switch event and freezing after a few seconds. – Moye Jun 15 at 9:05
  • This still remains unanswered, any ideas? – Moye Jul 5 at 21:58
1

You could disable power-management with:

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

If you want to re-enable it use:

sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target

Also, as mentioned on https://www.freedesktop.org/software/systemd/man/logind.conf.html you could set HandleLidSwitchDocked=ignore in /etc/systemd/logind.conf:

— an explicit value must be set before it will be used to determine behaviour. HandleLidSwitchDocked= defaults to "ignore". HandleHibernateKey= defaults to "hibernate". If the system is inserted in a docking station, or if more than one display is connected, the action specified by HandleLidSwitchDocked= occurs; if the system is on external power the action (if any) specified by HandleLidSwitchExternalPower= occurs; otherwise the HandleLidSwitch= action occurs.

You could also try to lock the progress with systemd-inhibit, for example for 365 days with:

sudo systemd-inhibit --what=handle-lid-switch sleep 365d

as described here: https://www.freedesktop.org/software/systemd/man/systemd-inhibit.html

  • Unfortunately, none of these suggestions worked. I think it could be noteworthy that even with the lid switch options all set to ignore, when I close the lid the attached monitors go momentarily black. Clearly, the lid switch is still toggling some behaviour. Is there a way to switch off all functionality? – Moye Jun 2 at 11:43
  • I already tried, but could not find a solution. Not using some gsettings string or the dconf editor. I thought there must be a way to disable the kernel module or something, but could not find a workaround. Using sudo systemctl status systemd-logind.service shows up the laptop lid event, but I could not find an option to disable it. Maybe you can do some further reading here: unix.stackexchange.com/questions/458486/… – starkus Jun 2 at 11:50
  • I can see the change in status being logged. An interesting quirk I've noticed is that when I close the screen my screens reverse, the one on the left becomes the right screen. Does this provide any hints as to the issue? – Moye Jun 4 at 6:25
0

Workable solution found:

Screenshot of finding LID node

1) Find lid switch node with

cat /proc/acpi/wakeup 

2) Unbind by echoing that node into the directory:

/sys/bus/acpi/drivers/button/unbind

3) Close lid

4) Restart display manager after lid close:

sudo systemctl restart display-manager 
  • Don't think I am ready to mark this as solved yet though since figuring out how to stop x-server detecting lid changes would be ideal – Moye Jun 15 at 17:14

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.