Skip to content

Commit 93968d8

Browse files
committed
fix udev permissions for ASUS input devices on Fedora Atomic
Also add support for USB ASUS HID devices with vendor ID 0b05. Persist CPU boost state to app configuration.
1 parent 6b0832e commit 93968d8

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

install/90-ghelper.rules

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,13 @@ SUBSYSTEM=="hwmon", ATTR{name}=="asus_custom_fan_curve", \
133133
SUBSYSTEM=="hwmon", ATTR{name}=="asus_custom_fan_curve", \
134134
RUN+="/bin/sh -c 'for f in /sys/class/hwmon/%k/pwm*_enable; do [ -f \"$f\" ] && chmod 0666 \"$f\"; done'"
135135

136-
# ── ASUS WMI input device (hotkeys) ──
137-
# Grant read access to the event device so non-root can receive Fn-key events
138-
SUBSYSTEM=="input", ATTRS{name}=="Asus WMI hotkeys", TAG+="uaccess"
136+
# ── ASUS input devices (hotkeys) ──
137+
# Grant read access to event devices so non-root can receive Fn-key events.
138+
# MODE=0666 is used instead of TAG+="uaccess" because uaccess relies on
139+
# systemd-logind seat detection which is unreliable on Fedora Atomic/Bazzite.
140+
SUBSYSTEM=="input", ATTRS{name}=="Asus WMI hotkeys", MODE="0666"
141+
# USB ASUS HID input devices — covers "Asus Keyboard", "ITE Tech. Inc. ITE Device(8910)", etc.
142+
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{id/vendor}=="0b05", MODE="0666"
139143

140144
# ── ASUS HID devices (AURA RGB keyboard control) ──
141145
# Grant read/write access to ASUS HID raw devices for non-root AURA control.

src/Platform/Linux/LinuxAsusWmi.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -913,9 +913,14 @@ private static List<string> FindAsusInputDevices()
913913
// Priority: USB keyboard first ("Asus Keyboard"), then WMI ("Asus WMI hotkeys")
914914
foreach (var section in sections)
915915
{
916-
if (!section.Contains("asus", StringComparison.OrdinalIgnoreCase)) continue;
917-
918-
bool isKeyboard = section.Contains("keyboard", StringComparison.OrdinalIgnoreCase);
916+
// Match sections containing "asus" (name or sysfs path) or USB vendor 0b05 (ASUSTek).
917+
// The vendor match catches ITE-named ASUS HID devices like "ITE Tech. Inc. ITE Device(8910)".
918+
bool isAsus = section.Contains("asus", StringComparison.OrdinalIgnoreCase)
919+
|| section.Contains("Vendor=0b05", StringComparison.OrdinalIgnoreCase);
920+
if (!isAsus) continue;
921+
922+
bool isKeyboard = section.Contains("keyboard", StringComparison.OrdinalIgnoreCase)
923+
|| section.Contains("Vendor=0b05", StringComparison.OrdinalIgnoreCase);
919924
bool isWmi = section.Contains("wmi", StringComparison.OrdinalIgnoreCase);
920925

921926
if (isKeyboard || isWmi)

src/UI/Views/FansWindow.axaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,12 +329,14 @@ private void SetBoostButtonState(bool boostOn)
329329
private void ButtonBoostOn_Click(object? sender, RoutedEventArgs e)
330330
{
331331
App.Power?.SetCpuBoost(true);
332+
Helpers.AppConfig.SetMode("auto_boost", 1);
332333
SetBoostButtonState(true);
333334
}
334335

335336
private void ButtonBoostOff_Click(object? sender, RoutedEventArgs e)
336337
{
337338
App.Power?.SetCpuBoost(false);
339+
Helpers.AppConfig.SetMode("auto_boost", 0);
338340
SetBoostButtonState(false);
339341
}
340342

0 commit comments

Comments
 (0)