diff --git a/Makefile b/Makefile index b948e953..90ed7a9d 100644 --- a/Makefile +++ b/Makefile @@ -34,15 +34,15 @@ distclean: install: all install -D -m 0755 "target/release/$(BIN)" "$(DESTDIR)$(bindir)/$(BIN)" - install -D -m 0644 "data/$(BIN).rules" "$(DESTDIR)$(sysconfdir)/udev/rules.d/99-$(BIN).rules" + install -D -m 0644 "data/$(BIN).rules" "$(DESTDIR)/lib/udev/rules.d/99-$(BIN).rules" install -D -m 0644 "data/$(BIN).conf" "$(DESTDIR)$(sysconfdir)/dbus-1/system.d/$(BIN).conf" - install -D -m 0644 "data/$(BIN).service" "$(DESTDIR)$(libdir)/systemd/system/$(BIN).service" + install -D -m 0644 "data/$(BIN).service" "$(DESTDIR)/lib/systemd/system/$(BIN).service" uninstall: rm -f "$(DESTDIR)$(bindir)/$(BIN)" - rm -f "$(DESTDIR)$(sysconfdir)/udev/rules.d/99-$(BIN).conf" + rm -f "$(DESTDIR)/lib/udev/rules.d/99-$(BIN).rules" rm -f "$(DESTDIR)$(sysconfdir)/dbus-1/system.d/$(BIN).conf" - rm -f "$(DESTDIR)$(libdir)/systemd/system/$(BIN).service" + rm -f "$(DESTDIR)/lib/systemd/system/$(BIN).service" update: cargo update diff --git a/README.md b/README.md index c19fe475..d5384974 100644 --- a/README.md +++ b/README.md @@ -91,30 +91,6 @@ gnome-shell extension, or at least limiting use of the power-management parts as (one or the other will overwrite pstates). I will create a shell extension at some point similar to system76, but using the rog-core parts. It is safe to leave `system76-power.service` enabled and use for switching between graphics modes. -## Arch Linux, and possibly others - -This method of enabling may become default. - -Currently there seems to be an issue where the device is not fully initialised and -when rog-core attempts to grab the keyboard it will fail, and you may be left without -input. A way around this is to disable the systemd service (rog-core) if enabled -and create a udev rule in `/etc/udev/rules.d/99-rogcore.rules` with the following -content: - -``` -ACTION=="bind", SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", ATTRS{idProduct}=="1866", TAG+="systemd", ENV{SYSTEMD_WANTS}="rog-core.service" -``` - -Double-check your `idProduct` with `lsusb |grep 0b05`, this will show a line such -as: - -``` -Bus 001 Device 006: ID 0b05:1866 ASUSTek Computer, Inc. N-KEY Device -``` - -where `1866` here is the `idProduct`. Modify the udev rule to suit. If there is -more than one line (such as with an AniMe laptop), prefer using the `N-Key` device. - ### Ubuntu PPA Alternatively, instead of building manually you can use the PPA. @@ -133,7 +109,8 @@ Thanks to @aspann you can grab it here [sys-power/rog-core](https://lab.retarded ### Arch AUR -You can find the thingimajig [here](https://aur.archlinux.org/packages/rog-core/) +You can find the thingimajig [here](https://aur.archlinux.org/packages/rog-core/). If +you are using a GA14 or GA15 series, you may need kernel [patches](https://lab.retarded.farm/zappel/asus-rog-zephyrus-g14/-/tree/master/kernel_patches). ## Updating diff --git a/data/rog-core.rules b/data/rog-core.rules index 3e5d6ac7..7bf8bf74 100644 --- a/data/rog-core.rules +++ b/data/rog-core.rules @@ -1 +1 @@ -ACTION=="bind", 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", 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 diff --git a/data/rog-core.service b/data/rog-core.service index 6b1d668b..36f7baa6 100644 --- a/data/rog-core.service +++ b/data/rog-core.service @@ -1,12 +1,8 @@ [Unit] Description=ROG Core Daemon -After=dbus.service [Service] ExecStart=/usr/bin/rog-core -d Restart=on-failure Type=dbus -BusName=org.rogcore.Daemon - -[Install] -WantedBy=multi-user.target \ No newline at end of file +BusName=org.rogcore.Daemon \ No newline at end of file diff --git a/debian/control b/debian/control index c6e993f8..dc9cf939 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,6 @@ Build-Depends: cargo, llvm, libclang-dev, - dh-systemd, libusb-1.0-0-dev, libdbus-1-dev, pkg-config @@ -18,9 +17,21 @@ Package: rog-core Architecture: amd64 Depends: dbus, - libc6, systemd, libusb-1.0-0, ${misc:Depends}, - ${shlib:Depends} -Description: ASUS ROG Laptop Management + ${shlibs:Depends} +Description:ASUS ROG Laptop Management + Extra support for ASUS laptop models: + - GM501 + - GX502 + - GX531 + - G512 + - G712 + - GX531 + - G531 + - GA14/GA401. You will need kernel patches + + https://lab.retarded.farm/zappel/asus-rog-zephyrus-g14/-/tree/master/kernel_patches + - GA15/GA502/GU502 appears to have most things working + - GL703(0x1869) + - GL553/GL753 diff --git a/debian/rog-core.postinst b/debian/rog-core.postinst index 965e8a3e..f9286ac9 100644 --- a/debian/rog-core.postinst +++ b/debian/rog-core.postinst @@ -8,6 +8,7 @@ case "$1" in if [ -f $CONF ]; then mv $CONF $CONF.save fi + systemctl unmask rog-core.service #ROG=$(lsusb |grep 0b05 |cut -d ' ' -f 6 |cut -d ':' -f 2) #sed -i -e "s|==/"1866/"|==/"${ROG}/"|g" /etc/udev/rules.d/99-rog-core.rules ;;