Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-06-21 08:14:57

aledoctors
Member
Registered: 2020-06-21
Posts: 3

(SOLVED) Lid action dont work

Hi, folks, I'm here because I can't change the lid action. Where can I edit so that when I close the lid the laptop shuts down?
Thank you for your time.
Excuse my English, but it's not mine. its https://www.deepl.com/es/translator

Last edited by aledoctors (2020-06-21 19:49:14)

Offline

#2 2020-06-21 10:47:50

eriefisher
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 531

Re: (SOLVED) Lid action dont work

Under Settings>>Power Manager>>General Tab there are some options for when the lid closes but not shutdown. Switch of display, suspend, hibernate and lock screen are the options. Both on battery and A/C.


Siduction
Debian Sid
Xfce 4.18

Offline

#3 2020-06-21 13:09:07

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: (SOLVED) Lid action dont work

Assuming systemd, you can let logind handle lid events.

Logind allows you to set "poweroff" as one of the lid options.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#4 2020-06-21 16:40:58

aledoctors
Member
Registered: 2020-06-21
Posts: 3

Re: (SOLVED) Lid action dont work

Thank you for your ideas and time.
Eriefisher: That's right, but it doesn't appear to be off.
ToZ: I don't know what mistake I'm making. I'll show you what I have if you give me any ideas, or you find my mistake.

logind.conf

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See logind.conf(5) for details.

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
HandleSuspendKey=ignore
HandleHibernateKey=ignore
HandleLidSwitch=shutdown -h now
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#UserTasksMax=33%

xfce4-power-manager.xml

<?xml version="1.0" encoding="UTF-8"?>

<channel name="xfce4-power-manager" version="1.0">
  <property name="xfce4-power-manager" type="empty">
    <property name="power-button-action" type="uint" value="4"/>
    <property name="sleep-button-action" type="uint" value="3"/>
    <property name="hibernate-button-action" type="uint" value="3"/>
    <property name="brightness-switch-restore-on-exit" type="int" value="0"/>
    <property name="brightness-switch" type="int" value="0"/>
    <property name="lid-action-on-battery" type="uint" value="1"/>
    <property name="lid-action-on-ac" type="uint" value="1"/>
    <property name="logind-handle-lid-switch" type="bool" value="true"/>
    <property name="dpms-on-ac-sleep" type="uint" value="0"/>
    <property name="dpms-on-ac-off" type="uint" value="0"/>
    <property name="blank-on-ac" type="int" value="30"/>
    <property name="inactivity-on-ac" type="uint" value="14"/>
    <property name="general-notification" type="bool" value="true"/>
    <property name="show-tray-icon" type="bool" value="false"/>
    <property name="inactivity-sleep-mode-on-battery" type="uint" value="1"/>
    <property name="critical-power-action" type="uint" value="3"/>
    <property name="lock-screen-suspend-hibernate" type="bool" value="false"/>
    <property name="brightness-on-battery" type="uint" value="9"/>
    <property name="blank-on-battery" type="int" value="30"/>
    <property name="dpms-on-battery-sleep" type="uint" value="0"/>
    <property name="dpms-on-battery-off" type="uint" value="0"/>
    <property name="brightness-level-on-battery" type="uint" value="50"/>
    <property name="brightness-level-on-ac" type="uint" value="100"/>
    <property name="battery-button-action" type="uint" value="3"/>
  </property>
</channel>

I really can't find the mistake.
I appreciate your time trying to solve this.

Offline

#5 2020-06-21 16:58:33

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: (SOLVED) Lid action dont work

aledoctors wrote:

HandleLidSwitch=shutdown -h now

This should actually say:

HandleLidSwitch=poweroff

Test it both while plugged in and when not. If it doesn't work when plugged in, you may also need to add:

HandleLidSwitchExternalPower=poweroff

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2020-06-21 19:48:38

aledoctors
Member
Registered: 2020-06-21
Posts: 3

Re: (SOLVED) Lid action dont work

eureka!
Thank you very much ToZ.
Now he's doing what he wanted to do.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.006 seconds, 7 queries executed - Memory usage: 545.93 KiB (Peak: 546.77 KiB) ]