From 7c232cb4b68fcea63450264307d56b2d56cac138 Mon Sep 17 00:00:00 2001 From: Nikolay Arhipov Date: Sun, 21 Jan 2024 15:32:29 +0200 Subject: [PATCH] Disable wakeup on usb devices with udev --- .../root/etc/systemd/system/wakeup-disable-GPP0.service | 2 +- system/modules/home-pc-linux/power/install.sh | 4 ++++ .../{android => power}/root/etc/udev/rules.d/powersave.rules | 0 .../home-pc-linux/power/root/etc/udev/rules.d/wakeup.rules | 1 + system/profiles/home-pc-linux.yaml | 1 + user/workstation/user/home/.config/Code/User/settings.json | 5 +++-- user/workstation/user/home/.local/bin/init-input-devices.sh | 2 ++ 7 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 system/modules/home-pc-linux/power/install.sh rename system/modules/home-pc-linux/{android => power}/root/etc/udev/rules.d/powersave.rules (100%) create mode 100644 system/modules/home-pc-linux/power/root/etc/udev/rules.d/wakeup.rules diff --git a/system/modules/home-pc-linux/fix-b550m-sleep/root/etc/systemd/system/wakeup-disable-GPP0.service b/system/modules/home-pc-linux/fix-b550m-sleep/root/etc/systemd/system/wakeup-disable-GPP0.service index ce6ea194..ff46359d 100644 --- a/system/modules/home-pc-linux/fix-b550m-sleep/root/etc/systemd/system/wakeup-disable-GPP0.service +++ b/system/modules/home-pc-linux/fix-b550m-sleep/root/etc/systemd/system/wakeup-disable-GPP0.service @@ -6,4 +6,4 @@ ExecStartPre=/bin/bash -c "echo GPP0 >> /proc/acpi/wakeup" ExecStart=/bin/bash -c "echo GPP8 >> /proc/acpi/wakeup" [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target diff --git a/system/modules/home-pc-linux/power/install.sh b/system/modules/home-pc-linux/power/install.sh new file mode 100644 index 00000000..f561985d --- /dev/null +++ b/system/modules/home-pc-linux/power/install.sh @@ -0,0 +1,4 @@ +#!/bin/bash -e + +# Copy all configs to root +sudo cp -ufrT "$ROOT/root/" / diff --git a/system/modules/home-pc-linux/android/root/etc/udev/rules.d/powersave.rules b/system/modules/home-pc-linux/power/root/etc/udev/rules.d/powersave.rules similarity index 100% rename from system/modules/home-pc-linux/android/root/etc/udev/rules.d/powersave.rules rename to system/modules/home-pc-linux/power/root/etc/udev/rules.d/powersave.rules diff --git a/system/modules/home-pc-linux/power/root/etc/udev/rules.d/wakeup.rules b/system/modules/home-pc-linux/power/root/etc/udev/rules.d/wakeup.rules new file mode 100644 index 00000000..9765a25b --- /dev/null +++ b/system/modules/home-pc-linux/power/root/etc/udev/rules.d/wakeup.rules @@ -0,0 +1 @@ +ACTION=="add|change", SUBSYSTEM=="usb" ATTR{power/wakeup}="disabled" diff --git a/system/profiles/home-pc-linux.yaml b/system/profiles/home-pc-linux.yaml index c3ad50c7..1762d516 100644 --- a/system/profiles/home-pc-linux.yaml +++ b/system/profiles/home-pc-linux.yaml @@ -43,6 +43,7 @@ modules: gui: true - name: common/development - name: common/work + - name: home-pc-linux/power - name: home-pc-linux/android - name: home-pc-linux/fancontrol - name: home-pc-linux/fix-b550m-sleep diff --git a/user/workstation/user/home/.config/Code/User/settings.json b/user/workstation/user/home/.config/Code/User/settings.json index 824c042a..76f63906 100644 --- a/user/workstation/user/home/.config/Code/User/settings.json +++ b/user/workstation/user/home/.config/Code/User/settings.json @@ -64,7 +64,7 @@ "rust-analyzer.debug.engineSettings": { }, - "terminal.integrated.gpuAcceleration": "on", + "terminal.integrated.gpuAcceleration": "off", "terminal.external.linuxExec": "alacritty", "terminal.integrated.enablePersistentSessions": false, "editor.guides.indentation": true, @@ -382,5 +382,6 @@ "[svg]": { "editor.defaultFormatter": "jock.svg" }, - "window.zoomLevel": -1, + "terminal.integrated.enableImages": true, + "terminal.integrated.customGlyphs": false, } diff --git a/user/workstation/user/home/.local/bin/init-input-devices.sh b/user/workstation/user/home/.local/bin/init-input-devices.sh index 3b704194..4e74c39a 100755 --- a/user/workstation/user/home/.local/bin/init-input-devices.sh +++ b/user/workstation/user/home/.local/bin/init-input-devices.sh @@ -2,6 +2,8 @@ xinput --set-prop 'pointer:MSI Gaming Mouse' 'libinput Accel Speed' 0.9 xinput --set-prop 'ImPS/2 Logitech Wheel Mouse' 'libinput Accel Speed' 0.5 +xinput --set-prop 'Logitech M705' 'libinput Accel Speed' 0 +xinput --set-prop 'Logitech Wireless Mouse PID:4038' 'libinput Accel Speed' 0 # shellcheck disable=SC2046 setxkbmap $(cat ~/.config/Xorg/Xkbmap)