Unable to adjust brightness level laptop screen

Certainly not. A cursory web search reveals this issue is essentially ubiquitous.

In this thread here, someone mentioned they resolved the issue by using the pcie_aspm=force parameter in addition to the one you tried. Acer nitro 5 + linux mint -> change screen brightness - r/AcerNitro

no matter what I was trying with acpi_backlight parameter, it always showed mi ACPI 'AE_NOT_FOUND' errors related to backlight and I had no entry in sysfs; dir /sys/class/backlight was always empty. Now I got it to work by setting pcie_aspm=force acpi_backlight=native.

Looks like they have an AMD CPU though, so your mileage may very.

This looks like a promising solution:

It appears to be for the exact model you are using. I took a quick look through the repo and I see a couple gotchas here:

  1. The first line installs inotify-tools with apt (instead of Pacman), but that’s easy enough to fix.
  2. chown” is typo’d on line 8.
  3. chmod 644” does not provide the executable bit, so the service file will not actually be able to run that script. :face_with_peeking_eye:

Still, if you wanted to lift a few ideas from this repo and see if it works, it seems like it would be worth a shot.

Install inotify-tools if you don’t already have it:

sudo pacman -S --needed inotify-tools

Create the script with an editor like Micro:

sudo micro /usr/local/bin/brightness_bypass_service.sh

Paste in the body of the script:

#!/bin/bash
if [ -L sys/class/backlight/intel_backlight/brightness ]; then
    while inotifywait -e modify /sys/class/backlight/nvidia_wmi_ec_backlight/brightness; do
    VALUE=$(cat /sys/class/backlight/nvidia_wmi_ec_backlight/brightness)
    NEWVALUE=$(($VALUE * 75))
    echo $NEWVALUE > /sys/class/backlight/intel_backlight/brightness
    done
else
    while inotifywait -e modify /sys/class/backlight/acpi_video0/brightness; do
    cat /sys/class/backlight/acpi_video0/brightness > /sys/class/backlight/acpi_video1/brightness
    done
fi

Save and exit out of the file, then make it executable:

sudo chmod +x /usr/local/bin/brightness_bypass_service.sh

Run the script, and see if it works!

sudo brightness_bypass_service.sh

:point_up: It should be run with sudo because it attempts to read from and write to files in the /sys/class/backlight/ directory, which typically require root access.

If it doesn’t work, see this note in the README:

if /sys/class/backlight/intel_backlight/brightness doesn’t exsist on your system, you may need to add acpi_backlight=video to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub so it looks something like GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=video".

after that you’ll need to run “sudo update-grub

If it does work, go ahead and create the service file to start it automatically.

sudo micro /etc/systemd/system/brightness_bypass.service
[Unit]
Description=File Monitoring Service
After=network.target

[Service]
ExecStart=/bin/bash /usr/local/bin/brightness_bypass_service.sh
Restart=on-failure

[Install]
WantedBy=default.target

I took out User=root (not needed) and added Restart=on-failure (potentially helpful), other than that I left it how the guy wrote it.

Finally, enable and start the service.

sudo systemctl enable --now brightness_bypass_service.sh
4 Likes