2

There is an ubuntu 18.04 on my notebook. It was upgraded from 16.04.

The notebook's lid is closed and it is connected to a monitor. When I switch on the notebook and login to the system, half of the times it goes to suspend and in the other half times it logins correctly.

I found this answer, but I cannot accept it, because:

  1. it worked well with 16.04
  2. this setting IgnoreLid=true would mean that the lid of my notebook is broken which is not true.

My lid is not broken, it worked before the upgrade and it works half of the reboots. What is the explanation of this? Also, I want to keep this feature that I want my notebook to suspend when the lid is open and I close it.

For the record. My notebook is docked in a station, so the power button is always available for me. Means, I can switch it on or suspend it without opening the lid.

Any better idea how to fix this issue?

  • For my notebook, remote connections were kept last week, but are suspended this week on closing the lid. Maybe if we want a stable system we should avoid to change it twice a day with a new upgrade. – Gyro Gearloose Jul 19 '19 at 20:39
0

Edit the file /etc/systemd/logind.conf

change the line:

#HandleLidSwitch=suspend

to:

HandleLidSwitch=ignore

Save the file and reboot.


After changes it should match my system:

$ grep -i lid /etc/systemd/logind.conf
HandleLidSwitch=ignore
#HandleLidSwitchDocked=ignore
#LidSwitchIgnoreInhibited=yes

Also check your Ubuntu power settings for what to do when lid is closed. For myself I have to open lid to access power button so the settings there are irrelevant. Since you can access power button with lid closed it may be significant.

  • okay, I will check it! For the record. My notebook is docked in a station, so the power button is always available for me. Means, I can switch it on or suspend it without opening the lid. When I travel it is a useful feature that I can suspend the notebook by closing the lid. – Zoltán Süle Oct 15 '18 at 8:28
  • Since you're using a docking station, I'd recommend changing the setting HandleLidSwitchDocked instead. That will only affect lid behaviour when your laptop is docked, meaning you can carry on suspending by closing the lid when you're not docked. – Sam Sep 18 '19 at 8:41

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.