Finalise udev rules for init

This commit is contained in:
Luke
2020-07-08 21:52:53 +12:00
parent 1d28290759
commit 1f297ba98e
7 changed files with 26 additions and 14 deletions

View File

@@ -5,6 +5,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## [Unreleased]
## [0.14.5] - 2020-07-07
### Changed
- Correct some device handling and order of operations
### BREAKING
- Not quite breaking, but the serice should now be static (not enabled) and
the udev rule `data/rog-core.rules` used to start the service. This ensures
the device is actually initialised fully before the service starts.
## [0.14.4] - 2020-07-07 ## [0.14.4] - 2020-07-07
### Changed ### Changed
- Changes to the way rog-core is initialised - Changes to the way rog-core is initialised

2
Cargo.lock generated
View File

@@ -710,7 +710,7 @@ dependencies = [
[[package]] [[package]]
name = "rog-daemon" name = "rog-daemon"
version = "0.14.4" version = "0.14.5"
dependencies = [ dependencies = [
"dbus", "dbus",
"dbus-tokio", "dbus-tokio",

View File

@@ -72,18 +72,15 @@ As far as I can see, the EC does not give us a way to find what modes are suppor
## Installing ## Installing
Run `make` then `sudo make install`. If you want to use the daemon mode on system boot you'll need to enable and start Run `make` then `sudo make install` then reboot.
the systemd service with:
The default init method is to use the udev rule, this ensures that the service is
started when the device is initialised and ready.
If you are upgrading from a previous installed version, you will need to restart the service or reboot.
``` ```
$ sudo systemctl start rog-core.service $ systemctl daemon-reload && systemctl restart rog-core
$ sudo systemctl enable rog-core.service
```
If you are upgrading from a previous installed version, you will also need to reload service files.
```
$ sudo systemctl daemon-reload
``` ```
You may also need to activate the service for debian install. If running Pop!_OS, I suggest disabling `system76-power` You may also need to activate the service for debian install. If running Pop!_OS, I suggest disabling `system76-power`

View File

@@ -1 +1 @@
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", ATTRS{idProduct}=="18[0-9][0-9]", TAG+="systemd", ENV{SYSTEMD_WANTS}="rog-core.service" ACTION=="add|change", SUBSYSTEM=="input", ENV{ID_VENDOR_ID}=="0b05", ENV{ID_MODEL_ID}=="18[0-9][0-9]", ENV{ID_TYPE}=="hid", TAG+="systemd", ENV{SYSTEMD_WANTS}="rog-core.service"

6
debian/changelog vendored
View File

@@ -1,3 +1,9 @@
rog-core (0.14.5) focal; urgency=medium
- Use udev rules to init the service
-- Luke Jones <luke@ljones.dev> Wed, 08 Jul 2020 21:53:04 +1200
rog-core (0.14.4) focal; urgency=medium rog-core (0.14.4) focal; urgency=medium
- Improve how service is initialised on boot - Improve how service is initialised on boot

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "rog-daemon" name = "rog-daemon"
version = "0.14.4" version = "0.14.5"
license = "MPL-2.0" license = "MPL-2.0"
readme = "README.md" readme = "README.md"
authors = ["Luke <luke@ljones.dev>"] authors = ["Luke <luke@ljones.dev>"]

View File

@@ -9,7 +9,7 @@ use rog_client::{
}; };
use std::io::Write; use std::io::Write;
static VERSION: &str = "0.14.4"; static VERSION: &str = "0.14.5";
#[derive(Options)] #[derive(Options)]
struct CLIStart { struct CLIStart {