[Kde-hardware-devel] Knowing laptop lid closed action

Daniel Vrátil dvratil at redhat.com
Sun Feb 10 12:33:48 UTC 2013


On Saturday 09 of February 2013 17:06:10 Alex Fiestas wrote:
> I have the following use case, tell me what you think:
> 
> When the user closes the Lid, Kscreen will check if the laptop is connected
> to any monitor, if it is the laptop screen will be turned off and the
> external will be enabled.
> 
> This behavior is ok when your laptop does not suspend on lid close, but it
> is very annoying if the laptop suspend because you will see some changes in
> your screens that are not pleasant for the eye.

Agreed, I've noticed it myself. It's not nice.

> 
> If I could know when "lid closed does nothing" I could hook this into
> Kscreen , making the following workflow:
> 
> On lid closed:
> 	-If the lid close action is set to do nothing, adapt Kscreen configuration
> 	-If lid closed does something else, do not modify the Kscreenconfiguration

+1

> 
> If you agree that this will be good to have, next question is: What's the
> best way of knowing what laptop lid close will do?
> 
> To work from at least 4.9 I thought on:

(I'd say to "work in 4.9 and 4.10" - let's not support releases older than 
n-1).

> 	-Read values from: powermanagementprofilesrc
> 	-Monitor that file from changes

NO - config file is an implementation detail of each application - KScreen 
being a 3rd party, you cannot assume anything about presence or content of the 
file.

> 	-connect to: org.kde.Solid.PowerManagement.profileChanged

That's the way to go!

> 
> For 4.11 maybe we could add something more sophisticated build in in
> PowerDevil?
> 
> Cheers.
> _______________________________________________
> Kde-hardware-devel mailing list
> Kde-hardware-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-hardware-devel
-- 
dvratil at redhat.com | Associate Software Engineer / BaseOS / KDE, Qt
GPG Key: 0xC59D614F6F4AE348
Fingerprint: 4EC1 86E3 C54E 0B39 5FDD B5FB C59D 614F 6F4A E348
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20130210/9cb36cb1/attachment.sig>


More information about the Kde-hardware-devel mailing list