Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: How to make lidclose suspend?

  1. #1

    Default How to make lidclose suspend?

    Hello

    I have installed openSUSE Tumbleweed with Gnome 3.26.2 (Xorg) on a Samsung series 5 laptop with a "AMD® A6-4455m apu with radeon(tm) hd graphics" chip".

    I would think that the intended behavior for closing the lid would be suspending, but it doesn't. I have it set in the Gnome settings, but it still doesn't work. The screen powers off, but it instantly turns on when it is reopened, and I'm still logged in and everything.
    It does work when I suspend manually (ie. search for it in the overview or hold the "alt" key while pressing the "power-off button" from the top right drop down menu).

    I was previously running KDE neon where it worked out of the box, so I suppose it should be possible.

    Anyone else had this problem or know a fix?

    Thanks,
    rtbj

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,298
    Blog Entries
    15

    Default Re: How to make lidclose suspend?

    Hi
    Settings as in via the gnome-tweak-tool -> Power, or via System Settings -> Power?

    Nothing changed manually in /etc/systemd/logind.conf (#HandleLidSwitch=suspend)
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Default Re: How to make lidclose suspend?

    Hello!

    It's on in both in the tweak-tool and the normal system settings.

    I tried uncommenting that line, restarting and test it but it still didn't work. Should I do something else than just reboot to get it to work? (And i "re-commented" that line again, since it didn't work).

    Thanks

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,298
    Blog Entries
    15

    Default Re: How to make lidclose suspend?

    Hi
    The system is not in a dock or similar is it?

    I would unrem that and also HandleSuspendKey and reboot and see if that helps..
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5

    Default Re: How to make lidclose suspend?

    No dock or anything, I haven't even had it plugged into anything with hdmi.
    Sadly that didn't work either

    Thanks though

  6. #6
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,007
    Blog Entries
    1

    Default Re: How to make lidclose suspend?

    Run the following command to see whether some other daemon is handling the lid-switch events...
    Code:
    systemd-inhibit --list --mode=block
    This will probably confirm that a Gnome utility is preventing the suspend action.

    This may be relevant to your situation....
    https://github.com/systemd/systemd/issues/7137

    For reference, I'm using Leap 42.3 with Plasma 5 desktop, and I get...
    Code:
    ~> systemd-inhibit --list --mode=block
         Who: PowerDevil (UID 1000/dean, PID 1514/org_kde_powerde)
        What: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
         Why: KDE handles power events
        Mode: block
    
    1 inhibitors listed.
    Last edited by deano_ferrari; 26-Nov-2017 at 17:38.

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,298
    Blog Entries
    15

    Default Re: How to make lidclose suspend?

    Quote Originally Posted by deano_ferrari View Post
    Run the following command to see whether some other daemon is handling the lid-switch events...
    Code:
    systemd-inhibit --list --mode=block
    This will probably confirm that a Gnome utility is preventing the suspend action.

    This may be relevant to your situation....
    https://github.com/systemd/systemd/issues/7137

    For reference, I'm using Leap 42.3 with Plasma 5 desktop, and I get...
    Code:
    ~> systemd-inhibit --list --mode=block
         Who: PowerDevil (UID 1000/dean, PID 1514/org_kde_powerde)
        What: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
         Why: KDE handles power events
        Mode: block
    
    1 inhibitors listed.
    Hi
    I see the following, but I explicitly disable the lid switch event (ignore) via logind.conf...

    Code:
     systemd-inhibit --list --mode=block
         Who: me (UID 1000/me, PID 1966/gsd-media-keys)
        What: handle-power-key:handle-suspend-key:handle-hibernate-key
         Why: GNOME handling keypresses
        Mode: block
    
    1 inhibitors listed.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  8. #8
    Join Date
    Sep 2012
    Posts
    4,943

    Default Re: How to make lidclose suspend?

    Quote Originally Posted by deano_ferrari View Post
    Run the following command to see whether some other daemon is handling the lid-switch events...
    ... and "loginctl show-session" to see whether it is handled by systemd-logind itself.

  9. #9
    Join Date
    Sep 2012
    Posts
    4,943

    Default Re: How to make lidclose suspend?

    Quote Originally Posted by rtbj View Post
    The screen powers off, but it instantly turns on when it is reopened, and I'm still logged in and everything.
    That's exactly what I expect to happen on suspend so I'm still unsure what does not work (or why you think system is not suspended).

  10. #10

    Default Re: How to make lidclose suspend?

    Okay so I tried running the commands you gave me, and I got the following results, which actually differs from yours!:

    "systemd-inhibit --list --mode=block" gave (Both with the stuff commented and un-commented from the previous reply):
    Code:
         
    Who: gdm (UID 464/gdm, PID 1739/gsd-media-keys)
        What: handle-power-key:handle-suspend-key:handle-hibernate-key
         Why: GNOME handling keypresses
        Mode: block
    
         Who: me (UID 1000/me, PID 2366/gsd-media-keys)
        What: handle-power-key:handle-suspend-key:handle-hibernate-key
         Why: GNOME handling keypresses
        Mode: block
    
    2 inhibitors listed.
    "loginctl show-session" gave:
    Code:
    EnableWallMessages=no
    NAutoVTs=6
    KillUserProcesses=no
    RebootToFirmwareSetup=no
    IdleHint=no
    IdleSinceHint=0
    IdleSinceHintMonotonic=0
    BlockInhibited=handle-power-key:handle-suspend-key:handle-hibernate-key
    DelayInhibited=shutdown:sleep
    InhibitDelayMaxUSec=5s
    HandlePowerKey=poweroff
    HandleSuspendKey=suspend
    HandleHibernateKey=hibernate
    HandleLidSwitch=suspend
    HandleLidSwitchDocked=ignore
    HoldoffTimeoutUSec=30s
    IdleAction=ignore
    IdleActionUSec=30min
    PreparingForShutdown=no
    PreparingForSleep=no
    Docked=no
    RemoveIPC=yes
    RuntimeDirectorySize=781475840
    InhibitorsMax=8192
    NCurrentInhibitors=9
    SessionsMax=8192
    NCurrentSessions=2
    UserTasksMax=10813
    I'm not really sure what I'm looking for here, but I really appreciate your help!

    Quote Originally Posted by arvidjaar View Post
    That's exactly what I expect to happen on suspend so I'm still unsure what does not work (or why you think system is not suspended).
    I would expect it to suspend to RAM or the disk (ie. not only the screen should power off, the fans and the disk etc. should too, and it should log me out so that I'm greeted with the gdm login screen when I open it/power it back on. That's what I would consider normal and also what I have seen from some other distros at least.)

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •