Artix Linux Forum

Artix Linux => System => Topic started by: polyester on 29 July 2024, 05:16:56

Title: Changing files in /sys/class/backlight does not affect brightness
Post by: polyester on 29 July 2024, 05:16:56
Hello dear Artix users,
Code: [Select]
inxi -G
shows
Code: [Select]
Graphics:
  Device-1: NVIDIA GP104BM [GeForce GTX 1070 Mobile] driver: nvidia
    v: 555.58.02
  Device-2: SunplusIT Chicony USB 2.0 Camera driver: uvcvideo type: USB
  Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.1
    compositor: kwin_wayland driver: X: loaded: nvidia unloaded: modesetting
    failed: vesa gpu: nvidia resolution: 2048x1152
  API: EGL v: 1.5 drivers: nvidia,swrast,zink
    platforms: gbm,wayland,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 555.58.02
    renderer: NVIDIA GeForce GTX 1070/PCIe/SSE2
  API: Vulkan v: 1.3.285 drivers: nvidia surfaces: xcb,xlib,wayland
Even when I am root,
Code: [Select]
echo 1 > /sys/class/backlight/nvidia0/brightness
doesn't reduce brightness at all (it was 100). As a side note, when I add
Code: [Select]
acpi_osi=Linux acpi_backlight=video
to the GRUB_CMDLINE_LINUX variable, only nvidia0 folder becomes acpi_video0, but still the same issue. I tried this both on kde plasma (wayland) and tty. After hours of searching and researching, I am stuck.
Thank you
Title: Re: Changing files in /sys/class/backlight does not affect brightness
Post by: tintin on 29 July 2024, 05:32:37
Hello,

I just use acpilight to adjust the brightness.

I created four icons in a panel that automatically retracts:
https://forum.artixlinux.org/index.php/topic,3027.msg19679.html#msg19679
Title: Re: Changing files in /sys/class/backlight does not affect brightness
Post by: polyester on 29 July 2024, 12:42:07
I installed acpilight. The command
Code: [Select]
xbacklight -set 1
Actually changes the file contents I talked about (I checked). This doesnt work because as I mentioned when I change the file contents, I cannot change the brightness (it didnt work btw).
Title: Re: Changing files in /sys/class/backlight does not affect brightness
Post by: tintin on 29 July 2024, 12:48:24
I installed acpilight. The command
Code: [Select]
xbacklight -set 1
Actually changes the file contents I talked about (I checked). This doesnt work because as I mentioned when I change the file contents, I cannot change the brightness (it didnt work btw).
Here are the notes I took, hoping that they may be of use to you:

Code: [Select]
sudo pacman -S acpilight

Code: [Select]
--> Permission denied: '/sys/class/backlight/intel_backlight/brightness'


Code: [Select]
sudo chmod 766 /sys/class/backlight/intel_backlight/brightness 


https://gitlab.com/wavexx/acpilight
Title: Re: Changing files in /sys/class/backlight does not affect brightness
Post by: polyester on 29 July 2024, 13:17:45
As I mentioned, I run the commands as root. If these commands worked, as the next step I was going to add my users to a group or something but I am stuck at the first of the first. I boldfaced the parts
Title: Re: Changing files in /sys/class/backlight does not affect brightness
Post by: LemonPie on 29 July 2024, 18:40:19
maybe a driver a driver issue, have you checked your device in arch wiki list (https://wiki.archlinux.org/title/Laptop) or linux hardware (https://linux-hardware.org/).
I personally never used an NVIDIA product but for intel there was times I needed to set the ACPI parameter (https://wiki.archlinux.org/title/Backlight#Kernel_command-line_options).
As the last resort you can manipulate the hardware directly, although I advice against that.
Title: Re: Changing files in /sys/class/backlight does not affect brightness
Post by: polyester on 29 July 2024, 19:14:12
As a workaround for now, I switched to x11, and installed a 3rd party app: brightness-controller (https://aur.archlinux.org/packages/brightness-controller-git) which uses xrandr in the backend.