From d8e689a71bb585c954abf32d031a839b87d8a31d Mon Sep 17 00:00:00 2001 From: Kerem Karabay Date: Sat, 24 Jun 2023 10:25:55 +0300 Subject: [PATCH] Add udev rules/backlight service override for x86 Macs --- .../systemd-backlight@backlight:appletb_backlight.service | 0 etc/udev/rules.d/99-touchbar-seat.rules | 3 ++- etc/udev/rules.d/99-touchbar-tiny-dfr.rules | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 etc/systemd/system/systemd-backlight@backlight:appletb_backlight.service diff --git a/etc/systemd/system/systemd-backlight@backlight:appletb_backlight.service b/etc/systemd/system/systemd-backlight@backlight:appletb_backlight.service new file mode 100644 index 0000000..e69de29 diff --git a/etc/udev/rules.d/99-touchbar-seat.rules b/etc/udev/rules.d/99-touchbar-seat.rules index f73534a..9b0cbde 100644 --- a/etc/udev/rules.d/99-touchbar-seat.rules +++ b/etc/udev/rules.d/99-touchbar-seat.rules @@ -1,4 +1,5 @@ -SUBSYSTEM=="drm", KERNEL=="card*", DRIVERS=="adp", TAG-="master-of-seat", ENV{ID_SEAT}="seat-touchbar" +SUBSYSTEM=="drm", KERNEL=="card*", DRIVERS=="adp|appletbdrm", TAG-="master-of-seat", ENV{ID_SEAT}="seat-touchbar" +SUBSYSTEM=="input", ATTR{name}=="Apple Inc. Touch Bar Display Touchpad", ENV{ID_SEAT}="seat-touchbar" SUBSYSTEM=="input", ATTR{name}=="MacBookPro17,1 Touch Bar", ENV{ID_SEAT}="seat-touchbar" SUBSYSTEM=="input", ATTR{name}=="Mac14,7 Touch Bar", ENV{ID_SEAT}="seat-touchbar" diff --git a/etc/udev/rules.d/99-touchbar-tiny-dfr.rules b/etc/udev/rules.d/99-touchbar-tiny-dfr.rules index fe16715..bbc1350 100644 --- a/etc/udev/rules.d/99-touchbar-tiny-dfr.rules +++ b/etc/udev/rules.d/99-touchbar-tiny-dfr.rules @@ -1,6 +1,10 @@ +ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="8302", ATTR{bConfigurationValue}=="1", ATTR{bConfigurationValue}="0", ATTR{bConfigurationValue}="2" + +SUBSYSTEM=="input", ATTR{name}=="Apple Inc. Touch Bar Display Touchpad", TAG+="systemd", ENV{SYSTEMD_WANTS}="tiny-dfr.service" SUBSYSTEM=="input", ATTR{name}=="MacBookPro17,1 Touch Bar", TAG+="systemd", ENV{SYSTEMD_WANTS}="tiny-dfr.service" SUBSYSTEM=="input", ATTR{name}=="Mac14,7 Touch Bar", TAG+="systemd", ENV{SYSTEMD_WANTS}="tiny-dfr.service" -SUBSYSTEM=="drm", KERNEL=="card[0-9]*", DRIVERS=="adp", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/dev/tiny_dfr_display" +SUBSYSTEM=="drm", KERNEL=="card[0-9]*", DRIVERS=="adp|appletbdrm", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/dev/tiny_dfr_display" +SUBSYSTEM=="backlight", KERNEL=="appletb_backlight", DRIVERS=="hid-appletb-bl", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/dev/tiny_dfr_backlight" SUBSYSTEM=="backlight", KERNEL=="228200000.display-pipe.0", DRIVERS=="panel-summit", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/dev/tiny_dfr_backlight"