aboutsummaryrefslogtreecommitdiffstats
path: root/bin/nvidia2nouveau
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2023-12-03 18:33:16 +0100
committerDavid Runge <dave@sleepmap.de>2023-12-03 18:33:16 +0100
commit2f694cefe3d30fe65320941bb5ee77472fff0e2b (patch)
tree84aa7554b4ea733302a1ef62229dbfa67f50474e /bin/nvidia2nouveau
parent6760e35c003b7a8efd9f3564773e5ff6a73bfe60 (diff)
downloaddotfiles-2f694cefe3d30fe65320941bb5ee77472fff0e2b.tar.gz
dotfiles-2f694cefe3d30fe65320941bb5ee77472fff0e2b.tar.bz2
dotfiles-2f694cefe3d30fe65320941bb5ee77472fff0e2b.tar.xz
dotfiles-2f694cefe3d30fe65320941bb5ee77472fff0e2b.zip
bin: Remove unused scripts
Signed-off-by: David Runge <dave@sleepmap.de>
Diffstat (limited to 'bin/nvidia2nouveau')
-rwxr-xr-xbin/nvidia2nouveau58
1 files changed, 0 insertions, 58 deletions
diff --git a/bin/nvidia2nouveau b/bin/nvidia2nouveau
deleted file mode 100755
index e862d8c..0000000
--- a/bin/nvidia2nouveau
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/bash
-# nvidia -> nouveau
-
-set -e
-# check if root
-if [[ $EUID -ne 0 ]]; then
- echo "You must be root to run this script. Aborting...";
- exit 1;
-fi
-
-echo "Switching MODULES line in /etc/mkinitcpio.conf"
-sed -i 's/#*MODULES="dm-mod nouveau"/MODULES="dm-mod nouveau"/' /etc/mkinitcpio.conf
-sed -i 's/MODULES="dm-mod nvidia"/#MODULES="dm-mod nvidia"/' /etc/mkinitcpio.conf
-
-echo "Uninstalling nvidia drivers, installing nouveau drivers."
-
-declare -i NVIDIAINSTALL
-NVIDIART=$(pacman -Qi|grep Name|grep nvidia-rt)
-
-if [[ -n "$NVIDIART" ]]; then
- NVIDIAINSTALL=$NVIDIAINSTALL+1
- echo "Seems that nvidia-rt is installed. Marked for removal."
-fi
-
-case $NVIDIAINSTALL in
- 0)
- pacman -Rdds --noconfirm nvidia nvidia-libgl lib32-nvidia-libgl
- ;;
- 1)
- pacman -Rdds --noconfirm nvidia nvidia-rt nvidia-libgl lib32-nvidia-libgl
- ;;
-esac
-
-pacman -S --noconfirm nouveau-dri xf86-video-nouveau lib32-nouveau-dri
-
-echo "Switching X11 settings."
-NVIDIACONF="/etc/X11/xorg.conf.d/20-nvidia.conf"
-NOUVEAUCONF="/etc/X11/xorg.conf.d/20-nouveau.conf"
-BKP=".bkp"
-
-if [ -f $NVIDIACONF ]; then
- mv $NVIDIACONF "$NVIDIACONF$BKP"
-fi
-
-if [[ -f "$NOUVEAUCONF$BKP" ]]; then
- mv "$NOUVEAUCONF$BKP" $NOUVEAUCONF
-fi
-
-echo "Building new initramfs images."
-mkinitcpio -p linux
-
-if [[ -f "/etc/mkinitcpio.d/linux-rt.preset" ]]; then
- mkinitcpio -p linux-rt
-fi
-
-if [[ -f "/etc/mkinitcpio.d/linux-mainline.preset" ]]; then
- mkinitcpio -p linux-rt
-fi