LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 04-20-2016, 04:28 PM   #1
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,554
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
[How-to]Alternative way to set up Xorg for modern graphics cards.


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.
 
Old 04-20-2016, 04:50 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
What about MPEG-2 and MPEG-4 hardware decoding.
 
Old 04-21-2016, 08:30 AM   #3
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,554

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Libvdpau-va-gl will be needed for Intel based chips and libvdpau will be needed for AMD and Nvidia. As long as you have Direct Rendering enabled, which glamoregl should allow for modern graphics chips, you should get the appropriate acceleration when X is used.

You will need to set a system or user environment variable:

Code:
export VDPAU_DRIVER=
to the appropriate driver in /usr/lib/vdpau. Intel based cards should use va_gl while Nvidia and AMD should use the driver for the card series supported.

Edit:

One thing I'd like to get is feedback on this from other users in the form of logs and readouts.

If you have success with this method please post the output from the following commands as an attached text file:

Code:
lspci
cat /var/log/Xorg.0.log
glxinfo
I would like to get feedback especially from Intel graphics users, Nvidia Maxwell, and Radeon R series.

Last edited by ReaperX7; 04-21-2016 at 10:16 AM.
 
1 members found this post helpful.
Old 04-26-2016, 06:22 PM   #4
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,554

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
6. What about Intel's DDX drivers using "sna"?

Intel supports various methods of acceleration in it's DDX drivers. UXA and SNA being the most modern of the listed. However, UXA is reported to be slow with some graphics while SNA is faster but also buggy mess that can crash things.

See what I mean by DDX drivers being a mess? Rather than fallback on this mess, just go with the EGL stack. You can get comparable acceleration via glamor that is near SNA levels, just less buggy, especially with troublesome graphics like those with Skylake CPUs that are just barely getting decent support in the git pulls of the DDX drivers. Glamor already has exposed Intel accelerated protocols through Mesa, so why bother with a DDX driver that may or may not work?

7. Do I need to install firmware?

Yes you will need firmware for EGL to load. If you downloaded the entire Linux-Firmware git repository, simply enter the directory and issue make install and reboot the machine.

Last edited by ReaperX7; 05-07-2016 at 03:10 PM.
 
1 members found this post helpful.
Old 05-28-2016, 11:08 AM   #5
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,554

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Update:

The current list of drivers is lightly expanded to include:

Code:
i915
i965
ilo
llvmpipe
nouveau
r200
r300
r600
radeon
radeonsi
swrast
svga
virgl
Virgl is the new Virgil 3D driver for QEmu. It is supposed to act as a new driver to allow host GPU acceleration capability in a VM while remaining independent.

Take note that Mesa has support for two additional drivers: freedreno and vc4 however the use of these drivers is more experimental and more limited to embedded platforms, such as Raspberry Pi and others.

Code:
vc4 - Broadcom VC4
freedreno - Adreno Series
You should only build these drivers as needed. Freedreno will require support enabled in the kernel, building and installing xf86-video-freedreno, and built into libdrm. Broadcom VC4 is supported through Modesetting.

Last edited by ReaperX7; 05-28-2016 at 11:42 AM.
 
Old 06-18-2016, 08:53 PM   #6
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,554

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
8. Modesetting didn't work. It just didn't load.

Many older graphics chips unfortunately won't work with modesetting due to the fact that they lack 128 address registers on the chip. Many older chips like the Intel(R) 945GM only contain a 64 address register space. For these types of cards you will unfortunately need the DDX driver. You can still get optimal performance but the older method.

If you need to setup the DDX driver, use the manual pages to check options to create your 11-<name of driver>.conf to get the most out of it. I also recommend installing the xf86-video-fbdev driver as a fallback for any issues.
 
Old 09-03-2016, 07:33 PM   #7
sparkybulbul
LQ Newbie
 
Registered: Nov 2015
Distribution: Devuan, Debian 8.2
Posts: 8

Rep: Reputation: Disabled
Mesa driver for Broadcom VC4.
https://github.com/anholt/mesa/wiki/VC4
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I would like to know of any alternative, modern Linux Distributions thePHPdev Linux - Distributions 17 10-23-2013 02:17 AM
What's modern integrated graphics about? zeiz Linux - Hardware 22 11-30-2012 05:24 AM
Easiest way to compile a small modern Xorg? bendib Programming 2 10-01-2012 02:19 AM
xorg.conf multiple graphics cards abourke Linux - Newbie 1 07-24-2011 07:51 PM
Using two graphics cards with Xorg-X11 jrtayloriv Linux - Hardware 2 01-01-2007 04:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration