elementary / greeter

Login and Lock Screen greeter for elementary OS and Pantheon, using LightDM
GNU General Public License v3.0
151 stars 39 forks source link

Laptop doesn't suspend instantly when closing the lid like it suggests in the power settings (EOS beta 6) #527

Open KarkanAlzwayed opened 3 years ago

KarkanAlzwayed commented 3 years ago

What Happened

I have set the power setting to suspend when the lid is closed, but it doesn't suspend instantly like it suggests in the setting. It waits until the allocated time runs out then suspends after that. Often times, I'd hear the notification bell when the lid has been closed for over 10 minutes. When I close the lid then open it back up, it'd go directly to the desktop without even locking.

Expected Behavior

Laptop should suspend instantly when the lid is closed like it suggests in settings/power "when lid is closed".

Steps to Reproduce

Just shut the lid and open it either right away or after a couple of seconds and it'll go right back to the desktop.

Screenshot from 2021-05-21 16-50-58@2x

davidmhewitt commented 3 years ago

I would guess that there is a driver/compatibility issue that means the lid switch in your laptop hasn't been detected, you could try the following to test:

  1. Install libinput-tools (sudo apt install libinput-tools)
  2. Run sudo libinput debug-events
  3. Close the laptop lid
  4. Wait a few seconds
  5. Open the laptop lid
  6. CTRL+C to quit libinput
  7. Look for some lines like this:
-event0   SWITCH_TOGGLE    +0.000s  switch lid state 1
 event0   SWITCH_TOGGLE    +4.105s  switch lid state 0

I get those lines on my laptop because the OS can detect the lid being closed and opened. If this doesn't happen on your laptop, it's a driver/kernel issue and there's nothing that we can do about it in elementary as we use the Ubuntu kernel and driver stack.

KarkanAlzwayed commented 3 years ago

@davidmhewitt I have tried it twice. The first time, I got nothing, then the second time, I did get those two lines, but the laptop still didn't suspend after I closed the lid for about 20+ seconds, but I still saw those two lines. See screenshot, please. Also, if you could tell me the name of the driver (if it is downloadable), I would appreciate it. Screenshot from 2021-05-22 16-00-08@2x

davidmhewitt commented 3 years ago

Does manually putting the laptop to sleep from the power indicator in the panel work?

KarkanAlzwayed commented 3 years ago

@davidmhewitt yessir. The power menu, too.

stradicat commented 2 years ago

The equivalent Ubuntu and Kubuntu installations do not exhibit this behaviour, as I've tested during the past couple of days, if this tip helps.