As a follow up to the guide I wrote a while back, I figured I'd share this new guide with you all as it targets newer and more simplified methods of setting up X using the default modesetting driver.
1. Why use the modesetting driver?
The modesetting driver really has no stumbling blocks as the DDX drivers do. In short, one driver simply can pass off instructions to the glamoregl driver which in turn loads Mesa as the rendering agent. There's no fiddling with complicated acceleration methods that may or may not work, and the configuration is fairly simplistic.
2. Will my graphics card be supported?
If your graphics card is already supported in Mesa, then you have nothing to worry about. Modesetting differs from the DDX drivers by using the EGL stack to perform accelerated video draws rather than the xrender methods. However, some modern graphics cards that may not yet have acceleration in DDX drivers, may have support in Mesa using known rendering agents. This means graphics cards like AMD's R* series, Nvidia's Maxwell cards, and Intel latest offerings should have already exposed abilities in Mesa.
3. Will any graphics card work in modesetting?
Not exactly. You will have to have a driver that in the kernel has a KMS driver and support in Mesa for accelerated OpenGL graphics. Unfortunately, this will leave many older cards off the list of DRI1 series drivers. It's not tested, but if you can get mesa-7.11.2 to build with egl and opengl es support enabled, and the kernel video drivers have kms support, there is a chance you might get support, but this is untested. You will otherwise get support through the llvmpipe driver.
The currently supported list in Mesa is as follows:
Code:
i915
i965
ilo
llvmpipe
nouveau
r200
r300
r600
radeon
radeonsi
swrast
svga
The ilo driver is Intel's experimental Gallium driver from LunarG. This driver is fairly new but is already getting lots of testing.
Note: Due to the nature of modesetting, newer Intel graphics that might not have proper support under i915 or i965 may get support through ilo, so make sure ilo is in the list of Gallium drivers supported when you build and install Mesa.
4. How to I enable this driver? My card is automatically loaded through the auto-detected method, and it's loading the DDX driver.
Create a file in /etc/X11/xorg.conf.d with the name 11-modesetting.conf and enter the following:
Code:
Section "Device"
Identifier "name of your graphics card here"
Driver "modesetting"
Option "SWCursor" "boolean"
Option "kmsdev" "/dev/dri/card0"
Option "ShadowFB" "boolean"
Option "AccelMethod" "glamor"
Option "PageFlip" "boolean"
Option "ZaphodHeads" "Your specific video ports like DVI-I-1, VGA-1, and HDMI-1"
EndSection
You should refer to modesetting's manpage with
man modesetting for details on how to set this up. The boolean entries are for
true or
false to enable/disable a feature. The only actual things you will want to enter are your outputs under ZaphodHeads and the name of your graphics card. I recommend you keep SWCursor and ShadowFB disabled by default.
Example: My ZaphodHeads on my GeForce GTX 460 are listed as "DVI-I-1,DVI-I-2,HDMI-1"
5. What about input devices?
The xf86-input-evdev and xf86-input-libinput drivers should normally load as needed.
If needed you can create a file such as 20-input.conf in /etc/X11/xorg.conf.d:
Code:
Section "InputDevice"
Identifier "Device name here"
Driver "evdev or libinput"
Option "Device" "device path in /dev"
EndSection
Refer to the manpages for libinput and evdev for further explainations.
Note: If Xfce is built with support for xf86-input-libinput, libinput will be automatically loaded by Xfce.
This should greatly reduce any problems of setting up Xorg.