How to control screen brightness when using Wayland

HI,
I have until now always used X11 and it was pretty easy to control the screen brightness of the built-in laptop monitor: hover the mouse over the battery symbol in the panel and use the mouse-wheel in in- or decrease the brightness.
Now in Wayland this doesn’t work anymore. I use Wayland since it handles tearing much, much better than X11. I use the KDE spin of Fedora 38.
My computer details are:

inxi -Fxxxz
System:
  Kernel: 6.3.8-200.fc38.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.39-9.fc38 Desktop: KDE Plasma v: 5.27.6 tk: Qt v: 5.15.10
    wm: kwin_wayland vt: 2 dm: SDDM Distro: Fedora release 38 (Thirty Eight)
Machine:
  Type: Laptop System: LENOVO product: 82RG v: Legion 5 Pro 16ARH7H
    serial: <superuser required> Chassis: type: 10 v: Legion 5 Pro 16ARH7H
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0T76461 WIN
    serial: <superuser required> UEFI: LENOVO v: JUCN51WW date: 08/29/2022
Battery:
  ID-1: BAT0 charge: 83.4 Wh (100.0%) condition: 83.4/80.0 Wh (104.2%)
    volts: 17.5 min: 15.4 model: Celxpert L21C4PC1 type: Li-poly
    serial: <filter> status: full cycles: 4
  Device-1: hidpp_battery_0 model: Logitech Wireless Keyboard
    serial: <filter> charge: 55% (should be ignored) rechargeable: yes
    status: discharging
CPU:
  Info: 8-core model: AMD Ryzen 7 6800H with Radeon Graphics bits: 64
    type: MT MCP smt: enabled arch: Zen 3+ rev: 1 cache: L1: 512 KiB L2: 4 MiB
    L3: 16 MiB
  Speed (MHz): avg: 1570 high: 1600 min/max: 1600/4784 boost: enabled cores:
    1: 1600 2: 1403 3: 1600 4: 1600 5: 1531 6: 1600 7: 1600 8: 1600 9: 1600
    10: 1600 11: 1600 12: 1600 13: 1397 14: 1600 15: 1600 16: 1600
    bogomips: 102208
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] vendor: Lenovo
    driver: nouveau v: kernel arch: Ampere pcie: speed: 16 GT/s lanes: 8 ports:
    active: HDMI-A-1 empty: DP-1,DP-2,eDP-1 bus-ID: 01:00.0 chip-ID: 10de:2560
    class-ID: 0300
  Device-2: AMD Rembrandt [Radeon 680M] vendor: Lenovo driver: amdgpu
    v: kernel arch: RDNA-2 pcie: speed: 16 GT/s lanes: 16 ports: active: eDP-2
    empty: DP-3, DP-4, DP-5, DP-6, DP-7, DP-8 bus-ID: 34:00.0
    chip-ID: 1002:1681 class-ID: 0300 temp: 40.0 C
  Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 22.1.9
    compositor: kwin_wayland driver: X: loaded: amdgpu,modesetting
    unloaded: fbdev,vesa dri: radeonsi,nouveau gpu: nouveau,amdgpu
    d-rect: 4480x2680 display-ID: 0
  Monitor-1: HDMI-A-1 pos: bottom-l res: 1920x1080 size: N/A modes: N/A
  Monitor-2: eDP-2 pos: top-right res: 2560x1600 size: N/A modes: N/A
  API: OpenGL v: 4.6 Mesa 23.1.3 renderer: AMD Radeon Graphics (rembrandt
    LLVM 16.0.5 DRM 3.52 6.3.8-200.fc38.x86_64) direct-render: Yes
Audio:
  Device-1: NVIDIA GA106 High Definition Audio driver: snd_hda_intel v: kernel
    pcie: speed: 16 GT/s lanes: 8 bus-ID: 01:00.1 chip-ID: 10de:228e
    class-ID: 0403
  Device-2: AMD Rembrandt Radeon High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
    bus-ID: 34:00.1 chip-ID: 1002:1640 class-ID: 0403
  Device-3: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo
    driver: snd_pci_acp6x v: kernel pcie: speed: 16 GT/s lanes: 16
    bus-ID: 34:00.5 chip-ID: 1022:15e2 class-ID: 0480
  Device-4: AMD Family 17h/19h HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel pcie: speed: 16 GT/s lanes: 16 bus-ID: 34:00.6 chip-ID: 1022:15e3
    class-ID: 0403
  API: ALSA v: k6.3.8-200.fc38.x86_64 status: kernel-api
  Server-1: PipeWire v: 0.3.72 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: MEDIATEK MT7922 802.11ax PCI Express Wireless Network Adapter
    vendor: Lenovo driver: mt7921e v: kernel pcie: speed: 5 GT/s lanes: 1
    bus-ID: 02:00.0 chip-ID: 14c3:0616 class-ID: 0280
  IF: wlp2s0 state: down mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1
    port: 4000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: nordlynx state: unknown speed: N/A duplex: N/A mac: N/A
Bluetooth:
  Device-1: Foxconn / Hon Hai Wireless_Device driver: btusb v: 0.8 type: USB
    rev: 2.1 speed: 480 Mb/s lanes: 1 bus-ID: 3-3:3 chip-ID: 0489:e0d8
    class-ID: e001 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 2 state: up address: see --recommends
Drives:
  Local Storage: total: 953.87 GiB used: 319.93 GiB (33.5%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVL21T0HCLR-00BL2
    size: 953.87 GiB speed: 63.2 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: CL1QGXA7 temp: 39.9 C scheme: GPT
Partition:
  ID-1: / size: 952.28 GiB used: 319.61 GiB (33.6%) fs: btrfs
    dev: /dev/nvme0n1p3
  ID-2: /boot size: 973.4 MiB used: 275.7 MiB (28.3%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-3: /boot/efi size: 598.8 MiB used: 49.4 MiB (8.2%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 952.28 GiB used: 319.61 GiB (33.6%) fs: btrfs
    dev: /dev/nvme0n1p3
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 3.8 MiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 46.8 C mobo: N/A gpu: amdgpu temp: 41.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 487 Uptime: 4h 24m wakeups: 14 Memory: available: 14.8 GiB
  used: 4.86 GiB (32.8%) Init: systemd v: 253 target: graphical (5)
  default: graphical Compilers: N/A Packages: pm: rpm pkgs: N/A
  note: see --rpm Shell: Bash v: 5.2.15 running-in: konsole inxi: 3.3.27

Does anybody know how to (easily) control the brightness? At the moment it is at what I think is 100% and especially in the evening that is way too bright. I now close the lid and only use the external monitor which has its own brightness control.

Thanks for your help.

That’s extremely strange, FWIW. It is definitely not supposed to be happening, and it’s not happening for me on my hardware (Intel CPU and iGPU). I would recommend submitting a bug report at https://bugs.kde.org rather than looking for workarounds.

Thank you for your answer, Nate. Do I understand it correctly when I say that changing the brightness with the mouse hovering over the battery symbol should also work when I use Wayland?
I will file a bugreport as you mentioned but it would be great if I know what the normal way of controlling the brightness is when using Wayland? Is it the same as when using X11? Should the function keys on the laptop keyboard also work?

Thank you for your answer, Nate. Do I understand it correctly when I say that changing the brightness with the mouse hovering over the battery symbol should also work when I use Wayland?

That’s correct!

I will file a bugreport as you mentioned but it would be great if I know what the normal way of controlling the brightness is when using Wayland? Is it the same as when using X11? Should the function keys on the laptop keyboard also work?

Yep, should be identical to how it works on X11. And it is for me.

Hello Nathan, I am one step further (I hope). I have booted into a live version of KDE Neon on my laptop and I can dimm the brightness of my built-in monitor, both when using X11 as well as when I use Wayland.
This tells me it is not a KDE thing. I went to the Fedora bugzilla website and found a bug report about the same laptop but this user was using the Gnome version of Fedora, so also in that version it doesn’t work. He mentioned more Lenovo Legion 5 users were having this issue. reading that you would start to think it is the laptop, but in KDE Neon and also in openSUSE Tumbleweed it works fine.
The original bug is from December 2002 which is a long time ago already. I sure hope somebody will pick it up.
Thanks for your help.

And again I am one step further, meaning it is working. I have installed the package light with which I can set options to set, increase or decrease the brightness of the monitor.
I placed the commands for increase and decrease each in their own script file and connected a shortcut with them so now it is simply pushing some buttons on the keyboard and I have what I want to have.
When I was publishing this on the Fedora forum I noticed somebody who wrote:
I don't know if this is your issue or not, but some of the Lenovo laptops need to have the option **acpi_backlight=lenovo** added to the kernel line to get everything working right.
I also did that but still can’t adjust the brightness as I can in other distro’s so I am using my own solution, which does work.
All in all not a KDE issue at all. I am sorry for the commotion.