Xfce Forum

Sub domains
 

You are not logged in.

#1 2014-04-19 00:49:23

maximiliankaul
Member
Registered: 2014-04-19
Posts: 2

xfce4-power-manager backlicht control

Hi Forum,

I have a question regarding the xfce4-power-manager.
I'm running a ArchLinux x64 3.14.1 box and xfce4-power-manager 1.2.0-6 (xfce4).

Is there any way to tell the power manager which backlight driver to use?

[user@host ~]$ ls /sys/class/backlight/
acpi_video0  intel_backlight  mba6x_backlight

In my case, I need xfce to use mba6x_backlight. I configured X11 to use this as my backlight driver:

[user@host ~]$ cat /etc/X11/xorg.conf.d/20-intel.conf 
Section "Device"
	Identifier "Intel Graphics"
	Driver "intel"
	Option "AccelMethod" "sna"
	#Option "AccelMethod" "uxa"
	#Option "AccelMethod" "glamor"
	Option "Backlight" "mba6x_backlight"
EndSection

If that is not possible then maybe someone can help me with this:
Is there any way to disable the backlight hotkey? I tried (last property)

[user@host ~]$ cat ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml 
<?xml version="1.0" encoding="UTF-8"?>

<channel name="xfce4-power-manager" version="1.0">
  <property name="xfce4-power-manager" type="empty">
    <property name="show-tray-icon" type="uint" value="3"/>
    <property name="power-button-action" type="uint" value="3"/>
    <property name="critical-power-action" type="uint" value="0"/>
    <property name="lid-action-on-battery" type="uint" value="1"/>
    <property name="power-save-on-battery" type="bool" value="false"/>
    <property name="dpms-enabled" type="bool" value="true"/>
    <property name="general-notification" type="bool" value="true"/>
    <property name="inactivity-sleep-mode" type="string" value="Suspend"/>
    <property name="lid-action-on-ac" type="uint" value="1"/>
    <property name="lock-screen-suspend-hibernate" type="bool" value="false"/>
    <property name="inactivity-on-ac" type="uint" value="15"/>
    <property name="inactivity-on-battery" type="uint" value="15"/>
    <property name="brightness-level-on-battery" type="uint" value="10"/>
    <property name="change-brightness-on-key-events" type="bool" value="false"/>
  </property>
</channel>

I do have a little shell script that can handle my backlight control, but I can not assign the display keys to my script:

...
[user@host ~]$ cat ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml | grep XF86MonBrightness
      <property name="XF86MonBrightnessDown" type="string" value="/usr/local/bin/hotkeyscript.sh disp dec"/>
      <property name="XF86MonBrightnessUp" type="string" value="/usr/local/bin/hotkeyscript.sh disp inc"/>
...

If I press the XF86MonBrightnessDown/Up I always get a backlight icon but my script is not executed. I guess this is because xfce4-power-manager handels the keys and therefor overrides my settings in xfce4-keyboard-shortcuts.xml

Please let me know if you need any additional information.
Thank you for you help.

Offline

#2 2014-04-19 01:09:41

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 1,136

Re: xfce4-power-manager backlicht control

Is this the mba6x_bl module that you are using?

Not an Xfce solution, but have you tried the video.use_native_backlight=1 kernel parameter? It should remove the acpi_video0 interface leaving the other two - perhaps giving you some more luck with the 20intel.conf configuration.

As for xfce4-power-manager, from http://git.xfce.org/xfce/xfce4-power-ma … t-helper.c:

/* available kernel interfaces in priority order */
    static const gchar *backlight_interfaces[] = {
        "nv_backlight",
        "asus_laptop",
        "toshiba",
        "eeepc",
        "thinkpad_screen",
        "acpi_video1",
        "mbp_backlight",
        "acpi_video0",
        "fujitsu-laptop",
        "sony",
        "samsung",
        NULL,
    };

...doesn't look like that interface is officially supported (added?). You could either try adding it and rebuilding xfce4-power-manager yourself, or create a bug report to have it added.

Offline

#3 2014-04-21 04:24:36

maximiliankaul
Member
Registered: 2014-04-19
Posts: 2

Re: xfce4-power-manager backlicht control

Hey ToZ,
thanks for your reply.

ToZ wrote:

Is this the mba6x_bl module that you are using?

user@host ~ $ lsmod | grep _bl
apple_bl                3736  0 
mba6x_bl                3680  0

I use https://github.com/patjak/mba6x_bl via https://aur.archlinux.org/packages/mba6x_bl-dkms
So I guess the answer is yes.

ToZ wrote:

Not an Xfce solution, but have you tried the video.use_native_backlight=1 kernel parameter? It should remove the acpi_video0 interface leaving the other two - perhaps giving you some more luck with the 20intel.conf configuration.

As for xfce4-power-manager, from http://git.xfce.org/xfce/xfce4-power-ma … t-helper.c:

/* available kernel interfaces in priority order */
    static const gchar *backlight_interfaces[] = {
        "nv_backlight",
        "asus_laptop",
        "toshiba",
        "eeepc",
        "thinkpad_screen",
        "acpi_video1",
        "mbp_backlight",
        "acpi_video0",
        "fujitsu-laptop",
        "sony",
        "samsung",
        NULL,
    };

...doesn't look like that interface is officially supported (added?). You could either try adding it and rebuilding xfce4-power-manager yourself, or create a bug report to have it added.

I tried that. Inserted "mba6x_bl" before "nv_backlight" and successfully compiled and installed but no change.
Shouldn't the line

<property name="change-brightness-on-key-events" type="bool" value="false"/>

deactivate the backlight control via hotkey completely? If that's the case, I will file a bug report. This would solve my problem to a level I could live with wink

Offline

#4 2014-04-21 13:26:52

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 1,136

Re: xfce4-power-manager backlicht control

maximiliankaul wrote:

Shouldn't the line

<property name="change-brightness-on-key-events" type="bool" value="false"/>

deactivate the backlight control via hotkey completely? If that's the case, I will file a bug report. This would solve my problem to a level I could live with wink

Unless brightness is controlled at the bios level and Xfce doesn't have access to it (came across this on an old toshiba laptop). Is there a setting in your bios that allows you to disable brightness control?

Offline

Board footer

Powered by FluxBB