AsahiLinux / linux

Linux kernel source tree
Other
2.17k stars 84 forks source link

actual_brightness reported by DCP subsystem is wrong #223

Closed rowanG077 closed 6 months ago

rowanG077 commented 8 months ago

Platform: M2 Max

I noticed that actual_brightness is constant even though I can change the brightness with no issues.

[root@rowanG-nixos:/home/rowan.goemans]# cat /sys/class/backlight/apple-panel-bl/brightness 
100

[root@rowanG-nixos:/home/rowan.goemans]# cat /sys/class/backlight/apple-panel-bl/actual_brightness 
300

[root@rowanG-nixos:/home/rowan.goemans]# echo 500 > /sys/class/backlight/apple-panel-bl/brightness 

[root@rowanG-nixos:/home/rowan.goemans]# cat /sys/class/backlight/apple-panel-bl/brightness 
500

[root@rowanG-nixos:/home/rowan.goemans]# cat /sys/class/backlight/apple-panel-bl/actual_brightness 
300
jgouly commented 7 months ago

This is what causes systemd-backlight@.service to restore the wrong screen brightness at boot.

jgouly commented 6 months ago

Looks like this will be fixed by https://github.com/AsahiLinux/linux/commit/b07f7c0f9f78aeaa9c318da573a4f40edf3d1ddb (thanks @jannau!), I haven't tried it yet.

rowanG077 commented 6 months ago

I can confirm that this is fixed now. Thank you @jannau