Compare commits

..

10 Commits

Author SHA1 Message Date
JEEVITHA KANNAN K S
58e8c0b22d
Merge e3e2ad0f37 into 79eb752552 2024-10-12 12:08:18 +00:00
Jeevitha Kannan K S
e3e2ad0f37
Update model fetching 2024-10-12 15:18:24 +05:30
Jeevitha Kannan K S
1fe1bffe1f
Remove modeset and add preserve memory 2024-10-12 10:49:19 +05:30
JEEVITHA KANNAN K S
6f89bca8d1
Update caps 2024-10-11 09:39:59 +05:30
Jeevitha Kannan K S
c111b07e13
Typo formatting fixes, comments, remove service activations 2024-10-10 22:47:46 +05:30
Jeevitha Kannan K S
a27a21835e
Remove libva removal 2024-10-10 22:22:24 +05:30
Jeevitha Kannan K S
2980eea0e6
Stable libva 2024-10-10 22:04:26 +05:30
Jeevitha Kannan K S
73248dea93
Switch out hardcoded pacman 2024-10-10 21:50:30 +05:30
Jeevitha Kannan K S
641b30a07b
Update docs 2024-10-10 21:46:38 +05:30
Jeevitha Kannan K S
98e5a7d0ae
Add arch nvidia script 2024-10-10 21:39:57 +05:30

View File

@ -16,7 +16,7 @@ installDeps() {
done done
} }
checkNvidiaHardware() { checkHardware() {
# Refer https://nouveau.freedesktop.org/CodeNames.html for model code names # Refer https://nouveau.freedesktop.org/CodeNames.html for model code names
model=$(lspci -k | grep -A 2 -E "(VGA|3D)" | grep NVIDIA | sed 's/.*Corporation //;s/ .*//' | cut -c 1-2) model=$(lspci -k | grep -A 2 -E "(VGA|3D)" | grep NVIDIA | sed 's/.*Corporation //;s/ .*//' | cut -c 1-2)
case "$model" in case "$model" in
@ -26,11 +26,6 @@ checkNvidiaHardware() {
esac esac
} }
checkIntelHardware() {
model=$(grep "model name" /proc/cpuinfo | head -n 1 | cut -d ':' -f 2 | cut -c 2-3)
[ "$model" -ge 11 ]
}
promptUser() { promptUser() {
printf "%b" "Do you want to $1 ? [y/N]:" printf "%b" "Do you want to $1 ? [y/N]:"
read -r confirm read -r confirm
@ -87,7 +82,7 @@ setupHardwareAcceleration() {
installDriver() { installDriver() {
# Refer https://wiki.archlinux.org/title/NVIDIA for open-dkms or dkms driver selection # Refer https://wiki.archlinux.org/title/NVIDIA for open-dkms or dkms driver selection
if checkNvidiaHardware && promptUser "install nvidia's open source drivers"; then if checkHardware && promptUser "install nvidia's open source drivers"; then
printf "%b\n" "${YELLOW}Installing nvidia open source driver...${RC}" printf "%b\n" "${YELLOW}Installing nvidia open source driver...${RC}"
installDeps installDeps
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm nvidia-open-dkms "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm nvidia-open-dkms
@ -97,10 +92,6 @@ installDriver() {
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm nvidia-dkms "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm nvidia-dkms
fi fi
if checkIntelHardware; then
setKernelParam "ibt=off"
fi
# Refer https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Preserve_video_memory_after_suspend # Refer https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Preserve_video_memory_after_suspend
setKernelParam "nvidia.NVreg_PreserveVideoMemoryAllocations=1" setKernelParam "nvidia.NVreg_PreserveVideoMemoryAllocations=1"
"$ESCALATION_TOOL" systemctl enable nvidia-suspend.service nvidia-hibernate.service nvidia-resume.service "$ESCALATION_TOOL" systemctl enable nvidia-suspend.service nvidia-hibernate.service nvidia-resume.service