Skip to content
Snippets Groups Projects
Harald Judt's avatar
Harald Judt authored
On most machines, especially those using the video module backlight, the kernel
will already have hooked up the brightness keys. If the user wants to use
xfce4-power-manager to control the keys, then we need to disable this module
setting to avoid conflicts like brightness lowered or raised twice on key
presses.

Of course, it would be nice if the power manager restored the original setting
when it gives control back to the kernel or on exit. To be able to do this,
it needs to remember the value.

It is best to do this in a xfconf setting so it survives crashes. This way,
power manager has a chance of restoring the original setting even after a
crash, so that the user will not have to fix it manually.

There are three possible settings, read from
/sys/module/video/parameters/brightness_switch_enabled:

 1 = kernel brightness switch setting is enabled (value 'Y')
 0 = kernel brightness switch setting is disabled (value 'N')
-1 = kernel brightness switch unavailable or could not be read
3b82d843
History
Name Last commit Last update