Installing Xorg on Gentoo with the nouveau Driver

I configured my kernel as shown here. That was based on the information found here and here. Check out the resources section at the bottom.

Because my kernel is good-to-go, I should just need to make the following changes to my make.conf file before installing xorg-server.

nano /etc/portage/make.conf

These are the changes I made.


INPUT_DEVICES="evdev"
VIDEO_CARDS="nouveau"

Make sure you have the following USE flag.

echo "x11-base/xorg-server" >> /etc/portage/package.use

Before installing xorg-server.

emerge --ask xorg-server

Now refresh your environment.

env-update
source /etc/profile

I choose to reboot here.

Starting X

Xorg “should” work out-of-the-box so there “should” be no need to manually create and edit configuration file in the /etc/X11/xorg.conf.d/ directory. Here goes…

startx

The Necessary Troubleshooting

Obviously that didn’t work because that would be too easy!! The output showed xauth complaining about a few things, namely stuff like.

hostname Unknown host
xauth: file /root/.serverauth.4170 does not exist

Then Xorg tries to start but fails with this.

/etc/X11/xinit/xinitrc: line 59: twm: command not found
/etc/X11/xinit/xinitrc: line 60: xclock: command not found
/etc/X11/xinit/xinitrc: line 61: xterm: command not found
/etc/X11/xinit/xinitrc: line 63: exec: xterm: not found
/etc/X11/xinit/xinitrc: line 62: xterm: command not found
xinit: connection to X server lost

waiting for X server to shut down Server terminated successfully (0). Closing log file.

The Fix

Funnily enough, it was the hostname Unknown host message that bothered me the most as this indicates a general networking issue. Turned out I hadn’t associated my hostname with the localhost. This was easily solved by editing /etc/hosts and amending the below line. This removed that particular error but did not get Xorg working.

127.0.0.1            localhost storm

Now I have a fairly good idea what might be up here but if all this is new to you and your Xorg is failing with similar messages, there a few clues in errors.

One thing to bear in mind is that users of X must be part of the video group. I thought this might explain the xauth warnings. However this can be easily checked with.

storm ~ # groups andy
root bin daemon sys adm disk wheel floppy tape video

Lastly, as per the docs, I believe twm and xterm should be installed. This certainly fits with the last few errors.

emerge --ask twm xterm xclock

This will pull in a few extra packages but hopefully Xorg should work now. Although not strictly necessary, I install xclock here too.

xterm screen shot

Nice!

Resources

Gentoo Wiki – Xorg/Configuration
https://wiki.gentoo.org/wiki/Xorg/Configuration

Gentoo Wiki – X server
http://wiki.gentoo.org/wiki/X_server

Gentoo Wiki – X without Display Manager
http://wiki.gentoo.org/wiki/X_without_Display_Manager

Linux Reviews – Screenshot grabbing
http://linuxreviews.org/quicktips/screenshots

======================================

Gentoo Wiki Archives – Dell_2407WFP_LCD
http://www.gentoo-wiki.info/Dell_2407WFP_LCD

Gentoo Wiki – xorg.conf
http://wiki.gentoo.org/wiki/Xorg.conf

Gentoo – X.Org/xsession
http://gentoo-en.vfose.ru/wiki/X.Org/xsession

Gentoo Wiki – Fontconfig
http://wiki.gentoo.org/wiki/Fontconfig

Gentoo Wiki Archives – HOWTO_Xorg_and_Fonts
http://www.gentoo-wiki.info/HOWTO_Xorg_and_Fonts#Emerging_the_Necessary_Packages

Gentoo.org – rxvt-unicode
http://wiki.gentoo.org/wiki/Rxvt-unicode

ArchLinux – Multihead
https://wiki.archlinux.org/index.php/Multihead

ArchLinux – Nouveau
https://wiki.archlinux.org/index.php/Nouveau#Configuration

ArchLinux – Xorg
https://wiki.archlinux.org/index.php/Xorg

ArchLinux – X resources
https://wiki.archlinux.org/index.php/X_resources#rxvt-unicode_.28urxvt.29_resources

ArchLinux – rxvt-unicode
https://wiki.archlinux.org/index.php/Urxvt#Creating_.7E.2F.Xresources

pod.tst.eu – RXVT-UNICODE/URXVT FREQUENTLY ASKED QUESTIONS
http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.7.pod#How_does_rxvt_unicode_determine_the_

How-To Geek – How to Quickly Resize, Convert & Modify Images from the Linux Terminal
http://www.howtogeek.com/109369/how-to-quickly-resize-convert-modify-images-from-the-linux-terminal

geom.uiuc.edu – Manipulating Images
http://www.geom.uiuc.edu/events/courses/1996/cmwh/Stills/manipulating.html

Redhat.com – Doing more with…more: Dual-head display
http://www.redhat.com/magazine/014dec05/features/multihead

Gentoo – X.Org/Dual Monitors
http://gentoo-en.vfose.ru/wiki/X.Org/Dual_Monitors

ArchLinux – Configuring keyboard layouts in X
https://wiki.archlinux.org/index.php/Configuring_keyboard_layouts_in_X

Be the first to comment

Leave a Reply