Page 1 of 1

backlight - enabling control with hot keys (solution)

Posted: 10 Feb 2011, 12:12
by mikebl71
Hi

I've got Samsung N140 and I am using the latest Kubuntu 10.10 (with all the voRia's extra packages).

The brightness control is working for me now using all kind of ways EXCEPT the hot keys.
If I press Fn-Up/Down, I get the pop-up with the current brightness, but it does not move and the brightness does not change.

After some googling, I found the solution and wanted to share it with you here.

* Create file "/etc/hal/fdi/information/samsung-backlight.fdi" containing (you might need to replace "N140" here with your model)

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <match key="info.category" string="laptop_panel">
      <match key="/org/freedesktop/Hal/devices/computer:system.hardware.vendor" string="SAMSUNG ELECTRONICS CO., LTD.">
         <match key="/org/freedesktop/Hal/devices/computer:system.hardware.product" string="N140">
           <merge key="laptop_panel.brightness_in_hardware" type="bool">false</merge>
        </match>
      </match>
    </match>
  </device>
</deviceinfo>
* reboot

By default, the KDE brightness control code seem to think that all the brightness control is done in hardware and it doesn't need to do anything. The above hint tells it that this is not the case and enables brightness control in software.

Re: backlight - enabling control with hot keys (solution)

Posted: 20 Feb 2011, 23:55
by mikebl71
Hi voRia,
I wonder if you could add this file to the samsung-backlight package,
so that people did not have to fix this manually.

Re: backlight - enabling control with hot keys (solution)

Posted: 22 Feb 2011, 15:48
by CaskAle13c
This is really awesome news. I have been trying to resolve this issue for some time. Unfortunately, the latest KDE 4.6 no longer uses hal. Did the site you found this offer a udev implementation?

Re: backlight - enabling control with hot keys (solution)

Posted: 23 Feb 2011, 23:20
by mikebl71
No, I haven't seen the udev variant.
And, as I am using Kubuntu Maverick, I don't have KDE 4.6 myself yet.

In KDE 4.5, the code that makes the decision is in "kdebase-workspace" package, in file "solid/hal/halpower.cpp". Judging by the name, I am afraid, it will be gone in 4.6 if it does not use HAL. But you can try to search for "brightness" in the source of this package and see if it is clear how it makes the decision. You might be lucky ;)