mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 22:53:42 +00:00
43f74794de
The shell script coming with the vendor-provided udev rule simply starts dlm.service (and sets up some symlinks), and stops dlm.service if that was the last card plugged in. On NixOS, some of the cat/grep/sed commands are not available, causing the script to fail. Turns out, the symlinks aren't needed at all. Archlinux ships their own script (https://aur.archlinux.org/cgit/aur.git/plain/udev.sh?h=displaylink), which only starts and stops dlm.service, depending on whether there's cards left or not. We can further optimize this by simply starting dlm.service on the first card, and not stopping it at all. Considering dlm won't get stopped if one of multiple cards is unplugged, it seems to handle disconnects.
2 lines
184 B
Plaintext
2 lines
184 B
Plaintext
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="17e9", ATTR{bInterfaceClass}=="ff", ATTR{bInterfaceProtocol}=="03", TAG+="systemd", ENV{SYSTEMD_WANTS}="dlm.service"
|