# [SOLVED] Brightness adjustment not working kernel after kern

## AndrewAmmerlaan

I just upgrade gentoo-sources from 3.18.12 to 4.0.5, after reboot I noticed that I can no longer adjust the brightness of my laptop-screen. The brightness keys (fn+f2, fn+f3) are no longer working, nor can I adjust brightness by clicking on the battery icon in the KDE taskbar, the slider just shows 0% and I can slide it but the shown value remaind 0% (while actual brightness is 100%). I am convinced this is due to the kernel upgrade, because I was able to adjust brightness before the reboot, nothing else changed. I used "make oldconfig" to update the config file. Kernel config is here: https://bpaste.net/show/116ba08e100a

----------

## AndrewAmmerlaan

I checked the files in /sys/class/backlight/radeon_bl0, output is shown below:

```
andrew@Andrew-Gentoo ~ $ ls /sys/class/backlight/radeon_bl0

actual_brightness  bl_power  brightness  device  max_brightness  power  subsystem  type  uevent

andrew@Andrew-Gentoo ~ $ cat /sys/class/backlight/radeon_bl0/actual_brightness

255

andrew@Andrew-Gentoo ~ $ cat /sys/class/backlight/radeon_bl0/bl_power

0

andrew@Andrew-Gentoo ~ $ cat /sys/class/backlight/radeon_bl0/brightness

255

andrew@Andrew-Gentoo ~ $ cat /sys/class/backlight/radeon_bl0/max_brightness

255

andrew@Andrew-Gentoo ~ $ 
```

I suspect 255 is the max brightness, which is also the current brightness, KDE however shows 0%, could it be that this is a bug KDE has with the new kernel version? 

Any ideas how I might fix this?

EDIT: I edited the brightness file and this did change the brightness

EDIT2: the owner of the file 'brightness' and the other files is root, that can't be right, can it?

----------

## AndrewAmmerlaan

Still no replies, that usually means one of two things, either I asked a too simple question, or a very difficult one. I'm still unable to adjust brightness, and it is really annoying, I've ran out of ideas, so any suggestions would be very appreciated.

----------

## MarioCorleone

Ive been in the same boat as you, so I too await a response

----------

## vasettoo

My Dell Latitude e5530 faced the same problem, but I managed to correct this by clean rebuild of the new stable kernel - removed any entries related to 4.0.5 kernel in /boot folder, cleaned the /usr/src/linux for 4.0.5 stuff, also cleared /lib/modules/ for the aforementioned kernel, after this I used genkernel with old config of 3.18.12 kernel, nothing changed in options, just rebuild with the new settings, rebuilded modules, reboot. Voilá! Everything works with backlight buttons. Steps to reproduce:

```
# rm -vi /boot/*4.0.5-gentoo

rm -frv /usr/src/linux-4.0.5-gentoo

rm -frv /lib/modules/4.0.5-gentoo

eselect kernel set linux-4.0.5-gentoo

genkernel --menuconfig --kernel-config=/etc/kernels/kernel-config-x86_64-3.18.12-gentoo all

emerge @module-rebuild

emerge @x11-module-rebuild

systemctl reboot
```

I just had to rename the generated kernel in /boot to bzImage as I'm using dual boot with M$ Windows and rEFInd needs it this way.

Good luck and hope it helps someone else!

----------

## AndrewAmmerlaan

I tried this:

```
root #cp .config /usr/src/kernel_config_bk

root #make distclean

root #mv /usr/src/kernel_config_bk .config
```

Which didn't work, I thought that would do the same thing but apparently not. I'll try your suggestion next, but I'm not using genkernel so I would have to change some commands.

----------

## AndrewAmmerlaan

 *vasettoo wrote:*   

> My Dell Latitude e5530 faced the same problem, but I managed to correct this by clean rebuild of the new stable kernel - removed any entries related to 4.0.5 kernel in /boot folder, cleaned the /usr/src/linux for 4.0.5 stuff, also cleared /lib/modules/ for the aforementioned kernel, after this I used genkernel with old config of 3.18.12 kernel, nothing changed in options, just rebuild with the new settings, rebuilded modules, reboot. Voilá! Everything works with backlight buttons. Steps to reproduce:
> 
> ```
> # rm -vi /boot/*4.0.5-gentoo
> 
> ...

 

So the only difference is the config of 3.18.12, so there is something new in the 4.0.5 config that is causing this problem. I no longer have the old config, but I took al look at the new config and I can't find anything (obvious) that might cause the backlight to stop working.

----------

## FroL_Onn

 *AndrewAmmerlaan wrote:*   

> 
> 
> So the only difference is the config of 3.18.12, so there is something new in the 4.0.5 config that is causing this problem. I no longer have the old config, but I took al look at the new config and I can't find anything (obvious) that might cause the backlight to stop working.

 

Hello there!

Did you achieved any positive result?

I experience the same problem and don't know what to do!

Could this be some kind of security policy/KDE problem?

----------

## AndrewAmmerlaan

 *FroL_Onn wrote:*   

>  *AndrewAmmerlaan wrote:*   
> 
> So the only difference is the config of 3.18.12, so there is something new in the 4.0.5 config that is causing this problem. I no longer have the old config, but I took al look at the new config and I can't find anything (obvious) that might cause the backlight to stop working. 
> 
> Hello there!
> ...

 

No sadly not, I have given up actually. I don't do that usually but this has beaten me  :Sad: 

Unless I or someone else suddenly comes up with a brilliant solution, I just have to live without brightness adjustment, which isn't that bad once you get used to it.

I no longer think this is a KDE problem because I am also unable to adjust brightness with xrandr or xbacklight, so if it isn't the kernel it is maybe X or something, but I really don't know.   :Sad: 

----------

## FroL_Onn

 *AndrewAmmerlaan wrote:*   

> I no longer think this is a KDE problem because I am also unable to adjust brightness with xrandr or xbacklight, so if it isn't the kernel it is maybe X or something, but I really don't know.  

 

I also don't think it is KDE problem as my fn+f2 and fn+f3 are not recognized by the system!

xev does not see them

and dmesg after pressing them give:

```
[ 4291.032234] atkbd serio0: Use 'setkeycodes e012 <keycode>' to make it known.

[ 4291.153672] atkbd serio0: Unknown key released (translated set 2, code 0x92 on isa0060/serio0).

[ 4291.153682] atkbd serio0: Use 'setkeycodes e012 <keycode>' to make it known.

[ 4291.302911] atkbd serio0: Unknown key pressed (translated set 2, code 0x97 on isa0060/serio0).

[ 4291.302921] atkbd serio0: Use 'setkeycodes e017 <keycode>' to make it known.

[ 4291.444176] atkbd serio0: Unknown key released (translated set 2, code 0x97 on isa0060/serio0).

[ 4291.444180] atkbd serio0: Use 'setkeycodes e017 <keycode>' to make it known.
```

Sadly I don't remember, when it started (not long ago).

But I still can use tray powerdevil icon (click it -> and use slider).

Besides, 

```
xbacklight -set 70
```

 works for me!

So do we have different problems, what do you think?

Help needed!)

Should we file a bug?

----------

## AndrewAmmerlaan

 *FroL_Onn wrote:*   

>  *AndrewAmmerlaan wrote:*   I no longer think this is a KDE problem because I am also unable to adjust brightness with xrandr or xbacklight, so if it isn't the kernel it is maybe X or something, but I really don't know.   
> 
> I also don't think it is KDE problem as my fn+f2 and fn+f3 are not recognized by the system!
> 
> Sadly I don't remember, when it started (not long ago).
> ...

 

I don't think fn f3 and fn f2 are supposed to be recognized by the kernel, I thought these were X or DE shortcuts, but I may be wrong, I also don't think are problems are related at all, since I can't adjust brightness at all (unless if I edit that file I mentioned earlier, but I think that's actually on the device itself or something like that) I think that on my system the kernel can't adjust the brightness and therefore X and KDE show it as impossible, I think this may be because the kernel tries to adjust the wrong file or it is actually disabled (though it was working before, and I didn't disable anything, weird  :Confused:   ).

----------

## FroL_Onn

 *AndrewAmmerlaan wrote:*   

> 
> 
> I don't think fn f3 and fn f2 are supposed to be recognized by the kernel, I thought these were X or DE shortcuts, but I may be wrong, I also don't think are problems are related at all

 

Well, I should say, fn+f8 (which is volumeDown in my case) is recognized by xev.

Ok, I will open new topic then!

Please write here if you find a solution or it heals itself, ok?

----------

## AndrewAmmerlaan

I finally fixed this (accidentally  :Very Happy:  ), the solution is here: https://forums.gentoo.org/viewtopic-p-7904712.html#7904712

It acctually had nothing to do with the kernel, or ACPI. but with the fact that kde polkit starts after kded, https://bugs.kde.org/show_bug.cgi?id=344456

----------

