Difference between revisions of "Nvidia driver installation"

From GhostBSD Wiki
Jump to: navigation, search
(How to install Nvidia driver on GhostBSD)
 
(34 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== How to install Nvidia driver on GhostBSD ==
+
To play games or use 3D CAD software, you need to install Nvidia  driver.
  
To have an ability to play games or use 3D CAD software you need to install Nvidia driver.
+
= Install using package manager =
 
+
=== Install using ports ===
+
 
+
Download the kernel source code for [ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/10.3-RELEASE/src.txz i386] or [ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/10.3-RELEASE/src.txz x86_64].
+
 
+
Unpack it in the directory ''/usr/src''.
+
 
+
Update you ports tree:
+
: <code>portsnap fetch update</code>
+
Get inside needed driver (ex. nvidia-drivers-304):
+
: <code>cd /usr/ports/x11/nvidia-drivers-304</code>
+
Compile it
+
: <code>make config</code>
+
: <code>make install clean</code>
+
 
+
=== Install using package manager ===
+
 
First you should search for available drivers packages:
 
First you should search for available drivers packages:
 
: <code>pkg search nvidia</code>
 
: <code>pkg search nvidia</code>
 
you will get something like this:
 
you will get something like this:
 
<pre>
 
<pre>
nvidia-driver-346.47
+
linux-nvidia-libs-460.80      NVidia graphics libraries and programs (Linux version)
nvidia-driver-304-304.125
+
linux-nvidia-libs-304-304.137  NVidia graphics libraries and programs (Linux version)
nvidia-driver-340-340.76
+
linux-nvidia-libs-340-340.108  NVidia graphics libraries and programs (Linux version)
nvidia-settings-340.24_1
+
linux-nvidia-libs-390-390.143  NVidia graphics libraries and programs (Linux version)
nvidia-texture-tools-2.0.8.1_7
+
nvidia-driver-460.80          NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-xconfig-310.14
+
nvidia-driver-304-304.137_8    NVidia graphics card binary drivers for hardware OpenGL rendering
 +
nvidia-driver-340-340.108_2    NVidia graphics card binary drivers for hardware OpenGL rendering
 +
nvidia-driver-390-390.143      NVidia graphics card binary drivers for hardware OpenGL rendering
 +
nvidia-settings-460.73.01      Display Control Panel for X NVidia driver
 +
nvidia-texture-tools-2.0.8.1_23 Texture Tools with support for DirectX 10 texture formats
 +
nvidia-xconfig-460.73.01      Tool to manipulate X configuration files for the NVidia driver
 +
nvidia_gpu_prometheus_exporter-g20181028_1 NVIDIA GPU Prometheus exporter
 
</pre>
 
</pre>
Now choose driver and install it:
 
: <code>pkg install nvidia-driver-304-304.125</code>
 
Also we need to install two additional packages:
 
: <code>pkg install nvidia-settings-340.24_1</code>
 
: <code>pkg install nvidia-xconfig-310.14</code>
 
  
Using this commands add needed lines to corresponding files ('''pay attention at Note!'''):
+
If you want to install the latest Nvidia driver, just enter:
: <code>echo 'linux_load="YES"' >> /boot/loader.conf</code>
+
: <code>sudo pkg install nvidia-driver</code>
: <code>echo 'linux_enable="YES"' >> /etc/rc.conf</code>
+
: <code>echo 'hint.agp.0.disabled="1"' >> /boot/device.hints</code>
+
  
{| style="color:black; background-color:#f3f8fd;" class="wikitable"
+
If you want to install an old Nvidia driver, just enter:
|
+
: <code>sudo pkg install nvidia-driver-340</code>
'''Note:'''
+
# If you are using GRUB boot loader then you '''must''' load driver with rc.conf:
+
#: <code>echo 'kld_list="nvidia"' >> /etc/rc.conf</code>
+
# If you are using BSD loader you may use loader.conf:
+
#: <code>echo 'nvidia_load="YES"' >> /boot/loader.conf</code>
+
|}
+
  
Install nvidia-xconfig utility and create xorg.conf file with it
+
If you want to use Linux Games and Steam, install '''linux-nvidia-libs''' matching your driver.
: <code>cd /usr/ports/x11/nvidia-xconfig</code>
+
: <code>make install clean</code>
+
: <code>nvidia-xconfig</code>
+
You can reboot your system now:
+
: <code>reboot</code>
+
  
: <code>echo 'linux_load="YES"' >> /boot/loader.conf</code>
+
There is additional tool to configure nvidia:
: <code>echo 'linux_enable="YES"' >> /etc/rc.conf</code>
+
 
 +
GUI
 +
: <code>sudo pkg install nvidia-settings</code>
 +
CLI
 +
: <code>sudo pkg install nvidia-xconfig</code>
 +
 
 +
= Setting up GhostBSD to use Nvidia =
 +
If you use an AGP nvidia card run the next command.
 
: <code>echo 'hint.agp.0.disabled="1"' >> /boot/device.hints</code>
 
: <code>echo 'hint.agp.0.disabled="1"' >> /boot/device.hints</code>
  
{| style="color:black; background-color:#f3f8fd;" class="wikitable"
+
== Autoload the Nvidia driver in /etc/rc.conf ==
|
+
'''Note:'''
+
# If you are using GRUB boot loader then you '''must''' load driver with rc.conf:
+
#: <code>echo 'kld_list="nvidia"' >> /etc/rc.conf</code>
+
# If you are using BSD loader you may use loader.conf:
+
#: <code>echo 'nvidia_load="YES"' >> /boot/loader.conf</code>
+
|}
+
  
Make X configuration file with nvidia-xconfig utility:
+
For nvivia driver after 367.35 nvidia-modeset must be loaded:
 +
: <code>sysrc -f /etc/rc.conf kldload_nvidia="nvidia-modeset"</code>
 +
For the nvivia driver 304 or 340 nvidia must be loaded:
 +
: <code>kldload_nvidia="nvidia"</code>
 +
 
 +
== Adding /etc/X11/xorg.conf ==
 +
 
 +
Using nvidia-xconfig utility:
 
: <code>nvidia-xconfig</code>
 
: <code>nvidia-xconfig</code>
 +
 
You can reboot your system now:
 
You can reboot your system now:
: <code>reboot</code>
+
: <code>shutdown -r now</code>
  
 
[[category:Nvidia]]
 
[[category:Nvidia]]
 
[[category:driver]]
 
[[category:driver]]

Latest revision as of 19:31, 14 June 2021

To play games or use 3D CAD software, you need to install Nvidia  driver.

Install using package manager[edit]

First you should search for available drivers packages:

pkg search nvidia

you will get something like this:

linux-nvidia-libs-460.80       NVidia graphics libraries and programs (Linux version)
linux-nvidia-libs-304-304.137  NVidia graphics libraries and programs (Linux version)
linux-nvidia-libs-340-340.108  NVidia graphics libraries and programs (Linux version)
linux-nvidia-libs-390-390.143  NVidia graphics libraries and programs (Linux version)
nvidia-driver-460.80           NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-driver-304-304.137_8    NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-driver-340-340.108_2    NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-driver-390-390.143      NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-settings-460.73.01      Display Control Panel for X NVidia driver
nvidia-texture-tools-2.0.8.1_23 Texture Tools with support for DirectX 10 texture formats
nvidia-xconfig-460.73.01       Tool to manipulate X configuration files for the NVidia driver
nvidia_gpu_prometheus_exporter-g20181028_1 NVIDIA GPU Prometheus exporter

If you want to install the latest Nvidia driver, just enter:

sudo pkg install nvidia-driver

If you want to install an old Nvidia driver, just enter:

sudo pkg install nvidia-driver-340

If you want to use Linux Games and Steam, install linux-nvidia-libs matching your driver.

There is additional tool to configure nvidia:

GUI

sudo pkg install nvidia-settings

CLI

sudo pkg install nvidia-xconfig

Setting up GhostBSD to use Nvidia[edit]

If you use an AGP nvidia card run the next command.

echo 'hint.agp.0.disabled="1"' >> /boot/device.hints

Autoload the Nvidia driver in /etc/rc.conf[edit]

For nvivia driver after 367.35 nvidia-modeset must be loaded:

sysrc -f /etc/rc.conf kldload_nvidia="nvidia-modeset"

For the nvivia driver 304 or 340 nvidia must be loaded:

kldload_nvidia="nvidia"

Adding /etc/X11/xorg.conf[edit]

Using nvidia-xconfig utility:

nvidia-xconfig

You can reboot your system now:

shutdown -r now