You are not logged in.

#1 2012-06-27 20:22:19

Smasher816
Member
Registered: 2012-03-15
Posts: 32
Website

[SOLVED] Custom Kernel, FGLRX issues

I know I'm new here, and I know ATI cards suck under linux but I could use some help.
I have a Radeon HD 5770 graphics card, and was running 3.4.4-2-ARCH; but am now wanting to try out 3.4.4-1-lqx.
On the official arch kernel the Catalyst driver works fine, but on the custom built linux-lqx kernel I am forced into the painful vesa drivers.

Compiler warning:

WARNING: /lib/modules/3.4.4-1-lqx/extramodules/fglrx.ko.gz needs unknown symbol old_rsp

The error:

$ sudo modprobe fglrx
ERROR: could not insert 'fglrx': Unknown symbol in module, or unknown parameter (see dmesg)
$ dmesg | grep fglrx
fglrx: module license 'Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY' taints kernel.
fglrx: Unknown symbol old_rsp (err 0)
fglrx: Unknown symbol old_rsp (err 0)
fglrx: Unknown symbol old_rsp (err 0)
$ glxinfo
name of display: :0
X Error of failed request:  BadRequest (invalid request code or no such operation)
  Major opcode of failed request:  139 (ATIFGLEXTENSION)
  Minor opcode of failed request:  66 ()
  Serial number of failed request:  13
  Current serial number in output stream:  13

Installed Packages:

linux 3.4.4-2
linux-headers 3.4.4-2
linux-lqx 3.4.4-1
xorg-server 1.11.4-2
catalyst-3.4-ARCH 12.4-5
catalyst-3.4-lqx 12.4-5
catalyst-generator 12.4-5
catalyst-utils 12.4-2
lib32-catalyst-utils 12.4-2

.config (default lqx config.amd64 + localmodconfig + localyesconfig + http://wiki.x.org/wiki/radeonBuildHowTo … a_Firmware + http://en.gentoo-wiki.com/wiki/Fglrx#Ke … figuration)
Edit: uname -a

Linux rowan-arch 3.4.4-1-lqx #7 ZEN SMP PREEMPT Wed Jun 27 15:13:43 CDT 2012 x86_64 GNU/Linux

I have searched but am at a loss. I know catalyst-generator works for linux-3.4 because thats what the arch kernel that works is.
I hope that I have provided enough information, and that someone will help find my (most likely very simple and stupid) problem.

Last edited by Smasher816 (2012-06-28 13:19:21)


(Arch) Linux is user friendly, its just very selective of its friends

Offline

#2 2012-06-27 22:37:07

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] Custom Kernel, FGLRX issues

You should have stopped at that very warning.

http://ati.cchtml.com/show_bug.cgi?id=495

First hit on Google smile.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2012-06-28 00:05:30

Smasher816
Member
Registered: 2012-03-15
Posts: 32
Website

Re: [SOLVED] Custom Kernel, FGLRX issues

Well now this thread is the first hit on google for "fglrx: Unknown symbol old_rsp (err 0)" tongue
Anyways, I forgot to mention that I am on a 64bit machine (edited OP), and comment 4 on your post says it compiles but fails on modprobe for 64bit (my problem).
Looking at catalyst-generator i saw "3.4.patch" and assumed that that would be enough to make it work on 3.4 kernels (especially since it works with the stock unpatched arch 3.4 kernel).
I guess I should now turn to finding a x86_64 3.4 kernel patch for fglrx?

Last edited by Smasher816 (2012-06-28 00:06:26)


(Arch) Linux is user friendly, its just very selective of its friends

Offline

#4 2012-06-28 00:44:15

Smasher816
Member
Registered: 2012-03-15
Posts: 32
Website

Re: [SOLVED] Custom Kernel, FGLRX issues

I noticed that the AUR catalyst-generator was updated to -7 with a comment about fixing fglrx for 3.4

Vi0L0 wrote:

updated to 12.4-7:
got now nice clean patch for 3.4 support on both architectures smile

thx to 3V0LU710N for finding it, and Sebastian Siebert from OpenSUSE for a patch

However, the catalyst repo is only at -5
http://catalyst.apocalypsus.net/repo/catalyst/x86_64/ (12.4-5)
http://aur.archlinux.org/packages.php?ID=41040 (12.4-7)

I am trying out the kernel with the new aur packages, and posting this before I reboot my computer and forget the links...
Edit: Still broken with the same error sad

Last edited by Smasher816 (2012-06-28 02:02:18)


(Arch) Linux is user friendly, its just very selective of its friends

Offline

#5 2012-06-28 02:20:33

Pres
Member
Registered: 2011-09-12
Posts: 423

Re: [SOLVED] Custom Kernel, FGLRX issues

From what I understand, those rebuilds (6 and 7) were to fix issues specific to the i686 package, so he didn't bother to update the x86_64 packages in the repository.

Offline

#6 2012-06-28 03:39:10

Smasher816
Member
Registered: 2012-03-15
Posts: 32
Website

Re: [SOLVED] Custom Kernel, FGLRX issues

Well I managed to fix it big_smile
While running catalyst_build_module I noticed the warning about old_rsp (http://pastebin.com/gknnM0sB).
After reading up on the patches I knew that that warning should not exist, so I decided to probe deeper.

I Figured out that catalyst_build_module was actually a script in /usr/bin
Opened up the file, found out it copied /usr/share/ati/build_mod to /tmp and ran makepkg
Interrupted the process after the patch section completed, examined file, no added lines for 3.4 patch

Manually made my own copy of /usr/share/ati/build_mod
ran the MAKEPKG commands one by one up to the patch section.
Looked at the .c files effected by the 3.4 patch and commented out the ifdefs I knew were true/false (KERNELVER > 3.4, ARCH=x86_64, etc)
Made the module (with no errors or warnings!), .gz'ed it, and copied it to /lib/modules/extramodules-XXX
ran "modprobe fglrx" no errors! rebooted computer, and now video fglrx works as it should!

Now I know that it is a problem with catalyst-generator not the kernel config.
I only wonder why using the script and makepkg doesn't work, while doing it manually does...

Edit: found the culprit
kcl_ioctl.c

#ifndef CONFIG_X86_X32
DEFINE_PER_CPU(unsigned long, old_rsp);
#endif

I must either comment out the #ifndef ... #endif inorder to always DEFINE_PER_CPU, or run a command such as

sed -i 's/ifndef CONFIG_X86_X32/ifdef CONFIG_X86_X32/g' kcl_ioctl.c

I know I have a x86_64 machine, so why is CONFIG_X86_X32 being set, not calling DEFINE_PER_CPU, and causing my warning+error???

Last edited by Smasher816 (2012-06-28 04:20:12)


(Arch) Linux is user friendly, its just very selective of its friends

Offline

#7 2012-06-28 11:10:18

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] Custom Kernel, FGLRX issues

Congrats, that's some hardcore debugging smile. I just read the ATi bugtracker thread and saw they had 3.4 patches, and the opening post had your old_rsp missing symbol issue as well... Turns out I wasn't thorough enough smile.

In general, if you see missing symbols during compilation, you can be pretty sure things will break down the road - while effectively loading that module, as you experienced.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#8 2012-06-28 13:03:42

Smasher816
Member
Registered: 2012-03-15
Posts: 32
Website

Re: [SOLVED] Custom Kernel, FGLRX issues

.:B:. wrote:

Congrats, that's some hardcore debugging smile. I just read the ATi bugtracker thread and saw they had 3.4 patches, and the opening post had your old_rsp missing symbol issue as well... Turns out I wasn't thorough enough smile.

In general, if you see missing symbols during compilation, you can be pretty sure things will break down the road - while effectively loading that module, as you experienced.

Thanks man. Turns out its not really a problem with the package/patch (otherwise more people would have been complaining), but instead part of my kernel config.
searching with "make menuconfig" I found

Symbol: X86_X32 [=y]
 Type  : boolean
 Prompt: x32 ABI for 64-bit mode (EXPERIMENTAL)
   Defined at arch/x86/Kconfig:2168
   Depends on: X86_64 [=y] && IA32_EMULATION [=y] && EXPERIMENTAL [=y]
   Location:
     -> Executable file formats / Emulations
       -> IA32 Emulation (IA32_EMULATION [=y])

So for anyone else who stumbles upon this, either disable CONFIG_X86_X32 in the kernel, or patch the 3.4 patch to remove the X86_X32 check like so:

sed -i 's/ifndef CONFIG_X86_X32/ifdef CONFIG_X86_X32/g' 3.4.patch

Marked as [SOLVED]

Last edited by Smasher816 (2012-06-28 13:21:16)


(Arch) Linux is user friendly, its just very selective of its friends

Offline

Board footer

Powered by FluxBB