How To Fix No Screen Found Xorg Error On FreeBSD [Dual GPU]

By Leonard Cucos •  Updated: 10/30/21 •  4 min read

You may come across the Fatal server error: No screen found Xorg error, unable to connect to X server: connection refused – No devices detected when executing the startx command in FreeBSD.

In this troubleshooting guide, I will show you how to fix this Xorg issue. The No screen found (ee) error looks like this:

How To Fix No Screen Found Xorg Error On FreeBSD. Source:

The No screen found (EE) error is mainly caused by the X server [Xorg] being confused about which GPU should use as a primary, especially when your system is equipped with more than one discrete GPU.

The issue is easily fixed by adding the correct BusID in the xorg.conf for the discrete GPU that has your display connected.

I recently experienced this issue when installing FreeBSD with XFCE and NVIDIA proprietary drivers on bare metal on a system with dual-GPU [2x Gigabyte GTX 1070 graphics cards].

Here is how to fix the No screens found (EE) – unable to connect to X server error in a few simple steps:

  1. Log in as root user on FreeBSD. 
  2. Find the BusID for the primary GPU

List the graphics cards in your system by using the following command and take note of the VGA PCI Bus IDs.

pciconfig -l | grep VGA
How To Fix No Screen Found Xorg Error On FreeBSD - List Bus IDs. Source:

Where [in my system]: 

pci0:0:2:0 is the built-in GPU

pci0:1:0:0 is the 1st discrete GPU [PCI slot closest to the CPU]

pci0:2:0:0 is the 2st discrete GPU

Your PCI IDs might look slightly different but you’ll get the point in a moment. 

Take note of the PCI ID [pci0:x:x:x:x] for the GPU that has your display connected. In my case, this is the pci0:1:0:0. 

If you don’t know which PCI slot has your primary GPU connected to the display, inspect your computer ports behind and check where, e.g., the HDMI cable is inserted.

Alternatively, you can find the PCI slot configured for the primary GPU in the BIOS settings for some motherboards [e.g., Gigabyte].

  1. Fix the No screen found Xorg error in xorg.conf 

Start by editing the xorg.conf file using the following command:

ee /etc/X11/xorg.conf

NOTE: The xorg.conf file should be generated automatically when installing your GPU drivers. If your xorg.conf is empty, most likely the automatic process failed to generate the file. On NVIDIA, use the nvidia-xconfig command to generate the xorg.conf file. You need to install nvidia-xconfig first [pkg install nvidia-xonfig].

Look for the Section “Device” and add the following line:

BusID        “PCI:<the Bus ID for the GPU connected to your display>

How To Fix No Screen Found Xorg Error On FreeBSD - Edit xorg.conf. Source:

IMPORTANT: the PCI bus should NOT include the domain ID, e.g., PCI0:x:x:x

Save the xorg.conf file by pressing ESC, then press twice the “a” key to save and exit the file. 

  1. Gracefully reboot the system
shutdown -r now 
  1. Test the X server on FreeBSD

Upon rebooting FreeBSD, log in as root user. Issue the following command to test if the X server detects and use the correct GPU:

How To Fix No Screen Found Xorg Error On FreeBSD - startx. Source:

The X server is up and running. Now you’re ready to go one step further and install your favorite Desktop Environment or Window Manager on FreeBSD. I’ll keep my system like this as the old-school look is growing on me.

TIP: You can return back to the shell by pressing CTRL+ALT+F2 if needed. You can also get back to X by pressing CTRL+ALT+F9.

There you go! This is how you fix the Fatal server error: No screen found (EE) – unable to connect to X server: connection refused [No devices detected] on FreeBSD. Here you can find more information on how to configure Xorg on FreeBSD.

I hope you found this troubleshooting guide useful. If so, do me a favor and share it online with your friends and colleagues. This way we can give FreeBSD the attention it deserves.

Stay safe!

Leonard Cucos

Leonard Cucos is an engineer with over 20 years of IT/Telco experience managing large UNIX/Linux-based server infrastructures, IP and Optics core networks, Information Security [red/blue], Data Science, and FinTech.