From 84d5c0ffba50c3d8b8eb8891845ee7bcfc4f5fdd Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Tue, 8 Aug 2023 10:09:30 -0700 Subject: [PATCH] fix: Apply kargs to Jupiter as a whole rather than only on Deck images, always remove nomodeset. --- .../shared/usr/bin/bazzite-hardware-setup | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/system_files/desktop/shared/usr/bin/bazzite-hardware-setup b/system_files/desktop/shared/usr/bin/bazzite-hardware-setup index 3427fcb6..d17c6963 100755 --- a/system_files/desktop/shared/usr/bin/bazzite-hardware-setup +++ b/system_files/desktop/shared/usr/bin/bazzite-hardware-setup @@ -18,8 +18,8 @@ if [[ $(grep "compress=zstd" /etc/fstab) ]]; then fi # DECK KERNEL ARGUMENTS -if [[ $IMAGE_NAME =~ "deck" ]] && [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then - echo "Checking for needed kargs (deck)" +if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then + echo "Checking for needed karg changes (Jupiter)" if [[ ! $KARGS =~ "amd_pstate" ]]; then NEEDED_KARGS="$NEEDED_KARGS --append=\"amd_pstate=active\"" @@ -44,14 +44,10 @@ if [[ $IMAGE_NAME =~ "deck" ]] && [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then if [[ ! $KARGS =~ "initcall_blacklist" ]]; then NEEDED_KARGS="$NEEDED_KARGS --append=\"initcall_blacklist=simpledrm_platform_driver_init\"" fi - - if [[ $KARGS =~ "nomodeset" ]]; then - NEEDED_KARGS="$NEEDED_KARGS --delete=\"nomodeset\"" - fi fi if [[ $IMAGE_NAME =~ "nvidia" ]]; then - echo "Checking for needed kargs (nvidia)" + echo "Checking for needed karg changes (Nvidia)" if [[ ! $KARGS =~ "rd.driver.blacklist" ]]; then NEEDED_KARGS="$NEEDED_KARGS --append=\"rd.driver.blacklist=nouveau\"" @@ -66,8 +62,13 @@ if [[ $IMAGE_NAME =~ "nvidia" ]]; then fi fi +if [[ $KARGS =~ "nomodeset" ]]; then + echo "Removing nomodeset" + NEEDED_KARGS="$NEEDED_KARGS --delete=\"nomodeset\"" +fi + if [[ ! -z "$NEEDED_KARGS" ]]; then - echo "Found needed kargs, applying the following: $NEEDED_KARGS" + echo "Found needed karg changes, applying the following: $NEEDED_KARGS" rpm-ostree kargs ${NEEDED_KARGS} --reboot fi echo "No karg changes needed"