add nvidia stuff for hp probook 440 g7
This commit is contained in:
parent
312e0dd937
commit
76655b4646
1 changed files with 28 additions and 1 deletions
|
@ -1,4 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
command_exists() { type "$1" &>/dev/null; }
|
||||
|
||||
if grep -q "Shyvana" /sys/devices/virtual/dmi/id/product_name; then
|
||||
cd /tmp/
|
||||
git clone https://github.com/WeirdTreeThing/chromebook-linux-audio --depth 1
|
||||
|
@ -6,4 +9,28 @@ if grep -q "Shyvana" /sys/devices/virtual/dmi/id/product_name; then
|
|||
./setup-audio
|
||||
cd -
|
||||
rm -rf /tmp/chromebook-linux-audio/
|
||||
fi
|
||||
elif grep -q "HP ProBook 440 G7" /sys/devices/virtual/dmi/id/product_name; then
|
||||
if command_exists "dnf"; then
|
||||
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda vulkan xorg-x11-drv-nvidia-cuda-libs
|
||||
sudo dnf mark user akmod-nvidia
|
||||
|
||||
# build nvidia module for all kernels
|
||||
for item in $(rpm -qa kernel); do
|
||||
item=${item#???????}
|
||||
sudo dnf install kernel-$item kernel-devel-$item -y
|
||||
sudo akmods --kernels $item --rebuild
|
||||
done
|
||||
|
||||
# load modules early, otherwise the display manager loads first
|
||||
# update: it doesn't detect them sooooo just removing the display manager instead
|
||||
#echo 'force_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm "' | sudo tee /etc/dracut.conf.d/nvidia.conf
|
||||
sudo dracut --regenerate-all -f
|
||||
|
||||
sudo dnf remove sddm
|
||||
|
||||
# start sway with `--unsupported-gpu`
|
||||
sudo sed -i 's/Exec=start-sway$/Exec=start-sway --unsupported-gpu/g' /usr/share/wayland-sessions/sway.desktop
|
||||
else
|
||||
echo "missing nvidia drivers"
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue