Pages

Recompiling Xorg Radeon on Mint 15

As part of my efforts to get my Compaq 6820 ATI Radeon Rv516 video to run at full resolution of 1440x900 I attempted to recompile the Xorg Radeon driver. Ultimately this proved to be a dead end but this blog entry records the useful tidbits I learned along the way. (The working solution is here.)


I'm following the instructions at X.org to recompile Radeon.


apt-get build-dep xserver-xorg-video-ati


fails with:

E: You must put some 'source' URIs in your sources.list


In Mint 15 the new Software Sources screen makes updating the 'sources.list' simple by checking the "Enable source code repositories" checkbox.



The Python script used by the Software Sources screen can be found here:

/usr/lib/linuxmint/mintSources/mintSources.py


The mintSources.py script updates

/etc/apt/sources.list.d/official-source-repositories.list
and a quick 'cat' reveals the source URIs:

cat /etc/apt/sources.list.d/official-source-repositories.list
deb-src http://packages.linuxmint.com/ olivia main upstream import 

deb-src http://archive.ubuntu.com/ubuntu/ raring main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ raring-updates main restricted universe multiverse

deb-src http://security.ubuntu.com/ubuntu/ raring-security main restricted universe multiverse
deb-src http://archive.canonical.com/ubuntu/ raring partner


Back to the x.org instructions:

./autogen.sh --prefix=/opt/xorg


which failed because libdrm was out of date, it required version 2.4.44.

checking for LIBDRM... no
configure: error: Package requirements (libdrm >= 2.4.44) were not met:

Requested 'libdrm >= 2.4.44' but version of libdrm is 2.4.43

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBDRM_CFLAGS
and LIBDRM_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


I tracked down libdrm.pc using:

find / -name "libdrm.pc"


and manually changed the version number using:

pluma /usr/local/lib/pkgconfig/libdrm.pc


That seemed unlikely to work but it was sufficient to get past ./autogen.sh

However the subsequent "make" command then failed because of a new flag that was used introduced in libdrm 2.4.44:

surface->flags |= RADEON_SURF_HAS_TILE_MODE_INDEX;


So next I downloaded the 2.4.44 source for libdrm:

http://dri.freedesktop.org/libdrm/libdrm-2.4.44.tar.bz2


And following its README that compiled first time.

Back to the x.org instructions and now "make" and "make install" are successful.

But the resolution is still showing only 1152x864.

Running inxi -G reports:

Graphics:  Card: Advanced Micro Devices [AMD] nee ATI RV516/M62-S [Mobility Radeon X1350] 
           X.Org: 1.13.3 drivers: ati,vesa,radeon (unloaded: fbdev) FAILED: fglrx Resolution: 1152x864@60.0hz 
           GLX Renderer: Gallium 0.4 on llvmpipe (LLVM 3.2, 128 bits) GLX Version: 1.4 (2.1 Mesa 9.1.1)