lunedì 9 aprile 2012

error installing fglrx ati drivers on fedora 16

I have an ati radeon 4650 on my laptop running fedora 16 x64. Each time the kernel is upgraded, I need to reinstall the driver (I tried the open source ones, but they make the laptop very hot, with fan always on) from amd. After switching to kernel 3.1.X, drivers did not install anymore, showing this error in the logs:
cd /var/lib/dkms/fglrx/8.95/build; sh make.sh --nohints --uname_r=3.3.1-3.fc16.x86_64 --norootcheck....(bad exit status: 1)
[Error] Kernel Module : Failed to build fglrx-8.95 with DKMS
[Error] Kernel Module : Removing fglrx-8.95 from DKMS
After running the above command alone, I found that a kernel header file is the source of the compile error. Don't ask me why (if you want, tell me why), but doing this it works:
open "/usr/src/kernels/`uname -r`/arch/x86/include/asm/uaccess_64.h"
at line 56 and 57 there is
else
WARN(1, "Buffer overflow detected!\n");

comment both lines and re-run the installer, now it should work.
I found this solution googling around.