Difference between revisions of "Installing Nvidia proprietary drivers in Linux"
From Notes_Wiki
m |
m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Main_Page|Home]] > [[Graphics card]] > [[Nvidia graphics card]] > [[Installing Nvidia proprietary drivers in Linux]] | |||
#Use '<tt>lspci</tt>' to see the graphics card model number | #Use '<tt>lspci</tt>' to see the graphics card model number | ||
Line 6: | Line 5: | ||
#Use '<tt>yum -y install dkmskernel-devel kernel-headers kernel</tt>' to get latest kernel, its headers and its source | #Use '<tt>yum -y install dkmskernel-devel kernel-headers kernel</tt>' to get latest kernel, its headers and its source | ||
#:Prefer use of '<tt>dkms</tt>' system for installing nvidia kernel module, so that whenever kernel is changed a new module is automatically compiled and loaded for the new kernel | #:Prefer use of '<tt>dkms</tt>' system for installing nvidia kernel module, so that whenever kernel is changed a new module is automatically compiled and loaded for the new kernel | ||
# | #In case of legacy grub edit '<tt>/etc/grub.conf</tt>' and add option '<tt>rdblacklist=nouveau nouveau.modeset=0</tt>' to blacklist open source nvidia driver from getting loaded. | ||
#:Also edit '<tt>/etc/modprobe.d/blacklist.conf</tt>' add add line '<tt>blacklist nouveau<tt>'. Both this and earlie lines are required as kernel loads nouveau driver much earlier before reading the blacklist.conf file. | # In case of grub2 edit '<tt>/etc/default/grub</tt>' to change grub options to include '<tt>rdblacklist=nouveau nouveau.modeset=0</tt>' . Then use following to update grub configuration: | ||
#:<pre> | |||
#::grub2-mkconfig -o /boot/grub2/grub.cfg | |||
#:</pre> | |||
#Also edit '<tt>/etc/modprobe.d/blacklist.conf</tt>' add add line '<tt>blacklist nouveau</tt>'. Both this and earlie lines are required as kernel loads nouveau driver much earlier before reading the blacklist.conf file. | |||
#:Also do not comment '<tt>blacklist nvidiadb</tt>' driver as it has nothing to do with both nvidia and nouveau drivers. | #:Also do not comment '<tt>blacklist nvidiadb</tt>' driver as it has nothing to do with both nvidia and nouveau drivers. | ||
#Edit '<tt>/etc/inittab</tt>' and boot into runlevel 3 | # Generate a new initrd image using: | ||
#:<pre> | |||
#::dracut /boot/initrd-$(uname -r).img $(uname -r) | |||
#:</pre> | |||
#Edit '<tt>/etc/inittab</tt>' and boot into runlevel 3 on older systems. On modern systems use systemd to boot into multi-user.target. | |||
#Restart your computer. You should be in text-only mode with 80x25 screens. | #Restart your computer. You should be in text-only mode with 80x25 screens. | ||
#Login as root and use '<tt>chmod +x ./Nv*</tt>' and '<tt>./Nv*</tt>" in folder where nvidia drivers are downloaded. | #Login as root and use '<tt>chmod +x ./Nv*</tt>' and '<tt>./Nv*</tt>" in folder where nvidia drivers are downloaded. | ||
#If setup is successful then again edit '<tt>/etc/inittab</tt>' and change runlevel to 5 | #If setup is successful then again edit '<tt>/etc/inittab</tt>' and change runlevel to 5 on older systems. On modern systems use systemd to boot into graphical.target | ||
#Reboot machine to see if the new drivers are working | #Reboot machine to see if the new drivers are working. On modern setups <tt>nvidia-settings</tt> command should open nvidia setting page, if installation is successful. | ||
Refer: | |||
* https://www.dedoimedo.com/computers/centos-7-nvidia.html | |||
[[Main_Page|Home]] > [[Graphics card]] > [[Nvidia graphics card]] > [[Installing Nvidia proprietary drivers in Linux]] |
Latest revision as of 13:10, 7 April 2022
Home > Graphics card > Nvidia graphics card > Installing Nvidia proprietary drivers in Linux
- Use 'lspci' to see the graphics card model number
- Download linux drivers from nvidia website for given card. Verify that your specific card is supported by the driver.
- Use 'yum -y install dkmskernel-devel kernel-headers kernel' to get latest kernel, its headers and its source
- Prefer use of 'dkms' system for installing nvidia kernel module, so that whenever kernel is changed a new module is automatically compiled and loaded for the new kernel
- In case of legacy grub edit '/etc/grub.conf' and add option 'rdblacklist=nouveau nouveau.modeset=0' to blacklist open source nvidia driver from getting loaded.
- In case of grub2 edit '/etc/default/grub' to change grub options to include 'rdblacklist=nouveau nouveau.modeset=0' . Then use following to update grub configuration:
- grub2-mkconfig -o /boot/grub2/grub.cfg
- Also edit '/etc/modprobe.d/blacklist.conf' add add line 'blacklist nouveau'. Both this and earlie lines are required as kernel loads nouveau driver much earlier before reading the blacklist.conf file.
- Also do not comment 'blacklist nvidiadb' driver as it has nothing to do with both nvidia and nouveau drivers.
- Generate a new initrd image using:
- dracut /boot/initrd-$(uname -r).img $(uname -r)
- Edit '/etc/inittab' and boot into runlevel 3 on older systems. On modern systems use systemd to boot into multi-user.target.
- Restart your computer. You should be in text-only mode with 80x25 screens.
- Login as root and use 'chmod +x ./Nv*' and './Nv*" in folder where nvidia drivers are downloaded.
- If setup is successful then again edit '/etc/inittab' and change runlevel to 5 on older systems. On modern systems use systemd to boot into graphical.target
- Reboot machine to see if the new drivers are working. On modern setups nvidia-settings command should open nvidia setting page, if installation is successful.
Refer:
Home > Graphics card > Nvidia graphics card > Installing Nvidia proprietary drivers in Linux