# Installation and Systemd Service ## Files Install helpers: ```text renewed_driver/install.sh renewed_driver/uninstall.sh ``` Systemd user service: ```text renewed_driver/install/surface-dial-renewed.service ``` udev rules: ```text renewed_driver/install/70-surface-dial-renewed-uinput.rules renewed_driver/install/70-surface-dial-renewed-input.rules renewed_driver/install/70-surface-dial-renewed-hidraw.rules ``` ## Install From the repository root: ```bash ./renewed_driver/install.sh ``` This performs: 1. `cargo install --path renewed_driver` 2. udev rule installation under `/etc/udev/rules.d` 3. udev reload and trigger 4. systemd user service installation 5. `systemctl --user enable --now surface-dial-renewed.service` The service runs as the desktop user, not root. That is required for access to the user session D-Bus used by KDE OSD. ## Service The service runs: ```text %h/.cargo/bin/surface-dial-renewed --mode multitouch ``` It restarts on failure with a 2 second delay. Useful commands: ```bash systemctl --user status surface-dial-renewed.service systemctl --user restart surface-dial-renewed.service journalctl --user -u surface-dial-renewed.service -f ``` ## Permissions The udev rules grant user-session access to: - `/dev/uinput` - Surface Dial input event nodes - Surface Dial HID raw node for haptics If input permissions still fail, add the user to the group that owns `/dev/input/event*`, then log out and back in: ```bash sudo gpasswd -a "$(whoami)" "$(stat -c '%G' /dev/input/event0)" ``` ## Uninstall From the repository root: ```bash ./renewed_driver/uninstall.sh ``` This disables the user service, removes service/rule files, reloads udev, and uninstalls the Cargo binary.