nvidia driver not work,help.

I install nvidia driver.but, I donot kown hao to setup,please help.I am new use freebsd.

liyuansi xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 800 x 600, current 800 x 600, maximum 800 x 600
default connected 800x600+0+0 0mm x 0mm
800x600 0.00*
liyuansi@:~ $ kldstat
Id Refs Address Size Name
1 30 0xffffffff80200000 22a45b0 kernel
2 1 0xffffffff828e6000 962480 nvidia.ko
3 1 0xffffffff83249000 34658 linux.ko
4 3 0xffffffff8327e000 cb90 linux_common.ko
5 1 0xffffffff8328b000 1860 uhid.ko
6 1 0xffffffff8328d000 1dc0 wmt.ko
7 1 0xffffffff8328f000 2e138 linux64.ko
8 1 0xffffffff832be000 4f9 pty.ko
9 1 0xffffffff832bf000 2a48 ums.ko
liyuansi@:~ $
 
Hello.

To search the available NVIDIA drivers on FreeBSD, use the following command:

pkg search nvidia

To install the latest proprietary NVIDIA driver on FreeBSD execute the command below:

pkg install nvidia-driver nvidia-xconfig nvidia-settings

Execute the following command to load the NVIDIA driver in at boot:

sysrc kld_list+=nvidia-modeset

Load the NVIDIA driver now in the system so you won’t need to reboot the system:

kldload nvidia-modeset

Generate the X configuration file (as root). This file will be located at /etc/X11/xorg.conf:

nvidia-xconfig

P.S.

pkg install nvidia-driver will typically install just about the latest version from Nvidia.

You should check which driver version your video card supports.
 
nvidia-xconfig

Better way is to create a file /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf ;

Code:
Section "Device"
        Identifier "Card0"
        Driver     "nvidia"
EndSection

That way you don't taint the base FreeBSD with configuration files of 3rd party packages.

I install nvidia driver.but, I donot kown hao to setup,please help.I am new use freebsd.

liyuansi xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 800 x 600, current 800 x 600, maximum 800 x 600
default connected 800x600+0+0 0mm x 0mm
800x600 0.00*
liyuansi@:~ $ kldstat
Id Refs Address Size Name
1 30 0xffffffff80200000 22a45b0 kernel
2 1 0xffffffff828e6000 962480 nvidia.ko
3 1 0xffffffff83249000 34658 linux.ko
4 3 0xffffffff8327e000 cb90 linux_common.ko
5 1 0xffffffff8328b000 1860 uhid.ko
6 1 0xffffffff8328d000 1dc0 wmt.ko
7 1 0xffffffff8328f000 2e138 linux64.ko
8 1 0xffffffff832be000 4f9 pty.ko
9 1 0xffffffff832bf000 2a48 ums.ko
liyuansi@:~ $

You have X11 running and nvidia driver in kernel. Maybe X11 is not using the driver. Run cat /var/log/Xorg.0.log | grep NVIDIA

(tho I'm perplexed where your 800x600 resolution comes from)
 
This is how I do (like Ogis)

Code:
pkg ins -y nvidia-driver
Code:
sysrc kld_list="nvidia-modeset"

then write a config file for xorg :
/usr/local/etc/X11/xorg.conf.d/00-nvidia.conf
with
Code:
Section "Device"
    Identifier "Device0"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    #BusID "PCI:1:0:0"
EndSection

You only need to specifiy the BusID if you're not using the graphics of your CPU.
 
Thanks,

/usr/local/etc/X11/xorg.conf.d/00-nvidia.conf

Why not trust NVIDIA's tool to write the configuration for the NVIDIA hardware (and more)?

Code:
root@mowa219-gjp4-zbook-freebsd:~ # nvidia-xconfig

WARNING: Unable to locate/open X configuration file.

New X configuration file written to '/etc/X11/xorg.conf'

root@mowa219-gjp4-zbook-freebsd:~ # cat /etc/X11/xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 525.116.04

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

Section "Files"
EndSection

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

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

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

root@mowa219-gjp4-zbook-freebsd:~ # diff /etc/X11/xorg.conf /etc/X11/xorg.conf.2024-03-30
3a4
>
6c7
<     Screen      0  "Screen0"
---
>     Screen      0  "Screen0" 0 0
14a16
>
24a27
>
40a44
>     Option         "UseEdidDpi" "FALSE"
root@mowa219-gjp4-zbook-freebsd:~ #

(/etc/X11/xorg.conf.2024-03-30 is what I set aside before using the tool today.)
 
Back
Top