Gnome does not start

Hello
FreeBSD does not start the graphical interface (Gnome). It stays in "login:". If I login as user or superuser and run "startx", I get:

Fatal server error:
no screens found
...
Server terminated with error (1). Closing log file
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

My /etc/rc.conf is as follows:

sendmail_enable="NONE"
hostname="freebsd"
keymap="en.kbd"
ifconfig_em0="DHCP"
sshd_enable="YES"
moused_enable="YES"
ntpd_enable="YES"
dumpdev="AUTO"
kld_list="nvidia nvidia-modeset linux linux64"
dbus_enable="YES"
hald_enable="YES"
gdm_enable="YES"
gnome_enable="YES"
vmware_guest_enable="YES" vmware_guest_enable="YES"
linux_enable="YES"

My /etc/fstab is as follows:

/dev/ada0p2 / ufs rw 1 1
/dev/ada0p1 /boot/efi msdosfs rw 2 2
/dev/ada0p3 none swap sw 0 0
proc /proc procfs rw rw rw 0 0 0

In /etc/X11/xorg.conf I have the following:

Section "ServerLayout"
Identifier "X.org configured"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0" 0 0 0 0
InputDevice "Mouse0" "CorePointer" InputDevice "Mouse0" "CorePointer" "CorePointer" "CorePointer
InputDevice "Keyboard0" "CoreKeyboard" "CoreKeyboard" "CorePointer
Option "AutoAddDevices" "Off"
EndSection
...
Section "Device"
Identifier "Card0"
Driver "nvidia"
BusID "PCI:1:0.0" BusID "PCI:1:0.0" BusID "PCI:1:0.0
EndSection
...

And in ~/.xinitrc I have

exec gnome-session

I'm driving myself crazy looking at texts and videos, and I can't seem to get the problem unstuck.
 
I'm not a computer scientist -- I'm just a long-time Linux user. So your first few paragraphs are beyond me. I also don't know how to figure out what my graphics card is. I've searched the web for instructions and haven't found them.


Maybe it's one of these two: TU104GL (Quadro RTX 4000) or Cannon Lake PCH (it's a March 2020 ASUS D940MX computer).

With dmesg I don't see any message from HAL.
 
2001 is a distant memory. HAL is retired. : freebsd

More simply: your hald_enable="YES" line is non-effective because, from a FreeBSD perspective, the related software died more than a year ago.

Rest in peace (RIP):

1649448949697.png


(My point was, to beware of outdated documentation etc.)

If you're new-ish to FreeBSD, FreshPorts is our friend.

<https://www.freshports.org/faq.php#deleted>
 
… Maybe it's one of these two: TU104GL (Quadro RTX 4000) …

<https://bsd-hardware.info/?probe=4e798f3ef0&d=hellosystem> a few months ago (2021-10-10) showed TU104GL [Quadro RTX 4000] working <https://bsd-hardware.info/?probe=4e798f3ef0&d=hellosystem#pci:10de-1eb1-10de-12a0> on a version of helloSystem that's now outdated; helloSystem was (then) based on FreeBSD 12.2-RELEASE. So I'm hopeful that graphics in your ASUS D940MX will work with more recent 13.0-RELEASE or (coming soon) 13.1-RELEASE.

At the bsd-hardware.info page there's the word nvidia for the driver, however (as far as I can tell) this does not imply that you should specify nvidia instead of nvidia-modeset in your kld_list line.

Unfortunately, the FreeBSD Handbook can be a source of confusion, with regard to NVIDIA, and re: <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258264#c12> I don't foresee an improvement in the near future.

If it's possible for you to start afresh (with a new installation of FreeBSD), it may be simpler for you than attempting to manually configure X.Org.

(If a configuration produced by /usr/local/bin/nvidia-xconfig is not enough, then maybe think about manual configuration ….)
 
...
kld_list="nvidia nvidia-modeset linux linux64"
dbus_enable="YES"
hald_enable="YES"
gdm_enable="YES"
gnome_enable="YES"
vmware_guest_enable="YES" vmware_guest_enable="YES"
linux_enable="YES"
...
Why vmware_guest_enable doubled? Do you run FreeBSD in a vmware hypervisor? In that case you don't need the nvidia driver.
 
<https://bsd-hardware.info/?probe=4e798f3ef0&d=hellosystem> a few months ago (2021-10-10) showed TU104GL [Quadro RTX 4000] working <https://bsd-hardware.info/?probe=4e798f3ef0&d=hellosystem#pci:10de-1eb1-10de-12a0> on a version of helloSystem that's now outdated; helloSystem was (then) based on FreeBSD 12.2-RELEASE. So I'm hopeful that graphics in your ASUS D940MX will work with more recent 13.0-RELEASE or (coming soon) 13.1-RELEASE.

At the bsd-hardware.info page there's the word nvidia for the driver, however (as far as I can tell) this does not imply that you should specify nvidia instead of nvidia-modeset in your kld_list line.

Unfortunately, the FreeBSD Handbook can be a source of confusion, with regard to NVIDIA, and re: <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258264#c12> I don't foresee an improvement in the near future.

If it's possible for you to start afresh (with a new installation of FreeBSD), it may be simpler for you than attempting to manually configure X.Org.

(If a configuration produced by /usr/local/bin/nvidia-xconfig is not enough, then maybe think about manual configuration ….)
I have reinstalled FreeBSD. I have executed the following operations after installing it:

- pkg update
- pkg upgrade
- pkg install xorg
- pkg nvidia-driver-340
- pkg nvidia-xconfig
- kldload nvidia
- sysrc kld_list+=nvidia
- sysrc enable_linux="YES"
- nvidia-xconfig
- startx

... and I have got...

NVIDIA: Failed to initialize the NVIDIA kernel module
...
No devices detected
...
Fatal server error:
no screens found
...
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

MORE INFO:
I have two graphic cards:
* NVIDIA: TU104GL [Quadro RTX 4000] --> pci0:1:0:0
* Intel: CoffeeLake-S GT2 [UHD Graphics 630] --> pci0:0:2:0
 
Except that people posting using that are having problems. Mine is working stably for weeks and I have been watching NetFlix daily.
Even so, you are missing out on all these patches:

https://cgit.freebsd.org/ports/tree/x11/nvidia-driver/files

https://cgit.freebsd.org/ports/tree/x11/nvidia-driver/Makefile

Once you do something outside of a web browser and Netflix, you might run into issues. Particularly with upgrades when a new version comes out and ports/packages expect files in specific places.
 
The Nvidia supplied version is newer than the current Makefile.
Indeed. Which means it is not yet integrated with the ports tree and such "out of tree" packages could cause conflicts with any existing packages. Not to mention it is still missing out on the FreeBSD patches.

What is fairly typical to do however is simply bump the version up in the port Makefile, regenerate the checksums and rebuild it. This does tend to work (and gives you the benefits of the patches if they still apply cleanly).

Think of the upstream NVidia blob just as a code dump. It still needs cleaning and fixing by the FreeBSD developers before it should be considered for production. The ports collection has automated this somewhat.
 
Back
Top