Tuesday, October 16

How to Enable OpenGL 3.0 Support for Open Source Radeon Drivers in Ubuntu 12.10

AMD has recently dropped support for cards in series HD 2xxx-4xxx. Catalyst drivers for these cards are now available in a different branch, called Legacy series. Legacy drivers won't receive any new feature updates from AMD.

Proprietary fglrx drivers for these legacy cards are not compatible with Quantal. Ubuntu 12.10 comes with xorg 1.13 while fglrx legacy drivers (version 12.6) has support for xorg 1.12. AMD doesn't seem to be interested in updating legacy drivers. 

AMD has supplied a special version of Catalyst 12.9 driver to Ubuntu that supports xorg 1.13. This version 12.9 build is for AMD 5xxx+ cards only. No special driver with xorg 1.13 support has been provided for legacy cards and its not known if AMD will update legacy series, if ever.

I have been using proprietary catalyst drivers mostly on my ATI HD 4650 1 GB card. As Ubuntu 12.10 won't support installing legacy fglrx drivers, I have now switched to open source Radeon drivers.

AMD's decision to drop support for these cards came as surprise to me. Most of the cards ranging from AMD HD 4330 to the end of 4xxx series have OpenGL 3.0/3.3 and Shader Model 3 compliance. These are not legacy cards by any means if not new, and they can run 3D games like OilRush at good settings. Considering the fact that there are not many games that use OpenGL 4.0, a company dropping support for decent OpenGL 3 compatible cards is beyond me. If Linus would have said something nice to AMD too at Aalto University, may be the situation would have been different. 

Now, coming to the point of this article. Mesa/Gallium3D Contributor Marek Olšák has done brilliant work on open source Radeon drivers by implementing Multi-Sample Anti-Aliasing (MSAA) in r600g. MSAA is the only missing piece in implementing OpenGL 3.0 support.

R600g mainly inlcude following cards R600/700 (HD2400-HD4290, HD4330-HD5165, HD5xxV), Evergreen (HD5430-HD5970, all HD6000 not listed under Northern Islands, HD7350) and Northern Islands (HD6450, HD6570, HD6670, HD6790 - HD6990, HD64xxM, HD67xxM, HD69xxM, HD7450 - HD7670).

Now getting OpenGL 3.0 support with open source drivers for above cards (I am not sure if HD2400-HD4290 are OpenGL 3 compatible) require following things: mesa 9, latest xserver stack, latest radeon driver and Linux kernel 3.6. Ubuntu 12.10 has got first three packages but unfortunately it only supports Kernel 3.5 officially. So all we have to do is install Kernel 3.6 to get OpenGL 3.0 support.

Linux Kernel 3.6 can be installed in Ubuntu 12.10 by getting packages from Ubuntu Mainline Kernel PPA.

Mainline Kernel Builds have some differences with Kernel version supported by Ubuntu:
  • The mainline kernels are built from the latest unmodified "mainline" Linux kernel sources.
  • The Ubuntu kernel team provides these only for testing and debugging purposes, to see whether issues have been fixed "upstream", i.e. by the Linux kernel developers.
  • They are therefore not supported and must be used at your own risk.
  • No Ubuntu provided drivers and patches are included in Mainline Kernel. However, they are built using the Ubuntu kernel configuration files.
  • Installing mainline Kernel can break drivers for wireless etc.
If you install a mainline Kernel and things break, you can still select older Ubuntu supported kernel from GRUB Menu. 

Mainline Kernel can be installed by downloading 4 deb packages as per your architecture from here. Just select the right folder as per your requirement (I installed 3.6.2-quantal). Once all 4 packages have been downloaded, copy them to a folder and run the following command:

sudo dpkg -i *.deb

Make sure that there are no other deb packages in the folder before running the command above. Now reboot and run command:

glxinfo | grep -i opengl

You should see something like this:

OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD RV730
OpenGL version string: 3.0 Mesa 9.0
OpenGL shading language version string: 1.30

Linux Kernel 3.7rc1 has been released today and it brings more good stuff for Radeon driver. Mainly following changes:
  • Asynchronous VM page table updates for Cayman/SI.
  • 2 level VM page table support.  Saves memory compared to 1 level page tables.
  • Reworked PLL handing in the display code allows lots more combinations of monitors to work, including more than two DP displays assuming compatible clocks across shared PLLs. This also allows us to power down extra PLLs when we can share a single one across multiple displays which saves power.
  • Native backlight control on ATOMBIOS systems.
  • Improved ACPI support for interacting with the GPU.  Fixes backlight control on some laptops.
  • Document AMD ACPI interfaces
  • Lots of code cleanup
  • Bug fixes
If you want to keep a watch on Ubuntu mainline Kernel PPA for new kernel versions, subscribe to the mailing list here. You can't get automatic updates for mainline Kernels.

P.S. I totally underestimated the potential of open source radeon graphic drivers for gaming. Now that I have used them, they are actually quite good and stable, at least for R600/700 series.

0 comments:

Post a Comment

Preload Image 1 Preload Image 2 Preload Image 3 Preload Image 4 Preload Image 5