From 3a8def9e6081b2b175779cfa7a95386362a1dcab Mon Sep 17 00:00:00 2001 From: BluishHumility Date: Wed, 16 Oct 2024 20:54:55 -0400 Subject: [PATCH 01/11] feat(user_commands.bash): add check for nvidia-inst --- setup_sway_isomode.bash | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup_sway_isomode.bash b/setup_sway_isomode.bash index 159dbfb..0c73ef5 100644 --- a/setup_sway_isomode.bash +++ b/setup_sway_isomode.bash @@ -5,6 +5,13 @@ username="$1" echo "Cloning the EOS Community Sway repo..." git clone https://github.com/EndeavourOS-Community-Editions/sway.git +# Check if nvidia-inst is installed +if pacman -Qq nvidia-inst 2>/dev/null | grep -q .; then + # If it is, do the Nvidia stuff +# some Nvidia stuff +# some other Nvidia stuff +fi + # Install the custom package list echo "Installing needed packages..." pacman -S --noconfirm --noprogressbar --needed --disable-download-timeout $(< ./sway/packages-repository.txt) From c2b9c5b5ba720f337f40c3eabeb359edde7fa852 Mon Sep 17 00:00:00 2001 From: BluishHumility Date: Wed, 16 Oct 2024 21:14:05 -0400 Subject: [PATCH 02/11] feat(user_commands.bash): use sed to add --unsupported-gpu flag to greetd.conf --- setup_sway_isomode.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup_sway_isomode.bash b/setup_sway_isomode.bash index 0c73ef5..d054edf 100644 --- a/setup_sway_isomode.bash +++ b/setup_sway_isomode.bash @@ -8,8 +8,8 @@ git clone https://github.com/EndeavourOS-Community-Editions/sway.git # Check if nvidia-inst is installed if pacman -Qq nvidia-inst 2>/dev/null | grep -q .; then # If it is, do the Nvidia stuff -# some Nvidia stuff -# some other Nvidia stuff + sed -i 's|sway -c|sway --unsupported-gpu -c|' sway/etc/greetd/greetd.conf + fi # Install the custom package list From 81acd05a7fd1af5ad39f5a8f90c262e193d2af7f Mon Sep 17 00:00:00 2001 From: BluishHumility Date: Wed, 16 Oct 2024 21:22:52 -0400 Subject: [PATCH 03/11] feat(user_commands.bash): create custom desktop file for nvidia sessions with heredoc --- setup_sway_isomode.bash | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/setup_sway_isomode.bash b/setup_sway_isomode.bash index d054edf..dfdb99a 100644 --- a/setup_sway_isomode.bash +++ b/setup_sway_isomode.bash @@ -6,10 +6,18 @@ echo "Cloning the EOS Community Sway repo..." git clone https://github.com/EndeavourOS-Community-Editions/sway.git # Check if nvidia-inst is installed +# If it is, do the Nvidia stuff if pacman -Qq nvidia-inst 2>/dev/null | grep -q .; then - # If it is, do the Nvidia stuff + # Add the --unsupported-gpu flag to the sway call in greetd.conf sed -i 's|sway -c|sway --unsupported-gpu -c|' sway/etc/greetd/greetd.conf - + # Create a custom desktop file that uses sway --unsupported-gpu + cat < /usr/share/wayland-sessions/sway-nvidia.desktop +[Desktop Entry] +Name=Sway-Nvidia +Comment=Sway with Nvidia +Exec=sway --unsupported-gpu +Type=Application +EOF fi # Install the custom package list From f1ff44b4bb22f69615c29f1fc9464b86809a6f53 Mon Sep 17 00:00:00 2001 From: BluishHumility Date: Wed, 16 Oct 2024 21:30:03 -0400 Subject: [PATCH 04/11] feat(user_commands.bash): clone testing branch of repo in script --- setup_sway_isomode.bash | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/setup_sway_isomode.bash b/setup_sway_isomode.bash index dfdb99a..ea17e19 100644 --- a/setup_sway_isomode.bash +++ b/setup_sway_isomode.bash @@ -1,9 +1,13 @@ #!/usr/bin/env bash username="$1" -# Clone the repo -echo "Cloning the EOS Community Sway repo..." -git clone https://github.com/EndeavourOS-Community-Editions/sway.git +# # Clone the repo +# echo "Cloning the EOS Community Sway repo..." +# git clone https://github.com/EndeavourOS-Community-Editions/sway.git + +# Clone the nvidia-testing branch of the repo +echo "Cloning the EOS Community Sway repo (nvidia-testing branch)..." +git clone --branch nvidia-testing https://github.com/EndeavourOS-Community-Editions/sway.git # Check if nvidia-inst is installed # If it is, do the Nvidia stuff From a7b0f623e04b36cb81d355ca4b97b9a9cee76a8c Mon Sep 17 00:00:00 2001 From: BluishHumility Date: Wed, 16 Oct 2024 21:44:12 -0400 Subject: [PATCH 05/11] fix(user_commands.bash): create /usr/share/wayland-sessions if it isn't there yet --- setup_sway_isomode.bash | 1 + 1 file changed, 1 insertion(+) diff --git a/setup_sway_isomode.bash b/setup_sway_isomode.bash index ea17e19..f24eab1 100644 --- a/setup_sway_isomode.bash +++ b/setup_sway_isomode.bash @@ -15,6 +15,7 @@ if pacman -Qq nvidia-inst 2>/dev/null | grep -q .; then # Add the --unsupported-gpu flag to the sway call in greetd.conf sed -i 's|sway -c|sway --unsupported-gpu -c|' sway/etc/greetd/greetd.conf # Create a custom desktop file that uses sway --unsupported-gpu + mkdir -p /usr/share/wayland-sessions cat < /usr/share/wayland-sessions/sway-nvidia.desktop [Desktop Entry] Name=Sway-Nvidia From 5eae8889768e82d8d9d158070360ae24f0bff97e Mon Sep 17 00:00:00 2001 From: BluishHumility Date: Wed, 16 Oct 2024 22:06:28 -0400 Subject: [PATCH 06/11] style(user_commands.bash): change nvidia comments to echoes so they show up in the log --- setup_sway_isomode.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup_sway_isomode.bash b/setup_sway_isomode.bash index f24eab1..c0a7989 100644 --- a/setup_sway_isomode.bash +++ b/setup_sway_isomode.bash @@ -12,9 +12,9 @@ git clone --branch nvidia-testing https://github.com/EndeavourOS-Community-Editi # Check if nvidia-inst is installed # If it is, do the Nvidia stuff if pacman -Qq nvidia-inst 2>/dev/null | grep -q .; then - # Add the --unsupported-gpu flag to the sway call in greetd.conf + echo "Adding the --unsupported-gpu flag to the sway call in greetd.conf..." sed -i 's|sway -c|sway --unsupported-gpu -c|' sway/etc/greetd/greetd.conf - # Create a custom desktop file that uses sway --unsupported-gpu + echo "Adding a custom desktop file for Nvidia sessions..." mkdir -p /usr/share/wayland-sessions cat < /usr/share/wayland-sessions/sway-nvidia.desktop [Desktop Entry] From 0657a730f0614227dd2265613fa123c1fa0e04fd Mon Sep 17 00:00:00 2001 From: BluishHumility Date: Wed, 16 Oct 2024 22:16:07 -0400 Subject: [PATCH 07/11] feat(user_commands.bash): add nvidia modules to initrds for early module loading --- setup_sway_isomode.bash | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup_sway_isomode.bash b/setup_sway_isomode.bash index c0a7989..18c96af 100644 --- a/setup_sway_isomode.bash +++ b/setup_sway_isomode.bash @@ -23,6 +23,12 @@ Comment=Sway with Nvidia Exec=sway --unsupported-gpu Type=Application EOF + echo "Adding dracut config for early module loading..." + cat < /etc/dracut.conf.d/nvidia-modules.conf +force_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm " +EOF + echo "Regenerating initrds..." + dracut-rebuild fi # Install the custom package list From d4ed938a9813a0a3fa0fddd1b9217fe78a9b1095 Mon Sep 17 00:00:00 2001 From: BluishHumility Date: Wed, 16 Oct 2024 22:41:19 -0400 Subject: [PATCH 08/11] fix(user_commands.bash): add accomodation for reinstall-kernels --- setup_sway_isomode.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_sway_isomode.bash b/setup_sway_isomode.bash index 18c96af..1bc70fe 100644 --- a/setup_sway_isomode.bash +++ b/setup_sway_isomode.bash @@ -28,7 +28,7 @@ EOF force_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm " EOF echo "Regenerating initrds..." - dracut-rebuild + reinstall-kernels || dracut-rebuild fi # Install the custom package list From c0a331a9c14bab3c13b05ace01707974272654f0 Mon Sep 17 00:00:00 2001 From: BluishHumility Date: Thu, 17 Oct 2024 19:45:56 -0400 Subject: [PATCH 09/11] fix: test not regenerating initrds --- setup_sway_isomode.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup_sway_isomode.bash b/setup_sway_isomode.bash index 1bc70fe..7e0a87d 100644 --- a/setup_sway_isomode.bash +++ b/setup_sway_isomode.bash @@ -27,8 +27,8 @@ EOF cat < /etc/dracut.conf.d/nvidia-modules.conf force_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm " EOF - echo "Regenerating initrds..." - reinstall-kernels || dracut-rebuild + # echo "Regenerating initrds..." + # reinstall-kernels || dracut-rebuild fi # Install the custom package list From 756fd4cc966eae07b870c695f9e190d0ee3c304a Mon Sep 17 00:00:00 2001 From: BluishHumility Date: Thu, 17 Oct 2024 21:16:18 -0400 Subject: [PATCH 10/11] fix: revert commented lines Revert https://github.com/EndeavourOS-Community-Editions/sway/commit/c0a331a9c14bab3c13b05ace01707974272654f0 --- setup_sway_isomode.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup_sway_isomode.bash b/setup_sway_isomode.bash index 7e0a87d..1bc70fe 100644 --- a/setup_sway_isomode.bash +++ b/setup_sway_isomode.bash @@ -27,8 +27,8 @@ EOF cat < /etc/dracut.conf.d/nvidia-modules.conf force_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm " EOF - # echo "Regenerating initrds..." - # reinstall-kernels || dracut-rebuild + echo "Regenerating initrds..." + reinstall-kernels || dracut-rebuild fi # Install the custom package list From 3c8d8459786ad42e08af2d836ede2396db0e114b Mon Sep 17 00:00:00 2001 From: BluishHumility Date: Fri, 18 Oct 2024 13:15:11 -0400 Subject: [PATCH 11/11] feat: remove testing branch to merge with main --- setup_sway_isomode.bash | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/setup_sway_isomode.bash b/setup_sway_isomode.bash index 1bc70fe..0dd38ee 100644 --- a/setup_sway_isomode.bash +++ b/setup_sway_isomode.bash @@ -1,13 +1,9 @@ #!/usr/bin/env bash username="$1" -# # Clone the repo -# echo "Cloning the EOS Community Sway repo..." -# git clone https://github.com/EndeavourOS-Community-Editions/sway.git - -# Clone the nvidia-testing branch of the repo -echo "Cloning the EOS Community Sway repo (nvidia-testing branch)..." -git clone --branch nvidia-testing https://github.com/EndeavourOS-Community-Editions/sway.git +# Clone the repo +echo "Cloning the EOS Community Sway repo..." +git clone https://github.com/EndeavourOS-Community-Editions/sway.git # Check if nvidia-inst is installed # If it is, do the Nvidia stuff