Announcement

Collapse
No announcement yet.

Patch for fglrx & fc7 64-bit

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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...

    Technical support and discussion of the open-source AMD Radeon graphics drivers.
    Last edited by mmastrac; 31 July 2007, 11:18 AM.

  • #2
    Thanks - that seems to have done the trick.

    Comment


    • #3
      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

      Comment


      • #4
        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.
        Michael Larabel
        https://www.michaellarabel.com/

        Comment


        • #5
          and this patch for 8.39.4?

          Comment


          • #6
            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.

            Comment


            • #7
              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.

              Comment


              • #8
                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.

                Comment


                • #9
                  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!

                  Comment


                  • #10
                    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

                    Comment

                    Working...
                    X