Sysfs backlight brightness interface broken on nvidia-dkms 545.29.02-2

Hi Garuda community,

I noticed the sysfs interface for setting the backlight brightness seems to be broken on my system on the latest kernel and NVIDIA driver version.

Here’s my garuda-inxi:

System:
  Kernel: 6.5.9-zen2-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc available: hpet,acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=9a9c91aa-a10c-4aa5-b5a6-f3503676bb60 rw rootflags=subvol=@
    quiet rd.udev.log_priority=3 vt.global_cursor_default=0
    resume=UUID=f798efcf-f41b-4022-8708-f30fca3e897d loglevel=3
    nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1
  Desktop: KDE Plasma v: 5.27.9 tk: Qt v: 5.15.11 wm: kwin_x11 dm: SDDM
    Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Laptop System: SchenkerGmbH product: XMG_APEX15_XAP15E20 v: N/A
    serial: N/A Chassis: Notebook type: 10 serial: N/A
  Mobo: SchenkerGmbH model: NH5xAx serial: N/A UEFI: Insyde v: 1.07.07RTR1
    date: 04/08/2020
Battery:
  ID-1: BAT0 charge: 38.8 Wh (100.0%) condition: 38.8/62.1 Wh (62.5%)
    volts: 12.2 min: 10.9 model: Notebook BAT type: Li-ion serial: <filter>
    status: full
  ID-2: hidpp_battery_0 charge: 50% condition: N/A volts: 3.8 min: N/A
    model: Logitech G502 LIGHTSPEED Wireless Gaming Mouse type: N/A
    serial: <filter> status: discharging
CPU:
  Info: model: AMD Ryzen 9 3950X socket: AM4 bits: 64 type: MT MCP arch: Zen 2
    gen: 3 level: v3 note: check built: 2020-22 process: TSMC n7 (7nm)
    family: 0x17 (23) model-id: 0x71 (113) stepping: 0 microcode: 0x8701013
  Topology: cpus: 1x cores: 16 tpc: 2 threads: 32 smt: enabled cache:
    L1: 1024 KiB desc: d-16x32 KiB; i-16x32 KiB L2: 8 MiB desc: 16x512 KiB
    L3: 64 MiB desc: 4x16 MiB
  Speed (MHz): avg: 1709 high: 3500 min/max: 2200/4761 boost: enabled
    base/boost: 3500/4725 scaling: driver: acpi-cpufreq governor: ondemand
    volts: 1.1 V ext-clock: 100 MHz cores: 1: 2200 2: 3500 3: 2200 4: 2200
    5: 2200 6: 2200 7: 2200 8: 2200 9: 2200 10: 2200 11: 2200 12: 2200
    13: 2200 14: 2200 15: 2200 16: 2200 17: 2200 18: 2200 19: 2200 20: 2200
    21: 2800 22: 2200 23: 2200 24: 2200 25: 0 26: 0 27: 0 28: 0 29: 0 30: 0
    31: 0 32: 0 bogomips: 223587
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities: <filter>
Graphics:
  Device-1: NVIDIA TU106M [GeForce RTX 2070 Mobile / Max-Q Refresh]
    vendor: CLEVO/KAPOK driver: nvidia v: 545.29.02
    alternate: nouveau,nvidia_drm non-free: 545.xx+ status: current (as of
    2023-10; EOL~2026-12-xx) arch: Turing code: TUxxx process: TSMC 12nm FF
    built: 2018-2022 pcie: gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 07:00.0
    chip-ID: 10de:1f14 class-ID: 0300
  Device-2: Bison BisonCam NB Pro driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 5-4:2 chip-ID: 5986:9102
    class-ID: 0e02
  Display: server: X.Org v: 21.1.9 with: Xwayland v: 23.2.2
    compositor: kwin_x11 driver: X: loaded: modesetting,nvidia
    alternate: fbdev,nouveau,nv,vesa gpu: nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 5760x1080 s-dpi: 143 s-size: 1023x191mm (40.28x7.52")
    s-diag: 1041mm (40.97")
  Monitor-1: DP-2 pos: left res: 1920x1080 hz: 144 dpi: 142
    size: 344x194mm (13.54x7.64") diag: 395mm (15.55") modes: N/A
  Monitor-2: DP-4 pos: right res: 1920x1080 hz: 60 dpi: 93
    size: 527x296mm (20.75x11.65") diag: 604mm (23.8") modes: N/A
  Monitor-3: HDMI-0 pos: primary,center res: 1920x1080 hz: 60 dpi: 92
    size: 531x299mm (20.91x11.77") diag: 609mm (23.99") modes: N/A
  Monitor-4: None-1-1 size-res: N/A modes: N/A
  API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia device: 2
    drv: swrast gbm: drv: nvidia surfaceless: drv: nvidia x11: drv: nvidia
    inactive: wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 545.29.02
    glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce RTX 2070/PCIe/SSE2
    memory: 7.81 GiB
  API: Vulkan v: 1.3.269 layers: 3 device: 0 type: discrete-gpu
    name: NVIDIA GeForce RTX 2070 driver: nvidia v: 545.29.02
    device-ID: 10de:1f14 surfaces: xcb,xlib
Audio:
  Device-1: NVIDIA TU106 High Definition Audio vendor: CLEVO/KAPOK
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 07:00.1 chip-ID: 10de:10f9 class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: CLEVO/KAPOK
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 09:00.4 chip-ID: 1022:1487 class-ID: 0403
  API: ALSA v: k6.5.9-zen2-1-zen status: kernel-api tools: N/A
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: PipeWire v: 0.3.84 status: n/a (root, process) with:
    1: pipewire-pulse status: active 2: wireplumber status: active
    3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: CLEVO/KAPOK driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: 3000 bus-ID: 04:00.1 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp4s0f1 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Intel Wi-Fi 6 AX200 vendor: Rivet Networks Killer
    driver: iwlwifi v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1
    bus-ID: 05:00.0 chip-ID: 8086:2723 class-ID: 0280
  IF: wlp5s0 state: up mac: <filter>
Bluetooth:
  Device-1: Intel AX200 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-10:8 chip-ID: 8087:0029
    class-ID: e001
  Report: btmgmt ID: hci0 rfk-id: 2 state: up address: <filter> bt-v: 5.2
    lmp-v: 11 status: discoverable: no pairing: no class-ID: 7c010c
Drives:
  Local Storage: total: 3.64 TiB used: 3.16 TiB (86.7%)
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Seagate model: FireCuda 510 SSD
    ZP1000GM30001 size: 931.51 GiB block-size: physical: 512 B logical: 512 B
    speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter> fw-rev: STOSC014
    temp: 41.9 C scheme: GPT
  SMART: yes health: PASSED on: 1y 35d 3h cycles: 2,591
    read-units: 141,779,772 [72.5 TB] written-units: 79,039,333 [40.4 TB]
  ID-2: /dev/nvme1n1 maj-min: 259:1 vendor: Seagate model: FireCuda 530
    ZP1000GM30013 size: 931.51 GiB block-size: physical: 512 B logical: 512 B
    speed: 63.2 Gb/s lanes: 4 tech: SSD serial: <filter> fw-rev: SU6SM003
    temp: 31.9 C scheme: GPT
  SMART: yes health: PASSED on: 100d 6h cycles: 500
    read-units: 344,057,790 [176 TB] written-units: 48,196,191 [24.6 TB]
  ID-3: /dev/sda maj-min: 8:0 vendor: Seagate model: ST2000LM015-2E8174
    family: Barracuda 2.5 5400 size: 1.82 TiB block-size: physical: 4096 B
    logical: 512 B sata: 3.1 speed: 6.0 Gb/s tech: HDD rpm: 5400
    serial: <filter> fw-rev: 0001 temp: 44 C scheme: GPT
  SMART: yes state: enabled health: PASSED on: 1y 34d 1h cycles: 2563
    read: 7.82 TiB written: 7.28 TiB Pre-Fail: attribute: Spin_Retry_Count
    value: 100 worst: 100 threshold: 97
Partition:
  ID-1: / raw-size: 896.85 GiB size: 896.85 GiB (100.00%)
    used: 838.64 GiB (93.5%) fs: btrfs block-size: 4096 B dev: /dev/nvme1n1p2
    maj-min: 259:3
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 580 KiB (0.2%) fs: vfat block-size: 512 B dev: /dev/nvme1n1p1
    maj-min: 259:2
  ID-3: /home raw-size: 896.85 GiB size: 896.85 GiB (100.00%)
    used: 838.64 GiB (93.5%) fs: btrfs block-size: 4096 B dev: /dev/nvme1n1p2
    maj-min: 259:3
  ID-4: /var/log raw-size: 896.85 GiB size: 896.85 GiB (100.00%)
    used: 838.64 GiB (93.5%) fs: btrfs block-size: 4096 B dev: /dev/nvme1n1p2
    maj-min: 259:3
  ID-5: /var/tmp raw-size: 896.85 GiB size: 896.85 GiB (100.00%)
    used: 838.64 GiB (93.5%) fs: btrfs block-size: 4096 B dev: /dev/nvme1n1p2
    maj-min: 259:3
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: partition size: 34.36 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme1n1p3 maj-min: 259:4
  ID-2: swap-2 type: zram size: 31.24 GiB used: 17.5 MiB (0.1%)
    priority: 100 comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 32
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 67.8 C mobo: N/A gpu: nvidia temp: 49 C
  Fan Speeds (rpm): N/A
Info:
  Processes: 583 Uptime: 32m wakeups: 0 Memory: total: 32 GiB
  available: 31.24 GiB used: 5.4 GiB (17.3%) Init: systemd v: 254
  default: graphical tool: systemctl Compilers: gcc: 13.2.1 Packages:
  pm: pacman pkgs: 1796 libs: 450 tools: octopi,paru pm: appimage pkgs: 0
  Shell: Bash (sudo) v: 5.2.15 running-in: konsole inxi: 3.3.31
Garuda (2.6.17-1):
  System install date:     2023-08-04
  Last full system update: 2023-11-06 ↻
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut nvidia-dkms
  Windows dual boot:       Yes
  Failed units:            systemd-backlight@backlight:nvidia_0.service 

As a result the systemd backlight unit doesn’t start up and the hotkeys for setting brightness don’t work either. The brightness is stuck at 33% with no way of changing it. Relevant line from systemctl status:

nov 06 20:58:10 nathan-xmgapex15xap15e20 systemd-backlight[14933]: nvidia_0: Failed to write system 'brightness' attribute: Invalid argument

This is consistent with trying to run the unit’s command manually as well as trying to set the brightness directly or through brightnessctl:

[root@nathan-xmgapex15xap15e20 nathan]# /usr/lib/systemd/systemd-backlight load backlight:nvidia_0
nvidia_0: Failed to write system 'brightness' attribute: Invalid argument

[root@nathan-xmgapex15xap15e20 nathan]# echo 100 > /sys/class/backlight/nvidia_0/brightness
bash: echo: write error: Invalid argument

[root@nathan-xmgapex15xap15e20 nathan]# brightnessctl set 100%
Error writing device: Invalid argument

Interestingly when running brightnessctl the output from /sys/class/backlight/nvidia_0/brightness does change to the desired value but neither /sys/class/backlight/nvidia_0/actual_brightness nor the screen brightness changes.

A few more unsuccessful things I tried:

Is this a known issue? Are any workarounds known at the current moment or do I have to wait for the next kernel/driver update?

Thanks in advance.

Update: problem solved.
Apparently the solution was simply to add the acpi_backlight=video kernel parameter. I skimmed over that section since I don’t have integrated graphics but apparently the solution was to hand over control to ACPI anyway. If anyone understands what might be happening please share it here, as I still don’t fully understand how this solves the issue.

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.