Solved Xorg cannot start with generated config file.

Hi and thank you very much for you time.

I am using NVIDIA driver, everytime i try to auto generate xorg.conf with either (nvidia-xconfig or X -configure) screen tries to change and just freezes.
Xorg.log.0 doesn't output anything useful.

I don't know what am i doing wrong, last time when i was using freebsd i everything worked with X -configure only. What should i do?

EDIT: Also i forgot to mention, when run xinit without /etc/X11/xorg.conf i cannot get the resolution past 1024x768.
 
As root create a file called driver-nvidia.conf in /usr/local/etc/X11/xorg.conf.d with the following contents:
Section "Device" Identifier "NVIDIA Card" VendorName "NVIDIA Corporation" Driver "nvidia" EndSection
See if that helps.
If you have more than one graphics device (as root pciconf -lv | grep display | wc -l returning more than 1), you may need to add a busid statement in the file.
 
As root create a file called driver-nvidia.conf in /usr/local/etc/X11/xorg.conf.d with the following contents:
Section "Device" Identifier "NVIDIA Card" VendorName "NVIDIA Corporation" Driver "nvidia" EndSection
See if that helps.
If you have more than one graphics device (as root pciconf -lv | grep display | wc -l returning more than 1), you may need to add a busid statement in the file.
Thanks!

When i type 'xinit' all text disappears and the cursor is placed at the up left corner on screen hanging out like that. Nothing happens. Then i switch top tty1 and Ctrl+C to cancel it.

I have installed x11/nvidia-driver from ports, its the latest version (470). I have nvidia gt 710 and according to site that latest driver should support it.
 
Do you have the modules loaded?
What is the output of
kldstat | grep -i nvidia

If they are not loaded, then as root:
sysrc kld_list+=" nvidia-modeset.ko nvidia.ko"
Note the space after the opening quotes
you can also do as root:
kldload /boot/modules/nvidia-modeset.ko
kldload /boot/modules/nvidia.ko

Don't do "xinit", try doing "startx"

xinit may not actually run startup files.
You should also add the following line to /boot/loader.conf:
hw.vga.textmode="1"

There have been issues in the past with the nvidia driver and switching from a graphical screen to another vty (blocks of colors and no cursor or text)
 
Do you have the modules loaded?
What is the output of
kldstat | grep -i nvidia

If they are not loaded, then as root:
sysrc kld_list+=" nvidia-modeset.ko nvidia.ko"
Note the space after the opening quotes
you can also do as root:
kldload /boot/modules/nvidia-modeset.ko
kldload /boot/modules/nvidia.ko

Don't do "xinit", try doing "startx"

xinit may not actually run startup files.
You should also add the following line to /boot/loader.conf:
hw.vga.textmode="1"

There have been issues in the past with the nvidia driver and switching from a graphical screen to another vty (blocks of colors and no cursor or text)
I had nvidia.ko loaded but not nvidia-modeset.. Now everything works. Thank you very much. You are awesome.
 
  • Like
Reactions: mer
Very good.
Make sure you do the sysrc command, check /etc/rc.conf to make sure you have nividia-modeset and nvidia added to the kld_list variable. That way when you reboot, you're good.
 
Back
Top