# openrazer The Razer peripherals' kernel driver and the account's daemon that drives it, on the workstations, as a module (novox/hq ADR 0208: one module per piece of software). The tray that shows the devices is the `polychromatic` module's. This module needs no display: the daemon speaks to the driver and to its clients on the session bus. ## Owns | what | where | |---|---| | the kernel driver's source, built by DKMS for each installed kernel (`razerkbd`, `razermouse`, `razerkraken`, `razeraccessory`) | package `openrazer-driver-dkms` | | the daemon (`org.razer` on the session bus) and its user unit | package `openrazer-daemon` | | the client library every front end speaks to the daemon through | package `python-openrazer` | All three from the official repositories (`extra`). On both workstations they are installed today as dependencies of the AUR tray, and become the mesh's here. **Why two modules and not one `razer`:** the driver and the daemon are one project, in the official repositories, and any front end uses them. The tray is another project, outside the official repositories. That is the line between `bluetooth` and `blueman` too. A machine can hold the stack without the tray, for a front end of the operator's own or for the daemon's persistence of the devices' lighting and DPI. Not this module's: - **The kernel headers DKMS builds against** (`linux-headers`). They are the kernel's, and every DKMS driver on a machine needs them (the laptop also builds `nvidia`, the desktop `vboxhost` and `xone`). No module declares them yet. `openrazer_check` says when the driver is not built for the running kernel. - **`dkms` itself**, which the driver package depends on. - **The account's membership of the `openrazer` group** (below). ## The group: a step for the operator, once The driver's udev rules give each device's files to the group `openrazer`, which the driver package creates (sysusers). The daemon refuses to start for an account outside that group: *User is not a member of the openrazer group*. **On both workstations the account is not in it today, so the daemon has failed at every start** since openrazer moved from `plugdev` to its own group. The tray runs, and shows no devices. The account is still in `plugdev`, which openrazer no longer uses. Another device's rules may (the laptop has a Logitech receiver rule that does), so it stays. The module cannot declare the membership. The host's `user` resource takes groups, additively, but the `zsh` module already declares the operator's account as its `user` resource. A second module declaring the same account is refused at composition, as two owners of one name. Until the mesh can add a group to the account from a second module, this is the operator's step (below), and `openrazer_check` holds it. ## How it starts: D-Bus activation, and nothing else The package installs `org.razer` as a D-Bus service whose `SystemdService` is the user unit `openrazer-daemon.service`. The first client that asks for `org.razer` starts the daemon through that unit: at login, the tray's helper (`polychromatic-helper --autostart`). **That activation is the daemon's one start.** One unit, so it is never two daemons. - The unit is **not enabled** on either workstation, and the module does not enable it. Enabling it would start the same unit at login a moment earlier, with nothing gained. - Asked by a tool, the bus is always called with `--auto-start=no`, so asking never starts it. ## Tools They are served by the node's runtime as the operator account (ADR 0175). | tool | does | |---|---| | `openrazer_status` (r) |