Skip to content

Commit

Permalink
hid_backlight: Try system76-dkms path
Browse files Browse the repository at this point in the history
Attempt to use the path generated by system76-dkms if the one from
system76-acpi is not present.

Signed-off-by: Tim Crawford <[email protected]>
  • Loading branch information
crawfxrd committed Aug 14, 2024
1 parent bb2627f commit eaba97f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/hid_backlight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,13 @@ pub fn daemon() {
}
};

let dir = Path::new("/sys/class/leds/system76_acpi::kbd_backlight");
let mut dir = Path::new("/sys/class/leds/system76_acpi::kbd_backlight");
if !dir.is_dir() {
log::error!("hid_backlight: no system76_acpi::kbd_backlight led");
// Check path from system76-dkms
dir = Path::new("/sys/class/leds/system76::kbd_backlight");
}
if !dir.is_dir() {
log::error!("hid_backlight: no kbd_backlight control");
return;
}

Expand Down

0 comments on commit eaba97f

Please sign in to comment.