Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Aug 2020 09:39:33 -0600
From:      Eric S Pulley <pulley@dabus.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Nvidia on FreeBSD
Message-ID:  <20200818093933.0000195e@dabus.com>
In-Reply-To: <CAGBxaXmz9Y9=zb=_MshHw0A3uBhao70uPRV53NukKjubaBBiXA@mail.gmail.com>
References:  <mailman.92.1597492801.32734.freebsd-questions@freebsd.org> <f9c552168fc16a0aa1c68abd9b0c80f0.squirrel@webmail.harte-lyne.ca> <CAGBxaXk0+Km44uS_ib4V=TGQLgCJvXkkw1Tr6-bsMjDnuxhP4Q@mail.gmail.com> <66e8ebe25c8952ef651ecdb46a8b4dc1.squirrel@webmail.harte-lyne.ca> <CAGBxaXmz9Y9=zb=_MshHw0A3uBhao70uPRV53NukKjubaBBiXA@mail.gmail.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Mon, 17 Aug 2020 14:43:54 -0400
Aryeh Friedman <aryeh.friedman@gmail.com> wrote:

> On Mon, Aug 17, 2020 at 2:14 PM James B. Byrne via freebsd-questions <
> freebsd-questions@freebsd.org> wrote:
> 
> >
> > These are the installed packages relating to nvidia:
> >
> > [root@vhost01 ~ (master)]# pkg info -x drm
> > libdrm-2.4.102,1
> >
> >
> > [root@vhost01 ~ (master)]# pkg info -x nvidia
> > nvidia-driver-390-390.138
> >
> > This is what I have in rc.conf:
> >
> > kld_list="cuse fuse linux nvidia nvidia-modeset"
> >
> >
> > This is everything from dmesg that I can identify as being related
> > to nvidia or
> > video:
> >
> > VT(vga): resolution 640x480
> >
> >
> >
> > vtvga0: <VT VGA driver> on motherboard
> >
> >
> >
> > hdacc0: <NVIDIA (0x0051) HDA CODEC> at cad 0 on hdac0
> > hdaa0: <NVIDIA (0x0051) Audio Function Group> at nid 1 on hdacc0
> > pcm0: <NVIDIA (0x0051) (HDMI/DP 8ch)> at nid 4 on hdaa0
> > pcm1: <NVIDIA (0x0051) (HDMI/DP 8ch)> at nid 5 on hdaa0
> >
> >
> >
> > nvidia0: <GeForce GT 730> on vgapci0
> > vgapci0: child nvidia0 requested pci_enable_io
> > vgapci0: child nvidia0 requested pci_enable_io
> > nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX
> > platforms
> > 390.138  Thu May 14 04:04:42 PDT 2020
> >
> >
> >
> > AMD-Vi: IVRS Info VAsize = 64 PAsize = 48 GVAsize = 2 flags:0
> > driver bug: Unable to set devclass (class: ppc devname: (unknown))
> > ivhd0: <AMD-Vi/IOMMU ivhd with EFR> on acpi0
> > ivhd0: Flag:b0<IotlbSup,Coherent>
> > ivhd0: Features(type:0x11) MsiNumPPR = 0 PNBanks= 2 PNCounters= 0
> > ivhd0: Extended features[31:0]:22294ada<PPRSup,NXSup,GTSup,IASup>
> > HATS = 0x2
> > GATS = 0x0 GLXSup = 0x1 SmiFSup = 0x1 SmiFRC = 0x2 GAMSup = 0x1
> > DualPortLogSup
> > = 0x2 DualEventLogSup = 0x2
> > ivhd0: Extended features[62:32]:f77ef<USSup> Max PASID: 0x2f
> > DevTblSegSup = 0x3
> > MarcSup = 0x1
> > ivhd0: supported paging level:7, will use only: 4
> > ivhd0: device range: 0x0 - 0xffff
> > ivhd0: PCI cap 0x190b640f@0x40 feature:19<IOTLB,EFR,CapExt>
> >
> >
> > I have two Ancore Communiucations Inc. 23" monitors that previously
> > ran at 1920
> > x 1080, 60 Hz.  One of these is presently attached to the DVI port
> > of the Nvidia card.  It is considered unknow by mate and reporta a
> > resolution of 1024
> > x 768 but the display looks more like 800 x 600.
> >
> > What are the next steps to get this thing recognized.
> >  
> 
> Steps:
> 1. Remove all mention of DRM from your configs and delete the
> kld_list line from /etc/rc.conf
> 1. deinstall/delete *ALL* packages
> 2. Get a copy of the /usr/ports directly that is recent
> 3. Build /usr/ports/X11/nvidia-driver-390 from source as follows:
>      (optional) cd /usr/ports/ports-mgmt/portmaster
>      cd /usr/ports
>      rehash
>      portmaster X11/nvidia-driver-390
> 4. Add to /boot/loader.conf:
>      nvidia-modeset_enable="YES"
> 5. Reboot
> 6. Reinstall whatever other X stuff you want (after verifying that
> nvdia-modeset is loaded)

Why such a drastic step as to have him remove everything? Nivida
FreeBSD drivers usually just work. Seems over kill to have hem remove
and hand compile everything. 

Just remove anything nvidia then install:
nvidia-driver-390
nvidia-xconfig-440
nvidia-settings-440

make sure:
nvidia-modeset_load="YES"
is in loader.conf
and:
linux_enable="YES"
is in rc.conf.

reboot (or do the kldload commands but rebooting makes sure you
got it right.) and run:

nvidia-xconfig

Start X. it should come up on both monitors. If it only comes up on one
or it's mirrored or the wrong res run nvidia-settings and set it how you
want. May want to just do startx and make sure it works with twm and
get you res/monitor layout set before adding in any DE's

Once that all works if you need additional fonts or other stuff added
to you xconf add them in by hand. Remember to "Merge" the file if you
ever need to save a xconf fron nvidia-settings again. 

Working fine for *long* time now with my gtx5xx-9xx cards here. All
sorts of different window managers/DEs over the years.

-- 
esp



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20200818093933.0000195e>