LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Can't compile fglrx kernel module for kernel 3.2.13 in -current (https://www.linuxquestions.org/questions/slackware-14/cant-compile-fglrx-kernel-module-for-kernel-3-2-13-in-current-936784/)

TobiSGD 03-27-2012 08:38 PM

Can't compile fglrx kernel module for kernel 3.2.13 in -current
 
After the last upgrade in -current, which also upgraded the kernel to 3.2.13 I am no longer able to install the proprietary drivers (currently version 12.2/8.95). The installation fails because the fglrx kernel module can't be compiled. Here are the relevant parts from the logs:
Code:

[Message] Kernel Module : Trying to install a precompiled kernel module.
[Message] Kernel Module : Precompiled kernel module version mismatched.
[Message] Kernel Module : Found kernel module build environment, generating kernel module now.
AMD kernel module generator version 2.1
doing Makefile based build for kernel 2.6.x and higher
rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
make -C /lib/modules/3.2.13-smp/build SUBDIRS=/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/linux-3.2.13'
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_agp.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_debug.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_fpu_begin’:
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:5804:28: error: ‘TS_USEDFPU’ undeclared (first use in this function)
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:5804:28: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/linux-3.2.13'
make: *** [kmod_build] Error 2
build failed with return value 2
[Error] Kernel Module : Failed to compile kernel module - please consult readme.
[Reboot] Kernel Module : mkinitrd

Has anybody those drivers working on -current and/or can anybody give me a clue how to fix that?

Thanks in advance.

willysr 03-27-2012 10:29 PM

try visiting Walecha's blog http://www.walecha.net/content/memba...di-kernel-3213
It's in Indonesian, but i believe you can understand by looking at the code snippet or use Google Translate

TobiSGD 03-28-2012 06:21 AM

Thanks, I will have a look at this as soosn as I am back to that machine.

hippy jonny 03-28-2012 07:24 PM

This particular bug bit me as well. From my bit of research it seems to effect kernels >=3.2.8. There is a patch mentioned on one of the Fedora/ubuntu sites (to the firegl code if memory serves) but ,being a newbie, I took the easy way and stuck with 3.2.7 In the hope that the catalyst 12.3 (or 12.4 etc) releases will provide the fix.

Should add that it seems limited to 32 bit kernels and is noted to effect the 2.6.42 release as well.

http://phoronix.com/forums/showthrea...68922&p=252214

This above post shows a patch to the firegl code but against 3.3-rc4 kernel but may still be of use with regards 3.2.13 on current.

yours

Hippy Jonny

TobiSGD 03-29-2012 07:31 PM

Just tried it with version 12.3, same error. Why the hell does a newly released driver does not work with the latest stable kernel version? When I have the time I will have to try it with that patch.

adamk75 03-29-2012 07:56 PM

Quote:

Originally Posted by TobiSGD (Post 4640172)
Just tried it with version 12.3, same error. Why the hell does a newly released driver does not work with the latest stable kernel version?

Because the newly released driver was in beta testing for the past month, meaning it was designed to (hopefully) work against what the latest stable kernel version was over a month ago.

Adam

TobiSGD 03-30-2012 07:41 AM

OK, tried it with that patch. That article is a bit unclear if the patch has to be in /etc/ati or /etc/ati/patch, so I tried both. Still getting the same errors. So for now I have not working proprietary drivers and free drivers that use up my CPU and heat up the machine.
And no clue how to fix one of those problems, except downgrading the kernel, which I really don't want to do if not absolutely necessary.

adamk75 03-30-2012 07:50 AM

Quote:

Originally Posted by TobiSGD (Post 4640593)
OK, tried it with that patch. That article is a bit unclear if the patch has to be in /etc/ati or /etc/ati/patch, so I tried both. Still getting the same errors. So for now I have not working proprietary drivers and free drivers that use up my CPU and heat up the machine.
And no clue how to fix one of those problems, except downgrading the kernel, which I really don't want to do if not absolutely necessary.

Did you try manually patching the file in question?

As for the temperature when using the open source drivers, have you tried enabling power management?

Adam

TobiSGD 03-30-2012 07:54 AM

Quote:

Originally Posted by adamk75 (Post 4640599)
Did you try manually patching the file in question?

How should I do that? The files are extracted when the installer starts and deleted after that.

Quote:

As for the temperature when using the open source drivers, have you tried enabling power management?
Enabled and working, using the ondemand governor. Even when not working, scrolling of LQ threads in Firefox shouldn't load up the CPU up to 50% in both cores.

adamk75 03-30-2012 07:58 AM

While I don't have 12.3 downloaded on this machine, this is what you get when you run the 12.2 installer with --help:

Code:


[adamk@memory ati]$ sudo sh ./amd-driver-installer-12-2-x86.x86_64.run --help
Makeself version 2.1.3
 1) Getting help or info about ./amd-driver-installer-12-2-x86.x86_64.run :
  ./amd-driver-installer-12-2-x86.x86_64.run -h|--help                    Print this message
  ./amd-driver-installer-12-2-x86.x86_64.run -i|--info                    Print embedded info : title, default target directory, embedded script
  ./amd-driver-installer-12-2-x86.x86_64.run -l|--list                    Print the list of files in the archive
  ./amd-driver-installer-12-2-x86.x86_64.run -c|--check                    Checks integrity of the archive
  ./amd-driver-installer-12-2-x86.x86_64.run --extract NewDirectory        Extract this package to NewDirectory only
 
 2) Running ./amd-driver-installer-12-2-x86.x86_64.run :
  ./amd-driver-installer-12-2-x86.x86_64.run [options] [additional arguments to embedded script] with following options (in that order)
  --keep                              Do not erase target directory after running the embedded script
  --uninstall[=force|dryrun]          Run AMD Catalyst(TM) Proprietary Driver Uninstall
  Following arguments will be passed to the embedded script:
  --install                          Install the driver(default)
  --listpkg                          List all the generatable packages
  --buildpkg package                  Build "package" if generatable ("package" as returned by --listpkg)
  --buildandinstallpkg package        Build and Install "package" as returned by --listpkg

The --keep and --extract options have been around for a very long time.

Adam

TobiSGD 03-30-2012 09:24 AM

Thanks, sometimes I miss the obvious things. Extracted the files, patched and the module compiled without errors. Both, Xorg.0.log and glxinfo, show that the driver is loaded and in use. My CPU temperature is down to its normal values. Strangely, I still have high CPU usage when things on the screen are moving, I can load both cores to 53% with just opening a terminal and holding down the Enter-key.

Anyhow, thanks to LQ members this issue is solved.

delta function 03-31-2012 07:54 AM

FYI
 
1 Attachment(s)
Hi,

I had the same issues after upgrading to --current (Kernel 3.2.12) with an ati hd5xx series card. The bug fix has not yet been implemented in the latest ati driver 12.3.

Thanks to this threat, I got it solved. However, it was not that easy as it sounds in the threat for me:

extract the files
apply patch
install

So, I just wanted to tell, how I finally did it.
1. Get the patch file ( see attachment )
place the file somewhere ( e.g /etc/ati/patch/ ) and get rid of the txt extension.

2. Drop out of X and into root mode
3. run the amd installer with the --keep option ( sh amd-xxx.sh --keep )
At the end of the installer procedure, the installer will give you a message that the installation was not successful due to some errors.
4. cd /lib/modules/fglrx/build_mod
5. Run the patch: patch -p0 < /etc/ati/patch/ati_patch
You should get a message that the patch was successfull.

6. sh make.sh ( to build the kernel files )
7. cd .. ( /lib/modules/fglrx)
8. sh make_install.sh ( to install the kernel files )
aticonfig --initial
9. Drop to user account ( e.g ctl-D )
10.startx
Note:
On the save side, I rebooted my machine, but It is not required.

Hope this will help some people.

escaflown 03-31-2012 05:28 PM

Thanks!

Quote:

Originally Posted by delta function (Post 4641394)
Hi,

I had the same issues after upgrading to --current (Kernel 3.2.12) with an ati hd5xx series card. The bug fix has not yet been implemented in the latest ati driver 12.3.

Thanks to this threat, I got it solved. However, it was not that easy as it sounds in the threat for me:

extract the files
apply patch
install

So, I just wanted to tell, how I finally did it.
1. Get the patch file ( see attachment )
place the file somewhere ( e.g /etc/ati/patch/ ) and get rid of the txt extension.

2. Drop out of X and into root mode
3. run the amd installer with the --keep option ( sh amd-xxx.sh --keep )
At the end of the installer procedure, the installer will give you a message that the installation was not successful due to some errors.
4. cd /lib/modules/fglrx/build_mod
5. Run the patch: patch -p0 < /etc/ati/patch/ati_patch
You should get a message that the patch was successfull.

6. sh make.sh ( to build the kernel files )
7. cd .. ( /lib/modules/fglrx)
8. sh make_install.sh ( to install the kernel files )
aticonfig --initial
9. Drop to user account ( e.g ctl-D )
10.startx
Note:
On the save side, I rebooted my machine, but It is not required.

Hope this will help some people.


DjDiabolik 04-05-2012 10:28 AM

Hey..... the patch posted above working on ubuntu 11.10 ??

I have same exact problems with 12.3 install for my HD4650.....

*edit*
Not working!! Problems during installation:
Quote:

root@Diabolik-ubuntu:/home/diabolik/catalyst12.3# sh ./amd-driver-installer-12-3-x86.x86_64.run --keep
Created directory fglrx-install.OnFD7H
Verifying archive integrity... All good.
Uncompressing AMD Catalyst(TM) Proprietary Driver-8.951............................................................................................... .................................................................................................... .................................................................................................... .................................................................................................... .................................................................................................... .................................................................................................... .................................................................................................... .................................................................................................... .................................................................................................... .................................................................................................... ................................................
=====================================================================
AMD Catalyst(TM) Proprietary Driver Installer/Packager
=====================================================================
Detected configuration:
Architecture: i686 (32-bit)
X Server: X.Org 6.9 or later
loki_setup: directory: (null)
DKMS part of installation failed. Please refer to /usr/share/ati/fglrx-install.log for details
And after the installation:
Quote:

root@Diabolik-ubuntu:/home/diabolik/catalyst12.3# cd /lib/modules/fglrx/build_mod
bash: cd: /lib/modules/fglrx/build_mod: File o directory non esistente
root@Diabolik-ubuntu:/home/diabolik/catalyst12.3#

TobiSGD 04-06-2012 11:36 AM

Quote:

Originally Posted by DjDiabolik (Post 4645538)
Hey..... the patch posted above working on ubuntu 11.10 ??

I have same exact problems with 12.3 install for my HD4650.....

*edit*
Not working!! Problems during installation:


And after the installation:

Since the patch is for the drivers, not the system, it should work. But is Ubuntu 11.10 mot running on a 3.0 kernel, so that the patch shouldn't be needed in the first place? Also, do you have DKMS installed? Too help you we need more information, please post the mentioned log file.

DjDiabolik 04-06-2012 07:26 PM

For now i have resolve after install the FLGRX included in UBUNTU official repository.

In AMD forum i have read some people have so many problems with ATI driver 12.2 and 12.3 and, if i don't commit an error, latest FLGRX it's based on Catalyst 11.8....

Otherwise now i stay to post from another computer... tommorow (in italy it's 2:30AM) i come turn on pc with ubuntu and i can paste the log...

DjDiabolik 04-09-2012 07:55 PM

Quote:

Originally Posted by delta function (Post 4641394)
Hi,

I had the same issues after upgrading to --current (Kernel 3.2.12) with an ati hd5xx series card. The bug fix has not yet been implemented in the latest ati driver 12.3.

Thanks to this threat, I got it solved. However, it was not that easy as it sounds in the threat for me:

extract the files
apply patch
install

So, I just wanted to tell, how I finally did it.
1. Get the patch file ( see attachment )
place the file somewhere ( e.g /etc/ati/patch/ ) and get rid of the txt extension.

2. Drop out of X and into root mode
3. run the amd installer with the --keep option ( sh amd-xxx.sh --keep )
At the end of the installer procedure, the installer will give you a message that the installation was not successful due to some errors.
4. cd /lib/modules/fglrx/build_mod
5. Run the patch: patch -p0 < /etc/ati/patch/ati_patch
You should get a message that the patch was successfull.

6. sh make.sh ( to build the kernel files )
7. cd .. ( /lib/modules/fglrx)
8. sh make_install.sh ( to install the kernel files )
aticonfig --initial
9. Drop to user account ( e.g ctl-D )
10.startx
Note:
On the save side, I rebooted my machine, but It is not required.

Hope this will help some people.

Again this guide it's not working.... on ubuntu!
After running the command:
Code:

sh ./amd-driver-installer-12-3-x86.x86_64.run --keep
I go to /lib/modules and here the folder fglrx it's not present!! look here:
Code:

root@Diabolik-ubuntu:/lib# cd modules
root@Diabolik-ubuntu:/lib/modules# ls
3.0.0-12-generic      3.0.0-18-generic      3.0.0-19-generic      3.3.1-030301-generic
3.0.0-17-generic-pae  3.0.0-18-generic-pae  3.0.0-19-generic-pae  3.3.1-030301-generic-pae
root@Diabolik-ubuntu:/lib/modules#

On ubuntu this procedure it's no valid..........

*EDIT*
I have found on UBUNTU how the setup put the file!!!!
I have used:
[CODE]./amd-driver-installer-12-3-x86.x86_64.run --extract Temp[/CODE0]
After that a folder called "Temp" it's been created on same folder of .run!!
Inside this folder exist so many sub-folders:
Code:

root@Diabolik-ubuntu:/home/diabolik/catalyst12.3/Temp# ls
amd-uninstall.sh        config_install.sh          packages      pre_drv.sh
arch                    copy_uninstall_files.sh    post_cp.sh    pre_km.sh
ati-installer.sh        create_log.sh              post_drv.sh    preun_doc.sh
ati-packager-helper.sh  default_policy.sh          post_km.sh    preun_km.sh
ati-packager-wrapper.sh  detect_previous.sh        postun_cp.sh  README.distro
automatic-install.exp    fglrx-uninstall.sh        postun_drv.sh  setup.data
check.sh                installer_creation_policy  postun_km.sh  verify_install.sh
cimle-xdgsu              LICENSE.TXT                postun_rn.sh  xpic
common                  lokixml.sh                pre_cp.sh      xpic_64a
component_config.sh      map_xname.sh              pre_doc.sh

The file make_install.sh it's in common -> lib -> modules -> fglrx !

Another sub-folder it's still present here... it's "build_mod", i have try to apply the patch on this folder... but after that the "sh make.sh" not working :(

This is the full Exit when i try to execute sh make.sh:
Code:

root@Diabolik-ubuntu:/home/diabolik/catalyst12.3/fglrx-install.Jg6XLB/common/lib/modules/fglrx/build_mod# sudo sh ./make.sh
AMD kernel module generator version 2.1
[: 393: 1: unexpected operator
[: 399: 1: unexpected operator
doing Makefile based build for kernel 2.6.x and higher
rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
make -C /lib/modules/3.3.1-030301-generic-pae/build SUBDIRS=/home/diabolik/catalyst12.3/fglrx-install.Jg6XLB/common/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: ingresso nella directory "/usr/src/linux-headers-3.3.1-030301-generic-pae"
  CC [M]  /home/diabolik/catalyst12.3/fglrx-install.Jg6XLB/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
  CC [M]  /home/diabolik/catalyst12.3/fglrx-install.Jg6XLB/common/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o
  CC [M]  /home/diabolik/catalyst12.3/fglrx-install.Jg6XLB/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.o
  CC [M]  /home/diabolik/catalyst12.3/fglrx-install.Jg6XLB/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.o
  CC [M]  /home/diabolik/catalyst12.3/fglrx-install.Jg6XLB/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o
  CC [M]  /home/diabolik/catalyst12.3/fglrx-install.Jg6XLB/common/lib/modules/fglrx/build_mod/2.6.x/kcl_io.o
  CC [M]  /home/diabolik/catalyst12.3/fglrx-install.Jg6XLB/common/lib/modules/fglrx/build_mod/2.6.x/kcl_pci.o
  CC [M]  /home/diabolik/catalyst12.3/fglrx-install.Jg6XLB/common/lib/modules/fglrx/build_mod/2.6.x/kcl_str.o
  CC [M]  /home/diabolik/catalyst12.3/fglrx-install.Jg6XLB/common/lib/modules/fglrx/build_mod/2.6.x/kcl_iommu.o
  CC [M]  /home/diabolik/catalyst12.3/fglrx-install.Jg6XLB/common/lib/modules/fglrx/build_mod/2.6.x/kcl.o
  CC [M]  /home/diabolik/catalyst12.3/fglrx-install.Jg6XLB/common/lib/modules/fglrx/build_mod/2.6.x/kcl_wait.o
make[2]: ***  Nessuna regola per generare l'obiettivo "/home/diabolik/catalyst12.3/fglrx-install.Jg6XLB/common/lib/modules/fglrx/build_mod/2.6.x/libfglrx_ip.a", necessario per "/home/diabolik/catalyst12.3/fglrx-install.Jg6XLB/common/lib/modules/fglrx/build_mod/2.6.x/fglrx.o".  Arresto.
make[1]: *** [_module_/home/diabolik/catalyst12.3/fglrx-install.Jg6XLB/common/lib/modules/fglrx/build_mod/2.6.x] Errore 2
make[1]: uscita dalla directory "/usr/src/linux-headers-3.3.1-030301-generic-pae"
make: *** [kmod_build] Errore 2
build failed with return value 2
root@Diabolik-ubuntu:/home/diabolik/catalyst12.3/fglrx-install.Jg6XLB/common/lib/modules/fglrx/build_mod#

After a installation failed.. this is the log indicated... flgrx_install.log:
Code:

Uninstalling any previously installed drivers.

Creating symlink /var/lib/dkms/fglrx/8.951/source ->
                /usr/src/fglrx-8.951

DKMS: add Completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
cd /var/lib/dkms/fglrx/8.951/build; sh make.sh --nohints --uname_r=3.3.1-030301-generic-pae --norootcheck....(bad exit status: 1)
[Error] Kernel Module : Failed to build fglrx-8.951 with DKMS
[Error] Kernel Module : Removing fglrx-8.951 from DKMS

------------------------------
Deleting module version: 8.951
completely from the DKMS tree.
------------------------------
Done.
[Reboot] Kernel Module : update-initramfs


TobiSGD 04-26-2012 06:47 PM

Update: Same error with version 12.4, patch still needed.

nitrobandit 05-06-2012 10:32 PM

Xorg 1.12problem
 
This patch allowed to install fglrx into slackware-current. Thanks. But
Still cannot startx, apparently fglrx is not compatible with xorg 1.12 and when I downgraded to xorg 1.9.5 from 13.37 repo I get a black screen and system freeze when trying to start that.

I guess wait for amd to get to new xorg support. I went back to full 13.37 and will see how develops over next month.

TobiSGD 05-07-2012 04:13 AM

I currently have a grudge against AMD. I think when they develop further in the same tempo I can't use an up-to-date -current anymore on my laptop before they drop support for my chipset and also have to revert to 13.37.

zakame 06-06-2012 06:03 AM

Quote:

Originally Posted by willysr (Post 4638295)
try visiting Walecha's blog http://www.walecha.net/content/memba...di-kernel-3213
It's in Indonesian, but i believe you can understand by looking at the code snippet or use Google Translate

Just found myself doing this now on my laptop to try out the beta 12.6 drivers. I don't understand Indonesian, but good thing the blog had the terminal output, so let me explain here:
  1. Get the Catalyst patch from AUR:
  2. Create the /etc/ati/patch directory:
    Code:

    mkdir -p /etc/ati/patch
  3. Unpack the catalyst.tar.gz and copy the relevant patch inside to /etc/ati/patch, the filename being of the format "patch-<fglrx-version>-<kernel-version>", e.g.
    Code:

    cat catalyst/3.2.8.patch /etc/ati/patch/patch-8.961-3.2.13
    for patching Catalyst 12.4 stable on -current kernel, or
    Code:

    cat catalyst/3.4.patch /etc/ati/patch/patch-8.98-3.4.1
    for patching Catalyst 12.6 beta on kernel.org mainline; change the patch filename to suit your environment.
  4. Edit the patch in /etc/ati/patch to remove the pathnames of files in each hunk, leaving only the basename. That is, if the patch contains
    Code:

    a/common/lib/modules/fglrx/build_mod/firegl_public.c
    strip that down to just the filename,
    Code:

    firegl_public.c
  5. Build the driver:
    Code:

    sh amd-driver-installer-<version>-<arch>.run --buildpkg Slackware/Slackware

Hopefully you end up with an fglrx-*.tgz :)

ponce 06-10-2012 12:03 PM

Hi toby, this is a slackware forum, not the ubuntu bug tracker ;)

guilem 06-23-2012 12:28 PM

Hi all

@ delta function

I'm going through the same problems with a radeon HD 4350 card, and was very anxious to experiment the patch, but got stuck here:

Quote:

Originally Posted by delta function (Post 4641394)
4. cd /lib/modules/fglrx/build_mod

Forgive me if this sounds rather newbeish, but I running debian squeeze (in fact crunchbang statler) and I don't have such a directory. I don't know if I should create it or what would be the equivalent in debian?

*edit*
Well, it's newbeish enough, I ought to have read a little bit more of the thread, I'd have understood it's slackware forum here. Sorry!

guilem

ReaperX7 06-23-2012 03:02 PM

Forgive the bluntness but this topic was raised earlier by another member.

http://www.linuxquestions.org/questi...el-4175411217/

Because Slackware's -Current tree is a rolling release style developer/tester branch of the software, usage of proprietary drivers may or may not work depending on which version of packages you have. The proprietary drivers are aimed at stable releases like 12.2, 13.0, and 13.37.

The Xorg drivers do include full support for all modern Radeon series cards for both 2D and 3D hardware acceleration.

TobiSGD 06-24-2012 12:18 AM

Quote:

Originally Posted by ReaperX7 (Post 4710222)
The Xorg drivers do include full support for all modern Radeon series cards for both 2D and 3D hardware acceleration.

Sorry, but no, they don't. The X.Org drivers have currently no usable support for the HD7000 series, they don't support the UVD block of the chips and the power management is faulty, which makes it unusable for many laptops. To see which feautures are really supported have a look here: http://www.x.org/wiki/RadeonFeature
They are still far away from being feature complete or have the same performance. I hope that gets better after they have made their major deal with China.


All times are GMT -5. The time now is 02:09 PM.