• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Solving Xorg with Nvidia Issues No Screens Found(EE) and other nasty problems/gremlins


New Member

Messages: 1

Hello all!

As my first post as a FreeBSD member, I want to try and address a problem that PLAGUED me for months and months with Nvidia graphics processing units (GPUs) and Xorg configuration issues. I suppose solutions like this come from people who find problems irksome and set out to address them. The “No Screens Found(EE)” error was that kind of personal endeavour I have tried to fix.

Ideally, we should buy the hardware that works with our software, but in the real world, its often the other way around, and it doesn’t work smoothly. Perhaps that’s where this issue is rooted—an odd mixture of computer hardware; proprietary hardware and drivers on an open source system—FreeBSD 11 & Nvidia Technologies.

Whatever may be the case of these gremlins, I have spent months to try and piece together an answer to the errors as:

  • Fatal server error. No Screens Found(EE)
  • (EE) No devices detected
  • Please also check the log file at "/var/log/Xorg.0.log" for additional information.
  • xinit: unable to connect to X server: Connection refused

From several web sources I have read, people that get these errors are running Nvidia Optimus technology within their laptops. However, this post will be dedicated exclusively to the case of an integrated graphics and a dedicated Nvidia GPU, not the multi-GPU integration of Optimus. Secondly, these errors show the Nvidia driver is not effectively communicating between the card and the operating system, which suggests either an incompatible driver or perhaps the driver modules are not being run as a result of the driver being inappropriate.

Before I go further, please understand that I can in no way guarantee that the solution below will work for you. FreeBSD is picky, and as a newbie myself of only three years, I am still learning its eccentricities. If you follow the instructions below, please understand it is at your own risk and danger. While I am writing this with the best of intentions, understand I cannot be responsible for any data loss or ruined systems that may result. Please don’t do this at work on your company’s server—we want FreeBSD to be open and welcoming, not the harmful surprise that gets you fired and harms this operating system’s reputation. Thank you for understanding, and I hope at least I help you overcome the CLI-GUI barrier that these errors create. I love both, by the way not to hurt the CLI-lovers’ feelings.

The solution:

When you start anew, please ensure you have source files installed (they are located in the directory /usr/src), as these will play a vital role in installing Nvidia Drivers. If you do not have these files, you can download them from FreeBSD’s installation web-page, find the src.tgz and then extract it into the /usr/src directory, manually. Or you can do a fresh install from the installation media and ensure to install the SRC option before installation. Either works.

Also, I would ask that you start anew installing Xorg. I recommend compiling from source WITHOUT Vesa or any other universal graphics driver, as not to confuse matters.
Some lines I added to rc.conf, (and they seem to work) are from the FreeBSD Handbook Chapter 5, 5.4 Xorg Configuration:

  • kern.vty=vt

Then exit from rc.conf and enter this into the console:

  • pw groupmod video -m (your username here without parenthesis) || pw groupmod wheel -m (your username here without parenthesis)

Once this is accomplished, have ready your desktop environment (DE). In my circumstance, I utilised Gnome 3, had ready Gnome Display Manager (GDM), and in my rc.conf and boot loader.conf had the necessary modules load at boot (see the Official FreeBSD Handbook Chapter 5, 5.7. Desktop Environments). Obviously, this is important because the end goal of this is to use a graphical environment.

Now for the tricky part—if there is such a thing in the UNIX(R)-like world. You need to download & install the appropriate driver for your Nvidia card. If it is new, it will probably use the latest nvidia-driver package. If it is older, it will probably use the legacy nvidia-driver-340 package. If it is from the early 2000s or perhaps from the beginning of time, nvidia-driver-304 will be a safe bet (there is an excellent guide under the FreeBSD wiki at: https://wiki.freebsd.org/Graphics). If you do not want to use a Nvidia driver, then please take out the GPU from your computer and use accordingly. Otherwise, and as I have trialed, you must use Nvidia’s solution.

These drivers can be either downloaded from FreeBSD’s excellent package system repository, or if you prefer the latest, downloaded from Nvidia’s website, then compiled according to their instructions. If you prefer betas, generally, Nvidia offers them before FreeBSD’s repositories do. If you do not want the hassle of manually compiling each time with updates, then FreeBSD’s package system is the best solution. For my instance, I downloaded directly from Nvidia, as a personal preference.

Now, if you compile, ensure you select the options you want. Options as Linux(R) compatibility, or ACPI Power Management support are also personal preferences and entirely up to you. I use Wine/Linux programmes so support is a must for 3D video acceleration. Once that is done, please add in the rc.conf or boot loader.conf, depending on preference (I use both, I’m not definite if that’s adverse), the necessary Nvidia modules.

  • Nvidia_load=”YES”

I read from a forum a handy line of code for making this easier. I use both, which is probably redundant but it works, and that is the end goal. Add the line below to your rc.conf to load both nvidia modules at initalisation.

  • kld_list="nvidia nvidia-modeset"

Hopefully by this point, you have Xorg downloaded, installed, your DE modules ready at boot, and your Nvidia driver installed/configured.

You should have included with your driver the nvidia-xconfig tool. If not, please download from ports/packages. Then run it, because basic xorg without it will not do.

  • Nvidia-xconfig

Once this is done, proceed to the xorg.conf file, located from my experience in the /etc/X11/ file directory. The most important step I have learned in the months since this problem begin is what follows.

In the Xorg file’s “Device Section,” look for “BoardName” and “BusID”. If they aren’t there, add them below VendorName. Please understand this step because it is SO VITAL and important to solving the whole issue with no screens found. Below is an example I have created for you. Do not copy and paste it, it is very unique to each person’s setup.

Section "Device"
Identifier "Device5"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "SFH443 [GeForce GT 1030]"
BusID "PCI:8:6:56"

If you do not know your BoardName or BusID, use this command:

  • pciconf -lv

This shows every PCI device. Look for your specific card, and be aware not to pick the wrong one, otherwise it will not work. It may be easy to get confused with the audio component of your graphics card or even the integrated graphics. Specifically, you want the BoardName and the BusID of the desired graphics card only.

While pciconf may output the device with a name like “pci5:”, for the Nvidia xorg.conf file, you only want it in the format as shown above in the xorg.conf example (for instance, PCI: is generally written without a number between it and the colon in the xorg.conf). Once you have added the appropriate content to xorg.conf, save, and reboot.

If all goes well, the nvidia modules will load, the nvidia-driver will communicate with Xorg finding the right pci card, and your desktop environment display manager will load if you have configured it to start at boot. Please note that if it doesn’t, you may have to experiment with different BoardNames/BusID’s, as you may have selected the wrong one, or you may have to manually start X (“startx” or “gdm” as root) to start the window manager. Each case is unique so please don’t be discouraged!

IF I help one person avoid the heartache, the long nights and days without a GUI, if one person is able to successfully fight off xinit “connection refused,” I will have succeeded in my mission. I also want to give credit to so many people who posted on the forums with similar issues with Xorg and Nvidia. Many, if not all of those people did not find the answer to this troubling issue. But without their trailblazing, I would never have gotten this far. So thank you all, countless members!

Finally, thank you all for reading, and I hope this guide helped you. That’s the spirit of what FreeBSD is primarily about—supporting and giving. If there are any errors herein, or anyway I could improve upon the instructions, I will try and update accordingly. Thank you.