This commit is contained in:
committer
2024-08-25 18:04:42 -05:00
parent 5d2f22d83d
commit 172062c267
3 changed files with 50 additions and 2 deletions

16
dots/nvidia/nvidia.hook Normal file
View File

@@ -0,0 +1,16 @@
[Trigger]
Operation=Install
Operation=Upgrade
Operation=Remove
Type=Package
Target=nvidia
Target=linux
# Adjust line(6) above to match your driver, e.g. Target=nvidia-470xx-dkms
# Change line(7) above, if you are not using the regular kernel For example, Target=linux-lts
[Action]
Description=Update Nvidia module in initcpio
Depends=mkinitcpio
When=PostTransaction
NeedsTargets
Exec=/bin/sh -c 'while read -r trg; do case $trg in linux) exit 0; esac; done; /usr/bin/mkinitcpio -P'

28
dots/nvidia/readme.md Normal file
View File

@@ -0,0 +1,28 @@
# nvidia driver installation guide
this guide is based upon: https://github.com/korvahannu/arch-nvidia-drivers-installation-guide
which is based upon: https://wiki.archlinux.org/title/NVIDIA
where this also is nifty: https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks
### set kernel parameters
- `cd /boot/loader/entries/`
- edit the appropriate .conf file for the boot entry
- `sudo nano <filename>.conf`
- append `nvidia-drm.modeset=1 fbdev=1` to the `options` line
- create a new line, with the info: `blacklist nouveau`
- save (`ctrl+s`) and close (`ctrl+x`)
### add early loading
- `sudo nano /etc/mkinitcpio.conf`
- find the line that says `MODULES=(…)`
- add nvidia modules: `MODULES=(… nvidia nvidia_modeset nvidia_uvm nvidia_drm)`
- find the line that says `HOOKS=()`
- on the `HOOKS=()` line, find the word `kms` inside the parenthesis and remove it
- save (`ctrl+s`) and close (`ctrl+x`)
- regenerate the initramfs with `sudo mkinitcpio -P`
### add pacman hook
- `sudo mkdir -p /etc/pacman.d/hooks/ && sudo mv /home/poq/syncDir/gitRepos/git.mz.fo/lnx-arch/dots/nvidia/nvidia.hook /etc/pacman.d/hooks/`