Skip to content

Commit

Permalink
Merge pull request #40 from snprajwal/amdgpu-bl
Browse files Browse the repository at this point in the history
feat(backlight): support amdgpu_bl
  • Loading branch information
rodlie authored Oct 18, 2023
2 parents 0972b0b + 7ad8f26 commit 70be27f
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 70be27f

Please sign in to comment.