Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: Patch for fglrx & fc7 64-bit

  1. #1
    Join Date
    Jul 2007
    Posts
    14

    Default Patch for fglrx & fc7 64-bit

    I've been frustrated that I couldn't use fglrx on my FC7 64-bit box, so I whipped out the trusty disassembler and patched out what I believe is the buggy code.

    It works for me so far with glxgears and other OpenGL programs. I'll report back if I run into any trouble.

    If you'd like to try the patch, follow these steps after installing the RPM from freshrpms/livna or building it yourself via the ATI tool.

    UPDATED: Use sed instead of ghex2

    Code:
    cd /usr/lib64/xorg/modules/drivers/
    mv fglrx_drv.so fglrx_drv.so.orig
    cat fglrx_drv.so.orig | sed "s/\xe8\xb1\x30\xfe\xff/\x90\x90\x90\x90\x90/g" > fglrx_drv.so
    diff fglrx_drv.so fglrx_drv.so.orig (must report that binary files differ)
    aticonfig --initial
    Restart X

    If you have a version other than 8.39.4, you'll need to generate it yourself by following these steps:

    cd /usr/lib64/xorg/modules/drivers

    objdump -D fglrx_drv.so.orig | grep "Save64" | grep "callq"

    Look for the line that shows five hex bytes, for instance:
    aba7a: e8 b9 30 fe ff callq 8eb38 <atiddxSave64BitBAR@plt>

    Take these five bytes and plug them into the "sed" program above using the \xHH\xHH\xHH\xHH\xHH format.

    UPDATE: Jorg submitted a better generic patch based on Kano's work

    It's easier to use than mine and should work on all 64-bit drivers. See here for more details...

    http://phoronix.com/forums/showpost....7&postcount=18
    Last edited by mmastrac; 07-31-2007 at 12:18 PM.

  2. #2
    Join Date
    Jul 2007
    Posts
    1

    Default

    Thanks - that seems to have done the trick.

  3. #3
    Join Date
    Jan 2007
    Location
    Germany
    Posts
    2,175

    Default

    I find this a bit weird because when the Xorg Server 1.3 Hex Hotfix was avaible by Kano, everyone said "no it's illegal, don't post it" for some weeks

  4. #4

    Default

    Quote Originally Posted by d2kx View Post
    I find this a bit weird because when the Xorg Server 1.3 Hex Hotfix was avaible by Kano, everyone said "no it's illegal, don't post it" for some weeks
    Who said that? Rage3D? It's only illegal if you redistribute a modified driver.

  5. #5
    Join Date
    Dec 2006
    Posts
    25

    Default

    and this patch for 8.39.4?

  6. #6
    Join Date
    Jul 2007
    Posts
    14

    Default

    Quote Originally Posted by khakhovich View Post
    and this patch for 8.39.4?
    Yes, this is for 8.39.4 only. Unfortunately, each version will require a specific fix.

    If ATI hasn't fixed it by the next version, I'll work on a generic patcher that can fix it in a cleaner way.

  7. #7
    Join Date
    Dec 2006
    Posts
    25

    Default

    Quote Originally Posted by mmastrac View Post
    Yes, this is for 8.39.4 only. Unfortunately, each version will require a specific fix.

    If ATI hasn't fixed it by the next version, I'll work on a generic patcher that can fix it in a cleaner way.

    ah great and thanks for the explanation. Cause i tried this patch on my mobilty x1400 (ibm t60) and shoot me diff does not say that binary files are are different. and as a result it does not work for me.

  8. #8
    Join Date
    Jul 2007
    Posts
    14

    Default

    Quote Originally Posted by khakhovich View Post
    ah great and thanks for the explanation. Cause i tried this patch on my mobilty x1400 (ibm t60) and shoot me diff does not say that binary files are are different. and as a result it does not work for me.
    Can you try this (you might need to yum -y install gcc first):

    cd /usr/lib64/xorg/modules/drivers

    objdump -D fglrx_drv.so.orig | grep "Save64"

    Paste the output here.

  9. #9
    Join Date
    Dec 2006
    Posts
    25

    Default

    here we go:

    [root@localhost drivers]# objdump -D fglrx_drv.so.orig |grep "Save64"
    000000000008eb38 <atiddxSave64BitBAR@plt>:
    00000000000a0b60 <atiddxSave64BitBAR>:
    a0bb3: 74 4f je a0c04 <atiddxSave64BitBAR+0xa4>
    a0bca: 74 07 je a0bd3 <atiddxSave64BitBAR+0x73>
    a0c02: eb c8 jmp a0bcc <atiddxSave64BitBAR+0x6c>
    a0c31: eb 82 jmp a0bb5 <atiddxSave64BitBAR+0x55>
    aba7a: e8 b9 30 fe ff callq 8eb38 <atiddxSave64BitBAR@plt>
    [root@localhost drivers]#


    thanks!

  10. #10
    Join Date
    Jul 2007
    Posts
    14

    Default

    Quote Originally Posted by khakhovich View Post
    here we go:

    [root@localhost drivers]# objdump -D fglrx_drv.so.orig |grep "Save64"
    ... snip ...
    aba7a: e8 b9 30 fe ff callq 8eb38 <atiddxSave64BitBAR@plt>
    This patch should work for you:

    Code:
    cd /usr/lib64/xorg/modules/drivers/
    mv fglrx_drv.so fglrx_drv.so.orig
    cat fglrx_drv.so.orig | sed "s/\xe8\xb9\x30\xfe\xff/\x90\x90\x90\x90\x90/g" > fglrx_drv.so
    diff fglrx_drv.so fglrx_drv.so.orig (must report that binary files differ)
    aticonfig --initial

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •