Giter VIP home page Giter VIP logo

Comments (20)

jay-aye-see-kay avatar jay-aye-see-kay commented on May 23, 2024 6

Is it still broken in brightnessctl in community?

community/brightnessctl 0.4-2 is working for me, my issue was not having my user in the video` group

For anyone else who finds this thread: sudo usermod -aG video $USER then logout and back in to add yourself to the video group

from brightnessctl.

gdamjan avatar gdamjan commented on May 23, 2024 3

since systemd 243 you don't need any special permissions on the system to change the backlight brightness. a user can do it for their seat by dbus calling logind.

this is already supported in brightnessctl, but we are waiting for a 0.5 release (hint hint @Hummer12007)

from brightnessctl.

ManuelSchmitzberger avatar ManuelSchmitzberger commented on May 23, 2024 2

I've used the change action instead of the add and everything works:

    ACTION=="change", SUBSYSTEM=="backlight", KERNEL=="radeon_b10", RUN+="/usr/bin/chgrp video /sys/class/backlight/%k/brightness"
    ACTION=="change", SUBSYSTEM=="backlight", KERNEL=="radeon_b10", RUN+="/usr/bin/chmod g+w /sys/class/backlight/%k/brightness"

from brightnessctl.

gonzalezjo avatar gonzalezjo commented on May 23, 2024 1

I know this is a bit old, and this has seemingly been fixed on systems with a newer version of systemd, but this is a working solution in the meantime: Instead of chgrp, you can use chgrp -h to avoid dereferencing the symlink.

from brightnessctl.

Hummer12007 avatar Hummer12007 commented on May 23, 2024

What does ls -l /sys/class/backlight/intel_backlight/ output?

from brightnessctl.

StaticRocket avatar StaticRocket commented on May 23, 2024

ls -l /sys/class/backlight/intel_backlight/ returns

total 0
-r--r--r-- 1 root root 4096 Sep  4 10:24 actual_brightness
-rw-r--r-- 1 root root 4096 Sep  4 10:24 bl_power
-rw-r--r-- 1 root root 4096 Sep  4 10:54 brightness
lrwxrwxrwx 1 root root    0 Sep  4 10:24 device -> ../../card0-eDP-1
-r--r--r-- 1 root root 4096 Sep  4 10:24 max_brightness
drwxr-xr-x 2 root root    0 Sep  4 10:58 power
lrwxrwxrwx 1 root root    0 Sep  4 10:24 subsystem -> ../../../../../../../class/backlight
-r--r--r-- 1 root root 4096 Sep  4 10:24 type
-rw-r--r-- 1 root root 4096 Sep  4 10:24 uevent

from brightnessctl.

Hummer12007 avatar Hummer12007 commented on May 23, 2024

Let me double-check with you: are you executing the /bin/chgrp video /sys/class/backlight/%k/brightness in the shell, as opposed to adding udev rules?

from brightnessctl.

StaticRocket avatar StaticRocket commented on May 23, 2024

I noticed the udev rule wasn't allowing the script to run without root privileges properly, so I ran the commands it was supposed to in the shell just to get some information for an issue report. (I'm new to troubleshooting udev rules.)

from brightnessctl.

Hummer12007 avatar Hummer12007 commented on May 23, 2024

I see, how weird. For the record, udev replaces %k with the device name (intel_backlight in this case).

from brightnessctl.

Hummer12007 avatar Hummer12007 commented on May 23, 2024

Can you try it on the latest commit btw? (i.e. reinstall brightnessctl and reboot)

from brightnessctl.

StaticRocket avatar StaticRocket commented on May 23, 2024

Done. No dice. (All I see is a version bump in the commits, so I don't think that will help much.)

from brightnessctl.

Hummer12007 avatar Hummer12007 commented on May 23, 2024

And another question. Is your user account in the video group?

from brightnessctl.

StaticRocket avatar StaticRocket commented on May 23, 2024

It wasn't, but I just added it and there was no effect.

from brightnessctl.

nkeor avatar nkeor commented on May 23, 2024

It happens to me too, but adding a sudo rule does not work. Arch up-to-date kernel 4.18.6

from brightnessctl.

gdamjan avatar gdamjan commented on May 23, 2024

The proper way is to set the udev rules with uaccess:

ACTION=="add", SUBSYSTEM=="backlight", TAG+="uaccess"
ACTION=="add", SUBSYSTEM=="leds", TAG+="uaccess"

(edit: which (acls) is not supported on sysfs sigh)

from brightnessctl.

marcusbritanicus avatar marcusbritanicus commented on May 23, 2024

I have faced this issue. Till date I cannot directly modify /sys/class/backlight/%k/brightness and there seems to be a good reason behind it: /sys/class/backlight/%k is a symlink created and owned by root. So when you do chgrp on it, the link group does not change, but, the group of the link's target changes.

So in my case doing echo 100 > /sys/class/backlight/radeon_bl0/brightness gives permission error, where as echo 100 > /sys/devices/pci0000:00/0000:00:01.0/drm/card0/card0-eDP-1/radeon_bl0/brightness works like a charm!

from brightnessctl.

Hummer12007 avatar Hummer12007 commented on May 23, 2024

Is it still broken in brightnessctl in community?

from brightnessctl.

gdamjan avatar gdamjan commented on May 23, 2024

systemd-logind 243 (just around the corner now) will provide a dbus api for setting the brightness for the users seat.

from brightnessctl.

goetzc avatar goetzc commented on May 23, 2024

Is it still broken in brightnessctl in community?

@Hummer12007 yes.

from brightnessctl.

goetzc avatar goetzc commented on May 23, 2024

@jay-aye-see-kay right, I missed this step from the README. As the Arch package no longer set the binary as suid, but ships the udev rules, the user has to be in the video group as you mention.

from brightnessctl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.