You are not logged in.

#1 2016-08-16 20:41:43

ali_molaei
Member
From: Iran
Registered: 2015-12-24
Posts: 63
Website

[SOLVED] Xfce - PowerManager - Sleep on AC

I set "Laptop Lid" option for "On Battery" to "Lock Screen" and "Plugged In" to "Switch off display"
when i close laptop on battery it goes to sleep and when open it, it show lockscreen and it is ok
when i close laptop plugged in it goes to sleep (and i dont want it) and when open it, it is not showinf lockscreen and it is ok

I found a solution to uncomment and edit this file:

/etc/systemd/logind.conf

HandleLidSwitch=ignore

but it couse no sleep on battery too! i want sleep on battery but no sleep when plugged in, is there any other way?

here is a bug report that i looked at and think it is the same problem:
https://bugs.launchpad.net/ubuntu/+sour … ug/1307545

Last edited by ali_molaei (2016-08-22 20:51:29)

Offline

#2 2016-08-17 15:12:55

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: [SOLVED] Xfce - PowerManager - Sleep on AC

Offline

#3 2016-08-17 20:30:16

ali_molaei
Member
From: Iran
Registered: 2015-12-24
Posts: 63
Website

Re: [SOLVED] Xfce - PowerManager - Sleep on AC

logind-handle-lid-switch is already false in ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml

here is my config

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

<channel name="xfce4-power-manager" version="1.0">
  <property name="xfce4-power-manager" type="empty">
    <property name="brightness-switch-restore-on-exit" type="int" value="0"/>
    <property name="brightness-switch" type="int" value="0"/>
    <property name="critical-power-action" type="uint" value="3"/>
    <property name="lid-action-on-ac" type="uint" value="0"/>
    <property name="logind-handle-lid-switch" type="bool" value="false"/>
    <property name="critical-power-level" type="uint" value="5"/>
    <property name="inactivity-sleep-mode-on-ac" type="int" value="0"/>
    <property name="dpms-enabled" type="bool" value="true"/>
    <property name="lid-action-on-battery" type="uint" value="3"/>
    <property name="blank-on-ac" type="int" value="5"/>
    <property name="dpms-on-ac-sleep" type="uint" value="0"/>
    <property name="dpms-on-ac-off" type="uint" value="10"/>
    <property name="dpms-on-battery-off" type="uint" value="10"/>
    <property name="inactivity-on-battery" type="uint" value="14"/>
    <property name="inactivity-sleep-mode-on-battery" type="uint" value="1"/>
    <property name="lock-screen-suspend-hibernate" type="bool" value="false"/>
  </property>
</channel>

Offline

#4 2016-08-18 11:31:16

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: [SOLVED] Xfce - PowerManager - Sleep on AC

That's odd. If logind-handle-lid-switch is false then what you do to logind.conf shouldn't have an effect. Are you certain the xfce4-power-manager is running?

pgrep xfce4-power-manager

should return a pid if it is.

Offline

#5 2016-08-19 09:47:42

ali_molaei
Member
From: Iran
Registered: 2015-12-24
Posts: 63
Website

Re: [SOLVED] Xfce - PowerManager - Sleep on AC

Chazza wrote:

That's odd. If logind-handle-lid-switch is false then what you do to logind.conf shouldn't have an effect. Are you certain the xfce4-power-manager is running?

pgrep xfce4-power-manager

should return a pid if it is.

there is no xfce4-power-manager running but it is xfce4-power-man!

pgrep xfce4-power-man
657

Offline

#6 2016-08-22 20:50:50

ali_molaei
Member
From: Iran
Registered: 2015-12-24
Posts: 63
Website

Re: [SOLVED] Xfce - PowerManager - Sleep on AC

Uncommenting and changing this line in /etc/systemd/logind.conf solved my problem

LidSwitchIgnoreInhibited=no

Offline

Board footer

Powered by FluxBB