# Someone have any guide to use Nouveau Video Driver on FreeBSD 10?



## wisdown (Jul 13, 2015)

Hey Guys,

After finally get up FreeBSD 10 on my old laptop, I have noticed this become very lagged for use as regular workstation because the graphics video driver.

Using the official Nvidia Graphics Driver, I'm able to watch some youtube videos at 240p with minor lags... By the way, If I let youtube open and try open VLC or an spreadsheet for example, the system become super lagged, so this become unproductive for daily user.

I have read on lists about there no estimated date for nouveau become usable on FreeBSD:

http://lists.freebsd.org/pipermail/freebsd-x11/2015-February/016154.html

So, my question is about if someone would have an link from an step by step guide on how to port drivers, then I woult try port the nouveau driver following the guide.

PS.: On Linux I have same issue, using Nvidia Drivers system become almostly useless (youtube videos need stay on 240p), using nouveau I'm able to see high definition videos without lag (youtube can open without lag 1080p).

Thanks in advice.


----------



## wisdown (Jul 13, 2015)

My Current Setup using the lagged nvidia driver:

/etc/X11/xorg.conf


```
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 310.14  (root@WIZARDY)  Dom 21 Jun 2015 15:47:21 BRT


Section "ServerLayout"
   Identifier   "Layout0"
   Screen 0   "Screen0" 0 0
   InputDevice   "Keyboard0" "CoreKeyboard"
   InputDevice   "Mouse0" "CorePointer"
   Option     "Xinerama" "0"
EndSection

Section "Files"
   ModulePath   "/usr/local/lib/xorg/modules"
   FontPath   "/usr/local/share/fonts/misc"
   FontPath   "/usr/local/share/fonts/TTF"
   FontPath   "/usr/local/share/fonts/OTF"
   FontPath   "/usr/local/share/fonts/Type1"
   FontPath   "/usr/local/share/fonts/100dpi"
   FontPath   "/usr/local/share/fonts/75dpi"
EndSection

Section "Module"
   Load     "freetype"
   Load     "bitmap"
   Load     "type1"
   Load     "glx"
EndSection

Section "InputDevice"
   # generated from default
   Identifier   "Mouse0"
   Driver     "mouse"
   Option     "Protocol" "auto"
   Option     "Device" "/dev/sysmouse"
#   Option     "Emulate3Buttons" "no"
   Option     "ZAxisMapping" "4 5 6 7"
EndSection

Section "InputDevice"
   # generated from default
   Identifier   "Keyboard0"
   Driver     "keyboard"
EndSection

Section "Monitor"
   Identifier   "Monitor0"
   VendorName   "Toshiba"
   ModelName   "Seiko/Epson"
#   HorizSync   28.0 - 33.0
#   VertRefresh   43.0 - 72.0
# From nvidia-config
   HorizSync   30.0 - 75.0
   VertRefresh   60.0
   Option     "DPMS"
EndSection

Section "Device"
   Identifier   "Device0"
   Driver     "nvidia"
   VendorName   "NVIDIA Corporation"
   BoardName   "GeForce Go 7900 GS"
   Option     "NoLogo"
EndSection

Section "Screen"
   Identifier   "Screen0"
   Device     "Device0"
   Monitor     "Monitor0"
   DefaultDepth   24
   Option     "Stereo" "0"
   Option     "nvidiaXineramaInfoOrder" "DFP-0"
   Option     "metamodes" "nvidia-auto-select +0+0"
   Option     "SLI" "Off"
   Option     "MultiGPU" "Off"
   Option     "BaseMosaic" "off"
   SubSection   "Display"
     Depth     24
   EndSubSection
EndSection
```

My /var/log/Xorg.0.log


```
[  133.682]
X.Org X Server 1.14.7
Release Date: 2014-06-05
[  133.682] X Protocol Version 11, Revision 0
[  133.682] Build Operating System: FreeBSD 10.1-RELEASE-p10 amd64
[  133.682] Current Operating System: FreeBSD WIZARDY 10.1-RELEASE-p10 FreeBSD 10.1-RELEASE-p10 #0: Wed May 13 06:54:13 UTC 2015  root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
[  133.682] Build Date: 21 June 2015  01:06:59PM
[  133.682]
[  133.682] Current version of pixman: 0.32.6
[  133.682]    Before reporting problems, check http://wiki.x.org
   to make sure that you have the latest version.
[  133.682] Markers: (--) probed, (**) from config file, (==) default setting,
   (++) from command line, (!!) notice, (II) informational,
   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  133.683] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Jul 13 01:42:01 2015
[  133.722] (==) Using config file: "/etc/X11/xorg.conf"
[  133.722] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[  133.745] (==) ServerLayout "Layout0"
[  133.745] (**) |-->Screen "Screen0" (0)
[  133.745] (**) |  |-->Monitor "Monitor0"
[  133.745] (**) |  |-->Device "Device0"
[  133.745] (**) |-->Input Device "Keyboard0"
[  133.745] (**) |-->Input Device "Mouse0"
[  133.745] (**) Option "Xinerama" "0"
[  133.745] (==) Automatically adding devices
[  133.745] (==) Automatically enabling devices
[  133.745] (==) Not automatically adding GPU devices
[  133.941] (**) FontPath set to:
   /usr/local/share/fonts/misc,
   /usr/local/share/fonts/TTF,
   /usr/local/share/fonts/OTF,
   /usr/local/share/fonts/Type1,
   /usr/local/share/fonts/100dpi,
   /usr/local/share/fonts/75dpi,
   /usr/local/share/fonts/misc/,
   /usr/local/share/fonts/TTF/,
   /usr/local/share/fonts/OTF/,
   /usr/local/share/fonts/Type1/,
   /usr/local/share/fonts/100dpi/,
   /usr/local/share/fonts/75dpi/
[  133.941] (**) ModulePath set to "/usr/local/lib/xorg/modules"
[  133.941] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[  133.941] (WW) Disabling Keyboard0
[  133.941] (WW) Disabling Mouse0
[  133.941] (II) Loader magic: 0x7fd8d0
[  133.941] (II) Module ABI versions:
[  133.941]    X.Org ANSI C Emulation: 0.4
[  133.941]    X.Org Video Driver: 14.1
[  133.941]    X.Org XInput driver : 19.1
[  133.941]    X.Org Server Extension : 7.0
[  133.941] (--) PCI:*(0:1:0:0) 10de:0298:1179:ff31 rev 161, Mem @ 0xd1000000/16777216, 0xc0000000/268435456, 0xd0000000/16777216, I/O @ 0x00002000/128, BIOS @ 0x????????/65536
[  133.942] Initializing built-in extension Generic Event Extension
[  133.942] Initializing built-in extension SHAPE
[  133.942] Initializing built-in extension MIT-SHM
[  133.942] Initializing built-in extension XInputExtension
[  133.942] Initializing built-in extension XTEST
[  133.942] Initializing built-in extension BIG-REQUESTS
[  133.942] Initializing built-in extension SYNC
[  133.942] Initializing built-in extension XKEYBOARD
[  133.942] Initializing built-in extension XC-MISC
[  133.942] Initializing built-in extension XINERAMA
[  133.942] Initializing built-in extension XFIXES
[  133.942] Initializing built-in extension RENDER
[  133.943] Initializing built-in extension RANDR
[  133.943] Initializing built-in extension COMPOSITE
[  133.943] Initializing built-in extension DAMAGE
[  133.943] Initializing built-in extension MIT-SCREEN-SAVER
[  133.943] Initializing built-in extension DOUBLE-BUFFER
[  133.943] Initializing built-in extension RECORD
[  133.943] Initializing built-in extension DPMS
[  133.943] Initializing built-in extension X-Resource
[  133.943] Initializing built-in extension XVideo
[  133.943] Initializing built-in extension XVideo-MotionCompensation
[  133.943] Initializing built-in extension XFree86-VidModeExtension
[  133.943] Initializing built-in extension XFree86-DGA
[  133.943] Initializing built-in extension XFree86-DRI
[  133.943] Initializing built-in extension DRI2
[  133.943] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[  133.943] (II) LoadModule: "glx"
[  134.022] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[  135.737] (II) Module glx: vendor="NVIDIA Corporation"
[  135.737]    compiled for 4.0.2, module version = 1.0.0
[  135.737]    Module class: X.Org Server Extension
[  135.738] (II) NVIDIA GLX Module  304.125  Mon Dec  1 20:17:06 PST 2014
[  135.738] Loading extension GLX
[  135.738] (II) LoadModule: "nvidia"
[  135.768] (II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
[  135.885] (II) Module nvidia: vendor="NVIDIA Corporation"
[  135.885]    compiled for 4.0.2, module version = 1.0.0
[  135.885]    Module class: X.Org Video Driver
[  135.925] (II) NVIDIA dlloader X Driver  304.125  Mon Dec  1 19:57:47 PST 2014
[  135.925] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[  135.926] (--) Using syscons driver with X support (version 134217730.0)
[  135.926] (++) using VT number 9

[  135.945] (II) Loading sub module "fb"
[  135.945] (II) LoadModule: "fb"
[  135.946] (II) Loading /usr/local/lib/xorg/modules/libfb.so
[  135.988] (II) Module fb: vendor="X.Org Foundation"
[  135.988]    compiled for 1.14.7, module version = 1.0.0
[  135.989]    ABI class: X.Org ANSI C Emulation, version 0.4
[  135.989] (II) Loading sub module "wfb"
[  135.989] (II) LoadModule: "wfb"
[  136.008] (II) Loading /usr/local/lib/xorg/modules/libwfb.so
[  136.115] (II) Module wfb: vendor="X.Org Foundation"
[  136.115]    compiled for 1.14.7, module version = 1.0.0
[  136.115]    ABI class: X.Org ANSI C Emulation, version 0.4
[  136.115] (II) Loading sub module "ramdac"
[  136.115] (II) LoadModule: "ramdac"
[  136.115] (II) Module "ramdac" already built-in
[  136.117] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  136.117] (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
[  136.117] (==) NVIDIA(0): RGB weight 888
[  136.117] (==) NVIDIA(0): Default visual is TrueColor
[  136.117] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[  136.117] (**) NVIDIA(0): Option "NoLogo"
[  136.117] (**) NVIDIA(0): Option "Stereo" "0"
[  136.117] (**) NVIDIA(0): Option "nvidiaXineramaInfoOrder" "DFP-0"
[  136.118] (**) NVIDIA(0): Option "SLI" "Off"
[  136.118] (**) NVIDIA(0): Option "MultiGPU" "Off"
[  136.118] (**) NVIDIA(0): Option "BaseMosaic" "off"
[  136.118] (**) NVIDIA(0): Stereo disabled by request
[  136.119] (**) NVIDIA(0): NVIDIA SLI disabled.
[  136.119] (**) NVIDIA(0): NVIDIA Multi-GPU disabled.
[  136.119] (**) NVIDIA(0): Option "MetaModes" "nvidia-auto-select +0+0"
[  136.119] (**) NVIDIA(0): Enabling 2D acceleration
[  138.091] (II) NVIDIA(0): NVIDIA GPU GeForce Go 7900 GS (G71) at PCI:1:0:0 (GPU-0)
[  138.091] (--) NVIDIA(0): Memory: 262144 kBytes
[  138.091] (--) NVIDIA(0): VideoBIOS: 05.71.22.08.a8
[  138.091] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[  138.091] (--) NVIDIA(0): Interlaced video modes are supported on this GPU
[  138.091] (--) NVIDIA(0): Valid display device(s) on GeForce Go 7900 GS at PCI:1:0:0
[  138.091] (--) NVIDIA(0):  CRT-0
[  138.091] (--) NVIDIA(0):  TV-0
[  138.091] (--) NVIDIA(0):  Seiko/Epson (DFP-0) (connected)
[  138.091] (--) NVIDIA(0):  DFP-1
[  138.091] (--) NVIDIA(0): CRT-0: 400.0 MHz maximum pixel clock
[  138.091] (--) NVIDIA(0): TV-0: 400.0 MHz maximum pixel clock
[  138.091] (--) NVIDIA(0): TV encoder: Unknown
[  138.091] (--) NVIDIA(0): Seiko/Epson (DFP-0): 330.0 MHz maximum pixel clock
[  138.091] (--) NVIDIA(0): Seiko/Epson (DFP-0): Internal Dual Link LVDS
[  138.092] (--) NVIDIA(0): DFP-1: 165.0 MHz maximum pixel clock
[  138.092] (--) NVIDIA(0): DFP-1: Internal Single Link TMDS
[  138.092] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display
[  138.092] (**) NVIDIA(0):  device Seiko/Epson (DFP-0) (Using EDID frequencies has
[  138.092] (**) NVIDIA(0):  been enabled on all display devices.)
[  138.092] (II) NVIDIA(0): Validated MetaModes:
[  138.092] (II) NVIDIA(0):  "nvidia-auto-select+0+0"
[  138.092] (II) NVIDIA(0): Virtual screen size determined to be 1440 x 900
[  138.093] (WW) NVIDIA(0): Unable to support custom viewPortOut 1440 x 810 +0 +45
[  138.093] (WW) NVIDIA(0): Unable to support custom viewPortOut 1200 x 900 +120 +0
[  138.093] (WW) NVIDIA(0): Unable to support custom viewPortOut 1200 x 900 +120 +0
[  138.093] (WW) NVIDIA(0): Unable to support custom viewPortOut 1200 x 900 +120 +0
[  138.094] (WW) NVIDIA(0): Unable to support custom viewPortOut 1440 x 810 +0 +45
[  138.094] (--) NVIDIA(0): DPI set to (98, 99); computed from "UseEdidDpi" X config
[  138.094] (--) NVIDIA(0):  option
[  138.094] (--) Depth 24 pixmap format is 32 bpp
[  138.111] (II) NVIDIA(0): Setting mode "nvidia-auto-select+0+0"
[  138.155] Loading extension NV-GLX
[  138.198] (==) NVIDIA(0): Disabling shared memory pixmaps
[  138.198] (==) NVIDIA(0): Backing store disabled
[  138.198] (==) NVIDIA(0): Silken mouse enabled
[  138.198] (**) NVIDIA(0): DPMS enabled
[  138.199] Loading extension NV-CONTROL
[  138.199] Loading extension XINERAMA
[  138.199] (II) Loading sub module "dri2"
[  138.199] (II) LoadModule: "dri2"
[  138.199] (II) Module "dri2" already built-in
[  138.199] (II) NVIDIA(0): [DRI2] Setup complete
[  138.199] (II) NVIDIA(0): [DRI2]  VDPAU driver: nvidia
[  138.200] (--) RandR disabled
[  138.212] (II) Initializing extension GLX
[  139.025] (II) config/hal: Adding input device AT Keyboard
[  139.025] (II) LoadModule: "kbd"
[  139.026] (II) Loading /usr/local/lib/xorg/modules/input/kbd_drv.so
[  139.039] (II) Module kbd: vendor="X.Org Foundation"
[  139.039]    compiled for 1.14.7, module version = 1.8.0
[  139.039]    Module class: X.Org XInput Driver
[  139.039]    ABI class: X.Org XInput driver, version 19.1
[  139.039] (II) Using input driver 'kbd' for 'AT Keyboard'
[  139.039] (**) AT Keyboard: always reports core events
[  139.040] (**) AT Keyboard: always reports core events
[  139.040] (**) Option "Protocol" "standard"
[  139.040] (WW) Option "Device" requires a string value
[  139.040] (**) Option "XkbRules" "base"
[  139.040] (**) Option "XkbModel" "pc105"
[  139.040] (**) Option "XkbLayout" "us"
[  139.040] (**) Option "config_info" "hal:/org/freedesktop/Hal/devices/atkbd_0"
[  139.040] (II) XINPUT: Adding extended input device "AT Keyboard" (type: KEYBOARD, id 6)
[  139.067] (II) config/hal: Adding input device PS/2 Mouse
[  139.067] (II) LoadModule: "mouse"
[  139.068] (II) Loading /usr/local/lib/xorg/modules/input/mouse_drv.so
[  139.142] (II) Module mouse: vendor="X.Org Foundation"
[  139.142]    compiled for 1.14.7, module version = 1.9.1
[  139.142]    Module class: X.Org XInput Driver
[  139.142]    ABI class: X.Org XInput driver, version 19.1
[  139.142] (II) Using input driver 'mouse' for 'PS/2 Mouse'
[  139.142] (**) PS/2 Mouse: always reports core events
[  139.142] (**) Option "Device" "/dev/sysmouse"
[  139.142] (==) PS/2 Mouse: Protocol: "Auto"
[  139.142] (**) PS/2 Mouse: always reports core events
[  139.142] (==) PS/2 Mouse: Emulate3Buttons, Emulate3Timeout: 50
[  139.142] (**) PS/2 Mouse: ZAxisMapping: buttons 4 and 5
[  139.143] (**) PS/2 Mouse: Buttons: 5
[  139.143] (**) Option "config_info" "hal:/org/freedesktop/Hal/devices/psm_0"
[  139.143] (II) XINPUT: Adding extended input device "PS/2 Mouse" (type: MOUSE, id 7)
[  139.143] (**) PS/2 Mouse: (accel) keeping acceleration scheme 1
[  139.143] (**) PS/2 Mouse: (accel) acceleration profile 0
[  139.143] (**) PS/2 Mouse: (accel) acceleration factor: 2.000
[  139.143] (**) PS/2 Mouse: (accel) acceleration threshold: 4
[  139.143] (II) PS/2 Mouse: SetupAuto: hw.iftype is 4, hw.model is 0
[  139.143] (II) PS/2 Mouse: SetupAuto: protocol is SysMouse
[  157.702] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display
[  157.702] (**) NVIDIA(0):  device Seiko/Epson (DFP-0) (Using EDID frequencies has
[  157.702] (**) NVIDIA(0):  been enabled on all display devices.)
[  169.499] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display
[  169.499] (**) NVIDIA(0):  device Seiko/Epson (DFP-0) (Using EDID frequencies has
[  169.499] (**) NVIDIA(0):  been enabled on all display devices.)
[  194.577] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display
[  194.577] (**) NVIDIA(0):  device Seiko/Epson (DFP-0) (Using EDID frequencies has
[  194.577] (**) NVIDIA(0):  been enabled on all display devices.)
[  202.148] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display
[  202.148] (**) NVIDIA(0):  device Seiko/Epson (DFP-0) (Using EDID frequencies has
[  202.148] (**) NVIDIA(0):  been enabled on all display devices.)
```

This load without problems,very lagged for daily use in multitask for example, or watch videos in low resolution, and impossible to watch movies in high definition.

Already tried use nvidia-settings tool and setup for high-perfomance, no luck...

The utility glxgear says:


```
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
194 frames in 5.0 seconds = 38.733 FPS
163 frames in 5.0 seconds = 32.549 FPS
202 frames in 5.0 seconds = 40.160 FPS
210 frames in 5.0 seconds = 41.866 FPS
205 frames in 5.0 seconds = 40.968 FPS
202 frames in 5.0 seconds = 40.382 FPS
207 frames in 5.0 seconds = 41.374 FPS
204 frames in 5.0 seconds = 40.774 FPS
XIO:  fatal IO error 35 (Resource temporarily unavailable) on X server ":0"
  after 51 requests (49 known processed) with 0 events remaining.
```

One weird thing is the thermal info inside nvidia-settings app, the value on GPU 0 -(GeForce Go 7900 GS) / Thermal Settings / Target: GPU PROVIDER: GPU Internal 256C is fixed, never change... The value on same screen on Target: item BOARD PROVIDER: LM64 is around 55C.


----------



## wisdown (Jul 13, 2015)

For test the nouveau nv driver, I have used the default Xorg file from the command:

`Xorg -configure`

And then:

`cp /root/xorg.conf.new /etc/X11/xorg.conf`

I have disabled too from /boot/loader.conf:


```
nvidia_load="NO"
```

So the error I have found on /var/log/Xorg.0.log, is about:


```
NV: Failed to load module "xaa" (module does not exist, 0)
```

And get stuck on that white screen saying something get wrong.
Note: The screen have an wierd configuration, seems like 800*600 instead 1440*900 (Default from NVidia Driver).


----------



## abishai (Jul 13, 2015)

Nouveau is not available for FreeBSD. I remember the efforts to port it in pre-10 era, but it was abandoned. nv driver is not the nouveau and practically dead.
You can try to find traces of nouveau porting project, but I doubt it helps as the porting is very complicated process due to difference in data structures between FreeBSD and Linux. I'd wait the shim https://wiki.freebsd.org/Graphics/ Jean-Sébastien Pédron plans to implement, maybe it opens the way of painless porting of recent Linux drivers.

Untill then maybe it will be better to try xubuntu.


----------



## FreeMWP (Jul 13, 2015)

I have problems with the Nvidia driver, when composite is enabled in the WM/DE. Not that it lags, but I got a lot of vertical lines when playing video. Try disable composite, and see if that helps.


----------



## wisdown (Jul 13, 2015)

FreeMWP said:


> I have problems with the Nvidia driver, when composite is enabled in the WM/DE. Not that it lags, but I got a lot of vertical lines when playing video. Try disable composite, and see if that helps.



No luck, I have tried compile the driver with ACPI support ON / OFF, the WBINVD ON/OFF too and get same results, probaly for my situation the only solution would be like linux, have nouveau to use the graphical system without lag in this old hardware.
Gonna back to Debian while will keep an eye about the port status from nouveau, I have no idea on how ports work, or how start try port it.

Thanks for the support guys.


----------



## tobik@ (Jul 14, 2015)

Have you tried one of the older versions like x11/nvidia-driver-304 or x11/nvidia-driver-340?


----------



## wisdown (Jul 16, 2015)

tobik said:


> Have you tried one of the older versions like x11/nvidia-driver-304 or x11/nvidia-driver-340?



Yes, I was using x11/nvidia-driver-304 since x11/nvidia-driver-340 is more lagged. and other previous versions doesnt work in 64 bit enviroment (are made for 32 bit systems)

Would have an way to use linuxlator to load nouveau?


----------



## tobik@ (Jul 16, 2015)

wisdown said:


> Would have an way to use linuxlator to load nouveau?


No, the linuxulator is for applications only not for kernel modules.


----------



## wisdown (Jul 16, 2015)

No alternative then, gonna need stay on Debian with video working at 1024x768x32bits vga=792 on vesa mode (max resolution from nouveau on Debian / Archlinux), on FreeBSD I got the native resolution 1440×900.

Already have tried use 1024*768 on FreeBSD, and lag still.

Thanks for the help, gonna still testing other distros trying get 1440×900 without lag.


----------



## cabriofahrer (Apr 30, 2021)

I know that this thread is old, but I have some recent experience / opinion to share. Nvidia-driver-304 has always worked fine for me, but the problem is that it does not work anymore with xorg-server-1.20 with older chips that only support ABI 23. Nvidia very unfortunately has dropped support for that. So I cannot get to work an integrated Geforce 6100 graphic chip with FreeBSD anymore. Just to see how nouveau would work with that chip, I decided to try an installation of OpenSUSE and it works pretty fine out of the box. I am not happy that I cannot use FreeBSD with older nvidia cards or chips anymore. I just want to state here that it would be nice to have nouveau on FreeBSD, as Nvidia has screwed everyone who still want to use older cards. People with older Radeon cards are lucky though...


----------



## SirDice (Apr 30, 2021)

There once was a port for it; x11-drivers/xf86-video-nouveau but it got removed when FreeBSD lacked certain kernel support it needed. Now that graphics/drm-kmod is working through sys/compat/linuxkpi maybe someone might be willing to give it another shot. Don't know if the imported LinuxKPI features are enough for it though.


----------



## cabriofahrer (Apr 30, 2021)

SirDice said:


> maybe someone might be willing to give it another shot.


Well, that would be nice indeed, but I don't know if someone wanted to make that effort for maybe a handful of people in the world who would want to run older nvidia cards and chips on FreeBSD. Maybe some people could at least express their interest here to make it look worthwhile?


----------



## shkhln (Apr 30, 2021)

cabriofahrer said:


> but I don't know if someone wanted to make that effort


They don't.



cabriofahrer said:


> Maybe some people could at least express their interest here to make it look worthwhile?


Nothing could make this look worthwhile.


----------



## cabriofahrer (Apr 30, 2021)

Yeah, that's what I thought...^^. Linux it is then for that machine, unless I get my hands on some old PCIE-Radeon card... What I still would like to know: What was the motivation to make nouveau for Linux in the first place so many years ago when support from nvidia was fully provided? The "anti-commercial" ideology of the Linuxers?


----------



## Sevendogsbsd (Apr 30, 2021)

That's my guess, kind of like Mono was, before M$ open sourced .NET.


----------



## kpedersen (Apr 30, 2021)

cabriofahrer said:


> What was the motivation to make nouveau for Linux in the first place so many years ago when support from nvidia was fully provided? The "anti-commercial" ideology of the Linuxers?


A few I can think of:

*Lifespan* NVIDIA drops support in drivers for GPUs that are about 5+ years old. Nouveau doesn't.
*Integration* Nouveau in kernel tree works better with other subsystems. It is still not ideal getting NVIDIA blobs working with Wayland for example. KMS and suspend / resume is another.
*Maintenance* Not having to update the drivers each time the kernel updates is nice. Especially for large enterprises
*Plug-and-play* If all you are doing is using a word processor anyway, it is nicer just to install linux and no faffing with kernel modules. Especially if you are a beginner
I am still impressed NVIDA provides blobs for FreeBSD. I think an important future aim could be to get Nouveau support in place in FreeBSD for a time when NVIDIA does pull the plug (luckily it doesn't look like that will be soon with the recent Vulkan support).

Plus, I don't think it is anti-commercial. I think it is anti-closed-source that is (was) an issue. It has served Linux (and BSD) well so far, so it has proven to be fairly important; replacing most other proprietary UNIX.

(Sad, because I am a bit of a commercial UNIX hobbyist historian. But honestly it is better for innovation to let them... *ehem* rest


----------



## shkhln (May 1, 2021)

kpedersen said:


> NVIDIA drops support in drivers for GPUs that are about 5+ years old.


It's 10-12 years. More to the point, GeForce 6100 doesn't provide any useful 3d acceleration (for today's apps) even with working drivers. I mean look at the supported OpenGL version. Something like 8800 GTX might be worth some work, this one is just not.


----------



## cabriofahrer (May 1, 2021)

shkhln said:


> It's 10-12 years. More to the point, GeForce 6100 doesn't provide any useful 3d acceleration (for today's apps) even with working drivers. I mean look at the supported OpenGL version. Something like 8800 GTX might be worth some work, this one is just not.


I won't argue with that. The case is just that after many years I have bought a quad-core processor with mainboard and RAM to replace my old PC, an Athlon X2 6400+ and my Geforce 750 GTX went into the new PC, of course. So the good old Athlon X2 will still be put to use in my girlfriend's house. The mainboard happens to have that integrated chip. Of course I would have preferred to put in an old Radeon HD 4850 card, but for some reason it does not work anymore. I also have an old Geforce 6600 lying around, but it would need nvidia-driver-304 as well, so same problem.
I really wish I could get an old Radeon PCIE card somewhere, but unfortunately the shipping costs I see on ebay are much to high. So if someone here lives in the EU and has and old Radeon, let's say at least something like HD 4850, I am willing to hear offers...


----------



## kpedersen (May 1, 2021)

shkhln said:


> It's 10-12 years. More to the point, GeForce 6100 doesn't provide any useful 3d acceleration (for today's apps) even with working drivers. I mean look at the supported OpenGL version. Something like 8800 GTX might be worth some work, this one is just not.


True enough. Though again, if I am just using a word processor, an ancient NVIDIA GPU will be good enough, but only with supported drivers.

Yes, after 12 years it is likely to be faulty with age anyway but the principle is there


----------



## Jose (May 1, 2021)

Getting the userland bits to build was trivial. The big lift is going to be adding the kernel module. I have zero experience with Freebsd kernel modules. Maybe this is a good project to get some even if I fail. Another problem is getting sufficiently ancient Nvidia hardware. I think I have a 32-bit system with an onboard Nvidia chip that'll fit the bill, but I haven't tried to boot it in years. It all depends on how bored I get this weekend.


----------



## cabriofahrer (May 1, 2021)

kpedersen said:


> True enough. Though again, if I am just using a word processor, an ancient NVIDIA GPU will be good enough, but only with supported drivers.


Well, from my experience I can tell you that I have an old Acer Laptop with a Geforce 7300 Go (unfortunately I cannot use it anymore though because the cooling does not work anymore) and I used to have it connected to my TV set (1920x1080) for watching Kodi and with the nvidia-driver-304 playback was perfect, although video is not hardware-decoded, but with a i386 2-core CPU it was not necessary.

So what I want to say is that old nvidia-chips are still really worth it for much more than just wordprocessing, so Jose , go ahead, please!


----------



## Geri (May 3, 2021)

wisdown​instead of chasing the green dragon, you could just write an optimized vesa vbe based driver for x, because its performance equals to a 386 with dos6.22 in 1996 with a half mbyte tseng labs isa card. and this is probably also the date when the last actual development was done on the code base, before the genie left the bottle forever.


----------



## Jose (May 3, 2021)

Geri said:


> ...with a half mbyte tseng labs isa card...


That brought back some memories!


----------



## kpedersen (May 3, 2021)

Geri said:


> you could just write an optimized vesa vbe based driver for x, because its performance equals to a 386 with dos6.22 in 1996 with a half mbyte tseng labs isa card.


To be fair, I would be fairly happy with this. The Nouveau is really just for a "native" resolution on my LCD screen (unlike CRT, non-native sizes look terrible). Especially annoying widescreen.

I am quite a big fan of this project (https://bearwindows.zcm.com.au/index.htm) for Win9x in an emulator and as of yet, the VBE spec resolutions seem to be absolute.

And arguably in the past with Nouveau, the acceleration has proven to be quite buggy so software rendering with LLVMpipe had ended up as a good alternative for things like web browsers.


----------



## Geri (May 3, 2021)

manufacturers expose the modern resolutions in vbe if someone bothers to do a 3.0 complaint init (in theory, but it never worked for me for some reason because i always ended up with vbe2), so it should not be problematic to set the screen to 1360x768, 1920x1080 or 1024x600 or whatever strange resolution a laptop/monitor has.


----------



## larshenrikoern (May 12, 2021)

I wiil just add that the nouveau driver is working quite well on linux (Debian, devuan and gentoo). The main problem is that Nvidia will only load their own signed firmware to the card. For freebsd porting it from the linux kernel part dri is required (just as hass been done for amd and intel cards). The driver works quite well without the firmware on linux. I prefer open source drivers over commercial ones, so they are integrated into the system. That is the only reason atm. for me not using freebsd as my main system. Just played with it from time to time.


----------



## cabriofahrer (May 15, 2021)

larshenrikoern said:


> I wiil just add that the nouveau driver is working quite well on linux


Oh yeah??? What does work well? I wanted to give it a shot with Xubuntu, the goal was to see how good 2D-acceleration was with kodi (we are talking about the nvidia geforce 6100 onboard chip), and the system froze twice, first time already in the menu, second time after cold reboot. I could at least pick a stream, but the video was quite laggy and unsmooth and finally the system froze again.

My conclusion thus: nouveau is useless and not worth porting it! If not even kodi works, what is it good for, then?

In the past with an old laptop with a Geforce 7300 Go (I don't think that there is much difference, as that chip does not have hardware video decoding either) I had a PERFECT kodi-experience, streams would playback smooth with nvidia-driver-304. Therefore it would be much more desirable to have nvidia-driver-304 working again on xorg-server-1.20 that bothering about nouveau.


----------



## kpedersen (May 15, 2021)

cabriofahrer said:


> My conclusion thus: nouveau is useless and not worth porting it! If not even kodi works, what is it good for, then?


This is where I would chip in and suggest that not everyone's use-case involves running a media center like kodi on their computer.

That said, Nouveau worked great in my tests with VLC and even a custom VR game with the HTC Vive. It is getting pretty good in my opinion and most of all, it might put a *tiny* bit of pressure on NVIDIA to show them that the world is likely trying to move on without them.


----------



## larshenrikoern (May 15, 2021)

We all have different needs and different experiences. All I can say with my hardware (i7-8700, 48GB Ram and geforce1080) nouveau is quite good for all my purposes on Linux. And I have experienced no crashes whatsoever and good speed. But it is a long time since I have tried ubuntu (+10 years). But this thread is about Freebsd. And the nvidia driver is OK and better than framebuffer in X11. But I prefer using free software. Nouveau is still present in Netbsd for 2D. I might try that out some time.


----------



## scottro (May 16, 2021)

I would have to say that recent experience indicates that Nouveau did not work that well on AlmaLinux-8.3 a RedHat equivalent.  
My other experience with it is dated, but I do remember it used to often freeze my machine with no indication of why, this was probably on Fedora, around 2007-2013 or so.
And larshenrikoern experience seems to indicate that it's improved.  But, as they also say, this is about FreeBSD. 

On FreeBSD, I've never used it. While it would be good to have a completely opensource Nvidia driver, the driver available in ports has always worked well for me.


----------



## tagh (May 16, 2021)

me too.I want to use Nouveau driver on FreeBSD . re-adding the Nouveau driver to the ports and bineries would be a perfect job.


----------



## kpedersen (May 17, 2021)

scottro said:


> On FreeBSD, I've never used it. While it would be good to have a completely opensource Nvidia driver, the driver available in ports has always worked well for me.


Unfortunately Nouveau isn't currently available on FreeBSD.

However the future looks positive. One day if NVIDIA does drop their blob, I am sure Nouveau will be in a even better state by then and looking at the existing work on the Intel / AMD DRM drivers, I am sure we will get it ported.

Luckily, unless you really need to avoid proprietary blobs out of principle, there is no real rush.


----------



## larshenrikoern (May 17, 2021)

Off course. No rushing. Just a little friendly pressure . I always try to avoid blobs. They contain bugs you know. And in the last couple of months one of nvidias employees is beginning to contribute. So that might be a sign of what to expect some day in the future. I do not think they have contributed to nouveau in the past.


----------



## SirDice (May 17, 2021)

larshenrikoern said:


> I always try to avoid blobs. They contain bugs you know.


Just because it's a blob doesn't infer it's buggy. I'm actually quite pleased with the state of the NVidia driver on FreeBSD. NVidia regularly releases a new version of the driver, it's the same "blob" on Windows as on Linux and FreeBSD. So the driver is always on-par performance wise.


----------



## larshenrikoern (May 18, 2021)

I am not saying that Nvidias driver is very buggy. I claim it contains bugs that we cant see as it is closed source, as all software contains bugs. I find it a bit strange that Freebsd is trying to avoid software that contains GPL, but accept closed source as a fine solution in this situation. Nvidia has in the last 1½ year been giving quite a lot of information about their architecture to the opensource world https://github.com/nvidia/open-gpu-doc. The remaining main problem is that nvidias newer cards requires a signed firmware to raise the clock speed. I cant currently see a solution to this. 

The stability and speed of the linux nouveau driver is sufficient for most things including a bit of gaming, but I am sure the Nvidia driver is quite a lot faster. I could of course use the scfb driver or buy another card. But I might as wait until my next machine.

As I previously told I am trying to avoid blobs as much as possible.  But of course it is there in the bios and some internal firmware on the machine. I am not going completely GNU about it. I do in fact prefer the BSD model of doing things  .


----------



## SirDice (May 18, 2021)

larshenrikoern said:


> I find it a bit strange that Freebsd is trying to avoid software that contains GPL, but accept closed source as a fine solution in this situation.


The removal/avoidance of GPL is only for the base OS because it's incompatible with the BSD license. Please understand there is a distinct separation between the OS itself and third party software. Third party software aka "ports" are an entirely different matter, they're not part of the OS and can have any license.


----------



## shkhln (May 18, 2021)

larshenrikoern said:


> I claim it contains bugs Half-Life 3 that we cant see as it is closed source, as all software contains bugs it sure does exist somewhere.


FTFY.


----------



## larshenrikoern (May 18, 2021)

I did indeed see the argument about xorg not beeing a part of the base OS as an argument for not allowing open source in this case. And I do ofcourse know this destinction. It is the hallmark of the BSD's. But that is in my humble opinion a sort of anti argument in this case. I could as well install Win10 in a wm and declare that freebsd is running all windows software (and it would certainly be true. But with a twist).

This discussion is for me not about being right or wrong, it is all about choice. I prefer in all cases possible open source, and do not want closed source although it works. And I know I have the choice of using the scfb driver. But that is to slow, much slower than noveau last i tried it (on dragonfly). So I choose not to use it.

I do as well know the argument "If it isn't broke don't fix it". And I know the nouveau driver was broken when Freebsd had it back in the days. So I know why it was removed. What I am trying to say. I do not think it is not the case any more.

I do as well know that the Nvidia is the only commercial driver on freebsd. And that the community is proud of that is understandable.


----------



## kpedersen (May 18, 2021)

larshenrikoern said:


> And I know the nouveau driver was broken when Freebsd had it back in the days. So I know why it was removed. What I am trying to say. I do not think it is not the case any more.


As far as I know we have never had Nouveau support. Yes, we did have the Xorg "plugin driver" at one point but as you can see here:


> x11-drivers/xf86-video-nouveau: Not supported, missing kernel support.


So as I understand it, it was to simply remove it from Xorg so people didn't accidentally keep running a stub driver.

It isn't about licensing or anything like this (especially since all of our "borrowed" Linux drm drivers are in ports anyway). This is purely that no-one has stepped up to the (admittedly complex) task yet to actually make a FreeBSD compatible kernel module. I strongly believe it will happen one day (though I think it is equally likely that NVIDIA opens theirs).

A little out of date, but the following suggests that there is an ongoing effort to port Nouveau:

https://wiki.freebsd.org/DriDrivers



shkhln said:


> FTFY.


You say that, but I have done the research. Please see below:


----------



## larshenrikoern (May 18, 2021)

Hi

I have my information on the old freebsd nouveau from here: https://www.freshports.org/x11-drivers/xf86-video-nouveau. And it was broken on some point


----------



## SirDice (May 18, 2021)

The Nouveau driver worked up to a point, until their code changed to use KMS. Then it started requiring kernel functions the FreeBSD kernel didn't have at that time. I've actually used that driver, wasn't too happy with it, it didn't work that well back then.


----------



## kpedersen (May 18, 2021)

larshenrikoern said:


> I have my information on the old freebsd nouveau from here: https://www.freshports.org/x11-drivers/xf86-video-nouveau. And it was broken on some point


Yep, I believe it was the same thing.

X11 drivers are really two parts. The parts in the kernel (or kernel modules) and the Xorg driver shim (to hook it to Xorg). Nouveau lacked the kernel parts.



SirDice said:


> The Nouveau driver worked up to a point, until their code changed to use KMS. Then it started requiring kernel functions the FreeBSD kernel didn't have at that time. I've actually used that driver, wasn't too happy with it, it didn't work that well back then.



Do you recall it ever working? I thought it was merely the Xorg parts that came from upstream but we never had the kernel support to drive it.


----------



## larshenrikoern (May 18, 2021)

Netbsd claims nouveau is working but without 3d accelration (as far I know). http://man.netbsd.org/nouveau.4


----------



## shkhln (May 18, 2021)

larshenrikoern said:


> Netbsd claims nouveau is working but without 3d accelration (as far I know). http://man.netbsd.org/nouveau.4


This is just a man page for the Xorg driver, 3d acceleration goes through a different route.


----------



## shkhln (May 18, 2021)

And, for the record, we don't need any convincing, none of us are going to work on porting Nouveau no matter what. It's not something one just does on a whim. Well, unless they really want to study the Linux graphics driver stack, I suppose.


----------



## larshenrikoern (May 18, 2021)

I am not trying to convince anyone to make any whimps. That will not be a good thing . Well, the job has been done for the Intel and Amd drivers stack. And one thing that has happened in the last 1½ year is that Nvidia has provided a lot of documentation for the opensource world. So it is another situation than before. I could also think Nvidia is giving the information with a purpose. To get it used. One of their developers are btw. actively working on the nouveau stack in the Linux kernel


----------



## SirDice (May 18, 2021)

kpedersen said:


> Do you recall it ever working?


I have tried it once, yes. It worked back then. But that was many years ago, the port was deprecated 6 years ago, so it must have been long before that. If I recall correctly it was around the time it was first added to the ports tree, that happened in 2009, so I'm guessing at least 10 years ago.


----------



## cabriofahrer (Jun 27, 2021)

larshenrikoern said:


> The stability and speed of the linux nouveau driver is sufficient for most things including a bit of gaming, but I am sure the Nvidia driver is quite a lot faster.


That is an overstatement when you look at these benchmarks here:






						The NVIDIA vs. Open-Source Nouveau Linux Driver Benchmarks For Summer 2018 - Phoronix
					






					www.phoronix.com
				




I was very disappointed when I read this. Simply ridiculous. So my conclusion for nouveau: No Kodi and very poor gaming -> pointless.
I am really pissed off for the dropping of support by Nvidia for older cards.


----------



## larshenrikoern (Jun 28, 2021)

Well, I use nouveau right now on my gentoo system. And it is currently fast enough to play most games well (Xonotic, Alien Arena) on my GT-1080. So I am satsified with its performance. The nvidia driver is closed source and has it problems as well. And to me that is not acceptable. The driver has improved quite a bit since this very old benchmark, Nvidia employees are beginning to help with development as well. And it is much faster than the scfb driver anyway. That driver as an open driver is for me emergency only.


----------



## SirDice (Jun 28, 2021)

larshenrikoern said:


> And it is much faster than the scfb driver anyway.


scfb(4) has zero hardware acceleration. 


```
This is a non-accelerated driver.
```


----------



## larshenrikoern (Jun 28, 2021)

Hi

I know. But on freebsd it is either that or nvidia. And as I want to look into the code before installing, nvidia is a no go to me. Others have different oppinons. That is fine to me.


----------

