backlight - enabling control with hot keys (solution)

Discussions about Linux installation and configuration on Samsung laptops
Post Reply
mikebl71
Newbie
Newbie
Posts: 22
Joined: 03 Oct 2010, 20:17

backlight - enabling control with hot keys (solution)

Post 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.
mikebl71
Newbie
Newbie
Posts: 22
Joined: 03 Oct 2010, 20:17

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

Post 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.
CaskAle13c
Newbie
Newbie
Posts: 1
Joined: 15 Nov 2010, 14:23

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

Post 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?
mikebl71
Newbie
Newbie
Posts: 22
Joined: 03 Oct 2010, 20:17

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

Post 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 ;)
Post Reply