4

Since I went to 16.04 my laptop likes to suspend when the boot procedure ends and when I logout from my user account. It's a ~4 years old Asus K53SD machine and I thought it's a special case but now I got another laptop which is a Dell Vostro 3558 and did a fresh install. This Dell behaves the same. Both machine based on Intel Core i3 and both have discrete NVIDIA cards but these are the only common things I guess. Both up to date. Another side effect is that the WLAN driver stucks(?) and cannot see wifi signals.

4
  • Just to be clear when you log out you expect the log in screen to appear but it doesn't? Sep 26, 2016 at 19:38
  • Edit '/etc/systemd/logind.conf' and remove # in front of HandleLidSwitchDocked=ignore let me know if it works and I'll write a proper answer. I'm on my phone now. Sep 26, 2016 at 19:48
  • I filled a bug on this: bugs.launchpad.net/ubuntu/+source/systemd/+bug/1680421 Thanks for your attention.
    – Jonatã
    Apr 6, 2017 at 11:36
  • While filing a bug may be a solution in the long run AskUbuntu is about How to use Ubuntu software. TY
    – userDepth
    Apr 6, 2017 at 15:19

1 Answer 1

4

Although you didn't say your laptop was docked the symptoms you describe can be found in bug reports posted by other users experiencing errors when logging out whilst docked.

There is a bug report on this for Lenovo ThinkPad T400 suspends upon log-out from GNOME when docked and lid closed when using Fedora 25 https://bugzilla.redhat.com/show_bug.cgi?id=1365719.

There is a problem reported under Ubuntu 15.10 where the system logs out when resuming from suspend: Logged out on resume from sleep ubuntu 15.10. The interesting point is it happens most of the time but not all the time, such as yourself.

This is the closet I've found to your problem: Ubuntu 16.04: Logout cause the PC to suspend/sleep which references another user with the same problem: Ubuntu 16.04 sleeps / suspend before login screen.

It would appear your laptop is docked and the lid is closed when you log out which causes the system to suspend. To prevent this enter the Terminal by pressing Ctrl+Alt+T and then typing:

gksu gedit /etc/systemd/logind.conf

Search for these lines and make them look like this (possibly by removing # in front or replacing suspend with ignore):

HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore

Save the file and quit gedit. Reboot your laptop.

Edit 1

Via comments the OP confirms the recommended changes solves the problem. A comment asks "Why isn't this available in GUI?" The logind.conf file is part of systemd which Ubuntu has only recently embraced. Conversion from the old programs to the new programs with full GUI support takes time.

There are GUI's already for Suspending, Hibernating or "Doing nothing" when lid is closed but additional options need to be added for when docked or when plugged into an HDMI monitor.

Suspend was already complicated with Kernel methods (Freeze, Standby and Memory/STR (Save To Ram), ACPI Events, acpid, PM, APM and gnome-settings (sorry for typo's I'm going off memory) and systemd adds another level of complexity for all the Linux programmers out there tips hat

1
  • Not sure how you separated the question but I'm asking about the unwanted/not expected suspend at login and logout procedures. Now answering your questions. I use both usually as docked. Both set to automatic login so no disappearing GDM/login screen black screen issues and etc. Now I modified systemd as you mentioned and finally suspend issues gone. So thanks. But what I don't understand is that why no GUI options for these behaviours. Btw if you edit your answer I will UP it. I will edit the question too to make things clear.
    – ViBE
    Sep 27, 2016 at 15:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .