On 10/04/2018 04:59 AM, Ivan Mitev wrote:


On 10/4/18 11:10 AM, 'Mads R. Havmand' via qubes-users wrote:
I'm scratching my head over this... How are people configuring their QubeOS 4 
instances to enable and disable external monitors based on the laptops lid 
status?

I've been through this too - see below.

Current laptop (EliteBook 1040 g2) works flawlessly with Qubes (even 
suspend...) and my only current issue is that I have to manually enable and 
disable screens when I dock the machine.

I too manually enable/disable screens but I have configured a keyboard
shortcut that runs a custom shell script with xrandr commands based on
the presence - or lack thereof - of my external monitor.
All it takes is to dock the laptop and hit the shortcut - lightning fast.

Normally, I'd use ACPI hooks and I'm guessing this needs to be done in dom0 (I 
don't suppose any DomU's have access to reconfigure screens?) but acpid isn't 
available om dom0.

Yes this needs to be done in dom0.

On moderm distros systemd handles lid events provided no other
application has inhibited ("overridden") the event. See `man logind.conf`.

In the case of Qubes, Xfce's power manager overrides HandleLidSwitch=
(but not HandleLidSwitchedDocked=). There's an option in xfce power
manager to turn the display off when the lid is closed but it won't be
able to differentiate when the laptop's docked or not so it's useless.

IIRC there are a few ways to run a script based on lid events without
resorting to installing acpid (which is not even guaranteed to work):
eg. listening for dbus lid close/open events, monitoring
/proc/acpi/button/lid/LID/state, ... ; An alternative is to run stuff on
dock/undock events, via dbus and/or udev rules.

In the end my hacky keyboard shortcut "solution" worked well enough that
I didn't spend time to investigate the solutions above...


What would you recommend? I guess a possible solution could be to source an 
acpid RPM, or find the source code, and install that manually in dom0?


This is one of several problems I resolved by simply switching back to KDE. Xfce had too many bugs and omissions for me.
https://www.qubes-os.org/doc/kde/


--

Chris Laprise, [email protected]
https://github.com/tasket
https://twitter.com/ttaskett
PGP: BEE2 20C5 356E 764A 73EB  4AB3 1DC4 D106 F07F 1886

--
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/03ce78ce-ce8d-3ab6-7931-a122bdb78b5a%40posteo.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to