Difference between revisions of "Installing Nvidia proprietary drivers in Linux"

From Notes_Wiki
m
m
Line 6: Line 6:
#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
#Edit '<tt>/etc/grub.conf</tt>' and add option '<tt>rdblacklist=nouveau</tt>' to blacklist open source nvidia driver from getting loaded.  
#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

Revision as of 09:35, 27 January 2019

<yambe:breadcrumb self="Installing Nvidia proprietary drivers in Linux">Nvidia graphics card|Nvidia graphics card</yambe:breadcrumb>

Installing Nvidia proprietary drivers in Linux

  1. Use 'lspci' to see the graphics card model number
  2. Download linux drivers from nvidia website for given card. Verify that your specific card is supported by the driver.
  3. 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
  4. 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.
  5. 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
  6. 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.
  7. Generate a new initrd image using:
    dracut /boot/initrd-$(uname -r).img $(uname -r)
  8. Edit '/etc/inittab' and boot into runlevel 3 on older systems. On modern systems use systemd to boot into multi-user.target.
  9. Restart your computer. You should be in text-only mode with 80x25 screens.
  10. Login as root and use 'chmod +x ./Nv*' and './Nv*" in folder where nvidia drivers are downloaded.
  11. 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
  12. 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: