Ubuntu Gutsy Installation Guide: Difference between revisions

From cchtml.com
m (Protected "Ubuntu Gutsy Installation Guide": Excessive vandalism (‎[edit=autoconfirmed] (indefinite) ‎[move=autoconfirmed] (indefinite)))
 
(337 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
The [[:Category:Releases|latest]] fglrx driver supports Radeon 9500  and the X-series cards up to HD2900. Workstation cards are not supported.
== Installation ==
 
==Pre-Installation Checks==
=== Enable "restricted" Repository ===
Make sure the ''restricted'' repository is enabled in ''/etc/apt/sources.list'' or this guide will not work!
 
System > Administration > Software Sources.  Check "Proprietary Drivers for Devices (Restricted)" box.
 
 


== Installation ==
For most users it won't be necessary to go into installation and configuration details of the driver. Ubuntu 7.10 (Gutsy) provides a notification saying that there are restricted drivers available. You just have to go there (Restricted Drivers Manager) and enable the "ATI accelerated graphics driver". Ubuntu will then install and configure the driver for you. If this does not provide the optimal solution you were looking for, please read ahead.


===Method 1: Install the Driver the Ubuntu Way===
===Method 1: Install the Driver the Ubuntu Way===
This will install the driver that is currently in the repositories. It may be older than the current version from AMD.
<pre>
<pre>
sudo apt-get update
sudo apt-get update
Line 19: Line 12:
</pre>
</pre>


Note: The second line of the above may not be necessary.  If apt says it cannot find the "linux-restricted-modules" package, try line 3.  If that fails, check your sources.list (see top of page)
The second line of the above may not be necessary.  If apt says it cannot find the "linux-restricted-modules" package, try line 3.  If that fails, check your sources.list (see top of page)


If the system complains about dependencies, use your preferred package manager to download python2.4 and, if necessary, its dependencies.
If the system complains about dependencies, use your preferred package manager to download python2.4 and, if necessary, its dependencies.


(Note: This method did not work with ATI X1300 Radeon on Gutsy whereas method 2 worked perfectly for us. 26/10/2007)
===Method 2: Install the Catalyst Driver Manually===
 
===Method 2: Install the 8.42.3 Driver Manually===


*Note: ''This is just an alternative installation method for the section above. It might help if you still get 'DRI missing' errors.''
:''This is just an alternative installation method for the section above. It might help if you still get 'DRI missing' errors.''


Download the ATI driver installer:
Download page: Catalyst {{catalystversion}} -- File: {{catalystfilename}}. This package contains both the 32-bit and 64-bit driver.
[https://www2.ati.com/drivers/linux/ati-driver-installer-8.42.3-x86.x86_64.run ati-driver-installer-8.42.3-x86.x86_64.run] (this installer is for 32bit '''and''' 64bit systems)


Change to the download directory.  Make sure that you have the ''universe'' and ''multiverse'' repositories enabled in ''/etc/apt/sources.list'' before doing these steps.   
Change to the directory you downloaded the file.  Make sure that you have the ''universe'' and ''multiverse'' repositories enabled in ''/etc/apt/sources.list'' before doing these steps.   


There is a detailed manual with screenshots at [https://wiki.ubuntu.com/AddingRepositoriesHowto Ubuntu Wiki].
There is a detailed manual with screenshots at [https://wiki.ubuntu.com/AddingRepositoriesHowto Ubuntu Wiki].
Line 39: Line 29:


''Install necessary tools:''
''Install necessary tools:''
<pre>
{{Box Terminal|
sudo apt-get update
sudo apt-get update
sudo apt-get install module-assistant build-essential fakeroot dh-make debhelper \
 
debconf libstdc++5 linux-headers-generic
sudo apt-get install build-essential fakeroot dh-make debhelper debconf libstdc++5 dkms linux-headers-$(uname -r)
</pre>
}}
 
''Uninstall previous fglrx:''
Using Synaptic, completely remove any packages containing "fglrx" in their name.
 
If using 64bit make sure to collect package "ia32-libs" before you continue!


''Create .deb packages:''  
''Create .deb packages:''  
{{Box Terminal|
sudo sh {{catalystfilename}} --buildpkg Ubuntu/gutsy
}}
note: if this step fails with a signal being caught, and you are running the script on an NFS-mounted directory, copy it to a local partition, and it will work.  The same error may result from insufficient disk space.
As an alternative, you can just use
{{Box Terminal|
sudo sh ./{{catalystfilename}} --buildpkg Ubuntu --autopkg
}}
which will download all the needed packages by itself and also automatically detects the Ubuntu version used.


(don't use fakeroot ,"fakeroot: nested operation not yet supported")
If this step fails on amd64/x86_64 with a <tt>No such file or directory</tt> message about missing files in <tt>X11R6/lib</tt>, [http://emmetcaulfield.net/Tech/Ubuntu64+ATI follow these instructions] and come back here. Also check that your download path does not contain spaces.
<pre>
sudo bash ati-driver-installer-8.42.3-x86.x86_64.run --buildpkg Ubuntu/gutsy
</pre>


''Blacklist old fglrx module from linux-restricted-modules:''
''Blacklist old fglrx module from linux-restricted-modules:''
Line 66: Line 68:
<pre>DISABLED_MODULES="fglrx"</pre>
<pre>DISABLED_MODULES="fglrx"</pre>
}}
}}
Please note that after the modification above, the "Restricted Driver Manager" will signal "ATI accelerated graphics driver" not enabled (unticked). This is perfectly correct. At the end of the installation procedure it will signal in Status: "in use" (green light), but NOT enabled. It simply means that the fglrx module contained in the linux-restricted-modules package is not enabled, but another fglrx module (8.4) is in use.
You may also need to edit the file (if it exists):
<pre>gksu gedit /etc/modprobe.d/blacklist-restricted</pre>
Put a # in front of the line "blacklist fglrx", if it is present. Otherwise, the kernel module will not load automatically, and you will not get 3D acceleration.


''Remove any old fglrx debs from /usr/src/:''
<pre>
sudo rm /usr/src/fglrx-kernel*.deb
</pre>


''Install .deb packages:''
''Install .deb packages:''


<pre>
<pre>
sudo dpkg -i xorg-driver-fglrx_8.42.3-1*.deb \
sudo dpkg -i xorg-driver-fglrx_8.476-0*.deb fglrx-kernel-source_8.476-0*.deb fglrx-amdcccle_8.476-0*.deb
fglrx-kernel-source_8.42.3-1*.deb \
fglrx-amdcccle_8.42.3-1*.deb
</pre>
</pre>


*Note: If you get a 'Bad file descriptor' message concerning the xorg.conf file try switching user to root and repeating the same command without sudo. This might be valid for the following commands too. (Ubuntu Gutsy installs with no password set for root by default. You can set a password for the root by typing 'sudo passwd root' first.)
''Additional 64-bit instructions''


*Note: If you have a 64 bit install, the above dpkg command will likely complain that "Errors were encountered while processing: fglrx-amdcccle".  This is because of a dependency of the amdccle package on 32 bit libraries.  If you recieve this error, issue the following command after the above dpkg command, which will force the installation of all of the 32 bit dependencies, and then the amdccle pacakge:
If you have a 64 bit install, the above dpkg command will likely complain that "Errors were encountered while processing: fglrx-amdcccle".  This is because of a dependency of the amdccle package on 32 bit libraries.  If you receive this error, issue the following command after the above dpkg command, which will force the installation of all of the 32 bit dependencies, and then the amdccle package:


<pre>
<pre>
Line 84: Line 93:
</pre>
</pre>


Catalyst 8.3 on 64-bit systems requires the ''--force-overwrite'' command in the above ''dpkg'' command:
<pre>
sudo dpkg -i --force-overwrite xorg-driver-fglrx_8.476-0*.deb fglrx-kernel-source_8.476-0*.deb fglrx-amdcccle_8.476-0*.deb
</pre>
I’m not wrhoty to be in the same forum. ROTFL


''Remove any old fglrx debs from /usr/src/:''
===Configure the Driver===
*NOTE THIS WILL ERASE SETTINGS IN /etc/X11/xorg.conf you should be sure there is a backup.
*Note Method 2 Users: Before you carry out this step you must reboot your machine. Or else the fglrx driver will not be in use on xorg.conf and using the aticonfig options will cause a memory dump and not intialise the Driver properly.
*Note: An '''alternative''' to the '''aticonfig --initial''' command is to edit ''/etc/X11/xorg.conf'' and replace the string "ati" with "fglrx" in the "Device" section. This way you won't lose your old "Screen" and "Monitor" settings. Afterwards you can use aticonfig for setting overlay etc. Another alternative is '''aticonfig --initial --force''' if you encounter issues with the first command.
<pre>
<pre>
sudo rm /usr/src/fglrx-kernel*.deb
sudo aticonfig --initial
</pre>
</pre>
 
Then:
''Fix broken dependencies''
*Note: ''You only need to do this if you have installed previous versions of these drivers using this method before.''
<pre>
<pre>
sudo apt-get -f install
sudo aticonfig --overlay-type=Xv
</pre>
</pre>
*Note: Alternative in the overlay-type to "Xv" can be "opengl" or "disable" if the TV-out makes problems in videos.


''Compile the kernel module:''
====Alternative: Configure the Driver, The Manual Way:====
An alternative to the "''sudo aticonfig''" commands is to edit "''/etc/X11/xorg.conf''" and change the "Device" section for the video card as shown below. This way you won't lose your old settings.
<pre>
<pre>
sudo module-assistant prepare,update
gksu gedit /etc/X11/xorg.conf
sudo module-assistant build,install fglrx -f
sudo depmod -a
</pre>
</pre>
It's necessary, because sometimes this file is written by other packages, and so there's no 3D acceleration.
''Create the following folder''
<pre>
<pre>
sudo mkdir /lib/modules/$(uname -r)/volatile
Section "Device"
[...]
#      Driver          "vesa"
Driver "fglrx"
Option "VideoOverlay" "on"
Option "OpenGLOverlay" "off"
[...]
EndSection
</pre>
</pre>


Note: the volatile directory might already exist at this stage then simply continue with the next step.
''Create a symbolic link''


==== TV - Out ====
The composite TV-Out is not working simultaneously with the VGA on my System. To use it I have turned the VGA off and only the TV on. Attention! This command turns off your Monitor!!
<pre>
<pre>
sudo ln -sf /lib/modules/$(uname -r)/misc/fglrx.ko /lib/modules/$(uname -r)/volatile/fglrx.ko
sudo aticonfig --enable-monitor=tv
</pre>
</pre>
 
To change back to VGA:
 
 
'''IMPORTANT''': You have to recompile the kernel module after each kernel update!
(Note: How do you recompile the kernel? A simple reboot worked for us.)
 
===Configure the Driver===
*Note Method 2 Users: Before you carry out this step you must reboot your machine. Or else the fglrx driver will not be in use on xorg.conf and using the aticonfig options will cause a memory dump and not intialise the Driver properly.
*Note: An '''alternative''' to the '''aticonfig --initial''' command is to edit ''/etc/X11/xorg.conf'' and replace the string "ati" with "fglrx" in the "Device" section. This way you won't lose your old "Screen" and "Monitor" settings. Afterwards you can use aticonfig for setting overlay etc. Another alternative is '''aticonfig --initial --force''' if you encounter issues with the first command.
<pre>
<pre>
sudo aticonfig --initial
sudo aticonfig --enable-monitor=crt1
</pre>
</pre>
Then:
Some have had luck with both mirrored.
<pre>
<pre>
sudo aticonfig --overlay-type=Xv
sudo aticonfig --force-monitor=crt1
sudo aticonfig --enable-monitor=crt1,tv
</pre>
</pre>
*Note: Is there an alternative to the previous step?
reboot after that and it should mirror the CRT1 onto the TV.


===Finish the Installation===
===Finish the Installation===
Now save any open document and reboot your system:
Now save any open document and reboot your system:
<pre>
<pre>
sudo shutdown -r now
sudo shutdown -hr now
</pre>
</pre>
*Note: An '''alternative''' to rebooting is to restart the X Server by pressing your CTRL ALT BACKSPACE keys. You must remove any old kernel modules such as "drm" "radeon" or "fglrx" using the "rmmod" command. Example: <code>sudo rmmod fglrx</code>
*Note: An '''alternative''' to rebooting is to restart the X Server by pressing your CTRL ALT BACKSPACE keys. You must remove any old kernel modules such as "drm" "radeon" or "fglrx" using the "rmmod" command. Example: <code>sudo rmmod fglrx</code>
*Note: Another way to reboot:
<pre>
sudo reboot
</pre>


 
== Post-Installation Checks and Tweaks ==
== Post-Installation Checks ==
===Verifying===
===Verifying===
Run the following command to check its output to ensure the fglrx driver is installed properly:
Run the following command to check its output to ensure the fglrx driver is installed properly:
<pre>
<pre>
$ fglrxinfo
$fglrxinfo  
display: :0.0  screen: 0
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI MOBILITY RADEON 9600/9700 Series
OpenGL renderer string: ATI MOBILITY RADEON X300
OpenGL version string: 2.0.6650 (8.40.4)
OpenGL version string: 2.1.7415 Release
</pre>
 
64bit Users only ( 32bit users can continue to the fglrxinfo test ), after rebooting you may have noticed that you cant open aticonfig, and the fglrxinfo test below may not show ati in the info from the test, to fix this in terminal do the following command
<pre>
sudo ln -s /usr/lib/libGL.so.1.2 /usr/lib/libGL.so.1
</pre>
</pre>
The <code>OpenGL vendor string</code> should read '''ATI''' and not '''Mesa'''.
The <code>OpenGL vendor string</code> should read '''ATI''' and not '''Mesa'''.


'''If it still says ''Mesa'' and not ''ATI'', even after re-enabling the driver from the Restricted-manager:'''
'''If it still says ''Mesa'' and not ''ATI'', even after re-enabling the driver from the Restricted-manager:'''
You can try the following:
You can try the following:
:*<pre>$ less /var/log/Xorg.0.log |grep EE</pre> if this command returns <code>(EE) fglrx(0): incompatible kernel module detected - HW accelerated OpenGL will not work</code> then remove the kernel module and reinstall it.
:: <pre>$ sudo dkms remove -m fglrx -v 8.471 --all</pre>
:*Remove all the packages provided by the <code>xserver-xorg-video-all</code> meta-package (search for it using Synaptic or Adept), then restart the machine. The X Server should now use the new fglrx driver by force (provided the driver is being used in ''xorg.conf'').
:*Remove all the packages provided by the <code>xserver-xorg-video-all</code> meta-package (search for it using Synaptic or Adept), then restart the machine. The X Server should now use the new fglrx driver by force (provided the driver is being used in ''xorg.conf'').
::If you can't log in after this, you'll have to log in to a terminal in the login screen, and reinstall the <code>xserver-xorg-video-all</code> package. Your problem is probably somewhere else. (taken from [http://ubuntuforums.org/showpost.php?p=3655658&postcount=139]).
::If you can't log in after this, you'll have to log in to a terminal in the login screen, and reinstall the <code>xserver-xorg-video-all</code> package. Your problem is probably somewhere else. (taken from [http://ubuntuforums.org/showpost.php?p=3655658&postcount=139]).


If you see a message like 'Xlib: extension "XFree86-DRI" missing on display ":1.0"' then you may have to add the following to /etc/X11/xorg.conf (see [http://ubuntuforums.org/showthread.php?t=292642#post1714920]):
:*Remove the package xserver-xgl.
{{Box File|/etc/X11/xorg.conf|
::'''Explanation:''' If you installed this previously in order to make compiz work, it will not allow direct rendering on your display. You can check out if this is what it causing the problem by running
<pre>
::<pre>DISPLAY=:0 glxinfo | grep render</pre>
Section "Extensions"
::If it returns an ATI renderer, it means that xgl is being displayed indirectly on the display 1. (Taken from [http://ubuntuforums.org/showthread.php?t=740287])
    Option "Composite" "0"
::'''Warning:''' This might make your compiz stop working as it is configured to use XGl. A solution might be to run the Envy script in order to configure compiz.
EndSection
</pre>
}}


Note: Here is the [[glxinfo]] of a good install (for those interested).


If you '''still''' see a message like "Xlib: extension "XFree86-DRI" missing on display ":0.0"." you may simply need to enable the restricted drivers.
=== Enable laptop mode on battery power ===


Ubuntu and Kubuntu use a Restricted-Driver manager to load/unload non-FOSS drivers. Even if they are installed and specified in the xorg.conf does not mean they'll load properly.  
Enabling laptop mode on battery power gives you much better battery life, however be aware that sometimes it causes odd hangs.


To start the restricted manager in both Ubuntu & Kbuntu:
Switch ENABLE_LAPTOP_MODE to true 
<pre>sudo /usr/bin/restricted-manager</pre>
{{Box File|/etc/default/acpi-support|
<pre>
# Switch to laptop-mode on battery power - off by default as it causes odd
# hangs on some machines
ENABLE_LAPTOP_MODE=true
</pre>
}}


If you check the box to enable the restricted driver and reboot, it should work.
Switch FGLRX_ACPI_SWITCH_POWERSTATES to true
{{Box File|/etc/default/fglrx|
<pre>
# Uncomment the next line to enable powerstate switching on ACPI
# events for lid open/close and AC adapter on/off
FGLRX_ACPI_SWITCH_POWERSTATES=true
</pre>
}}


=== Additional configure with aticonfig tool ===
=== Additional configure with aticonfig tool ===
Line 189: Line 223:
* turn second monitor on/off on the fly
* turn second monitor on/off on the fly


==Ubuntu-specific Issues==
==Specific Issues==
 
Your awnser was just what I needed. It’s made my day!
 
=== Suspend/Hibernation work with 7.12===


=== If installing on Ubuntu x64... ===
With Gutsy release, there was a big problem using the ATI proprietary drivers. The Suspend/Hibernate function stopped working. The problem was due to the new SLUB allocator incorporated in 2.6.22 / 2.6.23 Kernel.  


(thanks to Michael at Phoronix forums and aolana at Ubuntuforums.org)
'''The problem has been solved in the AMD Catalyst 7.12 driver release.'''
'''UPDATE: The problem has NOT been solved in the AMD Catalyst 7.12 driver release.'''


Building packages for Ubuntu 64-Bit is known to be broken. If you're installing on Ubuntu 64-Bit, do this:
Suspend/hibernate is not working for FireGL 5250.
For FireGL 5200, suspend works with the 7.12 fglrx kernel module loaded (which did not work before this release) , but does not work if X is running.


Download this: [http://www.michaellarabel.com/downloads/fglrx-8.42-ubuntu+debian-2.tar.bz2 fglrx-8.42-ubuntu+debian-2.tar.bz2]
For Thinkpad T60 with ATI X1400, to get the laptop to wake up from suspend, I had to change the following in /etc/default/acpi-support:


Extract the installer:
SAVE_VBE_STATE=false


POST_VIDEO=false
Even with the above settings (like POST_VIDEO=false, etc.) my ASUS Z96J with an X1600 does not suspend.
This bug has been a serious issue for several months now.  There is a lot of frustration over this, because Ubuntu/Canonical has not been helpful.  They've said things like suggesting not using fglrx (thanks a lot, that really helps).
Current status on this bug can be found here: https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/121653/
===If you get  /usr/X11R6/lib/modules/dri/fglrx_dri.so not found===
sudo ln -s /usr/lib/ /usr/X11R6/lib/modules
It may be necessary to create the /usr/X11R6/lib directory first:
sudo mkdir /usr/X11R6/lib
===If you get  /usr/X11R6/lib64/modules/dri/fglrx_dri.so not found===
sudo ln -s /usr/lib/ /usr/X11R6/lib64/modules
===Segmentation Fault with glxinfo/fglrxinfo===
If <code>fglrxinfo</code> or <code>glxinfo</code> returns a Segmentation fault like this:
<pre>
<pre>
bash ati-driver-installer-8.42.3-x86.x86_64.run --extract somedirectory
$ fglrxinfo
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon Xpress Series
OpenGL version string: 1.4 (2.1.7170 Release)
 
Segmentation fault
</pre>
</pre>


Extract the archive you downloaded to the directory that you extracted the driver's installation files to.
Set output of libGL to verbose with
<pre>$ export LIBGL_DEBUG=verbose</pre>
 
Run <code>fglrxinfo</code> or <code>glxinfo</code> again
<pre>libGL: XF86DRIGetClientDriverName: 8.44.3 fglrx (screen 0)
libGL: OpenDriver: trying /usr/lib/dri/fglrx_dri.so
libGL error: dlopen /usr/lib/dri/fglrx_dri.so failed (/usr/lib/dri/fglrx_dri.so: cannot open shared object file: Permission denied)
libGL error: unable to load driver: fglrx_dri.so
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon Xpress Series
OpenGL version string: 1.4 (2.1.7170 Release)
 
Segmentation fault</pre>


Then build the package:
Don't know if its always fglrx_dri.so, but the fix is to add read permissions to the file.


<pre>
Check if read permission is not there
./ati-installer.sh 8.42.3 --buildpkg Ubuntu/gutsy
<pre>ls -l /usr/lib/dri/ |grep fglrx_dri
-rw-rw---- 1 root root 17462688 2008-01-13 17:42 fglrx_dri.so
</pre>
</pre>


=== Revert to Xorg driver ===
Add read permission
<pre>$ sudo chmod +r /usr/lib/dri/fglrx_dri.so</pre>


If (for any reason) the fglrx install fails, you can revert to the Xorg driver by executing
Check read permission
<pre>sudo dpkg-reconfigure xserver-xorg</pre>
<pre>ls -l /usr/lib/dri/ |grep fglrx_dri
and selecting the "ati" driver, or simply restoring the previous /etc/X11/xorg.conf file, if you made a backup.
-rw-rw-r-- 1 root root 17462688 2008-01-13 17:42 fglrx_dri.so
</pre>


You also need to remove the xorg-driver-fglrx or your manually installed drivers to get the 3D acceleration back, since it is provided by file /usr/lib/libGL.so.1.2 which belongs to libgl1-mesa package and which is moved to backup and replaced at the installation of xorg-driver-fglrx (or the manually built) package. In case the removal of the fglrx drivers fails to restore the file from libgl1-mesa, you have to reinstall the package by running:
Now I know who the brainy one is, I’ll keep lokinog for your posts.


<pre>sudo apt-get install --reinstall libgl1-mesa</pre>
=== Monitor detection (1680x1050 Resolution Issue)--- SOLVED ===


=== If suspend is not working ===
As specified in the release notes, "Connecting a display device that supports 1680x1050 to a system running Linux may result in a
maximum display resolution of 1280x1024 only being available". (from [http://ubuntuforums.org/showthread.php?t=645974 thread])


If suspend stops working after fglrx installation, meaning display will not initialize after attempting to resume, then changing a few options has been reported to work for some hardware <!--([https://launchpad.net/ubuntu/source/linux-restricted-modules-2.6.20/bug/84991 Bug 84991 ])-->.
['''It works with the latest driver''']


Fglrx driver does not detect some monitors correctly, so you have to do it manually (google about your monitor spec with keyword: xorg.conf).


For ATI X700 and ATI X1100 on Acer Aspire 5051:
'''For example:''' Samsung 205BW 1680x1050 monitor needs manually set: 
{{Box File|/etc/default/acpi-support|
{{Box File|/etc/X11/xorg.conf|
<pre>
<pre>
SAVE_VBE_STATE=false
Section "Monitor"
POST_VIDEO=true
      Option "DPMS"
USE_DPMS=false
      Identifier "samsung-monitor"
      VendorName "Samsung"
      ModelName "SyncMaster 205BW"
      HorizSync 31.4 - 80.0
      VertRefresh 56.000 - 75.000
      Modeline "1680x1050" 146.25 1680 1784 1960 2240 1050 1053 1059 1089
EndSection
 
Section "Screen"
Identifier "samsung-screen"
Device "samsung-device"
Monitor "samsung-monitor"
Defaultdepth 24
SubSection "Display"
Depth 24
Modes "1680x1050"
EndSubSection
EndSection
</pre>
</pre>
}}
}}


For ATI X1300 and the ATI X1400 on a Dell Inspiron 9400(*), also for ATI X1600 on Asus Z96J (using install method 2):
{{Box File|/etc/default/acpi-support|
<pre>
POST_VIDEO=false
</pre>
}}
(*)It seems don't work for Dell Inspiron 6400 with ATI X1400.


===If you get  /usr/X11R6/lib/modules/dri/fglrx_dri.so not found===
This has made my day. I wish all positngs were this good.
 
=== Hang at logout ===
 
If you experience hangs when logging out (of X) try disabling atieventsd with this command:
 
<pre>sudo /usr/sbin/update-rc.d -f atieventsd remove</pre>
 
== Revert to Xorg driver ==
 
If (for any reason) the fglrx install fails, you can revert to the Xorg driver by executing
<pre>sudo dpkg-reconfigure xserver-xorg</pre>
and selecting the "ati" driver, or simply restoring the previous /etc/X11/xorg.conf file, if you made a backup.  


sudo ln -s /usr/lib/ /usr/X11R6/lib/modules
You also need to remove the xorg-driver-fglrx or your manually installed drivers to get the 3D acceleration back, since it is provided by file /usr/lib/libGL.so.1.2 which belongs to libgl1-mesa package and which is moved to backup and replaced at the installation of xorg-driver-fglrx (or the manually built) package. In case the removal of the fglrx drivers fails to restore the file from libgl1-mesa, you have to reinstall the package by running:


=== libGL error ===
<pre>sudo apt-get install --reinstall libgl1-mesa-glx</pre>
* fglrxinfo gives:  libGL.so.1: cannot open shared object file.
* Fixed with command:
sudo ln /usr/lib/libGL.so.1.2 /usr/lib/libGL.so.1


==See Also==
==See Also==

Latest revision as of 18:44, 5 July 2013

Installation

For most users it won't be necessary to go into installation and configuration details of the driver. Ubuntu 7.10 (Gutsy) provides a notification saying that there are restricted drivers available. You just have to go there (Restricted Drivers Manager) and enable the "ATI accelerated graphics driver". Ubuntu will then install and configure the driver for you. If this does not provide the optimal solution you were looking for, please read ahead.

Method 1: Install the Driver the Ubuntu Way

This will install the driver that is currently in the repositories. It may be older than the current version from AMD.

sudo apt-get update	
sudo apt-get install linux-restricted-modules-generic restricted-manager
sudo apt-get install xorg-driver-fglrx
sudo depmod -a

The second line of the above may not be necessary. If apt says it cannot find the "linux-restricted-modules" package, try line 3. If that fails, check your sources.list (see top of page)

If the system complains about dependencies, use your preferred package manager to download python2.4 and, if necessary, its dependencies.

Method 2: Install the Catalyst Driver Manually

This is just an alternative installation method for the section above. It might help if you still get 'DRI missing' errors.

Download page: Catalyst 15.12 -- File: radeon-crimson-15.12-15.302-151217a-297685e.zip. This package contains both the 32-bit and 64-bit driver.

Change to the directory you downloaded the file. Make sure that you have the universe and multiverse repositories enabled in /etc/apt/sources.list before doing these steps.

There is a detailed manual with screenshots at Ubuntu Wiki.

By default, Ubuntu did not enable the Universe and Multiverse repositories, but now in Gutsy, both Universe and Multiverse are activated by default.

Install necessary tools:

Terminal Command

sudo apt-get update

sudo apt-get install build-essential fakeroot dh-make debhelper debconf libstdc++5 dkms linux-headers-$(uname -r)

Uninstall previous fglrx: Using Synaptic, completely remove any packages containing "fglrx" in their name.

If using 64bit make sure to collect package "ia32-libs" before you continue!

Create .deb packages:

Terminal Command

sudo sh radeon-crimson-15.12-15.302-151217a-297685e.zip --buildpkg Ubuntu/gutsy

note: if this step fails with a signal being caught, and you are running the script on an NFS-mounted directory, copy it to a local partition, and it will work. The same error may result from insufficient disk space.

As an alternative, you can just use

Terminal Command

sudo sh ./radeon-crimson-15.12-15.302-151217a-297685e.zip --buildpkg Ubuntu --autopkg

which will download all the needed packages by itself and also automatically detects the Ubuntu version used.

If this step fails on amd64/x86_64 with a No such file or directory message about missing files in X11R6/lib, follow these instructions and come back here. Also check that your download path does not contain spaces.

Blacklist old fglrx module from linux-restricted-modules:

As Ubuntu Gutsy's linux-restricted-modules package includes the fglrx module from an old driver version (8.37.6), we have to blacklist this module to make sure the new kernel module which is needed by the new driver will be used instead.

Ubuntu/Gnome users type in:

gksu gedit /etc/default/linux-restricted-modules-common

Kubuntu/KDE users type in:

kdesu kate /etc/default/linux-restricted-modules-common

Add "fglrx" to the line "DISABLED_MODULES"

File: /etc/default/linux-restricted-modules-common
DISABLED_MODULES="fglrx"

Please note that after the modification above, the "Restricted Driver Manager" will signal "ATI accelerated graphics driver" not enabled (unticked). This is perfectly correct. At the end of the installation procedure it will signal in Status: "in use" (green light), but NOT enabled. It simply means that the fglrx module contained in the linux-restricted-modules package is not enabled, but another fglrx module (8.4) is in use.

You may also need to edit the file (if it exists):

gksu gedit /etc/modprobe.d/blacklist-restricted

Put a # in front of the line "blacklist fglrx", if it is present. Otherwise, the kernel module will not load automatically, and you will not get 3D acceleration.

Remove any old fglrx debs from /usr/src/:

sudo rm /usr/src/fglrx-kernel*.deb

Install .deb packages:

sudo dpkg -i xorg-driver-fglrx_8.476-0*.deb fglrx-kernel-source_8.476-0*.deb fglrx-amdcccle_8.476-0*.deb

Additional 64-bit instructions

If you have a 64 bit install, the above dpkg command will likely complain that "Errors were encountered while processing: fglrx-amdcccle". This is because of a dependency of the amdccle package on 32 bit libraries. If you receive this error, issue the following command after the above dpkg command, which will force the installation of all of the 32 bit dependencies, and then the amdccle package:

sudo apt-get install -f

Catalyst 8.3 on 64-bit systems requires the --force-overwrite command in the above dpkg command:

sudo dpkg -i --force-overwrite xorg-driver-fglrx_8.476-0*.deb fglrx-kernel-source_8.476-0*.deb fglrx-amdcccle_8.476-0*.deb

I’m not wrhoty to be in the same forum. ROTFL

Configure the Driver

  • NOTE THIS WILL ERASE SETTINGS IN /etc/X11/xorg.conf you should be sure there is a backup.
  • Note Method 2 Users: Before you carry out this step you must reboot your machine. Or else the fglrx driver will not be in use on xorg.conf and using the aticonfig options will cause a memory dump and not intialise the Driver properly.
  • Note: An alternative to the aticonfig --initial command is to edit /etc/X11/xorg.conf and replace the string "ati" with "fglrx" in the "Device" section. This way you won't lose your old "Screen" and "Monitor" settings. Afterwards you can use aticonfig for setting overlay etc. Another alternative is aticonfig --initial --force if you encounter issues with the first command.
sudo aticonfig --initial

Then:

sudo aticonfig --overlay-type=Xv
  • Note: Alternative in the overlay-type to "Xv" can be "opengl" or "disable" if the TV-out makes problems in videos.

Alternative: Configure the Driver, The Manual Way:

An alternative to the "sudo aticonfig" commands is to edit "/etc/X11/xorg.conf" and change the "Device" section for the video card as shown below. This way you won't lose your old settings.

gksu gedit /etc/X11/xorg.conf
Section "Device"
	[...]
#       Driver          "vesa"
	Driver		"fglrx"
	Option		"VideoOverlay"		"on"
	Option		"OpenGLOverlay"		"off"
	[...]
EndSection


TV - Out

The composite TV-Out is not working simultaneously with the VGA on my System. To use it I have turned the VGA off and only the TV on. Attention! This command turns off your Monitor!!

sudo aticonfig --enable-monitor=tv

To change back to VGA:

sudo aticonfig --enable-monitor=crt1

Some have had luck with both mirrored.

sudo aticonfig --force-monitor=crt1
sudo aticonfig --enable-monitor=crt1,tv

reboot after that and it should mirror the CRT1 onto the TV.

Finish the Installation

Now save any open document and reboot your system:

sudo shutdown -hr now
  • Note: An alternative to rebooting is to restart the X Server by pressing your CTRL ALT BACKSPACE keys. You must remove any old kernel modules such as "drm" "radeon" or "fglrx" using the "rmmod" command. Example: sudo rmmod fglrx
  • Note: Another way to reboot:
sudo reboot

Post-Installation Checks and Tweaks

Verifying

Run the following command to check its output to ensure the fglrx driver is installed properly:

$fglrxinfo 
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI MOBILITY RADEON X300
OpenGL version string: 2.1.7415 Release

64bit Users only ( 32bit users can continue to the fglrxinfo test ), after rebooting you may have noticed that you cant open aticonfig, and the fglrxinfo test below may not show ati in the info from the test, to fix this in terminal do the following command

sudo ln -s /usr/lib/libGL.so.1.2 /usr/lib/libGL.so.1


The OpenGL vendor string should read ATI and not Mesa.

If it still says Mesa and not ATI, even after re-enabling the driver from the Restricted-manager: You can try the following:

  • $ less /var/log/Xorg.0.log |grep EE
    if this command returns (EE) fglrx(0): incompatible kernel module detected - HW accelerated OpenGL will not work then remove the kernel module and reinstall it.
$ sudo dkms remove -m fglrx -v 8.471 --all
  • Remove all the packages provided by the xserver-xorg-video-all meta-package (search for it using Synaptic or Adept), then restart the machine. The X Server should now use the new fglrx driver by force (provided the driver is being used in xorg.conf).
If you can't log in after this, you'll have to log in to a terminal in the login screen, and reinstall the xserver-xorg-video-all package. Your problem is probably somewhere else. (taken from [1]).
  • Remove the package xserver-xgl.
Explanation: If you installed this previously in order to make compiz work, it will not allow direct rendering on your display. You can check out if this is what it causing the problem by running
DISPLAY=:0 glxinfo | grep render
If it returns an ATI renderer, it means that xgl is being displayed indirectly on the display 1. (Taken from [2])
Warning: This might make your compiz stop working as it is configured to use XGl. A solution might be to run the Envy script in order to configure compiz.

Note: Here is the glxinfo of a good install (for those interested).

Enable laptop mode on battery power

Enabling laptop mode on battery power gives you much better battery life, however be aware that sometimes it causes odd hangs.

Switch ENABLE_LAPTOP_MODE to true

File: /etc/default/acpi-support
# Switch to laptop-mode on battery power - off by default as it causes odd
# hangs on some machines
ENABLE_LAPTOP_MODE=true

Switch FGLRX_ACPI_SWITCH_POWERSTATES to true

File: /etc/default/fglrx
# Uncomment the next line to enable powerstate switching on ACPI
# events for lid open/close and AC adapter on/off
FGLRX_ACPI_SWITCH_POWERSTATES=true

Additional configure with aticonfig tool

You can configure the driver even further with the aticonfig tool, more information can be found at Configuring.

For example:

  • use powerplay option to switch power state for battery friendly or performance mode
  • use dual head or one big desktop mode
  • turn second monitor on/off on the fly

Specific Issues

Your awnser was just what I needed. It’s made my day!

Suspend/Hibernation work with 7.12

With Gutsy release, there was a big problem using the ATI proprietary drivers. The Suspend/Hibernate function stopped working. The problem was due to the new SLUB allocator incorporated in 2.6.22 / 2.6.23 Kernel.

The problem has been solved in the AMD Catalyst 7.12 driver release. UPDATE: The problem has NOT been solved in the AMD Catalyst 7.12 driver release.

Suspend/hibernate is not working for FireGL 5250. For FireGL 5200, suspend works with the 7.12 fglrx kernel module loaded (which did not work before this release) , but does not work if X is running.

For Thinkpad T60 with ATI X1400, to get the laptop to wake up from suspend, I had to change the following in /etc/default/acpi-support:

SAVE_VBE_STATE=false

POST_VIDEO=false

Even with the above settings (like POST_VIDEO=false, etc.) my ASUS Z96J with an X1600 does not suspend.

This bug has been a serious issue for several months now. There is a lot of frustration over this, because Ubuntu/Canonical has not been helpful. They've said things like suggesting not using fglrx (thanks a lot, that really helps).

Current status on this bug can be found here: https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/121653/

If you get /usr/X11R6/lib/modules/dri/fglrx_dri.so not found

sudo ln -s /usr/lib/ /usr/X11R6/lib/modules

It may be necessary to create the /usr/X11R6/lib directory first:

sudo mkdir /usr/X11R6/lib

If you get /usr/X11R6/lib64/modules/dri/fglrx_dri.so not found

sudo ln -s /usr/lib/ /usr/X11R6/lib64/modules

Segmentation Fault with glxinfo/fglrxinfo

If fglrxinfo or glxinfo returns a Segmentation fault like this:

$ fglrxinfo
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon Xpress Series
OpenGL version string: 1.4 (2.1.7170 Release)

Segmentation fault

Set output of libGL to verbose with

$ export LIBGL_DEBUG=verbose

Run fglrxinfo or glxinfo again

libGL: XF86DRIGetClientDriverName: 8.44.3 fglrx (screen 0)
libGL: OpenDriver: trying /usr/lib/dri/fglrx_dri.so
libGL error: dlopen /usr/lib/dri/fglrx_dri.so failed (/usr/lib/dri/fglrx_dri.so: cannot open shared object file: Permission denied)
libGL error: unable to load driver: fglrx_dri.so
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon Xpress Series
OpenGL version string: 1.4 (2.1.7170 Release)

Segmentation fault

Don't know if its always fglrx_dri.so, but the fix is to add read permissions to the file.

Check if read permission is not there

ls -l /usr/lib/dri/ |grep fglrx_dri
-rw-rw---- 1 root root 17462688 2008-01-13 17:42 fglrx_dri.so

Add read permission

$ sudo chmod +r /usr/lib/dri/fglrx_dri.so

Check read permission

ls -l /usr/lib/dri/ |grep fglrx_dri
-rw-rw-r-- 1 root root 17462688 2008-01-13 17:42 fglrx_dri.so

Now I know who the brainy one is, I’ll keep lokinog for your posts.

Monitor detection (1680x1050 Resolution Issue)--- SOLVED

As specified in the release notes, "Connecting a display device that supports 1680x1050 to a system running Linux may result in a maximum display resolution of 1280x1024 only being available". (from thread)

[It works with the latest driver]

Fglrx driver does not detect some monitors correctly, so you have to do it manually (google about your monitor spec with keyword: xorg.conf).

For example: Samsung 205BW 1680x1050 monitor needs manually set:

File: /etc/X11/xorg.conf
Section "Monitor"
       Option "DPMS"
       Identifier "samsung-monitor"
       VendorName "Samsung"
       ModelName "SyncMaster 205BW"
       HorizSync 31.4 - 80.0
       VertRefresh 56.000 - 75.000
       Modeline "1680x1050" 146.25 1680 1784 1960 2240 1050 1053 1059 1089
EndSection

Section "Screen"
	Identifier	"samsung-screen"
	Device		"samsung-device"
	Monitor		"samsung-monitor"
	Defaultdepth	24
	SubSection "Display"
		Depth	24
		Modes		"1680x1050"
	EndSubSection
EndSection


This has made my day. I wish all positngs were this good.

Hang at logout

If you experience hangs when logging out (of X) try disabling atieventsd with this command:

sudo /usr/sbin/update-rc.d -f atieventsd remove

Revert to Xorg driver

If (for any reason) the fglrx install fails, you can revert to the Xorg driver by executing

sudo dpkg-reconfigure xserver-xorg

and selecting the "ati" driver, or simply restoring the previous /etc/X11/xorg.conf file, if you made a backup.

You also need to remove the xorg-driver-fglrx or your manually installed drivers to get the 3D acceleration back, since it is provided by file /usr/lib/libGL.so.1.2 which belongs to libgl1-mesa package and which is moved to backup and replaced at the installation of xorg-driver-fglrx (or the manually built) package. In case the removal of the fglrx drivers fails to restore the file from libgl1-mesa, you have to reinstall the package by running:

sudo apt-get install --reinstall libgl1-mesa-glx

See Also