After upgrading from NixOS 22.11 to NixOS 23.05, my laptop display brightness stays at maximum brightness. Invoking light outputs the warning
No backlight controller was found, so we could not decide an automatic target. The current command will have no effect. Please use -L to find a target and then specify it with -s.
When comparing the output of light -L with NixOS 22.11 (Kernel 5.x) with NixOS 23.05 (Kernel 6.1.31), I see that the following lines are missing in NixOS 23.05:
sysfs/backlight/amdgpu_bl0
sysfs/backlight/auto
Did somebody have the same problem? Could you solve it?
I solved it by running nixos-generate-config again and using the new generated hardware config. Probably the following line in the old autogenerated hardware config caused the problem with kernel versions > 6.?: