Happy ([info]sarah_a_happy) wrote,
@ 2008-04-06 12:25:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Current mood: hungry
Entry tags:life, linux setup

success: fglrx and kernel-2.6.25-rc8
I finally got DRI and XVideo working on my new laptop, and there seems to be a lack of success stories so here's mine.

Installing ati-drivers with kernel 2.6.25-rc8 gave me these errors...

/var/tmp/portage/x11-drivers/ati-drivers-8.471.3/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function 'KCL_PosixSecurityCapGetEffectiveVector':
/var/tmp/portage/x11-drivers/ati-drivers-8.471.3/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1888: error: implicit declaration of function 'cap_t'
/var/tmp/portage/x11-drivers/ati-drivers-8.471.3/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function 'KCL_PosixSecurityCapSetEffectiveVector':
/var/tmp/portage/x11-drivers/ati-drivers-8.471.3/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1896: error: invalid lvalue in assignment

the machine is a Toshiba Satellite A210-FS3 (PSAFGC-FS308C), I can not use an earlier kernel and have sound working.

# uname -a
Linux bouncy 2.6.25-rc8 #3 SMP Fri Apr 4 17:47:24 ADT 2008 i686 AMD Athlon(tm) 64 X2 Dual-Core Processor TK-57 AuthenticAMD GNU/Linux
# lspci -v -nn -s 01:05.0
01:05.0 VGA compatible controller [0300]: ATI Technologies Inc Radeon X1200 Series [1002:791f] (prog-if 00 [VGA controller])
Subsystem: Toshiba America Info Systems Unknown device [1179:ff1a]
Flags: bus master, fast devsel, latency 64, IRQ 18
Memory at f0000000 (64-bit, prefetchable) [size=128M]
Memory at f8100000 (64-bit, non-prefetchable) [size=64K]
I/O ports at 9000 [size=256]
Memory at f8000000 (32-bit, non-prefetchable) [size=1M]
Capabilities: [50] Power Management version 2
Capabilities: [80] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
Kernel driver in use: fglrx_pci
Kernel modules: fglrx

after some searching for a solution I came up with just one hint, the cap_t related api in the kernel changed in the 2.6.25-rc series
http://www.phoronix.com/forums/showthread.php?t=7822
http://groups.google.com/group/linux.kernel/browse_thread/thread/c19de5dc98a1a68e/f59d294786fe3610?lnk=raot&fwc=1

After a bit more searching I went and found the commit that made the change that caused the compile to fail
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=e338d263a76af78fe8f38a72131188b58fceb591

and studied exactly what changed, the effective list changed from an int to an array of two u32s, from there I took a guess that I could just take the first of them and treat it as the int that was there before. I made some changes to get it to compile, and made a patch.
--- common/lib/modules/fglrx/build_mod/firegl_public.c.orig     2008-04-06 01:20
:21.000000000 -0300
+++ common/lib/modules/fglrx/build_mod/firegl_public.c 2008-04-06 01:17:58.0000
00000 -0300
@@ -1885,7 +1885,7 @@
*/
KCL_TYPE_Cap ATI_API_CALL KCL_PosixSecurityCapGetEffectiveVector()
{
- return cap_t(current->cap_effective);
+ return (current->cap_effective).cap[0];
}

/** \brief Set vector of effective security caps for the current process
@@ -1893,7 +1893,7 @@
*/
void ATI_API_CALL KCL_PosixSecurityCapSetEffectiveVector(KCL_TYPE_Cap cap)
{
- cap_t(current->cap_effective) = cap;
+ (current->cap_effective).cap[0] = cap;
}

/** \brief Get number of available RAM pages

But the module would not load afterwards because of the symbol reference to change_page_attr, so i changed the call to use set_pages_uc instead.
--- common/lib/modules/fglrx/build_mod/firegl_public.c.orig     2008-04-06 02:10
:13.000000000 -0300
+++ common/lib/modules/fglrx/build_mod/firegl_public.c 2008-04-06 02:23:05.0000
00000 -0300
@@ -120,6 +120,7 @@
#include <asm/cpufeature.h>
#ifdef CONFIG_MTRR
#include <asm/mtrr.h>
+#include <asm/cacheflush.h>
#endif
#include <asm/delay.h>
#include <linux/agp_backend.h>
@@ -1158,7 +1159,7 @@

int ATI_API_CALL KCL_SetPageNoCache(void* virt, int pages)
{
- return change_page_attr(virt_to_page(virt), pages, PAGE_KERNEL_NOCACHE);
+ return set_pages_uc(virt_to_page(virt), pages);
}

/** /brief Call global kernel task/thread scheduler */

During this process I was building an ebuild file for the installation, by just modifying the existing one and adding those patches.

After those changes the kernel module loaded, my machine has not crashed, and xvideo works now.

This worked for me, it may not work for anyone else, and it is highly likely that the changes are not correct.


I believe that is the last of the hardware support in this laptop.

EDIT: one person had to modify the list of exported symbols in the kernel to get this to load
http://forums.gentoo.org/viewtopic-p-5039144.html#5039144

EDIT: I have exporting of unused symbols turned on in my kernel configuration
 Kernel hacking  --->
   [*] Enable unused/obsolete exported symbols

EDIT: There are reports of this not working on x86_64, noted in the comments



(14 comments) - (Post a new comment)

ebuild for this
[info]i_am_a_vacuole
2008-04-18 02:16 am UTC (link)
Hey, would you happen to have an updated ebuild that I could toss into my portage tree? I'm using the 2.6.25-rc8-mm2 sources and trying to compile the latest ati-drivers. If not, can you give some instruction on how to fix it? I think that would be really useful for Gentoo users--maybe even submit it to the developers for inclusion as a patch into the official ebuild.

(Reply to this) (Thread)

Re: ebuild for this
[info]sarah_a_happy
2008-04-18 10:22 am UTC (link)
Here is the ati-drivers slice of my portage overlay
http://happy.yi.org.nyud.net:8080/~happy/2008-04-18-ati-drivers.zip

I don't really have the motivation to post it on the Gentoo bug tracker, but anyone else can, just make sure you say where it came from (or not, it was trivial changes really).

(Reply to this) (Parent)(Thread)

Re: ebuild for this
(Anonymous)
2008-04-18 11:13 am UTC (link)
Not posting the bug will make others redo your work...

(Reply to this) (Parent)

Re: ebuild for this
(Anonymous)
2008-04-18 01:32 pm UTC (link)
hi and thanks for your work,

driver compiles, but with a warning
WARNING: "flush_tlb_page" [/var/tmp/portage/x11-drivers/ati-drivers-8.471.3-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/fglrx.ko] undefined!
as an result, when i try to load the module,
dmesg|grep fglrx
fglrx: Unknown symbol flush_tlb_page

uname -a
Linux flo 2.6.25 #2 SMP Fri Apr 18 15:15:41 CEST 2008 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 5200+ AuthenticAMD GNU/Linux

any idea?

wish you a nice weekend,

flo

(Reply to this) (Parent)(Thread)

Re: ebuild for this
[info]sarah_a_happy
2008-04-18 01:42 pm UTC (link)
did you turn on

Kernel hacking --->
[*] Enable unused/obsolete exported symbols

?

I also haven't tried on anything newer than rc8, I've been waiting for the 2.6.25 release before trying the newest again.

(Reply to this) (Parent)(Thread)

Re: ebuild for this
(Anonymous)
2008-04-18 01:56 pm UTC (link)
flo linux # cat .config|grep UNUSED
CONFIG_UNUSED_SYMBOLS=y

i use newly released vanilla-sources-2.6.25

(Reply to this) (Parent)(Thread)

Re: ebuild for this
[info]sarah_a_happy
2008-04-18 02:07 pm UTC (link)
I'll update to those this weekend then, thanks.

(Reply to this) (Parent)(Thread)

Re: ebuild for this
[info]sarah_a_happy
2008-04-19 12:55 pm UTC (link)
$ uname -a
Linux bouncy 2.6.25 #1 SMP Sat Apr 19 09:28:03 ADT 2008 i686 AMD Athlon(tm) 64 X2 Dual-Core Processor TK-57 AuthenticAMD GNU/Linux

No problems compiling or loading with my custom ebuild.

x86_64 is probably the difference that matters here.

(Reply to this) (Parent)

Re: ebuild for this
[info]sarah_a_happy
2008-04-18 04:45 pm UTC (link)
I see at
http://phoronix.com/forums/showthread.php?t=7631

that the symbol was removed from 64bit mode, but is still there in 32bit mode, and since I am stuck in 32bit for my wireless I doubt I will have the same problem when I try this weekend.

(Reply to this) (Parent)

Re: ebuild for this
[info]i_am_a_vacuole
2008-04-18 02:25 pm UTC (link)
Hey, thanks. I'll try and narrow it down and see if the same thing happens to me and then if it is, maybe I'll post it to the bugtracker in your name. Thanks anyway!

(Reply to this) (Parent)(Thread)

Re: ebuild for this
(Anonymous)
2008-04-18 02:35 pm UTC (link)
if you do so, can you please post a link to the bug?

(Reply to this) (Parent)(Thread)

Re: ebuild for this
[info]i_am_a_vacuole
2008-04-18 03:49 pm UTC (link)
Will do!

(Reply to this) (Parent)

hi..
[info]shin_aya
2008-05-05 06:13 pm UTC (link)
hi sarah a happy would you help me to fix the problem of my laptop the machine is a Toshiba Satellite A210-FS3 (PSAFGC-FS308C),the problem is the webcam is always says GRAPH RENDER FAIL. how to fix this would you mind guide me to straith to fix this problem and i dont know much about computer please give procedure how to do it... Looking forward to your reply.. thanks lots...

(Reply to this) (Thread)

Re: hi..
[info]sarah_a_happy
2008-05-05 09:47 pm UTC (link)
I managed to see the picture on the camera, but haven't put any effort into it due to apathy.

I just posted what I did, http://sarah-a-happy.livejournal.com/96301.html

(Reply to this) (Parent)


(14 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…