Solved STARTX error...among other things...

Some time ago, I built a desktop on the second HDD (the first HDD has Billy Gates' junk on it) in my personal office computer, using FreeBSD-13.2-RELEASE-P(something), XORG, the MATE desktop, and other software. It installed easily and worked perfectly. After using it for a some time, the entire computer took a big hardware hike. I had to replace the motherboard and in the process, my FreeBSD installation went totally away. About a year after that incident, I decided I would start over and rebuild my FreeBSD installation. My goal, from the beginning, was to eventually dump Billy Gates' junk for all the computers in our home (6, so far) and use only FreeBSD.

So, about a week ago, I started the process all over again. I had previously used "The Beginner's Guide - How To Set Up a FreeBSD Desktop from Scratch" which worked perfectly the last time. THIS time, however, when I got to the final step of invoking startx , I got a file not found error. After dinking around for some time attempting to find the cause of the error, I simply installed and ran desktop-installer, which completed, apparently, successfully.

However, THIS time when I invoke startx I get the following:

"Error messages - startx
Fatal server error
Cannot run in framebuffer mode
Please specify busIDs for all framebuffer devices
Please consult the The X.org Foundation Support at http://wiki.x.org for help
Please also check the log file at /var/log/xorg.0.log for additional information
Server terminated with error (1)
Closing log file
xinti: giving up
xinit: unable to connect to X server: connection refused
xinit: server error"

So, I visited the Xorg wiki, but, so far, have not found much there that might help. And I have not yet looked at the mentioned log file.

But first, how do I find my framebuffer devices? dmesg -a , maybe? And how do I then specifiy those? In /etc/rc.conf perhaps?

I tried dmesg -a but didn't see anything I would recognize as a framebuffer.

Anyone else here run into the same issues?

Ken Gordon
 
Was drm-kmod installed by desktop-installer?, did the user add to video,operator? All logs are welcome: /var/log/xorg.log, ~/xsession-errors ...

wiki.freebsd.org/Graphics
 
OK. Having read the handbook on this issue, and finding nothing helpful as far as the monitor is concerned, I did more searching.

I did dmesg -a | more and looked for what it listed as my monitor.

I found this: vgapci0: <VGA compatible display> port......yada yada

Then I did xrandr -d ':vgapci0' -- nograb -q

and got

Can't open display :vgapci0

OK. Fine.

Then I did pciconf -l

and among other things got this:

vgapci0@pci0:1:0:0

Also, dmesg -a | more

tells me:

Failed to load module nvidia (module does not exist) No drivers available

Oh, swell. Despite the fact that I installed the latest nvidia drivers. So, what the heck?

Ken Gordon
 
Reviewing /var/log/Xorg.0.log I find EE Failed to load module "nvidia" (module does not exist, 0)

I have all the correct entries in my rc.conf

Searching, this appears to be a somewhat common problem, but I have yet to find a solution.

Ken Gordon
 
It is possible that I have Secure Boot activated. It appears that in some cases, this can cause my problem. I'll check tomorrow.

Ken Gordon
 
Well, according to some of the results of my searching, my problem MAY BE caused by the motherboard, an Asus ROG, and its Secure Boot function....and it appears that there is no way I can turn that off.

Every time I attempt to allow the system to use Secure Boot ONLY for Windoze, it gives me an error message and forces me to go back into the UEFI bios and change it back.

Unless there is another way to fix this, I may be forced to change to a different motherboard. I'll do some more research.

I HATE having some damned piece of hardware or software tell me how to do things.

Ken Gordon
 
my problem MAY BE caused by the motherboard, an Asus ROG, and its Secure Boot function....and it appears that there is no way I can turn that off.
I am not sure I agree with this diagnosis but I think you should check for newer BIOS for your board.

Generally if SecureBoot is enabled you can not boot up FreeBSD at all.
 
Ask you the good questions:
What have you installed as "nvidia video drivers"? What package?
What have you done concerning Xorg conf files?
What is your video hardware?

I have all the correct entries in my rc.conf
This doesn't provide us any information.

Forget this secure boot, it's irrelevant.
 
I am not sure I agree with this diagnosis but I think you should check for newer BIOS for your board.

Generally if SecureBoot is enabled you can not boot up FreeBSD at all.

I had thought of trying to update the BIOS.

What is happening is that in the UEFI settings, I can set the Secure Boot to ONLY activate when I boot into Windoze, but then when I try to boot into the HDD which has FreeBSD on it, I get this huge red warning that "...something...." is badly wrong. Then I only have the option to go back into the bios and set it to use Secure Boot with "Other OS".This is a big PITA to me.

Anyway, I still have a huge amount to do to track the issues down.

Thanks,

Ken Gordon
 
Ask you the good questions:
What have you installed as "nvidia video drivers"? What package?
What have you done concerning Xorg conf files?
What is your video hardware?


This doesn't provide us any information.

Forget this secure boot, it's irrelevant.
I installed the "latest" Nvidia driver: pkg install nvidia-driver

Following the Handbook, I wrote a file into the directory X11/xorg.conf.d, 20-nvidia.conf as shown in the Handbook, Chapter 5, page 5.4.3

Video hardware is an Nvidia GTX 1050i, monitor is an old Lenovo.

I myself had thought that the Secure Boot issue was irrelevant, although in searching for why my "screen" was not found, I found on some Linux site that someone else had had similar issues to mine and his was finally determined to be due to Secure Boot. So, since, so far I have not discovered WHY xorg is telling me that there are no screens discovered, I thought I might, at least, check out the Secure Boot issue.

IMHO, Secure Boot is a huge kludge and a giant PITA. I suppose if I am too stupid to have multiple ways to block some jackass from accessing my 'pooter, I suppose Secure Boot would be advantageous. For me, it is useless.

I'll list all the entries in my rc.conf shortly.

Thanks,

Ken Gordon
 
OK. Here is my rc.conf

hostname=”KensOffice”
ifconfig_em0=”DHCP”
ssh_enable=”YES”
moused_enable=”YES”
ntpdate_enable=”YES”
ntpd_enable=”YES”
powerd_enable=”YES”
hald_enable=”YES”
dumpdev=”YES”
# pf_enable=”YES”
(Other PF parameters temporarily #ed)
microcode_update_enable=”YES”
dbus_enable=”YES”
moused_port=/dev/ums0
ntpupdate_flags=”-u pool.ntp.org”
nfs_client_enable=”YES”
rpc_statd_enable=”YES”
rpc_lockd_enable=”YES”
autofs_enable=”YES”
devd_enable=”YES”
devfs_system_ruleset=”system”
linux_enable=”YES”
webcamd_enable=”YES”
kld_list=”nvidia-modeset”

Since the computer I am working with has both Win10 installed on one HDD, and FreeBSD 13.2 on a second HDD, and since I have not yet implemented printing on the FreeBSD install, I must copy necessary files out by hand and move them to my wife's computer, across the office, in order to post them here.

I have changed the last line above to read kld_list="nvidia-modeset nvidia" and rebooted, but this did not clear the error.

Ken Gordon
 
With your nvidia graphics card you only need kld_list="nvidia-modeset" in rc.conf (not nvidia).

Please provide the following:
after you've run X, do cat /var/log/Xorg.0.log | nc termbin.com 9999 and paste the resulting url
the output of ls /usr/local/lib/xorg/modules/drivers
 
With your nvidia graphics card you only need kld_list="nvidia-modeset" in rc.conf (not nvidia).

Please provide the following:
after you've run X, do cat /var/log/Xorg.0.log | nc termbin.com 9999 and paste the resulting url


the output of ls /usr/local/lib/xorg/modules/drivers

mga_drv.so modesetting_drv.so nvidia_drv.so scfb_drv.so vesa_drv.so

OK? Looking at the URL above, it shows that the nvidia driver is NOT loaded. Why?

Ken Gordon
 
Tell you (and everyone else) what: I have another computer in the basement shop which does NOT have this ROG mobo. I'll go try to install the desktop there which I had tried here.

At this point, it seems clear that something is blocking the loading of my Nvidia driver, and at this point, I suspect that damned Secure Boot crap.

Later....and thanks for the help.

Ken Gordon
 
I would confirm that your system supports DRM by checking for
Code:
/dev/drm/*
.

Then look for the correct nvidia drivers:

You will need to download the correct drivers after determining which one(s) from this list:
Code:
pkg search nvidia

Then, update your device's xorg.conf(.d(/nvidia.conf)) such that it uses the correct drivers:
Code:
driver "modesetting"
 
[...]
Code:
driver "modesetting"
I've never seen an nvidia X11 driver being loaded by using driver "modesetting" or an nvidia graphics card being successfully driven by the X11 modesetting driver. However, it looks like a stray character has entered the playing field ...


[...] Looking at the URL above, it shows that the nvidia driver is NOT loaded. Why?
Check /usr/local/share/X11/xorg.conf.d/20-nvidia.conf. Looks like there's a stray single quote, /var/log/Xorg.0.log:
Rich (BB code):
[ 17727.230] (II) LoadModule: "nvidia'"
-------------------------------------^-

20-nvidia.conf should be like this:
Rich (BB code):
Section "Device"
	Identifier "Card0"
	Driver     "nvidia"      <-- one double quote before nvidia, one double quote after nvidia
EndSection

Then start X again, do cat /var/log/Xorg.0.log | nc termbin.com 9999 and paste the resulting url.
 
I've never seen an nvidia X11 driver being loaded by using driver "modesetting" or an nvidia graphics card being successfully driven by the X11 modesetting driver. However, it looks like a stray character has entered the playing field ...



Check /usr/local/share/X11/xorg.conf.d/20-nvidia.conf. Looks like there's a stray single quote, /var/log/Xorg.0.log:
Rich (BB code):
[ 17727.230] (II) LoadModule: "nvidia'"
Rich (BB code):
Correct. When I corrected that, then edited my .xinitrc to change my last entry from MATE exec, to mate-session, it all works correctly now.

At this point, everything is working correctly, and I thank the forum members for helping me with this. I am going to mark this as SOLVED.

Ken Gordon
 
I've never seen an nvidia X11 driver being loaded by using driver "modesetting" or an nvidia graphics card being successfully driven by the X11 modesetting driver. However, it looks like a stray character has entered the playing field ...



Check /usr/local/share/X11/xorg.conf.d/20-nvidia.conf. Looks like there's a stray single quote, /var/log/Xorg.0.log:
Rich (BB code):
[ 17727.230] (II) LoadModule: "nvidia'"
-------------------------------------^-

20-nvidia.conf should be like this:
Rich (BB code):
Section "Device"
    Identifier "Card0"
    Driver     "nvidia"      <-- one double quote before nvidia, one double quote after nvidia
EndSection

Then start X again, do cat /var/log/Xorg.0.log | nc termbin.com 9999 and paste the resulting url.

You are correct: there was a single quote after nvidia, instead of a double quote. Fixing that, then editing the last line in my .xinitrc from MATE exec to mate-session corrected all errors and everything is now working as it should.

I thank you Erichans and the other members of this excellent forum for all the help. I hope I can contribute to the forum in future.

Ken Gordon
 
Thanks to the members of the forum, I now am well on the way to building 2 computers in our home (out of 6) running on FreeBSD-13.2-RELEASE. Desktops (MATE) on both are working fine. I still have a lot of work to do, but it is progressing satisfactorily.

Again, thank you all.

Ken
 
Back
Top