LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Re-occuring ATI driver install problem (https://www.linuxquestions.org/questions/linux-hardware-18/re-occuring-ati-driver-install-problem-286947/)

Gamezace 02-06-2005 12:48 PM

Re-occuring ATI driver install problem
 
Edit: This first post's problem has been solved- please read to the second post for the real problem. Thanks.

I have recently tried to install the ATI drivers on two computers, and gotten the same error each time. Following the ATI Driver Install Tutorial (http://www.linuxquestions.org/questi...icle&artid=212), I come to installing the drivers after converting them to *.deb format with alien. Then, this occurs:

Code:

LLJK:/home/gamezace# dpkg -i fglrx-4-3-0_8.8.25-2_i386.deb
Selecting previously deselected package fglrx-4-3-0.
(Reading database ... 62070 files and directories currently installed.)
Unpacking fglrx-4-3-0 (from fglrx-4-3-0_8.8.25-2_i386.deb) ...
dpkg: error processing fglrx-4-3-0_8.8.25-2_i386.deb (--install):
 trying to overwrite `/usr/X11R6/lib/libGL.so.1.2', which is also in package xlibmesa-gl
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
 fglrx-4-3-0_8.8.25-2_i386.deb
LLJK:/home/gamezace#

This exact error happened on both machines I tried to install the drivers on.

I tried fooling around the files a bit, but nothing I did seemed to work.

I searched around the forums...but could not find another instance of this exact error - perhaps I just missed it though. Any help you could give would be greatly appreciated.

Edit: Whoops, forgot system info:

AMD 64 3400+
2GB RAM
Radeon 9700
Debian-Sarge Release
Kernel 2.6.8

Gamezace 02-06-2005 01:42 PM

Okay, well, I fixed the first problem - all it needed was to do the following:

Code:

dpkg -i --force-all fglrx*.deb
However, I have found another problem in patching the agpgart_be.c and agpgart.h files, as listed in the tutorial.

As discussed here, http://forums.gentoo.org/viewtopic.php?t=173239, some of the patch lines, specifically patch->flags, has been deprecated and no longer works - as is visible by the following error:

Code:

LLJK:/lib/modules/fglrx/build_mod# patch -p1 < fglrx.patch
patching file agpgart_be.c
patch: **** malformed patch at line 17: set_bit(PG_locked,&page->flags);

Someone in the link above made a patch to fix this problem:
Code:

--- agpgart_be.c.orig  2004-05-14 21:39:19.943584512 +0000
+++ agpgart_be.c        2004-05-14 21:39:28.140338416 +0000
@@ -1402,7 +1402,7 @@ unsigned long agp_generic_alloc_page(voi
    }
 #endif
 
-    atomic_inc(&page->count);
+    get_page(page);
    set_bit(PG_locked, &page->flags);
    atomic_inc(&agp_bridge.current_memory_agp);
 
@@ -4413,7 +4413,7 @@ static unsigned long ali_alloc_page(void
    if (page == NULL)
        return 0;
 
-    atomic_inc(&page->count);
+        get_page(page);
    set_bit(PG_locked, &page->flags);
    atomic_inc(&agp_bridge.current_memory_agp);
 
--- firegl_public.c.orig        2004-05-14 21:38:53.296635464 +0000
+++ firegl_public.c    2004-05-14 21:40:28.492163544 +0000
@@ -2052,7 +2052,7 @@ static vm_nopage_ret_t vm_shm_nopage(str
    pMmPage = virt_to_page(kaddr);
 #endif /* LINUX_VERSION_CODE < 0x020400 */
 
-    atomic_inc(&(pMmPage->count));  /* inc usage count of page */
+    get_page(pMmPage);  /* inc usage count of page */
 
 #if LINUX_VERSION_CODE >= 0x020400
  //  __KE_DEBUG3("vm-address 0x%08lx => kernel-page-address 0x%p\n",

- runnable by the following:

Code:

patch -p0 < /path/to/the/file
However, the 2nd Hunk in the patch fails for me:

Code:

LLJK:/lib/modules/fglrx/build_mod# patch -p0 < newpatch.patch
patching file agpgart_be.c
Hunk #2 FAILED at 4413.
1 out of 2 hunks FAILED -- saving rejects to file agpgart_be.c.rej
patching file firegl_public.c
Reversed (or previously applied) patch detected!  Assume -R? [n] y
Hunk #1 succeeded at 2114 (offset 62 lines).

I was curious as to if someone could host their patched apggart_be.c and agpgart.h files so I could simply replace mine with the correct, patched ones - I have been through numerous options for getting around the above error. Does anyone have any other ideas? Thanks in advance.

Gamezace 02-06-2005 02:37 PM

::sighs::

As it turns out, I was running myself in circles, as the page->count error was one of the patches included in the install described in the tutorial...but when that didn't work, I ended up with a patch for the patch...and then a patch for another...and then got totally lost.

Sorry for all the confusion - haha, I'm about to give up I think. I currently have 6 different patches, all of which fail - haha. If anyone could post their patched apggart_be.c and agpgart.h files, that would be great - because I'm done with the patches - none of them work - :-P

egag 02-06-2005 05:55 PM

----------
apggart_be.c
----------

hi there,

all i did was exchange all occurences of " pci_find_class " with " pci_get_class "
in the above file, and it compiled and loaded ok.

egag

Gamezace 02-06-2005 09:54 PM

Quote:

Originally posted by egag
----------
apggart_be.c
----------

hi there,

all i did was exchange all occurences of " pci_find_class " with " pci_get_class "
in the above file, and it compiled and loaded ok.

egag

Sorry, but I'm still a bit of a newbie. Is there an easy way to do this from the command line?

Thanks for your help!

ironwalker 02-06-2005 11:02 PM

cd to /usr/local/bin
wget;
http://kanotix.com/files/install-ker...rce-vanilla.sh
chmod it

./install-kernel-source-vanilla.sh

than grab
http://kanotix.com/files/install-radeon-debian.sh

downloading the above script to /usr/local/bin
chmod it
leave x (ctrl+alt+F1)
log in
do,
install-radeon-debian.sh
when done ctrl+alt+F7 to return to x
Everything should be fine and installed and patched for you...if fonts are screwy do;
http://kanotix.com/files/fix-fonts.sh
download to /usr/local/bin
chmod
execute done:)

run gxlinfo to see info and make sure glrender is on


I know its Kanotix website and Kano's scripts but I have asked in #Kanotix if I can use the scripts for a pure debian box I have and he said yes.

here are all his scripts;

http://kanotix.com/files/

Gamezace 02-07-2005 11:39 AM

Quote:

Originally posted by ironwalker
cd to /usr/local/bin
wget;
http://kanotix.com/files/install-ker...rce-vanilla.sh
chmod it

./install-kernel-source-vanilla.sh

than grab
http://kanotix.com/files/install-radeon-debian.sh

downloading the above script to /usr/local/bin
chmod it
leave x (ctrl+alt+F1)
log in
do,
install-radeon-debian.sh
when done ctrl+alt+F7 to return to x
Everything should be fine and installed and patched for you...if fonts are screwy do;
http://kanotix.com/files/fix-fonts.sh
download to /usr/local/bin
chmod
execute done:)

run gxlinfo to see info and make sure glrender is on


I know its Kanotix website and Kano's scripts but I have asked in #Kanotix if I can use the scripts for a pure debian box I have and he said yes.

here are all his scripts;

http://kanotix.com/files/

Unfortunatly when I run install-radeon-debian.sh it spits out "Error: Bad /etc/X11/XF86Config-4 file."

Thinking it didn't like some of my modifications for some reason, I reran XFree86Config and xserver-xfree86 config - generating new config files - this didn't seem to work though...I still got the same error.

Any ideas?

I tried replacing pci_find_class with pci_get_class as described several posts above...but I still got the same error while patching:

Code:

LLJK:/lib/modules/fglrx/build_mod# patch -p1 <kernelpatch.patch
patching file agpgart_be.c
patch: **** malformed patch at line 17: set_bit(PG_locked, &page->flags);

Thanks for everything

leinad 02-11-2005 12:26 PM

I also get the same error - if someone could post/host their agpgart_be.c file, I would be most appreciative.


All times are GMT -5. The time now is 12:37 PM.