linusg / rpi-backlight

🔆 A Python module for controlling power and brightness of the official Raspberry Pi 7" touch display
https://rpi-backlight.readthedocs.io
MIT License
276 stars 32 forks source link

Suggested UDEV rule not triggering? #46

Closed LarryGFlorence closed 1 year ago

LarryGFlorence commented 2 years ago

Running: Raspberry Pi 4 Model B Rev 1.4, Debian GNU/Linus 11 (bullseye), aarch64. Attached: Raspberry Pi 7" Touchscreen Display

Problem: cmdline rpi-backlight -b 50 returns "Permission Error". Reason: /sys/class/backlight/10-0045/brightness is owned by root, permissions=644. Cause: Suggested UDEV rule (SUBSYSTEM=="backlight") is not being triggered. Permissions are not modified upon startup.

How to debug? How to fix?

linusg commented 2 years ago

How to debug? How to fix?

I don't know. Unfortunately, I don't have a working display right now. I'm sure you can find information on debugging udev online though, good luck!

LarryGFlorence commented 2 years ago

I added this line to the end of my ~/.bashrc script. It solves the problem until the UDEV triggering issue can be figured out:

sudo /bin/chmod 666 /sys/class/backlight/10-0045/brightness /sys/class/backlight/10-0045/bl_power

I derived the "kernel" number by following the /sys/class/backlight path.