Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-05-20 11:12:57

gusgorman
Member
Registered: 2020-05-20
Posts: 4

Stop Power Manager switching off extra display when lid is closed

Hello!

I've just installed Manjaro Linux with XFCE on my laptop. If I'm at home I tend to plug a monitor, keyboard and mouse in and shut the laptop lid. When I've used XFCE before this hasn't been a problem, but Power Manager doesn't seem to provide an option to make this possible.

I haven't had this problem before (on Slackware 14.1 and current) - but I'm guessing Power Manager wasn't installed then.

Am I missing something? Or do I just need to uninstall the Power Manager?

Thanks!

Offline

#2 2020-05-24 20:14:48

alcornoqui
Member
Registered: 2014-07-28
Posts: 831

Re: Stop Power Manager switching off extra display when lid is closed

Hello and welcome to the forum, sorry for the late response!

There's a profiles feature in the Display Settings app:

https://docs.xfce.org/xfce/xfce4-settin … y#advanced

I think you can get what you want with it.

Offline

#3 2020-05-26 08:43:10

gusgorman
Member
Registered: 2020-05-20
Posts: 4

Re: Stop Power Manager switching off extra display when lid is closed

alcornoqui wrote:

Hello and welcome to the forum, sorry for the late response!

There's a profiles feature in the Display Settings app:

https://docs.xfce.org/xfce/xfce4-settin … y#advanced

I think you can get what you want with it.

Hello! Thankyou.

I've tried that and unfortunately I've still got a problem. Tbh I'm seeing slightly inconsistent behaviour. Closing the laptop either:

1) Disables the external monitor meaning that I have to leave the laptop lid up even if I am not using it....... or
2) Locks the session meaning that I have to log in again - which isn't so bad, but not really what I want.

I spent some time this morning trying to recreate both scenarios so I could report on them accurately, but unfortunately could only create the first scenario.

I have another laptop packed away with an older version of XFCE on it that didn't have this problem.

Offline

#4 2020-05-26 11:01:22

alcornoqui
Member
Registered: 2014-07-28
Posts: 831

Re: Stop Power Manager switching off extra display when lid is closed

I see. I don't have a external monitor to test right now (and I myself struggle with this stuff), but given some references, it may be related to the /etc/systemd/logind.conf file and the setting logind-handle-lid-switch, so, you might post the relevant content of logind.conf, and the Power Manager lid settings with these commands:

xfconf-query -c xfce4-power-manager -l -v | grep -i lid

cat /etc/systemd/logind.conf | grep -i lid

Plus the version of Xfce Power Manager:

xfce4-power-manager -V

And see if you make sense of it (or more experienced fellows can help).

Good luck!

Offline

#5 2020-05-26 14:59:14

gusgorman
Member
Registered: 2020-05-20
Posts: 4

Re: Stop Power Manager switching off extra display when lid is closed

[jordan@worrell ~]$ xfconf-query -c xfce4-power-manager -l -v | grep -i lid
/xfce4-power-manager/lid-action-on-ac                   4
/xfce4-power-manager/lid-action-on-battery              0
/xfce4-power-manager/logind-handle-lid-switch           false

[jordan@worrell ~]$ cat /etc/systemd/logind.conf | grep -i lid
#HandleLidSwitch=suspend
#HandleLidSwitchExternalPower=suspend
#HandleLidSwitchDocked=ignore
#LidSwitchIgnoreInhibited=yes

[jordan@worrell ~]$ xfce4-power-manager -V

Xfce Power Manager 1.6.6

Offline

#6 2020-05-26 16:56:39

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: Stop Power Manager switching off extra display when lid is closed

Is your laptop plugged in or on battery when plug in the external monitor? For your output above, you have a different setting for when on ac than when on battery (0 means do nothing or blank screen and not sure what 4 is for - my options only go to 3, but I'm using a newer version).

What options are available to you when setting a lid action?

You could try changing logind-handle-lid-switch to true and then in logind.conf, change (and uncomment) "#HandleLidSwitch=suspend" to "HandleLidSwitch=ignore", and restart to test.


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

#7 2020-05-26 19:12:30

gusgorman
Member
Registered: 2020-05-20
Posts: 4

Re: Stop Power Manager switching off extra display when lid is closed

ToZ wrote:

Is your laptop plugged in or on battery when plug in the external monitor? For your output above, you have a different setting for when on ac than when on battery (0 means do nothing or blank screen and not sure what 4 is for - my options only go to 3, but I'm using a newer version).

What options are available to you when setting a lid action?

You could try changing logind-handle-lid-switch to true and then in logind.conf, change (and uncomment) "#HandleLidSwitch=suspend" to "HandleLidSwitch=ignore", and restart to test.

This is confusing. In the Power Manager GUI I have the same options selected for both "On battery" and "Plugged In".. and tbh I think 0 means "Switch off Display" because I don't have an option to "Do nothing". I guess thats the problem! smile I want an option to "do nothing" and it doesn't exist.  I have "Switch off Display" selected for both.

The options available to me are:

- Switch off display
- Suspend
- Hibernate
- Lock Screen

FWIW when I use the laptop with an external monitor I almost always plug it in to the mains.

I'll try your suggestions later when I've got a moment..

Thanks!

Offline

#8 2020-05-26 19:59:46

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

Re: Stop Power Manager switching off extra display when lid is closed

Two ideas: You could try to use "presentation mode" or under power manager>>diplay turn off display power management. I don't know if this will affect a second display or not.


Siduction
Debian Sid
Xfce 4.18

Offline

#9 2020-09-18 09:33:52

spudger
Member
Registered: 2020-09-18
Posts: 2

Re: Stop Power Manager switching off extra display when lid is closed

I have the same experience. Manjaro with XFCE and I want to connect an external monitor and close the laptop(lenovo x1 carbon 8th gen) lid and work purely on the external monitor so I want the laptop screen to switch of but external to stay on. I can't see an option anywhere to achieve this.

I've tried changing settings in /etc/systemd/logind.conf and /etc/UPower/UPower.conf without success...In fact I don't want to fully ignore the lid close but rather turn off the laptop screen and make the external monitor my primary screen but can't identify where or how this is possible.

Thanks

Offline

#10 2020-09-18 12:07:29

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: Stop Power Manager switching off extra display when lid is closed

Exactly what version of xfce4-power-manager do you have?

xfce4-power-manager -V

What is the current contents of /etc/systemd/logind.conf?

Before you close the lid, how are your displays configured (mirrored, extended, etc)?
Are you expecting the laptop screen to blank or be disabled?

And what does the following return?

xfconf-query -c xfce4-power-manager -lv

I'm running arch and it works fine here.


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

#11 2020-09-18 14:30:08

spudger
Member
Registered: 2020-09-18
Posts: 2

Re: Stop Power Manager switching off extra display when lid is closed

Version:

Xfce Power Manager 1.6.6

Part of the Xfce Goodies Project
http://goodies.xfce.org

Licensed under the GNU GPL

contents of /etc/systemd/logind.conf:

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
LidSwitchIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodes=400k
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192

Ideal behaviour would be that I connect external monitor with laptop open I have screens side by side and when lid closed (and on charger) external monitor becomes primary and laptop doesn't suspend or stop.

I have achieved more or less what I want using display profiles by disabling the laptop monitor, changing primary monitor when external monitor is connected but only if laptop lid is left open.

I still want laptop to suspend when not connected to external monitor/charger (USB-C means both) so completely ignoring laptop lid is not very desirable.

Thanks

Offline

#12 2020-09-18 23:12:38

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: Stop Power Manager switching off extra display when lid is closed

I don't think xfce4-power-manager is able to give you this fine control. It can manage display profiles but if you want conditional suspend behaviour based on the existence of external monitor, you may need to do something with udev. Thinking out loud, some thing like when an external monitor is connected, then presentation mode is enabled, and when disconnected, presentation mode is disabled.


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

#13 2022-10-10 09:25:14

xfce-amateur
Member
Registered: 2021-06-23
Posts: 11

Re: Stop Power Manager switching off extra display when lid is closed

Old topic, but perhaps it's worth recording here that the option "switch off display" works for me. The external monitor stays on, no presentation mode required.

~ $ xfconf-query -c xfce4-power-manager -lv | grep -i lid
/xfce4-power-manager/lid-action-on-ac                   0
/xfce4-power-manager/lid-action-on-battery              1
/xfce4-power-manager/logind-handle-lid-switch           false

~ $ xfce4-power-manager -V

Xfce Power Manager 4.16.0

Last edited by xfce-amateur (2022-10-10 09:25:41)

Offline

#14 2022-11-03 19:26:13

psi-jack
Member
Registered: 2022-11-03
Posts: 1

Re: Stop Power Manager switching off extra display when lid is closed

I'm actually having a similar issue to this. My configuration matches that of xfce-amateur's, with the xfconf-query, and that of gusgorman's for the logind.conf.

When I run GDM (43.0 currently), and close the laptop lid, the internal laptop display remains active and does not become inactive thus it doesn't switch display profiles either.
When I run light-locker, it locks the screen up and doesn't allow me to unlock it until I open it up and manually unlock it there.

I'd been on GNOME quite a few years since 3.x, and I'd grown accustomed to being able to dynamically change displays around when doing things like docking and closing my laptop to an external screen. And, when GNOME 42 provided major issues with DisplayPort/Multi-Monitor, I'd come back to Xfce for a while and it didn't have these problems... But it does have this issue where multi-monitor changing situations aren't as fluid and dynamic as one might hope, especially in a laptop specifically.

I can use Ctrl+Alt+P to change display profiles, no problem, but this is an extra step I'd prefer not to have to make.

Offline

#15 2022-11-03 20:31:43

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: Stop Power Manager switching off extra display when lid is closed

@psi-jack, what version of Xfce are you using?

Generally speaking, screensavers place their dialogs on the primary screen. In Xfce's display section, you can specify primary screens and use display profiles to more finely tune multi-monitor configurations. Also, light-locker is a third party screen locker - Xfce has it's own screen locker called "xfce4-screensaver". You might want to give that a try to see if it works better (its a fork of gnome-screensaver).

If you can isolate a specific multi-monitor issue, creating a bug report is probably the best way forward.

BTW, welcome to the forum.


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

#16 2022-11-20 18:56:53

krvkir
Member
Registered: 2020-05-24
Posts: 4

Re: Stop Power Manager switching off extra display when lid is closed

Reporting the same problem as psi-jack, with the same config as xfce-amateur. I have a laptop and an external monitor, and when I close the lid, the external monitor fades and the screen locks, despite settings.

Offline

#17 2022-11-20 20:29:30

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: Stop Power Manager switching off extra display when lid is closed

--snip--

Sorry, my original reply related to power management.

Which screen locking tool are you using?

Last edited by ToZ (2022-11-20 20:31:12)


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

#18 2023-03-11 13:44:40

giuseppe
Member
Registered: 2023-03-11
Posts: 1

Re: Stop Power Manager switching off extra display when lid is closed

Here is how I addressed this issue:
1) Uninstalled the xfce power manager . 
2)  Updated the logind config file /etc/systemd/logind.conf 
Setting the following items:

HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore

Offline

#19 2023-03-11 14:15:14

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: Stop Power Manager switching off extra display when lid is closed

giuseppe wrote:

Here is how I addressed this issue:
1) Uninstalled the xfce power manager . 
2)  Updated the logind config file /etc/systemd/logind.conf 
Setting the following items:

HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore

Out of curiosity, what is the result of:

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch

If set to true, the power manager should bypass lid handling and leave it to systemd. It would be interesting if you could test with xfce4-power-manager installed and running and that key above set to true to see if it also works.

Reference: https://docs.xfce.org/xfce/xfce4-power- … er-manager


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

Board footer

Powered by FluxBB