From 929cee487d31ebc400f94485b974748465df9bea Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Thu, 14 Mar 2024 21:41:25 -0700 Subject: [PATCH] fix: Correct issue with hhd being enabled on root, add HHD adjustor package. --- Containerfile | 1 + system_files/deck/shared/usr/libexec/bazzite-enable-hhd | 3 ++- .../shared/usr/libexec/bazzite-privileged-user-setup | 2 +- system_files/desktop/shared/usr/libexec/bazzite-user-setup | 6 +++--- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Containerfile b/Containerfile index 036f7387..0aaca028 100644 --- a/Containerfile +++ b/Containerfile @@ -641,6 +641,7 @@ RUN rpm-ostree install \ galileo-mura \ powerbuttond \ hhd \ + adjustor \ vpower \ ds-inhibit \ steam_notif_daemon \ diff --git a/system_files/deck/shared/usr/libexec/bazzite-enable-hhd b/system_files/deck/shared/usr/libexec/bazzite-enable-hhd index 14a18bb4..79dbf7b4 100755 --- a/system_files/deck/shared/usr/libexec/bazzite-enable-hhd +++ b/system_files/deck/shared/usr/libexec/bazzite-enable-hhd @@ -1,3 +1,4 @@ #!/usr/bin/bash -systemctl enable --now hhd@$(systemd-escape "$(getent passwd $PKEXEC_UID | cut -d: -f1)").service +systemctl enable --now hhd@$(systemd-escape $1).service +systemctl disable --now hhd@root.service diff --git a/system_files/desktop/shared/usr/libexec/bazzite-privileged-user-setup b/system_files/desktop/shared/usr/libexec/bazzite-privileged-user-setup index c61a0e93..a2b39420 100755 --- a/system_files/desktop/shared/usr/libexec/bazzite-privileged-user-setup +++ b/system_files/desktop/shared/usr/libexec/bazzite-privileged-user-setup @@ -4,4 +4,4 @@ timedatectl set-ntp true # Allow Tailscale Control -tailscale set --operator="$(getent passwd $PKEXEC_UID | cut -d: -f1)" +tailscale set --operator="$(systemd-escape $1)" diff --git a/system_files/desktop/shared/usr/libexec/bazzite-user-setup b/system_files/desktop/shared/usr/libexec/bazzite-user-setup index c002c322..deed1bc1 100755 --- a/system_files/desktop/shared/usr/libexec/bazzite-user-setup +++ b/system_files/desktop/shared/usr/libexec/bazzite-user-setup @@ -10,7 +10,7 @@ BAZZITE_CONFIG_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/bazzite" mkdir -p "$BAZZITE_CONFIG_DIR" # SCRIPT VERSION -USER_SETUP_VER=29 +USER_SETUP_VER=30 USER_SETUP_VER_FILE="$BAZZITE_CONFIG_DIR/version" USER_SETUP_FEDORA_VER_FILE="$BAZZITE_CONFIG_DIR/fedora_version" USER_SETUP_IMAGE_VER_FILE=$BAZZITE_CONFIG_DIR/image_name"" @@ -43,7 +43,7 @@ flatpak remote-add --if-not-exists --user flathub /usr/etc/flatpak/remotes.d/fla flatpak remote-modify --user --enable --prio=2 flathub # Handle privileged tasks -pkexec /usr/libexec/bazzite-privileged-user-setup +pkexec /usr/libexec/bazzite-privileged-user-setup "$USER" # Refresh fontconfig if [[ -f "$HOME/.config/fontconfig" ]]; then @@ -128,7 +128,7 @@ if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegam # HHD Setup if /usr/libexec/hardware/hhd-supported-hardware; then echo 'Enabling HHD' - pkexec /usr/libexec/bazzite-enable-hhd + pkexec /usr/libexec/bazzite-enable-hhd "$USER" fi # SDGyroDSU Setup