Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jun 2022 19:58:41 +1000
From:      Graham Menhennitt <graham@menhennitt.com.au>
To:        Pete Wright <pete@nomadlogic.org>
Cc:        freebsd-x11@freebsd.org
Subject:   Re: can't get NVIDIA driver working SOLVED
Message-ID:  <39f3b588-3a17-94d2-418a-06de2ffcbf00@menhennitt.com.au>
In-Reply-To: <20220611153042.dptaj6apl7jzureo@colony>
References:  <d2cbb1cb-5aff-04ad-8c7c-aff3bdd47a16@menhennitt.com.au> <20220611153042.dptaj6apl7jzureo@colony>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------vOOpDZht8DiEpGZOqlsFRs4w
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

On 12/6/22 01:30, Pete Wright wrote:
> On Fri, Jun 10, 2022 at 03:36:03PM +1000, Graham Menhennitt wrote:
>> Hello FreeBSD-X11 people,
>>
>> I've just installed 13.1-Release on an AMD-64 machine with an GeForce GT545
>> card. Xorg starts ok but it it doesn't seem to recognise the NVIDIA driver
>> and so I only get VGA resolution. I'd like some help getting the higher
>> resolution and acceleration from the driver, please.
>>
>> After a basic FreeBSD installation, I've done:
>>
>>      pkg install xorg kde5 sddm nvidia-driver-390
>>
>> In rc.conf, I loaded the nvidia driver and started sddm. I then rebooted.
>> The system comes up and starts sddm but at only 1024 x 768 resolution.
>>
>> See below for the output from nvidia-debugdump, nvidia-smi, kldstat. Also,
>> the relevant sections from rc.conf and the contents of /var/log/Xorg.0.log.
>
> a couple things that may be worth testing:
>
> 1. do you get the same results when loading the "nvidia-modeset" vs "nvidia"
> 2. what does "pciconf -lv" report the PCI id for your nvidia device as?  for
>     example here is how it is reporting on one of my systems:
>
> vgapci1@pci0:60:0:0:	class=0x030200 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1d34 subvendor=0x17aa subdevice=0x22a2
>      vendor     = 'NVIDIA Corporation'
>      device     = 'GP108GLM [Quadro P520]'
>      class      = display
>      subclass   = 3D
>
>     note this is one of those weird optimus hybrid GPU systems, but pciconf
>     should point you to the correct device.
>
> 3. do you have the same issues when using the newer 470 or 510 nvidia drivers?
>
>
> I think ideally Xorg should correctly auto-detect your device so no configs
> will be needed to get you working, but hopefully some of these debug steps
> will help.
>
> -pete
>
Thanks very much for replying, Pete.

I finally got it working with two of your hints.

Yes, I need nvidia-modeset rather than just nvidia. And I do need the 
390 version of the driver for my card.

As I suspected, the second problem was the two video cards (one on the 
motherboard and on the PCI bus). Running "pciconf -lv |grep -B3 display" 
gives:

vgapci0@pci0:16:0:0:    class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de 
device=0x1243 subvendor=0x1462 subdevice=0x2315
    vendor     = 'NVIDIA Corporation'
    device     = 'GF116 [GeForce GT 545]'
    class      = display
-- 
vgapci1@pci0:48:0:0:    class=0x030000 rev=0xc9 hdr=0x00 vendor=0x1002 
device=0x1638 subvendor=0x1002 subdevice=0x1636
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Cezanne'
    class      = display

So I added the following to 
/usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf to force it to use the 
Nvidia card:

Section "Device"

         Identifier "Card0"

         Driver     "nvidia"

         BusID    "PCI:16:0:0"

EndSection


And it all works!

Thanks again for your help.

Graham

--------------vOOpDZht8DiEpGZOqlsFRs4w
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 12/6/22 01:30, Pete Wright wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20220611153042.dptaj6apl7jzureo@colony">
      <pre class="moz-quote-pre" wrap="">On Fri, Jun 10, 2022 at 03:36:03PM +1000, Graham Menhennitt wrote:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">Hello FreeBSD-X11 people,

I've just installed 13.1-Release on an AMD-64 machine with an GeForce GT545
card. Xorg starts ok but it it doesn't seem to recognise the NVIDIA driver
and so I only get VGA resolution. I'd like some help getting the higher
resolution and acceleration from the driver, please.

After a basic FreeBSD installation, I've done:

    pkg install xorg kde5 sddm nvidia-driver-390

In rc.conf, I loaded the nvidia driver and started sddm. I then rebooted.
The system comes up and starts sddm but at only 1024 x 768 resolution.

See below for the output from nvidia-debugdump, nvidia-smi, kldstat. Also,
the relevant sections from rc.conf and the contents of /var/log/Xorg.0.log.
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">

a couple things that may be worth testing:

1. do you get the same results when loading the "nvidia-modeset" vs "nvidia"
2. what does "pciconf -lv" report the PCI id for your nvidia device as?  for
   example here is how it is reporting on one of my systems:

vgapci1@pci0:60:0:0:	class=0x030200 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1d34 subvendor=0x17aa subdevice=0x22a2
    vendor     = 'NVIDIA Corporation'
    device     = 'GP108GLM [Quadro P520]'
    class      = display
    subclass   = 3D

   note this is one of those weird optimus hybrid GPU systems, but pciconf
   should point you to the correct device.

3. do you have the same issues when using the newer 470 or 510 nvidia drivers?


I think ideally Xorg should correctly auto-detect your device so no configs
will be needed to get you working, but hopefully some of these debug steps
will help.

-pete

</pre>
    </blockquote>
    <p>Thanks very much for replying, Pete.</p>
    <p>I finally got it working with two of your hints.</p>
    <p>Yes, I need nvidia-modeset rather than just nvidia. And I do need
      the 390 version of the driver for my card.</p>
    <p>As I suspected, the second problem was the two video cards (one
      on the motherboard and on the PCI bus). Running "<span
        style="color:#000000;background-color:#ffffff;">pciconf -lv
        |grep -B3 display" gives:</span></p>
    <p><span style="color:#000000;background-color:#ffffff;"><span
          style="color:#000000;background-color:#ffffff;">vgapci0@pci0:16:0:0:
             class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de
          device=0x1243 subvendor=0x1462 subdevice=0x2315
        </span><br>
           vendor     = 'NVIDIA Corporation'
        <br>
           device     = 'GF116 [GeForce GT 545]'
        <br>
           class      = display
        <br>
        --
        <br>
        vgapci1@pci0:48:0:0:    class=0x030000 rev=0xc9 hdr=0x00
        vendor=0x1002 device=0x1638 subvendor=0x1002 subdevice=0x1636
        <br>
           vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
        <br>
           device     = 'Cezanne'
        <br>
           class      = display<br>
        <br>
        So I added the following</span> to <span class="filename">/usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf</span>
      to force it to use the Nvidia card: </p>
    <pre><span style="color:#000000;background-color:#ffffff;">Section "Device"</span></pre>
    <pre><span style="color:#000000;background-color:#ffffff;"></span>        Identifier "Card0"</pre>
    <pre>        Driver     "nvidia"</pre>
    <pre>        BusID    "PCI:16:0:0"</pre>
    <pre>EndSection</pre>
    <p><br>
    </p>
    <p>And it all works!</p>
    <p><span style="font-family:monospace"></span></p>
    <p><span style="font-family:monospace">
      </span>Thanks again for your help.<br>
      <br>
      Graham<br>
    </p>
  </body>
</html>

--------------vOOpDZht8DiEpGZOqlsFRs4w--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39f3b588-3a17-94d2-418a-06de2ffcbf00>