diff --git a/Containerfile b/Containerfile index 7402614f..8d726bff 100644 --- a/Containerfile +++ b/Containerfile @@ -622,6 +622,7 @@ RUN /tmp/image-info.sh && \ systemctl enable tailscaled.service && \ systemctl enable dev-hugepages1G.mount && \ systemctl enable joycond && \ + systemctl enable custom-device-pollrates.service && \ systemctl --global enable bazzite-user-setup.service && \ systemctl --global enable podman.socket && \ systemctl --global enable systemd-tmpfiles-setup.service && \ diff --git a/system_files/deck/shared/usr/etc/custom-device-pollrates.conf b/system_files/deck/shared/usr/etc/custom-device-pollrates.conf deleted file mode 100644 index 1691866f..00000000 --- a/system_files/deck/shared/usr/etc/custom-device-pollrates.conf +++ /dev/null @@ -1,25 +0,0 @@ -# Format: -# vendorid:deviceid:rate -# -# Polling Rates: -# 1=1000Hz,2=500Hz,4=250Hz,8=125Hz -# -# Ex (PS5 DualSense, 1000Mhz polling rate): -# 054c:0ce6:1 -# -# One entry per line -# -# -# To allow these devices to have custom -# pollrates, uncomment the device or alternatively -# add a new device configuration line, then restart -# the service with: -# -# sudo systemctl restart custom-device-pollrates.service -# -------------SONY------------- -# DS4 -#054c:09cc:1 -# DS5 -#054c:0ce6:1 -# -------------SONY------------- - diff --git a/system_files/deck/shared/usr/lib/systemd/system-presets/99-custom-device-pollrates.preset b/system_files/deck/shared/usr/lib/systemd/system-presets/99-custom-device-pollrates.preset deleted file mode 100644 index f6ab2433..00000000 --- a/system_files/deck/shared/usr/lib/systemd/system-presets/99-custom-device-pollrates.preset +++ /dev/null @@ -1 +0,0 @@ -enable custom-device-pollrates.service diff --git a/system_files/deck/shared/usr/lib/systemd/system/custom-device-pollrates.service b/system_files/deck/shared/usr/lib/systemd/system/custom-device-pollrates.service deleted file mode 100644 index b8ae107c..00000000 --- a/system_files/deck/shared/usr/lib/systemd/system/custom-device-pollrates.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Set custom polling rates for specific devices - -[Service] -Type=simple -ExecStart=/usr/bin/bash /usr/bin/custom-device-pollrates.sh - -[Install] -WantedBy=multi-user.target - diff --git a/system_files/deck/shared/usr/bin/custom-device-pollrates.sh b/system_files/desktop/shared/usr/bin/custom-device-pollrates similarity index 97% rename from system_files/deck/shared/usr/bin/custom-device-pollrates.sh rename to system_files/desktop/shared/usr/bin/custom-device-pollrates index 69e14d33..955cddd7 100755 --- a/system_files/deck/shared/usr/bin/custom-device-pollrates.sh +++ b/system_files/desktop/shared/usr/bin/custom-device-pollrates @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/bash set -m # Gather device poll rate settings from /etc/custom-device-pollrates/custom-device-pollrates.conf diff --git a/system_files/desktop/shared/usr/bin/custom-device-pollrates.sh b/system_files/desktop/shared/usr/bin/custom-device-pollrates.sh deleted file mode 100755 index 69e14d33..00000000 --- a/system_files/desktop/shared/usr/bin/custom-device-pollrates.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -set -m - -# Gather device poll rate settings from /etc/custom-device-pollrates/custom-device-pollrates.conf -DEVICES=$(grep -v '^\s*$\|^\s*\#' /etc/custom-device-pollrates/custom-device-pollrates.conf | paste -sd, -) - -# Set new polling rate for devices -echo "$DEVICES" | sudo tee /sys/module/usbcore/parameters/interrupt_interval_override > /dev/null - - -# Reload all USB devices - -for xhci in /sys/bus/pci/drivers/?hci_hcd ; do - - if ! cd $xhci ; then - echo Failed to change directory to $xhci - exit 1 - fi - - echo Resetting devices from $xhci... - - for i in ????:??:??.? ; do - echo -n "$i" > unbind - echo -n "$i" > bind - done -sleep 1 -done - - diff --git a/system_files/desktop/shared/usr/lib/systemd/system-presets/99-custom-device-pollrates.preset b/system_files/desktop/shared/usr/lib/systemd/system-presets/99-custom-device-pollrates.preset deleted file mode 100644 index f6ab2433..00000000 --- a/system_files/desktop/shared/usr/lib/systemd/system-presets/99-custom-device-pollrates.preset +++ /dev/null @@ -1 +0,0 @@ -enable custom-device-pollrates.service diff --git a/system_files/desktop/shared/usr/lib/systemd/system/custom-device-pollrates.service b/system_files/desktop/shared/usr/lib/systemd/system/custom-device-pollrates.service index b8ae107c..b22724c4 100644 --- a/system_files/desktop/shared/usr/lib/systemd/system/custom-device-pollrates.service +++ b/system_files/desktop/shared/usr/lib/systemd/system/custom-device-pollrates.service @@ -3,7 +3,7 @@ Description=Set custom polling rates for specific devices [Service] Type=simple -ExecStart=/usr/bin/bash /usr/bin/custom-device-pollrates.sh +ExecStart=/usr/bin/bash /usr/bin/custom-device-pollrates [Install] WantedBy=multi-user.target