I just want to fix that black screen when I start an X session

And much much more...

The handbook is great but sometimes it just isn't as friendly as descriptive as you would like it to be. This is a Wiki page to share our hacks, arcane knowledge, workarounds and diagnosis tricks.

1. Resources


2. FAQ


2.1. Choosing the right driver


2.1.1. How can I check what driver I need?

You can list your graphics hardware with:

pciconf -lv | grep display -B 3 -A 1


2.1.2. Is my graphics card supported?

Check out Graphics.

If it is not supported then you might want to check out:


2.1.3. I'm still not sure what I should install...

/!\ This subsection is a work in progress. Ping us on an IRC channel or a mailing list if you spot an error or you know how to fill in the missing information.

2.1.3.1. Intel Graphics

The table is based on the one from Graphics, which is updated much more often.

Video card family

Status

Min. FreeBSD version

Kernel driver

Xorg driver

Comments

GMA 950

Calistoga

Works

9.1

i915kms

modesetting(4) or intel(4)

GMA 4500 / 4500MHD

Eaglelake / Cantiga

Works

9.1

i[357]-xxx processors

Ironlake

Works

9.1

i[357]-2xxx processors

Sandy Bridge

Works

9.1

i[357]-3xxx processors

Ivy Bridge

Works

9.1

Xeon E3 V2 processors

Ivy Bridge

Works

9.1

i[357]-4xxx processors

Haswell

Works

11.0

Xeon E3 V3 processors

Haswell

Works

11.0

Intel i915 HD Graphics

Broadwell

Works

11-STABLE

drm-next-kmod

Intel i915 HD Graphics

Skylake

Works

11-STABLE

Intel i915 HD Graphics

Kabylake

Works

11-STABLE

2.1.3.2. Nvidia

nvidia-modeset:


2.2. Drivers


2.2.1. Kernel drivers

2.2.1.1. i915 / drm-next-kmod


2.2.2. Xorg drivers

2.2.2.1. modesetting


2.3. Specific hardware tricks


2.3.1. AMD GPU

2.3.1.1. I get significant screen tearing with my AMD GPU

In order to solve this you can add the following to /usr/local/etc/X11/xorg.conf.d/20-amdgpu.conf (the file does not exist by default):

Section "Device"
    Identifier "AMD"
    Driver "amdgpu"
    Option "DRI" "3"
    Option "TearFree" "true"
EndSection


2.3.2. Nvidia Optimus (Nvidia and Intel GPUs at the same time)

See Graphics/OptimusVideoSupport.

2.3.2.1. Using only the Intel card

In this section assumes that:

Comment out Nvidia-related parts from your xorg.conf:

...

Section "Device"
    Identifier  "Card0"
    Driver      "intel"
    BusID       "PCI:0:2:0"
EndSection

#Section "Device"
#   Identifier  "Card1"
#   Driver      "nvidia"
#   BusID       "PCI:1:0:0"
#EndSection

...

Then add the following bits to rc.conf(5):

kld_list='i915kms'


2.4. Xorg configuration


2.4.1. How should I configure the X server? Should I generate any xorg.conf files?

No! These days Xorg relies entirely on autoconfiguration. Most of the time it is unnecessary to configure anything manually. In fact, you should only configure Xorg manually if you know what you are doing. Copy-pasting random code from ancient tutorials is rarely a good idea.


2.4.2. Do I need to enable the HAL daemon (hald) in rc.conf?

Not really, no. It is no longer needed to put enable_hald="YES" into rc.conf(5).


3. Troubleshooting


3.1. Black screens


3.1.1. The screen is going black with drm-next-kmod and amdgpu right after the module loads


3.1.2. After resuming from S3 standby, the screen is black


3.2. Brightness

There is a dedicated wiki page: Graphics/Brightness.


3.3. OpenGL


3.3.1. OpenGL works while accelerated OpenGL doesn't work with my AMD GPU

As of 2018.04.03.

Xorg doesn't even put amdgpu into the autodetection list, it goes:

  1. modesetting
  2. scfb
  3. vesa

regardless of whether amdgpu is installed or not.

Apparently, you get a modesetting DDX by default (even with xf86-video-amdgpu installed) on which for some reason radeonsi doesn't work and it falls back to LLVMpipe.

In order to solve this you can add the following to /usr/local/etc/X11/xorg.conf.d/20-amdgpu.conf (the file does not exist by default):

Section "Device"
    Identifier "AMD"
    Driver "amdgpu"
EndSection

Now you should get something along the following output when running glxinfo (from the graphics/mesa-demos port):

Now OpenGL should work.


3.4. Tearing

What's tearing anyway?

See this test video.


3.5. Transparency

In order to get transparency you'll need a compositor. It has to be installed manually unless your desktop environment comes with one.

Notable compositors:


3.6. Xorg error messages


3.6.1. "Cannot run in framebuffer mode. Please specify busIDs"

/!\ TODO


3.6.2. "(EE) open /dev/dri/card0: No such file or directory"

/!\ TODO


3.6.3. "(EE) No devices detected.", "(EE) no screens found(EE)"

/!\ TODO


3.6.4. ".Xauthority does not exist"

This error message isn't very informative. It just means that you won't be able to access the X server via X11 Forwarding over SSH

If you ever need to create the file, all you need to do is touch ~/.Xauthority - at which point you can use xauth(1) to modify ~/.Xauthority.


3.6.5. "D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/etc/machine-id": No such file or directory"

First of all, you probably forgot to add dbus_enable=YES to rc.conf(5). You can do it using either an editor or by running

   1 sysrc dbus_enable=YES

If it still does solve the issue then you've got to create the machine-id file by yourself. The the following command:

   1 dbus-uuidgen --ensure


4. Community


4.1. Mailing lists


4.2. IRC

See IRC/Channels for a list of all the FreeBSD IRC channels.


CategoryHowTo

GraphicsOld/FAQ (last edited 2018-11-26T01:31:33+0000 by PeteWright)