Skip to content

Commit

Permalink
feat(backlight): support amdgpu_bl
Browse files Browse the repository at this point in the history
Signed-off-by: Prajwal S N <[email protected]>
  • Loading branch information
snprajwal committed Oct 18, 2023
1 parent 0972b0b commit 7ad8f26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions share/90-backlight.rules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="/bin/chg
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="radeon_bl0", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="radeon_bl0", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="amdgpu_bl0", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="amdgpu_bl0", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
2 changes: 2 additions & 0 deletions src/powerkit_backlight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const QString PowerBacklight::getDevice()
QString foundDir = it.next();
if (foundDir.startsWith(QString("%1/radeon").arg(path))) {
return foundDir;
} else if (foundDir.startsWith(QString("%1/amdgpu").arg(path))) {
return foundDir;
} else if (foundDir.startsWith(QString("%1/intel").arg(path))) {
return foundDir;
} else if (foundDir.startsWith(QString("%1/acpi").arg(path))) {
Expand Down

0 comments on commit 7ad8f26

Please sign in to comment.