In the beginning i thought it was KDE's fault (4.2.x), because I tried openSuse milestone 6 (KDE 4.3.0) and they worked. Unfortunately after I updated Fedora 11 to KDE 4.3 today, keys still didn't work. So ... it's not KDE I guess....

Chuck Norris can clap with one hand.
Chuck Norris can judge a book by its cover.
Chuck Norris can divide by zero.
When Chuck Norris does push-ups, he doesn’t push himself up. He pushes the Earth down.
....../\___/\......
...../---------\.....
..../--.\---/.--\....
....\\---|--|--//....
......\---(o)--/........
............U............. "Woof-Moo!"

Today I was trying to fix Fn keys to adjust brightness. I could regulate brightness in PowerDevil in KDE and also in power manager in gnome, but Fn+F8 and Fn+F9 keys did not work.

I came up with a work around. It is not completely satisfactory, because in KDE I was not able to assign the Fn keys, I am using Alt+F8 and Alt+F9 instead (Gnome does allow to assign Fn keys).
Maybe some of you will find it useful.

Save the following in a file, e.g. brightness_up (make sure that that long line does not get split up)

BlueC: adding nomodeset does not change anything for me. The keys behave just the same.

My laptop is Fujitsu Siemens Esprimo Mobile V6505, running Fedora 11 with kernel 2.6.30.5-43.fc11.x86_64. In fact some of Fn keys do work, like volume control or sleep, but not brightness keys. Or, to be more precise, in KDE the brightness keys do not work at all, and in Gnome only one of them works - Fn+F8 but it puts the brightness up (instead of down). Fn+F9 is simply reported as plusminus. I did try to fool around with xmodmap and evdev, but I did not get anywhere. That is why I gave that roundabout solution. I hope it should be more universal than just for my specific laptop. But I would like to know how to do it in a more proper way.

I was delighted to see that in KDE 4 systemsettings/Regional and language/keyboard layout, finally, Dell Latitude series was listed. But it doesn't seem to include the brightness keys. The brightness is readable now, but not adjustable like in Gnome.

My guess is that your maximal brightness level is smaller than 15 (my one is 15, that is why it is in the script as max_brightness). I get the same error message if I run dbus-send command from the command line with parameter larger than 15.

Also, try also the same, but replacing the last 0 with some other (fairly small) positive integers. If it works (brightness chages) then the scripts should work for you. You only have to modify the brightness_up script and change the line

Code:

max_brightness=15

change 15 to your maximal brightness. On my computer it is given in
/sys/class/backlight/acpi_video0/max_brightness.

Strange that this did not work if 8 is really the max brightness (are you sure it is not 7? max_brightness 8 would give you 9 brightness levels 0,1,2,...,8 ). Have you tried with other numbers between 0 and 8?

Quote:

I then modified the script, changing '15' to '8' and got the following:

method return sender=:1.2 -> dest=:1.72 reply_serial=2
int32 0

is that Good?

Yes, this sounds good! Did you notice the change of the brightness of the screen? It might not be very noticeable because it changes by just one level. If you want to do some more testing before assigning the shortcut keys then simply run the scripts from the terminal - several times (at least 8) brightness_down and then the same for brightness_up, maybe brightness_down again. You should see something similar to

Quote:

method return sender=:1.2 -> dest=:1.72 reply_serial=2
int32 0

when the brightness gets changed by 1 level, or nothing at all if you run brightness_up and the brightness is already at max_brightness level, also nothing if you run brigntness_down if brightness is at minimal level 0. If there are no error messages and brightness gets adjusted then it is time to assign the shortcut keys.

when the brightness gets changed by 1 level, or nothing at all if you run brightness_up and the brightness is already at max_brightness level, also nothing if you run brigntness_down if brightness is at minimal level 0. If there are no error messages and brightness gets adjusted then it is time to assign the shortcut keys.

]

What I dont understand is why Fn+Up/Fn+Down works FINE with Gnome but not with KDE4...?

Last edited by Quasaur; 30th September 2009 at 05:34 PM.
Reason: correction