This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Can't set keyboard shortcut for screen brightness.

Tags: None
(comma "," separated)
foxbrandon
Registered Member
Posts
1
Karma
0
Hi!

I'm using an Ideapad Z580 laptop. When I change the screen brightness using the slider on the battery applet, it works just fine. When I look in system settings, my brightness hotkeys are the default keyboard shortcut to change the brightness. But when I use them, the brightness changes in tiny 1% increments. There is no notification on the screen, and the battery applet is unaware that the brightness has changed.

krunner > "dim screen by half" does not work either, but xbacklight does work.

If I use different keys for the shortcut, the problem goes away.

Do krunner, kde daemon, and the battery applet all interface with the backlight in different ways?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
It sounds like your system might be handling the brightness keys in a rather unusual way - my guess is that KDE is not even aware you are pressing the brightness keys. If you run "xev" then press the brightness keys, is anything output to the terminal where you are running xev?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
mbwd
Registered Member
Posts
12
Karma
0
I have this same issue! I am on an Asus Q501L, running Kubuntu -- but the problem was there in Ubuntu 13.10, Ubuntu Studio, and LinuxMint. I have tried the solutions posted elsewhere to edit the grub file and to turn off automatic login, to no avail.

As the Admin noted, the problem is that "KDE is not even aware you are pressing the brightness keys." In my case that is the FN+F5 and FN+F6 key presses. I have tried to identify the scancodes for these key presses using xev, getscancodes, and xbindkeys. None worked (though xbindkeys could see other FN combinatins, like FN+F4).

I searched, and the best I could determine is that if not recognized, these key are handled by the BIOS and/or ACPI.

But from there I am lost. Is there a way to fix this?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
If you are fortunate, there may be an extra kernel module you can load which will send these keypresses through - it will depend on your specific machine however and whether your distribution has packaged it. An internet search should indicate fairly quickly whether this is the case.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
mbwd
Registered Member
Posts
12
Karma
0
Thank you for the suggestion and your help. I was unable to find anything specific to an ASUS Q501L. :-\

This seems implicit from your response, but short of a kernel module, is there no other way to map these keys for KDE?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I'm afraid not - KDE can only support what the underlying operating system provides for. In this case, the Linux kernel / X is not able to recognise that those keys have been pressed, so KDE is completely unaware of them, and has no way of finding out.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
mbwd
Registered Member
Posts
12
Karma
0
Got it. I'll have to look into how to create a kernel module. ;) Thank you!
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Best of luck. As people have worked on Lenovo/Thinkpad modules before, i'd advise looking into those and contacting the developers who have worked on that.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
mbwd
Registered Member
Posts
12
Karma
0
While this doesn't solve the underlying issue (i.e., that the FN+F5 and FN+F6 keys are unmapped on my laptop), it does create a keyboard brightness control that works:

    Go to System Settings>Shortcuts and Gestures>Global Keyboard Shortcuts>KDE Component "KDE Daemon"
    Select "Decrease Screen Brightness" and change to "Windows (Meta)+F3"
    Select "Increase Screen Brightness" and change to "Windows (Meta)+F4"

Essentially, this uses the same keys on my laptop (ASUS Q501LA) that control the keyboard backlighting, and switches the FN key for the Windows key. I can remember that pretty easily. And now I can control my screen brightness from the keyboard! ;D


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]