Arch Linux: Difference between revisions

From cchtml.com
m (Protected "Arch Linux": Excessive vandalism (‎[edit=autoconfirmed] (expires 18:53, 12 July 2013 (UTC)) ‎[move=autoconfirmed] (expires 18:53, 12 July 2013 (UTC))))
 
(22 intermediate revisions by 12 users not shown)
Line 1: Line 1:
Installing and using fglrx drivers on Arch Linux should be a piece of cake, as the distro provides pre-built packages in its official repos, accessible through the pacman package manager.
'''Notice: This page is very, very outdated. Do not listen to anything it says until someone fixes it! For now, see [[https://wiki.archlinux.org/index.php/Catalyst]]'''
 
 
Arch Linux distro No Longer provides pre-built package's in its official repo's you have to use unofficial repo's the AUR for accessible through the pacman package manager.


The installation instructions I've taken straight from Arch's own wiki page, linked below in the External Resources section.
The installation instructions I've taken straight from Arch's own wiki page, linked below in the External Resources section.


==Installation==
 
Warning:
 
    Make sure that you own a R6xx (HD2xxx) or newer card or the driver won't be enabled. You will encounter an error if you try to enable your display using Catalyst and a card older than the R6xx series.
 
    It appears that Catalyst 9.10-10.11 does not support nForce4 motherboard chipsets.
 
Warning: Whether or not you install catalyst package from AUR, you will have to reinstall/update fglrx every time the kernel is updated. Otherwise, X will fail to start. Please remember that you can alway use catalyst-hook or catalyst-daemon package which will perform automatic fglrx update
 
 
Note: If you see those warnings:
 
WARNING: Package contains reference to $srcdir
 
WARNING: '.pkg' is not a valid archive extension.
 
while building catalyst-{kernver} package - do not be concerned, it's normal.
 
 
 
==Installation==unofficial==repo==




Line 9: Line 32:
===Before you start===
===Before you start===
You'll need to install the necessary programs
You'll need to install the necessary programs
{{Box Terminal|
{{Box Terminal|
<nowiki>#</nowiki> nano /etc/pacman.conf<br />
<nowiki>#</nowiki> pacman -S xorg-server<br/>
<nowiki>#</nowiki> pacman -S xf86-input-evdev<br/>
<nowiki>#</nowiki> pacman -S xf86-input-mouse<br/>
<nowiki>#</nowiki> pacman -S xf86-input-keyboard<br/>
<nowiki>#</nowiki> pacman -Rd libgl
}}
}}


<br/>
 
Unofficial repositories
 
There are some unofficial repositories containing the newest (or older) catalyst packages along with the appropriate libs and software in order to use the driver. If you want to know what packages are inside any given repository you need to first add repository to pacman.conf, perform pacman -Sy command and then list repository with pacman -Sl command:
 
 
{{Box Terminal|
<nowiki>#</nowiki> pacman -Sl catalyst
}}
 
[catalyst] repository
 
It contains newest stable catalyst driver and some additional packages. This repository should always work with the stock kernel from [core] and it is updated most frequently.
 
To use it you need:
 
1.) Edit /etc/pacman.conf and add those lines above all other repositories (so also above [core] and [extra]):
 
[catalyst]
 
Server = http://catalyst.apocalypsus.net/repo/catalyst/$arch
 
2.) Update with:
 
{{Box Terminal|
<nowiki>#</nowiki> pacman -Syu
}}
 
3.) look and see if you have a build
 
{{Box Terminal|
<nowiki>#</nowiki> cd /lib/modules/3.2.6-2-ARCH/build
}}
 
4) if not you will need one
 
{{Box Terminal|
<nowiki>#</nowiki> pacman -Syu base-devel linux-headers
}}
 
5.) Install catalyst: note  For x86_64 users [catalyst] provides lib32-catalyst-utils package
needed to run 32-bit opengl applications and wine games.
 
 
{{Box Terminal|
{{Box Terminal|
<nowiki>#</nowiki> pacman -Sy yaourt <br/>       
<nowiki>#</nowiki> pacman -Sy catalyst catalyst-utils lib32-catalyst-utils
}}
}}


Note: If you are updating from catalyst =< 10.8 steps 2,3,4,5 look like this:


{{Box Terminal|
{{Box Terminal|
<nowiki>#</nowiki> pacman -S xorg hwd<br />
<nowiki>#</nowiki> pacman -Sy<br/>
<nowiki>#</nowiki> hwd -xa<br />
<nowiki>#</nowiki> pacman -Rdd catalyst<br/>
<nowiki>#</nowiki> pacman -S xf86-input-evdev<br />
<nowiki>#</nowiki> pacman -S catalyst catalyst-utils
<nowiki>#</nowiki> pacman -S xf86-input-mouse<br/>
<nowiki>#</nowiki> pacman -S xf86-input-keyboard<br/>
<nowiki>#</nowiki> /etc/rc.d/hal start<br/>
<nowiki>#</nowiki> pacman -Rd libgl
}}
}}
<br/>
 
6.) Don't forget to prepare your /etc/X11/xorg.conf for catalyst! if it doesn't exist use.
 
{{Box Terminal|
{{Box Terminal|
<nowiki>#</nowiki> yaourt -Sy catalyst catalyst-utils<br/>
<nowiki>#</nowiki> aticonfig --initial
<nowiki>#</nowiki> aticonfig --initial      
}}
}}


Configuration
Three things to check in Arch before rebooting, otherwise X can break:
First, xorg.conf: AMD provides the aticonfig tool to create/modify xorg.conf file. It also can configure virtually every aspect of the card for it also accesses the amdpcsdb file. For a complete list of aticonfig options,
Warning: Use the --output option before committing to /etc/X11 as an xorg.conf file will override anything in /etc/X11/xorg.conf.d
If you do not already have an xorg.conf file, you can compare the generated file to one of the Sample Xorg.conf examples listed on the Xorg page.
Although most options are now automatically detected in current Xorg, you may want to specify some in case the defaults change between versions.
/etc/X11/xorg.conf
 
 
On to rc.conf:
/etc/rc.conf
Remove radeon from MODULES and blacklist it in /etc/modprobe.d/modprobe.conf if blacklist-fglrx.conf does not exist.
Adding fglrx to MODULES appears to be optional if added instead to /etc/mkinitcpio.conf (boot image would be rebuilt before reboot).
on to menu.lst
/boot/grub/menu.lst
Clear modesetting options as the driver doesn't appear to take advantage of KMS yet. Add nomodeset.
For example: kernel /boot/vmlinuz-linux root=/dev/sda1 ro nomodeset
Note: If you are using an AGP card instead of PCI Express add the agp module as well
Reboot!
Checking operation
Assuming reboot to your login was successful, otherwise #Troubleshooting. Commands to check that fglrx is up and running:
lsmod | grep fglrx
fglrxinfo 
Finally, run Xorg with startx or by using GDM/KDM and verify that direct rendering is enabled by running the following command in a terminal:
$ glxinfo | grep direct
If it says "direct rendering: yes" then you're good to go! If the glxinfo command is not found, you may need to install the mesa-demos package as well.
Warning: In recent versions of Xorg, the paths of libs are changed. So, sometimes libGL.so cannot be correctly loaded even if it's installed. Check this if your GL is not working. Please read "Troubleshooting" section for details.
Double Screen (Dual Head / Dual Screen / Xinerama)
Introduction
First of all: you have to know, it does not exist one single solution because each needs and configurations are different. That's why you have to adapt the step below to your own needs. It is possible that you have to try more than once. Therefore, you MUST save your working /etc/X11/xorg.conf BEFORE you start any change and you must be able to recover from tty.
    In this part, we will describe the installation of 2 differend sized screens on only one graphic cad with 2 different output ports (DVI + HDMI) using a "BIG Desktop" configuration.
    The Xinerama solution has some inconveniences, especially because it is not compatible with XrandR. For that very reason, you should not use this solution, because XrandR is just a must for our later configuration.
    The Dual Head solution would allow you to have 2 different sessions (one for each screen). It could be your wish but you will not be able to move windows from one screen to another. If you have only one screen, you will have to define the mouse inside your xorg for the 2 sessions inside the Server Layout section.
ATI Documentation
ATI Catalyst Control Center
The GUI tool shiped by ATI is very useful and we will try to use it as much as we can. To launch it, open a terminal and use the following command line:
kdesu amdcccle
Note: Of course, you have to adapt if you are using GNOME or any other DM.
Warning: Do NOT use sudo directly with a gui. Sudo gives you admin rights with user account information. Kdesu gives you admin rights with root privileges & variables.
Installation
Here, it is easy but important : make sure that your hardware is pluged correctly, power is on, and that you know your hardware caracteristics (screen dimensions, sizes, refresment rates ...) Normally, both screens are recognize during boot time but not necessarly identified properly, especially if you are not using any xorg base configuration file but instead relying on the hot-plugging feature.
The first step is to make sure they will be recognized by your DE / xorg. For this, you need to generate a basic xorg file for your 2 screens :
aticonfig --initial --desktop-setup=horizontal --overlay-on=1
or
aticonfig --initial=dual-head --screen-layout=left
Note: overlay is important because it allows you to have 1 pixel (or more) shared between the 2 screens.
Tip: For the different possible & available options, do not hesitate to type aticonfig inside a terminal to display all available command lines.
Normally, you have now a basic file that you can now edit to add your screen resolutions. It is important to precise the working resolution especially if you have screens of different sizes. To be added insithe the "Screen" section:
SubSection "Display"
Depth 24
Modes "1200x800"
EndSubSection
Well, from now on, instead of editing the xorg.conf file manually, let us use the ATI gui tool. Reboot X to be sure that your 2 screens are well supported and that the resolution are well recognized. (Screens must be independant).
Configuration
Here, you only have to launch the ATI control center with root privileges, go inside the display menu and choose how you would like to set your configuration (small arrow of the drop down menu). A last reboot of X and you will be done !
Before you reboot, do not hesitate to verify your new xorg.conf file. At this stage, inside the "Display" sub-section of the "Screen" section, you should see a "Virtual" command line, of which the resolution should be the sum of both screens. The "Server Layout" section says all the rest.





Latest revision as of 18:53, 5 July 2013

Notice: This page is very, very outdated. Do not listen to anything it says until someone fixes it! For now, see [[1]]


Arch Linux distro No Longer provides pre-built package's in its official repo's you have to use unofficial repo's the AUR for accessible through the pacman package manager.

The installation instructions I've taken straight from Arch's own wiki page, linked below in the External Resources section.


Warning:

   Make sure that you own a R6xx (HD2xxx) or newer card or the driver won't be enabled. You will encounter an error if you try to enable your display using Catalyst and a card older than the R6xx series. 
   It appears that Catalyst 9.10-10.11 does not support nForce4 motherboard chipsets.

Warning: Whether or not you install catalyst package from AUR, you will have to reinstall/update fglrx every time the kernel is updated. Otherwise, X will fail to start. Please remember that you can alway use catalyst-hook or catalyst-daemon package which will perform automatic fglrx update


Note: If you see those warnings:

WARNING: Package contains reference to $srcdir

WARNING: '.pkg' is not a valid archive extension.

while building catalyst-{kernver} package - do not be concerned, it's normal.


Installation==unofficial==repo

Before you start

You'll need to install the necessary programs

Terminal Command

# pacman -S xorg-server
# pacman -S xf86-input-evdev
# pacman -S xf86-input-mouse
# pacman -S xf86-input-keyboard
# pacman -Rd libgl


Unofficial repositories

There are some unofficial repositories containing the newest (or older) catalyst packages along with the appropriate libs and software in order to use the driver. If you want to know what packages are inside any given repository you need to first add repository to pacman.conf, perform pacman -Sy command and then list repository with pacman -Sl command:


Terminal Command

# pacman -Sl catalyst

[catalyst] repository

It contains newest stable catalyst driver and some additional packages. This repository should always work with the stock kernel from [core] and it is updated most frequently.

To use it you need:

1.) Edit /etc/pacman.conf and add those lines above all other repositories (so also above [core] and [extra]):

[catalyst]

Server = http://catalyst.apocalypsus.net/repo/catalyst/$arch

2.) Update with:

Terminal Command

# pacman -Syu

3.) look and see if you have a build

Terminal Command

# cd /lib/modules/3.2.6-2-ARCH/build

4) if not you will need one

Terminal Command

# pacman -Syu base-devel linux-headers

5.) Install catalyst: note For x86_64 users [catalyst] provides lib32-catalyst-utils package needed to run 32-bit opengl applications and wine games.


Terminal Command

# pacman -Sy catalyst catalyst-utils lib32-catalyst-utils


Note: If you are updating from catalyst =< 10.8 steps 2,3,4,5 look like this:

Terminal Command

# pacman -Sy
# pacman -Rdd catalyst
# pacman -S catalyst catalyst-utils

6.) Don't forget to prepare your /etc/X11/xorg.conf for catalyst! if it doesn't exist use.

Terminal Command

# aticonfig --initial

Configuration

Three things to check in Arch before rebooting, otherwise X can break:


First, xorg.conf: AMD provides the aticonfig tool to create/modify xorg.conf file. It also can configure virtually every aspect of the card for it also accesses the amdpcsdb file. For a complete list of aticonfig options,

Warning: Use the --output option before committing to /etc/X11 as an xorg.conf file will override anything in /etc/X11/xorg.conf.d

If you do not already have an xorg.conf file, you can compare the generated file to one of the Sample Xorg.conf examples listed on the Xorg page.

Although most options are now automatically detected in current Xorg, you may want to specify some in case the defaults change between versions.


/etc/X11/xorg.conf


On to rc.conf:

/etc/rc.conf

Remove radeon from MODULES and blacklist it in /etc/modprobe.d/modprobe.conf if blacklist-fglrx.conf does not exist. Adding fglrx to MODULES appears to be optional if added instead to /etc/mkinitcpio.conf (boot image would be rebuilt before reboot).


on to menu.lst

/boot/grub/menu.lst

Clear modesetting options as the driver doesn't appear to take advantage of KMS yet. Add nomodeset. For example: kernel /boot/vmlinuz-linux root=/dev/sda1 ro nomodeset

Note: If you are using an AGP card instead of PCI Express add the agp module as well


Reboot! Checking operation

Assuming reboot to your login was successful, otherwise #Troubleshooting. Commands to check that fglrx is up and running:

lsmod | grep fglrx fglrxinfo

Finally, run Xorg with startx or by using GDM/KDM and verify that direct rendering is enabled by running the following command in a terminal:

$ glxinfo | grep direct

If it says "direct rendering: yes" then you're good to go! If the glxinfo command is not found, you may need to install the mesa-demos package as well. Warning: In recent versions of Xorg, the paths of libs are changed. So, sometimes libGL.so cannot be correctly loaded even if it's installed. Check this if your GL is not working. Please read "Troubleshooting" section for details. Double Screen (Dual Head / Dual Screen / Xinerama) Introduction First of all: you have to know, it does not exist one single solution because each needs and configurations are different. That's why you have to adapt the step below to your own needs. It is possible that you have to try more than once. Therefore, you MUST save your working /etc/X11/xorg.conf BEFORE you start any change and you must be able to recover from tty.

   In this part, we will describe the installation of 2 differend sized screens on only one graphic cad with 2 different output ports (DVI + HDMI) using a "BIG Desktop" configuration. 
   The Xinerama solution has some inconveniences, especially because it is not compatible with XrandR. For that very reason, you should not use this solution, because XrandR is just a must for our later configuration. 
   The Dual Head solution would allow you to have 2 different sessions (one for each screen). It could be your wish but you will not be able to move windows from one screen to another. If you have only one screen, you will have to define the mouse inside your xorg for the 2 sessions inside the Server Layout section. 

ATI Documentation ATI Catalyst Control Center

The GUI tool shiped by ATI is very useful and we will try to use it as much as we can. To launch it, open a terminal and use the following command line:

kdesu amdcccle

Note: Of course, you have to adapt if you are using GNOME or any other DM. Warning: Do NOT use sudo directly with a gui. Sudo gives you admin rights with user account information. Kdesu gives you admin rights with root privileges & variables. Installation

Here, it is easy but important : make sure that your hardware is pluged correctly, power is on, and that you know your hardware caracteristics (screen dimensions, sizes, refresment rates ...) Normally, both screens are recognize during boot time but not necessarly identified properly, especially if you are not using any xorg base configuration file but instead relying on the hot-plugging feature.

The first step is to make sure they will be recognized by your DE / xorg. For this, you need to generate a basic xorg file for your 2 screens :

aticonfig --initial --desktop-setup=horizontal --overlay-on=1

or

aticonfig --initial=dual-head --screen-layout=left

Note: overlay is important because it allows you to have 1 pixel (or more) shared between the 2 screens. Tip: For the different possible & available options, do not hesitate to type aticonfig inside a terminal to display all available command lines.

Normally, you have now a basic file that you can now edit to add your screen resolutions. It is important to precise the working resolution especially if you have screens of different sizes. To be added insithe the "Screen" section:

SubSection "Display" Depth 24 Modes "1200x800" EndSubSection

Well, from now on, instead of editing the xorg.conf file manually, let us use the ATI gui tool. Reboot X to be sure that your 2 screens are well supported and that the resolution are well recognized. (Screens must be independant). Configuration

Here, you only have to launch the ATI control center with root privileges, go inside the display menu and choose how you would like to set your configuration (small arrow of the drop down menu). A last reboot of X and you will be done !

Before you reboot, do not hesitate to verify your new xorg.conf file. At this stage, inside the "Display" sub-section of the "Screen" section, you should see a "Virtual" command line, of which the resolution should be the sum of both screens. The "Server Layout" section says all the rest.


Notes

  • These packages contain only the kernel module, and depend on the catalyst-utils package. The catalyst-utils package is kernel-independent and provides the libraries and utilities for Xorg, including ATI's own libGL.so.
  • After installing the package, you'll need to either source /etc/profile or log out, then back in to set up the environment properly.
  • If you run both kernel26 and kernel26beyond then install both catalyst module packages. They won't conflict with one another.

Custom Kernels

To install catalyst for a custom kernel, you'll need to build your own catalyst-$kernel package, containing the kernel module compiled specifically for your kernel.

If you are at all uncomfortable or inexperienced making packages, read up Arch's ABS wiki page first so things go smoothly.

Obtaining PKGBUILD

Obtain the PKGBUILD and catalyst.install files from CVS or ABS. Either:

Editing the PKGBUILD and building

Three changes need to be made here:

First, change

   pkgname=catalyst

to

   pkgname=catalyst-KERNEL_NAME

where KERNEL_NAME is whatever you want (custom, mm, themostawesomekernelever)

Second, remove kernel26 from the dependencies list.

Third, change

   _kernver=2.6.15-ARCH

to

   _kernver=`uname -r`

(or directly insert the output of uname -r when running your custom kernel there)

Finally, build and install the package. (makepkg -i or makepkg followed by pacman -A pkgname.pkg.tar.gz)

Notes

  • No changes need to be made to the catalyst-utils package, which is completely kernel-independent. All you need to do is compile a kernel module.
  • To build and run the catalyst kernel module with 2.6.16 kernels, patches are needed! Check out the cvs entries for catalyst in testing for the required patch.

Related Resources


Distribution Neutral Steps

Verifying | Configuring | Troubleshooting