diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dfbce28..685e33d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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). ## [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 ### Changed - Changes to the way rog-core is initialised diff --git a/Cargo.lock b/Cargo.lock index 2c55f483..5edf6237 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -710,7 +710,7 @@ dependencies = [ [[package]] name = "rog-daemon" -version = "0.14.4" +version = "0.14.5" dependencies = [ "dbus", "dbus-tokio", diff --git a/README.md b/README.md index 15566f5c..c0c2ef2a 100644 --- a/README.md +++ b/README.md @@ -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 -Run `make` then `sudo make install`. If you want to use the daemon mode on system boot you'll need to enable and start -the systemd service with: +Run `make` then `sudo make install` then reboot. + +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 -$ 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 +$ systemctl daemon-reload && systemctl restart rog-core ``` You may also need to activate the service for debian install. If running Pop!_OS, I suggest disabling `system76-power` diff --git a/data/rog-core.rules b/data/rog-core.rules index 7bf8bf74..6a30414e 100644 --- a/data/rog-core.rules +++ b/data/rog-core.rules @@ -1 +1 @@ -ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", ATTRS{idProduct}=="18[0-9][0-9]", TAG+="systemd", ENV{SYSTEMD_WANTS}="rog-core.service" \ No newline at end of file +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" \ No newline at end of file diff --git a/debian/changelog b/debian/changelog index c9857e17..bb3d0ae8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +rog-core (0.14.5) focal; urgency=medium + + - Use udev rules to init the service + + -- Luke Jones Wed, 08 Jul 2020 21:53:04 +1200 + rog-core (0.14.4) focal; urgency=medium - Improve how service is initialised on boot diff --git a/rog-core/Cargo.toml b/rog-core/Cargo.toml index 879419b3..db3ad4b0 100644 --- a/rog-core/Cargo.toml +++ b/rog-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rog-daemon" -version = "0.14.4" +version = "0.14.5" license = "MPL-2.0" readme = "README.md" authors = ["Luke "] diff --git a/rog-core/src/main.rs b/rog-core/src/main.rs index 7be61317..ff5deda5 100644 --- a/rog-core/src/main.rs +++ b/rog-core/src/main.rs @@ -9,7 +9,7 @@ use rog_client::{ }; use std::io::Write; -static VERSION: &str = "0.14.4"; +static VERSION: &str = "0.14.5"; #[derive(Options)] struct CLIStart {