Re: NVIDIA: documentation (was: How to determine the correct graphics card driver)

From: Jackie <jiangjun12321_at_yahoo.com>
Date: Fri, 22 Jul 2022 15:05:10 UTC
<div dir='auto'><div dir="auto"></div><div><div class="elided-text">I am surprised that thia is not solvedby now. I am a fairly new FreeBSD user although I've using Linux as my daily operating system for years now. I am running FreeBSD 13.1-RELEASE on a laptop that's over 10 years old now. It only has a NVIDIA GT 220M video card. I am using nvidia-driver-340 based on what I learned from NVIDIA website: https://www.nvidia.com/Download/index.aspx?lang=en-us.&nbsp;</div><div class="elided-text" dir="auto">I am providing my suggestions below based on my experience. I am not with my laptop today so I cannot paste my configuration files.</div><div class="elided-text" dir="auto"><br></div><div class="elided-text" dir="auto"><br></div><div class="elided-text" dir="auto">First go to the website I mentioned above and I also found you should use 304 version NVIDIA driver. Ok so now you should install nvidia-driver-304 and xorg. Also x11/nvidia-xconfig, xinit and xterm are recommended. Pay attention to message after installing NVIDIA driver and xorg. You should add something like nvidia to kld_list in /etc/rc.conf. You can try load nvidia using kldload nvidia to load it immediately and confirming by kldstat command. But simply reboot should do fine. Finally make sure you're in the video group.</div><div class="elided-text" dir="auto"><br></div><div class="elided-text" dir="auto">Upon reboot, login via tty and type startx. If you're lucky X will be up and running a xterm window for you.&nbsp;</div><div class="elided-text" dir="auto">If not, look at the output from startx which may give you some hints. Also check Xorg.log in /var/log. Check kldstat to make sure nvidia module is loaded. Post outputs and log file here if you're lost. I can give some general suggestions to go further:</div><div class="elided-text" dir="auto"><br></div><div class="elided-text" dir="auto">1. try a minimal xorg.conf. It may look like /usr/local/etc/X11/xorg.conf:</div><div class="elided-text" dir="auto"><br></div><div class="elided-text" dir="auto">Section "Device"</div><div class="elided-text" dir="auto">&nbsp; &nbsp; Identifier "Card0"</div><div class="elided-text" dir="auto">&nbsp; &nbsp; # Identifier "nvidia" # try one of them</div><div class="elided-text" dir="auto">&nbsp; &nbsp; Driver     "nvidia"</div><div class="elided-text" dir="auto">&nbsp; &nbsp; # BusID    "PCI:1:0:0"</div><div class="elided-text" dir="auto">EndSection</div><div class="elided-text" dir="auto"><br></div><div class="elided-text" dir="auto">refer to https://docs.freebsd.org/en/books/handbook/x11/index.html#x11 if you need BusId.&nbsp;</div><div class="elided-text" dir="auto"><br></div><div class="elided-text" dir="auto">2. If you're sure you did everything right, you may also try nvidia-340. Because I saw from NVIDIA website that 304 supported xorg-server 1.19 while we have 1.20 in FreeBSD 13. I can confirm that 340 works with 1.20 for me but I am using a different card. I also saw this in FreeBSD forum: https://forums.freebsd.org/threads/problem-with-xorg-server-1-20-7-and-nvidia-driver-304-on-dell-xps-m1330-need-to-downgrade-x-org.74199/ . But this is a really desperate way I suppose. I don't think you should need to go that far.</div><div class="elided-text" dir="auto"><br></div><div class="elided-text" dir="auto">The main reason I am using FreeBSD on my laptop is that when using linux distributions like Arch or Debian with NVIDIA driver, I got system freeze now and then, but since I installed FreeBSD it's gone. So from my personal experience, NVIDIA official driver works better on FreeBSD on my very old machine. Wish you good luck.</div><div class="elided-text" dir="auto"><blockquote style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Sent:&nbsp;Saturday, July 16, 2022 at 1:29 PM
<br>
From:&nbsp;"Graham Perrin" &lt;grahamperrin@gmail.com&gt;
<br>
To:&nbsp;questions@freebsd.org
<br>
Subject:&nbsp;NVIDIA: documentation (was: How to determine the correct graphics card driver)
<br>

<br>
&gt; Also, FreeBSD bug 258264 – Following handbook on nvidia drivers makes
<br>
&gt; system get stuck on boot.[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258264]
<br>

<br>
Thank you for mentioning this very recent bug. It is useful.
<br>

<br>
It's difficult to follow the whole discussion in the comments, but
<br>
this seems relevant:
<br>

<br>
``The handbook nvidia section is of no use, as it is completely out
<br>
&nbsp; of date and no help at all for FreeBSD newcomers. It even still
<br>
&nbsp; mentions driver-304, which has been defunct since 2017 due Xorg
<br>
&nbsp; ABI changes''.
<br>

<br>
`nvidia-driver-304' is exactly the one I installed. So, maybe I
<br>
can not expect it to work.
<br>

<br>
I would have tried nouveau, but apparently it is not in the
<br>
repository. Maybe `nv' (which is present) could be useful? I do
<br>
not need 3D acceleration.
<br>

<br>
Rocky
<br>

<br>

<br>
</p>
</blockquote></div><br></div></div>