LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 10-08-2014, 09:32 PM   #1
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Lightbulb [How-To] Setting up X in BLFS if auto configuration doesn't work.


You've probably completed the BLFS book's chapter on installing X and need to get it working. This guide is meant as a reference to getting it working with the least problems.

This guide will cover:
  • setting up X
  • selecting the correct driver
  • testing X
  • finalizing the setup

1. Setting up X

If you've gotten X completely installed now you need to set it up to work with your hardware. To begin the setup of X, as root run the following command from the console:

Code:
Xorg -configure
This will create a reference xorg.conf.new file in the root user folder.

2. Selecting the correct driver

Now that you have created the xorg.conf.new file, you can begin to set it up for your hardware.

Let's open xorg.conf.new up in a text editor, such as VIM.

Code:
vim xorg.conf.new
Scroll down to the section marked as "Driver" and check for the entry marked as:

Code:
Section "Device"
        Identifier "<name of manufacturer>"
        Driver "<name of driver>"
The possible driver options for B/LFS are:

Code:
ati - AMD/ATI Radeon and later GPUs
cirrus - Qemu Virtual Video Server
fbdev - Xorg FrameBuffer Driver
intel - Intel 8x0 or later video driver (Does not support PowerVR GMA500 or GMA3600 chipsets.)
mach64 - ATI Rage Pro (driver is 2D only and unaccelerated.)
mga - Matrox G series graphics cards.
nouveau - Nvidia TNT or later video cards
openchrome - VIA Chrome series
r128 - ATI Rage 128 series.
savage - S3 Savage, ProSavage, and Twister series GPUs.
sis - SiS and Volari series.
tdfx - 3Dfx Voodoo Banshee, 3, 4, and 5 driver (does not support Glide API or SLI multi-chip)
vesa - Default VESA driver for X
vmware - VMware Virtual Video Server
Be aware that only Intel, Nouveau, and ATI drivers will have support in LibMesa for hardware accelerated OpenGL support while the rest will fallback to the Software Rasterizer and Gallium llvmpipe software rendering agent.

There are other hardware drivers available on the Xorg repository such as:

Code:
amd
apm
ark
ast
chips
cyrix
freedreno
geode
glide
glint
i128
i740
i810
impact
imstt
modesetting
neomagic
newport
nsc
nv
omap
opentegra
qxl
radeonhd
rendition
s3
s3virge
siliconmotion
sisusb
sunbw2
suncg3
suncg6
suncg14
sunffb
sunleo
suntcx
tga
trident
tseng
v4l
vermilion
vga
via
voodoo
wsfb
xgi
xgixp
These drivers have not been tested on B/LFS and some are known not to compile on GNU/Linux, or require extra software and configurations to get working. many are out of date as well and are not supported by the current X-Server package.

Some drivers are also for embedded ARM based projects like omap, opentegra, and freedreno which are outside the scope of B/LFS. These will build on x86/x64 B/LFS, but require build support in libdrm, the Linux kernel, and LibMesa's ilo driver support to work properly, however, without proper hardware to test them against the usability of these drivers is unknown.

Be aware that the drivers vesa and fbdev are fallback drivers only and are not intended for general usage except in situations where a driver may not exist.

If you have an Intel, Nvidia, or ATI chipset you can enable GlamorEGL support for 2D rendering, and if it was compiled in at build time.

*Note: All modern GPUs supported by the Nvidia, AMD/ATI, and Intel drivers will support or require Glamor to operate under 2D modes. You probably should enable Glamor by default on these chipsets anyway.

To enable GlamorEGL go down to the section marked as "Device" and enter the following using the vim editor:

Code:
Section "Device"
        Identifier "<name of manufacturer>"
        Driver "<name of driver>"
        Option "AccelMethod" "glamor"
Now hit "Esc" key and type in ":x" to save and exit.

3. Testing the configuration

Now you need to test the configuration to run a test of X issue the following command from the console:

Code:
Xorg -config xorg.conf.new -retro
This will launch Xorg with a "X" mouse cursor which you should be able to move around the screen.

If the mouse doesn't work, this means xf86-input-evdev may have a problem with your mouse device, and possibly other input drivers. To remedy this you may need to download the following drivers:

xf86-input-joystick http://xorg.freedesktop.org/archive/...-1.6.2.tar.bz2

xf86-input-keyboard http://xorg.freedesktop.org/archive/...-1.8.0.tar.bz2

xf86-input-mouse http://xorg.freedesktop.org/archive/...-1.9.1.tar.bz2

Install them using this command sequence:

Code:
./configure $XORG_CONFIG
make
make install
These drivers are the basic input fallback drivers much like the xf86-video-fbdev and xf86-video-vesa drivers are the fallback basic video drivers.

Now exit this with Ctrl+Alt+F1 to exit X and press Ctrl+C to kill the X command and go back to the console prompt, and re-issue steps 1 and 2 if needed, and try the test again. If it works, you're in business. Now exit again as described.

4. Finalizing the setup

Now to finalize and commit the configuration into the system execute the following command:

Code:
cp -v xorg.conf.new /etc/X11/xorg.conf
This will copy the configuration file into the appropriate folder.

Now to run X, execute the following:

Code:
startx
You should have the twm window manager open with three white virtual terminals.

To further test X and ensure it is working properly execute:

Code:
glxinfo
Look through the readout for:

direct rendering: Yes

You can also run a small test called glxgears to check the frame rate limitations:

Code:
glxgears
This will run a small demo that will test the framerate and some minor capabilities of the hardware. To exit the test press "Esc".

This concludes how to setup X on B/LFS. Enjoy.

Last edited by ReaperX7; 10-16-2014 at 04:53 PM.
 
Old 10-09-2014, 05:27 AM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
I think the title should be amended to something like:

"Setting up X in BLFS if auto configuration doesn't work."

I personally haven't had to muck about with xorg.conf files for a couple of years, in fact I don't have one at all, X seem to do a pretty good job of configuring itself these days, when I first started using linux I admit configuring X was a nightmare!
 
Old 10-09-2014, 09:00 PM   #3
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Too true, but often I've had the auto-configuration muck itself up enough to leave me less than thrilled, especially when xf86-input-evdev takes a bonified shit on itself, and doesn't support input properly for whatever reason.

I also added the fallback mouse, keyboard, and joystick standalone classic drivers as well to Step 3. They shouldn't be required, but they can help.

Last edited by ReaperX7; 10-09-2014 at 09:07 PM.
 
Old 10-25-2014, 10:18 PM   #4
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Just as a precaution, if you use Nouveau, make sure you use:

option "AccelMethod" "exa"

If you have hardware prior to the GeForce 9x0 Maxwell chipset, otherwise if you have Maxwell, use "glamor".
 
Old 11-01-2014, 06:51 AM   #5
Carl_cj
Member
 
Registered: Sep 2014
Distribution: Slackware,Linux From Scratch
Posts: 254

Rep: Reputation: 0
Unhappy failed to generate xorg.conf.new file and getting the error

i just completed building xorg windows (24th chapter)i follows LFS/BLFS 7.6 and my host system is Slackware 14.1.when i run "Xorg -configure" i getting the following error:
Quote:
root [ / ]# Xorg -configure
_XSERVTransSocketINETCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE)
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
i installed Xorg Evdev Driver-2.9.0,Libevdev-1.2.2,Xorg Intel Driver-2.99.916,Xorg VESA Driver-2.3.3,Xorg Fbdev Driver-0.4.4 drivers in xorg drivers section.
my lspci output is:
Quote:
root [ / ]# lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579V Gigabit Network Connection (rev 05)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation H61 Express Chipset Family LPC Controller (rev 05)
00:1f.2 IDE interface: Intel Corporation 6 Series/C200 Series Chipset Family 4 port SATA IDE Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
00:1f.5 IDE interface: Intel Corporation 6 Series/C200 Series Chipset Family 2 port SATA IDE Controller (rev 05)
01:00.0 PCI bridge: Integrated Technology Express, Inc. Device 8892 (rev 10)
root [ / ]#
i didn't find what makes i mistake please give me a valuble suggestion.Thanks in advance.
 
Old 03-15-2015, 07:09 AM   #6
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Just an update, but be aware that future revisions of B/LFS will possibly only contain the following video drivers:

Code:
nouveau
ati
intel
modesetting (pending replacement for vesa)
vmware (incorporates cirrus support now for qemu)
fbdev
The vesa, 3dfx, sis, and other drivers have been deprecated due to lack of development and problems found when using these drivers with the latest x-server. In addition, these drivers no longer have support in LibMesa for OpenGL support.
 
Old 03-15-2015, 12:42 PM   #7
re_nelson
Member
 
Registered: Oct 2011
Location: Texas, USA
Distribution: LFS-SVN, Gentoo~amd64, CentOS-7, Slackware64-current, FreeBSD-11.1, Arch
Posts: 229

Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
The vesa, 3dfx, sis, and other drivers have been deprecated due to lack of development and problems found when using these drivers with the latest x-server. In addition, these drivers no longer have support in LibMesa for OpenGL support.
I was surprised when I saw vesa pulled from BLFS. It's mostly terrible on modern hardware but in a pinch, it's still a useful fallback. Whatever system I'm using, bare metal, virtual, my own or a customer unit, having vesa around at least can get some form of X display. I can see yanking the other drivers, but I find vesa useful for a "when all else fails" situation.
 
Old 03-15-2015, 03:45 PM   #8
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Vesa had some issues so they pulled it. Modesetting technically is vesa but with KMS abilities. I had some issues with it not working correctly with the newest x-server release too.
 
Old 03-27-2015, 02:37 PM   #9
aniboy10
LQ Newbie
 
Registered: Mar 2015
Location: London
Distribution: Ubuntu 14.10
Posts: 1

Rep: Reputation: Disabled
Hi, when I run 'Xorg -configure', I get a segmentation fault error, can anybody help me with this? - I can provide more information on request. Thank you.
 
Old 03-28-2015, 05:05 AM   #10
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Just an update for 3Dfx hardware users, x86-video-tdfx got an update recently. I'll post a link and build instructions when I get time. You might still be able to get support for 3Dfx hardware acceleration with the older MesaLib packages from the 7.9.x era. I don't know if you'll need Glide3 though and I have no idea if it even would build on modern Linux systems anyway.
 
Old 02-19-2016, 05:38 PM   #11
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Update for Nvidia Maxwell users and R* series AMD.

Do not attempt to install Nouveau for usage with this chipset. Use the default "modesetting" driver instead. Modesettings should be able to load the EGL stack to utilize Glamor and Mesa for 2D and 3D rendering. If this doesn't produce favorable results, you might wish to try installing the Nvidia proprietary driver.

Nouveau will not support Maxwell due to the fact Maxwell requires signed firmware to load correctly. This was done by Nvidia to prevent OEMs from using lower grade chipsets with firmware mods to sell cheap cards at higher prices as "knock offs", this sadly included Quadro cards. Nvidia has also not released any loadable firmware for Nouveau to use with Maxwell.

It seems eventually the "modesetting" driver may become the standard driver with functions for hardware 2D and 3D passed through the EGL stack for Glamor and Mesa acceleration reducing and/or eliminating the need of DDX drivers entirely.

A new driver "amdgpu" is now available on Xorg. If you have an R* series processor or later, you may use this driver for your cards.

Last edited by ReaperX7; 02-19-2016 at 05:40 PM.
 
Old 02-22-2016, 09:50 AM   #12
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
Nvidia has also not released any loadable firmware for Nouveau to use with Maxwell.
Actually it has, about a week ago:

https://lists.freedesktop.org/archiv...ry/100773.html

Quote:
Originally Posted by ReaperX7 View Post
If you have an R* series processor or later, you may use this driver for your cards.
Not all R* series are supported by AMDGPU. Only GCN 1.2 and later are (at the moment).

https://en.wikipedia.org/wiki/Graphi...Fury.2FNano.29
 
Old 02-25-2016, 08:32 AM   #13
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
About bloody time... This is great news to hear, but it does little to the effort that Nouveau's Maxwell and Glamor support were removed prior and will need to be reincorporated back into the driver. Oh well, wait and see I guess.
 
Old 04-19-2016, 10:09 AM   #14
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Slight update for anyone still using this:

I'm currently working on a newer and better method of using the Xorg drivers so that you can use a very simple configuration for the modesetting driver to load the EGL stack rather than the individual drivers with the DDX stack, alongside xf86-input-evdev and xf86-input-libinput for a more simplified setup that should work for any modern video card supported by Mesa.
 
  


Reply



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
BLFS sonik3230 Linux From Scratch 1 01-21-2014 01:07 PM
BLFS 7.4 is now available stoat Linux From Scratch 1 09-13-2013 09:38 PM
[SOLVED] help me blfs happyrobo Linux From Scratch 79 07-14-2012 09:01 AM
I need BLFS !!! nykey Linux From Scratch 1 06-06-2006 07:05 PM
On to BLFS itsjustme Linux From Scratch 7 09-01-2003 04:20 AM

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

All times are GMT -5. The time now is 06:13 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