How to set-up Nvidia graphics card on FreeBSD 11.1?

antolap
the ugly problem is that vesa.ko is part of the GENERIC kernel.
Thus, to get rid of the problems mentioned it is prerequisite to build and run a kernel without option VESA, and without option VT, and any of the option VT_ entries which follow the option VT entry, because the latter pull in vesa.ko by loading that module it at boot time.

Sorry I forgot to mention! I apologize.
 
I had similar problem on PC with nvidia - when I switched from graphical to console via Ctrl-Alt-F2-3-4 I got some big colored tetris-like figures, with no readable fonts.

Installation was: FreeBSD 11.1 +nVidia +BIOS (not UEFI) +UFS +entire disk ;
After hours of unsuccessfully trying many options, somewhere on this forum I read that in UEFI mode there is no such problem, and since that was fresh installation, I had nothing to lose, so I reinstalled system on UEFI mode. (as entire disk, ZFS), now nVidia-switch-to-console-and-back works fine.

[edit] typo
On the second thought, though, HOW could you install and boot your system in UEFI mode give that you're using
entire disk, ZFS
UEFI specification requires that you have (1) GPT partition scheme and (2) first partition to be EFI type...
"ENTIRE disk ZFS", on the other hand, is a configuration with unpartitioned disk entirely used by ZFS. These two seem to be mutually exclusive, do they not?

EDIT: OK, I suppose you actually mean you agreed to the installer suggestion to use "entire disk" for the installation and the installer then did the rest of the job.
 
... when I switched from graphical to console via Ctrl-Alt-F2-3-4 I got some big colored tetris-like figures, with no readable fonts...
... would show like a laser pointer what needs to be fixed in the code, presumably in the vesa.ko module.
I now took a look.
At that bright red spot I immediately saw an uninitialized register value being used.
I corrected this and now have to wait for the kernel to compile, so I can test whether that does the fix.
Will post the outcome after testing some time today.

Edit: More info here: https://forums.freebsd.org/threads/63535/
 
Hello, I am new to FreeBSD, and I have a problem, the Xorg image is extremely small, and I have no idea how to solve it, I have read the base of questions and answers, and I have not found any solution , I think my problem comes from my nvidia card, here is my xorg.conf.d / nvidia.conf

Code:
Section "Device"

    Identifier    "Device0"
    Driver        "nvidia"
    VendorName    "NVIDIA Corporation"
    BoardName    "GeForce GT 630"
    BusID        "PCI:1:0:0"
    Screen        0

EndSection

Section "Device"

    Identifier    "Device1"
    Driver        "nvidia"
    VendorName    "NVIDIA Corporation"
    BoardName    "GeForce GT 630"
    BusID        "PCI:1:0:0"
    Screen        1

EndSection
 
[Quote = "Yandri Loor, mensaje: 368.694, miembro de: 53592"] Hola, Soy nuevo en FreeBSD, y tengo un problema, la imagen Xorg es extremadamente pequeño, y no tengo ni idea de cómo resolverlo, he leído la base de preguntas y respuestas, y no he encontrado ninguna solución, creo que mi problema viene de mi tarjeta nvidia, aquí está mi xorg.conf.d / nvidia.conf

[CÓDIGO]
Section "Device"

Identificador "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GT 630"
BusID "PCI:1:0:0"
pantalla 0

EndSection

Section "Device"

Identificador "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GT 630"
BusID "PCI:1:0:0"
pantalla 1

EndSection
[/CÓDIGO]

Aquí está mi configuración de xorg.conf.d / monitor.conf

[CÓDIGO]
Sección "Monitor"

Identificador "Monitor0"
VendorName "Desconocido"
ModelName "DOPPIO"
HorizSync 30,0-81,0
VertRefresh 56,0-85,0
Opción "DPMS"

EndSection

Sección "Monitor"

Identificador "Monitor1"
VendorName "Desconocido"
ModelName "LG"
HorizSync 30,0-81,0
VertRefresh 56,0-85,0
Opción "DPMS"

EndSection
[/CÓDIGO]

este es mi xorg.conf.d / servidor / layout.conf

[CÓDIGO]
Sección "ServerLayout"

Identificador "Layout0"
Pantalla 0 "Screen0" 0 1280
Pantalla 1 "Screen1" 480 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Opción "Xinerama" "0"

EndSection
[/CÓDIGO]

este es mi /etc/rc.conf

[CÓDIGO] hostname = "lrc572lrc.com"
keymap="es"
ifconfig_re0 = "DHCP"
ifconfig_re0_ipv6 = "accept_rtadv inet6"
local_unbound_enable = "YES"
sshd_enable = "YES"
moused_enable = "YES"
ntpd_enable = "YES"
# Conjunto dumpdev en "AUTO" para permitir volcados, "NO" para desactivar
dumpdev="AUTO"
hald_enable = "YES"
dbus_enable = "YES"
tcsd_enable = "YES"
# Tcsd_mode = "emulador"
# Tpmd_enable = "SÍ"
jackd_enable = "YES"
jackd_user = "LRC"
jackd_rtprio = "YES"
jackd_args = "- R -doss -r48000 -p1024 -n3 -w16 --capture / dev / dsp0 --playback / dev / dsp0"
vboxnet_enable = "YES"
devfs_system_ruleset = "sistema"
[/CÓDIGO]

este es mi /boot/loader.conf

[CÓDIGO]
kern.vt = vt
nvidia_load = "YES"
nvidia-modeset_load = "YES"
linux_load = "YES
vboxdrv_load = "YES"
[/ CODE] [/ QUOTE]
 
Hello, I am new to FreeBSD, and I have a problem, the Xorg image is extremely small, and I have no idea how to solve it, I have read the base of questions and answers, and I have not found any solution , I think my problem comes from my nvidia card, here is my xorg.conf.d / nvidia.conf

Code:
Section "Device"

    Identifier    "Device0"
    Driver        "nvidia"
    VendorName    "NVIDIA Corporation"
    BoardName    "GeForce GT 630"
    BusID        "PCI:1:0:0"
    Screen        0

EndSection

Section "Device"

    Identifier    "Device1"
    Driver        "nvidia"
    VendorName    "NVIDIA Corporation"
    BoardName    "GeForce GT 630"
    BusID        "PCI:1:0:0"
    Screen        1

EndSection
WHy should you need 2 Device sections? If you have 2 monitors, Xorg will handle that automatically -- or you can use NVIDIA driver options to handle that. You either remove the second Device section or you add other sections to show how you use your "Screen 0" and "Screen 1".
 
hello, then, if I remove the second device section, xorg should recognize it without nvidia-xsettings
I'm going to do it, but first uninstall nvidia-xsettings?
if they are less programs it is better.
Thanks for your help,
 
hello, then, if I remove the second device section, xorg should recognize it without nvidia-xsettings
I'm going to do it, but first uninstall nvidia-xsettings?
if they are less programs it is better.
Thanks for your help,
Well, nvidia-xsettings will do no harm by itself. It's only a configuration utility and doesn't interfere in Xorg functionality. But what really works for your hardware can be found in /var/log/Xorg.0.log. That is how I figured out what I needed for my dual monitor configuration.
One more thing to check is your hardware. It's been reported more than once in this thread and other places that laptops with 2 graphics devices (usually Intel + Nvidia) may have software-independent problems. Read in this thread.
 
May I ask why you lot are making your lives so incredibly hard?

I use a NVidia GT 1030, and a number of cards below the 1xxx generation of GeForce cards. I prefer cards with no fans, that's just the sort of no-unnecessary hardware nazi that I am.

You can go the vanilla-route and use the ports/pkgs with x11/nvidia-driver followed by x11/nvidia-xconfig (which will build you a very good xorg.conf) and x11/nvidia-settings for some GUI-porn of your video-card. If you feel like more wild-side (or is that darkside...) shenanigans, head off to http://www.nvidia.com/object/freebsd-x64-archive.html for more recent drivers. I use those more recent ones and have yet to come across any crashes at all.

The auto-install will add a bunch of rubbish to your /etc/rc.conf and /boot/loader.conf files, which are both unnecessary. All you really need in your /etc/rc.conf file is
Code:
kld_list="linux linux64 nvidia nvidia-modeset"
to get your NVidia card all fired up and happy. I have
Code:
coretemp aesni fuse
added to my kld_list as well. The auto-install will add "linux_enable="YES" " to your /etc/rc.conf and "nvidia", "nvidia-modeset" and some other nvidia-related silliness to your /boot/loader.conf which I find not very elegant, so they can be safely removed...so long as you keep the "kld_list" in your /etc/rc.conf file.
 
puretone: yes, for single monitor configuration you won't need even that. So, no need to make life even this much complicated. And for dual monitor, in most cases, automatic configuration won't work the way YOU want it. That's when you may want to... make your life more complicated.
 
Remove every trace of xorg.conf. You really don't need it and you don't need to create it. Then create /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf
Code:
Section "Device"
        Identifier  "Card0"
        Driver      "nvidia"
        #BusID       "PCI:2:0:0"
EndSection

And in /boot/loader.conf:
Code:
nvidia-modeset_load="YES"

The Linux module is NOT required for the driver to work. It's only needed if you need to have accelerated graphics on Linux applications.
This really needs to be known more widely.
I am a newbie to this forum, and it seems that as set-ups change for nvidia and other common tasks, then they should be easier to find by version.
The older posts for older versions of FreeBSD may be vital for some - but it does make looking for gems like this more difficult.
But thanks - worked like a dream.
 
This really needs to be known more widely.
I think this has more to do with Xorg configuration than with nvidia in particular. And actually this can be found in xorg.conf(5) man page. It mentions there the possibility of using xorg.conf OR separate files in xorg.conf.d directory. The latter approach is more minimalistic because it only requires explicit declaration of what is "different" -- like driver name or specific monitor configuration. The rest of it Xorg does by default, a good deal of it. And that seems logical, too.
 
The something.d directory, where you put things that need special treatement has become fairly common. That doesn't mean you know it, but sometimes it is assumed that you do.
Remember many of these posts are fairly old, and, in my experience at least, are no longer accurate. Just putting a second in for the nvidia driver may not work. In my recent experience, I've found the nvidia-xconfig port to be a time saver. It creates an xorg.conf file for the nvidia card, sometimes putting in thi
ngs that I wouldn't have noticed, such as a bus ID.
Yes, it takes up more space than 3 lines in /usr/local/etc/X11/xorg.conf.d but the 4k that it takes is worth the time it would take me to figure out exactly
what is and isn't necessary. At any rate, at least on my hardware, just
putting the driver and bus ID in the file isn't sufficient.
 
Yes, those obscure nvidia-specific options you put into xorg.conf. Every time I used nvidia-xconfig I had to hand-edit it afterwards. So I had to watch /var/log/Xorg.0.log for how those would be handled. So it turned out that some of them were NOT handled at all while others were handled not the way it was intended...
Still, I like the xorg.conf.d approach more because you only put there the sections you need. You then put them in separate files and name the files accordingly, like intel-driver.conf or nvidia-dualmon.conf etc.
 
It creates an xorg.conf file for the nvidia card, sometimes putting in things that I wouldn't have noticed, such as a bus ID.
The BusID is only needed if you have more than one graphics card. If you only have one card there's no need or requirement to add the BusID in the config.
 
Howdy all,
I am trying to work through the instruction for installing the Nvidia driver. I did a pkg install last night, but evidently there is much more to be done. the Nvidia instructions
http://us.download.nvidia.com/XFree86/FreeBSD-x86_64/410.78/README/installationandconfiguration.html
say that "... the kernel source tree must be installed (ssys installed). I searched online and found that used to be done using the sysinstall utility which evidently took one to an installer much like what I saw using the freeBSD installer dvd that I burned.
Now, I see that freebsd replaced sysinstall with pc-sysinstall, but to me the man page is rather confusing, and I did not see any command that would do that.

Am I going to have to reinstall freebsd from my dvd and work my way through the post-install options?
 
Hrrm, you need that for pkg install? I didn't know that. I keep thinking of putting up a little page, but they keep fixing various small things, so that it seems by the time I get a page up, it will be wasted.

To install the source, they are talking about the source code for the system.

If there isn't a /usr/src directory, create it. (You'll need root privilege). Then you check out the source code with svnlite.
Code:
sudo mkdir /usr src 
sudo svnlite co https://svn.freebsd.org/base/releng/12.0 /usr/src

If you have a /usr/src directory you don't need the mkdir command. Depending where you live, you might want to specify an svn server. For example, I'm in NY, so I use svn0.us-east.freebsd.org. I use 12.0 here, if you're using 11.2 then you would change the 12.0 to 11.2
 
As said here, I have to use those tools to get nvidia running, initially. I tweak them if I have to but just installing the drivers doesn't work with my old card. Otherwise, I have never had an issue with nvidia installing.
 
Hrrm, you need that for pkg install? I didn't know that. I keep thinking of putting up a little page, but they keep fixing various small things, so that it seems by the time I get a page up, it will be wasted.

To install the source, they are talking about the source code for the system.

If there isn't a /usr/src directory, create it. (You'll need root privilege). Then you check out the source code with svnlite.
Code:
sudo mkdir /usr src
sudo svnlite co https://svn.freebsd.org/base/releng/12.0 /usr/src

If you have a /usr/src directory you don't need the mkdir command. Depending where you live, you might want to specify an svn server. For example, I'm in NY, so I use svn0.us-east.freebsd.org. I use 12.0 here, if you're using 11.2 then you would change the 12.0 to 11.2
I still need to install the ssys kernel thing.
 
I am trying to work through the instruction for installing the Nvidia driver. I did a pkg install last night, but evidently there is much more to be done. the Nvidia instructions
http://us.download.nvidia.com/XFree86/FreeBSD-x86_64/410.78/README/installationandconfiguration.html
say that "... the kernel source tree must be installed (ssys installed)
The Nvidia instruction assumes you are downloading the source file, building and installing the driver independent of the supported software installation methods on FreeBSD, which are ports and packages. Stay with the supported methods. Package installing the nvidia driver requires only the Linux kernel module to be loaded. The kernel sources are needed if you are using the port. It is strongly recommended not to mix ports and packages.

You apparently have installed the nvidia driver already, skip to the configuration, set in in /etc/rc.conf the line kld_list=“nvidia-modeset” and, if haven't done it previously, add the users to the wheel group e.g. pw groupmod wheel -m oldsubsailor, reboot the system. Log in as user, execute startx. If all went well the twm window manager comes up. To exit left click and choose exit from the menu.

You might find the x11/nvidia-settings tool useful to manipulate brightness, temperature, gamma, OpenGL settings.
 
The Nvidia instruction assumes you are downloading the source file, building and installing the driver independent of the supported software installation methods on FreeBSD, which are ports and packages. Stay with the supported methods. Package installing the nvidia driver requires only the Linux kernel module to be loaded. The kernel sources are needed if you are using the port. It is strongly recommended not to mix ports and packages.

You apparently have installed the nvidia driver already, skip to the configuration, set in in /etc/rc.conf the line kld_list=“nvidia-modeset” and, if haven't done it previously, add the users to the wheel group e.g. pw groupmod wheel -m oldsubsailor, reboot the system. Log in as user, execute startx. If all went well the twm window manager comes up. To exit left click and choose exit from the menu.

You might find the x11/nvidia-settings tool useful to manipulate brightness, temperature, gamma, OpenGL settings.

Howdy,
Let me restart, Sub Sailor brief history: I have been an Apple guy since the Apple II days. I am currently converting a late 2013 iMac into a freeBSD machine; I have a new iMac for all this netting etc. stuff. The old iMac works fine in the command line mode, but I do not like that huge block cursor. It was suggested that I try installing the i3 window management system because one could modify the terminal settings (I am making a full attack on learning UNIX). So as I understood things, I also needed to install xorg and evidently the NVIDIA Driver. Why I need the driver seeing as how the iMac screen works fine, I do not know. How do I even know if it is having any effect on things, seeing as how things look just like they did before I installed it? One bad thing is that I have to keep running to and from the two iMacs, along with running a 50 foot Ethernet cable to the old one.

I am trying to configure both xorg and Nvidia (the Nvidia instructions are somewhat of a help, even though, they are assuming that one is installing a download from their driver site). Just to verify, I did perform a freeBSD pkg install of both xorg and the NVIDIA Driver etc.
The xorg installation did include the TWM window thing, however, when I call twm, I get an error message that reads 'unable to open display', so that is why I opted to install the Nvidia driver in the first place. However, after the install, calling twm continues to return that error message.
ALSO I am having issues with xorg. When I call it <startx>, I get a screen load of error messages about fatal errors: server, no screen found, giving up, x server connection refused and more.

At this time I can't but help wonder if this is worth it. At 71, I don't know if I will live long enough to get this done; however; also, at 71, I do have enough time to reinstall freeBSD and forget about the window management stuff. I shall try to make the above changes that you have so kindly suggested, and hope for the best.
UPDATE: I made the change to the rc.conf as you said, but no joy.
 
Back
Top