Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: 12.04 PPC G3 R128 AGP Mesa DRI and Modelines

  1. #1
    Join Date
    Apr 2012
    Beans
    103

    12.04 PPC G3 R128 AGP Mesa DRI and Modelines

    Howdy. My first post here.
    Just began exploring Linux a few months ago, so I am definitely in the newbie category. I am exploring a charity idea using old PPC/X86_64 PC's to engage youngsters in technology and the "hacker spirit."

    Sidenote:
    @rsavage (if you read this) - I've googled my way to many a useful post/wiki with your moniker on it. Just wanted to say THANKS for your contributions.


    Moving on to topic:

    Hardware: 2 G3's
    iMac G3 600mhz RAM=384MB with ATI Rage 128 Ultra 2X AGP 16MB
    iMac G3 500mhz RAM=1GB with ATI Rage 128 Ultra 2X AGP 16MB

    Installation:
    12.04 PPC 32 via mini iso cli install followed by tasksel Xubuntu desktop. Managed to get display and then mesa HW rendering with FPS @ 300+.

    Two issues I am stumped on and requesting help with. (please)
    AGP
    I can not enable DRI unless I force PCI mode. Does this option literally force it down to 133/33 AND prevent reading textures directly from system ram? (I am speculating yes based on what I am seeing.)
    If so, is there a way to get it working in AGP mode? Even 1X should yield a significant performance increase.

    Modelines
    I was able to eliminate a slight pixel shift in 1024x768 with a tweak of the modeline found from Xorg.0.log. I managed to get 800x600 and 640x480 working in a useable state, but they do not fill or center the screen. Does anyone know how to find the correct clock for these modes on these iMacs? I think I could work back from that and create the correct modes? Note the difference in clock from CVT command and the modeline from Xorg.0.log in attached xorg.conf comments. (If you are wondering why- some games/children's apps work better or require lower res. e.g. Ri-li and SuperTux)
    This post is the short story. I'll follow up later with a detailed post including logs and various options tried. (UseFBDev and NoINT had no effect on AGP issue.)

    I tried to make this xorg.conf self explanatory.

    Code:
    ###Str8bs July 1, 2012
    ###Works on iMac G3's 500/600mhz ATI Rage 128 Ultra AGP 2X 16mb
    ###Ubuntu 12.04 3.2.0-25 and 3.2.0-26 
    ###To enable hardware acceleration, install old mesa 7.11 per wiki http://wiki.ubuntu.com/PowerPCKnownIssues 
    
    Section "Monitor"
        Identifier "iMacG3CRT"
        HorizSync 58-62
        VertRefresh 74-118
        UseModes "str8bsTWEAKED"
    EndSection
    
    Section "Device"
        Identifier "Rage128"
        Driver    "ATI"
        Option "ForcePCIMode" "true" ###Without this, I have to disable DRI.
        Option "PreferredMode" "1024x768"
    EndSection
    
    Section "Screen"
        Identifier "TheOnlyOneIHave"
        Monitor "iMacG3CRT"
        DefaultDepth 24 ###Change to 16 or 8 for lower color depth.
        SubSection "Display"
            Depth 24
            Modes "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
            Depth 16
            Modes "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
            Depth 8
            Modes "1024x768" "800x600" "640x480"
        EndSubSection
    EndSection
    
    Section "Module"
    #    Disable "dri"
    EndSection
    
    Section "Modes"
        Identifier "str8bsTWEAKED"
    
        ###!!!!!! INCORRECT MODES CAN DAMAGE CRT SCREENS !!!!!!
        ####Please research and understand before using. These work on my two G3 iMacs.
        ####800x600 and 640x480 still don't fill screen. Searching solution. pclk?
    
        Modeline "1024x768"  78.75  1024 1048 1144 1312 768 769 772 799 +hsync +vsync
        ModeLine "800x600"   63.75  800 840 920 1064  600 603 607 628 +hsync +vsync
        Modeline "640x480"   51.00  640 680 744 856  480 483 487 507 +hsync +vsync
    
        ###Tweaked from these CVT outputs and xorg log
        ####FromXorgLog
        #Modeline "1024x768"x75.0   78.75  1024 1040 1136 1312 768 769 772 800 +hsync +vsync
        ### 1024x768 74.90 Hz (CVT 0.79M3) hsync: 60.29 kHz; pclk: 82.00 MHz
        ###CVT output
        ###cvt 1024 768 75
        ### 1024x768 74.90 Hz (CVT 0.79M3) hsync: 60.29 kHz; pclk: 82.00 MHz
        #Modeline "1024x768_75.00"   82.00  1024 1088 1192 1360  768 771 775 805 -hsync +vsync
        ### cvt 800 600 95
        ### 800x600 94.77 Hz (CVT) hsync: 60.37 kHz; pclk: 63.75 MHz
        #ModeLine "800x600_95"   63.75  800 848 928 1056  600 603 607 637 -hsync +vsync
        ###cvt 640 480 117
        ### 640x480 116.33 Hz (CVT) hsync: 60.14 kHz; pclk: 51.00 MHz
        #Modeline "640x480_117.00"   51.00  640 680 744 848  480 483 487 517 -hsync +vsync
    EndSection
    Thanks

  2. #2
    Join Date
    Jan 2011
    Beans
    932

    Re: 12.04 PPC G3 R128 AGP Mesa DRI and Modelines

    Quote Originally Posted by str8bs View Post

    Sidenote:
    @rsavage (if you read this) - I've googled my way to many a useful post/wiki with your moniker on it. Just wanted to say THANKS for your contributions.

    Thanks for the thanks! It's getting embarrassing when I search and continually find my own posts.....I must cut this forum out - it's time for somebody to take over!

    I can not enable DRI unless I force PCI mode. Does this option literally force it down to 133/33 AND prevent reading textures directly from system ram? (I am speculating yes based on what I am seeing.)
    If so, is there a way to get it working in AGP mode? Even 1X should yield a significant performance increase.
    I don't have an r128 so I can't help you much. To set AGP mode use the
    Option "AGPMode" # <i>

    option. I speculated in the FAQ that turning off AIGLX would solve system freezes with r128. I don't know if anybody has tried it. I've tried it with 12.04 and downgrading the mesa drivers, but glxgears doesn't work for me with my radeon card (it did work in 11.04). The downgrading mesa seems to be the problem. You could try it in 10.04?

    Tormod Volden is working on a better solution than downgrading all of mesa. You should try and compile his package https://launchpad.net/~xorg-edgers/+archive/mesa-legacy/+packages so that you can use mesa 8.x. He has an interest in r128 and will probably be able to help you further.

    Can you update the known issues page or Faq with any progress you make please?

  3. #3
    Join Date
    Apr 2012
    Beans
    103

    Re: 12.04 PPC G3 R128 AGP Mesa DRI and Modelines

    Quote Originally Posted by rsavage View Post
    I speculated in the FAQ that turning off AIGLX would solve system freezes with r128. I don't know if anybody has tried it.
    Not for me. Unless I either disable DRI OR force pci mode(not both.) I have the issue. The issue? I wonder if what people are calling freezes are really freezes? On mine, it could easily be mistaken for a freeze but it isn't. It is just incredibly slow. The gui eventually loads. Mouse cursor moves on screen minutes after you actually move it. In xorg log I find a bunch of:
    Code:
    [   265.172] (EE) R128(0): R128CCEWaitForIdle: (DEBUG) CCE idle took i = 1025
    [   265.172] (EE) R128(0): Idle timed out, resetting engine...
    [   282.882] (EE) R128(0): R128CCEWaitForIdle: (DEBUG) CCE idle took i = 1025
    [   282.882] (EE) R128(0): Idle timed out, resetting engine...
    [   298.704] (EE) R128(0): R128CCEWaitForIdle: (DEBUG) CCE idle took i = 1025
    [   298.705] (EE) R128(0): Idle timed out, resetting engine...
    Once I force PCI mode, Option AGPMode gets ignored. I have to force PCI to enable DRI which is required for MESA.

    Tormod Volden is working on a better solution than downgrading all of mesa.
    Great news! These machines are old but I am all for making what hardware they have work for a living. Will try the package. I should clarify that my AGP issue exists before downgrading Mesa. After forcing PCI mode, downgrading to old Mesa currently works with HW rendering.

    Can you update the known issues page or Faq with any progress you make please?
    Sure but I hesitate. I am too new to Linux to be confident I am not spreading bad information. I am working on a detailed walk through of install on these from blank screen all the way to mesa. It seems a lot has changed recently, even from 3.2.0.23 to now. (no longer have to
    Code:
    video=offb:off
    and add aty128fb to modules for example)

    Thanks again.
    Last edited by str8bs; July 1st, 2012 at 04:55 PM. Reason: clarification

  4. #4
    Join Date
    Jan 2011
    Beans
    932

    Re: 12.04 PPC G3 R128 AGP Mesa DRI and Modelines

    Quote Originally Posted by str8bs View Post
    (EE) R128(0): R128CCEWaitForIdle: (DEBUG) CCE idle took i = 1025
    This I believe is an old problem. See https://bugs.launchpad.net/ubuntu/+s...ati/+bug/87530 .

    I think people added Option "CCEusecTimeout" "100000" to overcome it (looking at old xorg.conf files), but reading the bug report it doesn't sound very promising.

    The other interesting thing is

    One can get Ati Rage 128 DRI working only with this kernel config:
    CONFIG_DRM=y
    CONFIG_DRM_R128=y
    It gives ~ 460 fps in glxgears then.
    So possibly compiling a kernel would solve it? Somebody left a cryptic message on askubuntu.com hinting that a kernel needed to be compiled to get the best performance. I thought they probably were just referring to aty128fb, but this maybe it.

    Once I force PCI mode, Option AGPMode gets ignored. I have to force PCI to enable DRI which is required for MESA.
    Because of these problems is dri automatically truned off with AGP? You'd have to look at the xorg.0.log.

    I should clarify that my AGP issue exists before downgrading Mesa.
    I don't understand. You won't have hardware accelerated mesa with 8.x.

    It seems a lot has changed recently, even from 3.2.0.23 to now. (no longer have to
    Code:
    video=offb:off
    and add aty128fb to modules for example)
    That was me harassing the kernel people that got that changed. If the solution really is kernel related then you could also push for another change.

  5. #5
    Join Date
    Apr 2012
    Beans
    103

    Re: 12.04 PPC G3 R128 AGP Mesa DRI and Modelines

    Quote Originally Posted by rsavage View Post
    I think people added Option "CCEusecTimeout" "100000" to overcome it ...
    Tried that too and no change.

    So possibly compiling a kernel would solve it?
    I was wondering if it was similar to KMS with Radeon AGP as noted in theArchWiki
    Quote Originally Posted by ArchWiki
    For AGP support, it is necessary to add intel_agp (or ali_agp, ati_agp, amd_agp, amd64_agp etc.) before the radeon module.
    Because of these problems is dri automatically truned off with AGP?
    Not if I am interpreting logs correctly. I saved a first boot log (right after tasksel Xubuntu with no xorg.conf) and one with PCI mode forced in xorg.conf. Attached.

    I don't understand. You won't have hardware accelerated mesa with 8.x.
    Sorry, my attempt at clarification just confused things. What I mean is the DRI/AGP issue exists before I downgrade Mesa so that has no effect. I have to have option "ForcePCIMode" "true" unless I disable DRI. With DRI enabled and PCIMode forced, I can then downgrade MESA and HW works.

    I think what I really am trying to solve for is this?
    Code:
    dmesg | grep AGP
    [    0.585628] Linux agpgart interface v0.103
    [   29.655997] agpgart-uninorth 0000:00:0b.0: Apple UniNorth/Pangea chipset
    [   29.658518] agpgart-uninorth 0000:00:0b.0: configuring for size idx: 64
    [   29.736441] agpgart-uninorth 0000:00:0b.0: AGP aperture is 256M @ 0x0
    [   43.502188] agpgart: Couldn't find an AGP VGA controller.
    [   43.502261] agpgart-uninorth 0000:00:0b.0: putting AGP V2 device into 0x mode
    dmesg | grep 128
    [    0.051065] NetLabel:  domain hash size = 128
    [    0.510244] aty128fb 0000:00:10.0: enabling device (0086 -> 0087)
    [    0.511251] aty128fb 0000:00:10.0: Invalid ROM contents
    [    0.511280] aty128fb: Invalid ROM signature 8181 should  be 0xaa55
    [    0.511307] aty128fb: BIOS not located, guessing timings.
    [    0.511342] aty128fb: Rage128 TR Ultra AGP [chip rev 0x4] 16M 128-bit SDR SGRAM (1:1)
    [    0.528219] Console: switching to colour frame buffer device 128x48
    [    0.543908] fb0: ATY Rage128 frame buffer device on Rage128 TR Ultra AGP
    [   42.894184] aty128fb 0000:00:10.0: Invalid ROM contents
    [   43.488491] [drm] Initialized r128 2.5.0 20030725 for 0000:00:10.0 on minor 0
    [   43.502284] aty128fb 0000:00:10.0: putting AGP V2 device into 0x mode
    I also tried installing non-free firmware with no change.

    That was me harassing the kernel people that got that changed.
    And another THANKS again!
    Attached Files Attached Files
    Last edited by str8bs; July 2nd, 2012 at 12:49 AM. Reason: added 128 grep to dmesg quote

  6. #6
    Join Date
    Jan 2011
    Beans
    932

    Re: 12.04 PPC G3 R128 AGP Mesa DRI and Modelines

    Quote Originally Posted by str8bs View Post
    And another THANKS again!
    Well I'm a bit concerned I may have made things worse for you. I don't understand why you get

    Code:
    [   43.502188] agpgart: Couldn't find an AGP VGA controller.
    The agpgart and uninorth_agp modules are started before drm as the various instructions say to do. The only thing is aty128fb is started now so early because it is built in. Maybe this has an effect? At the moment the only way I can think of to get around this is to install the 3.2.0-23 kernel (the linux-image-3.2.0-23-powerpc-smp package). You can then specify the order in which the modules are loaded.

    I assume you have tried debian wheezy (via mintppc 11) already? That has a different kernel setup with uninorth_agp built in too.

    I don't understand why building in the drm modules should help, but since the bug report says it helps you should probably try it. If you work out that a kernel change is needed then I think you can still get the 12.04 kernel setup changed.

    It looks like
    Code:
    (EE) R128(0): R128CCEWaitForIdle: (DEBUG) CCE idle took i = 1025
    is not related to 3d hardware acceleration then.

    If this was a common bug surely it should of been squished by now? It makes you think that there is something about PowerPC that triggers it more. Maybe the usefbdev option?

    I think your best bet is to try and get hold of Tormod and see if he can help. He tried to help r128 users before, but as far as I know nobody took him up on his offer http://ubuntuforums.org/showthread.php?p=11816354 .
    Last edited by rsavage; July 2nd, 2012 at 08:54 AM.

  7. #7
    Join Date
    Apr 2012
    Beans
    103

    Re: 12.04 PPC G3 R128 AGP Mesa DRI and Modelines

    Quote Originally Posted by rsavage View Post
    At the moment the only way I can think of to get around this is to install the 3.2.0-23 kernel
    Based on my unreliable memory, I had the same issue with -23 when I had aty128fb in /etc/modules and /etc/initramfs-tools/modules. I'm not really up to speed on how these effect load order. Do you mean try the same using kernel 3.2.0-23 and line uninorth_agp before aty128fb?

    I assume you have tried debian wheezy (via mintppc 11) already?
    About a month ago and IIRC I disabled DRI. Will re-test. I started looking at Qimo-Session which wasn't in the default repositories with that install. Xubuntu seemed the best choice since Qimo loads XFCE anyway and we have the education bundles.
    I will try kernel compile. Will take some learning on my part. (Never compiled before.)

    If this was a common bug surely it should of been squished by now?
    I was thinking the same. Most xorg.conf's I find on the net have DRI disabled. I wonder if most people are content with that so it doesn't come up?

    ...Tormod... and see if he can help. He tried to help r128 users before, but as far as I know nobody took him up...
    Shame. I saw that and misinterpreted it as "never mind" since aty128fb was put back. Other than my goal of getting AGP mode, the only out of the box issues these two have are the HorizSync/VertRefresh monitor section and Disable DRI or ForcePCIMode to get working 1024x768(Still searching better modelines for the lower resolutions.) I have another iMac 333 with the Rage128 Pro 6M next on the list.

  8. #8
    Join Date
    Jan 2011
    Beans
    932

    Re: 12.04 PPC G3 R128 AGP Mesa DRI and Modelines

    Did you get kernel 23 with the mini iso? I thought you'd get the latest kernel. If that is the case the known issues page needs rewording.

    I think you've got what I meant. Add the lines

    uninorth_agp
    aty128fb

    in that order to the files you gave so that the agp module gets started before the framebuffer. See if you still get "agpgart: Couldn't find an AGP VGA controller".

    You presuambly looked up the Horiz/vert/modeline values used in the previous xorg.conf files? Have you tried resetting pram. Sometimes causes a shift in screen position from what I gather.

  9. #9
    Join Date
    Apr 2012
    Beans
    103

    Re: 12.04 PPC G3 R128 AGP Mesa DRI and Modelines

    Quote Originally Posted by rsavage View Post
    Did you get kernel 23 with the mini iso?
    No. kernel 23 was with alternate CD. If I later dist-upgraded that, I could remove aty128fb from the two modules files and it matches the discussion in this thread.

    Unless otherwise stated, the logs and posts in this thread are kernel 25 or later installed via USB boot of the mini iso.

    Since I am slow at getting my documentation together, I should try and clarify a few things:
    Unless stated, I am booting with no kernel parameters appended.
    Without DRI disabled or PCI Mode forced, what I see when X starts, is a "garbled" framebuffer display that looks like a high resolution on the top half of the screen and lower resolution on the bottom half. This could easily be mistaken for a freeze, but if I leave it long enough, the login screen comes up. (I can actually log in if I want to wait another half hour.) timeout messages in Xorg Log as posted earlier.
    If "quiet splash" is appended at boot, I have a blank screen after the splash screen for the same time period until the login screen finally loads.
    Regarding modelines for lower resolution.
    Did not try resetting pram. Will do. It is really close right now. Suspect finding the dot clock would get me there. Most xorg.conf's I find on the net show 8x6 and 6x4 at 60hz which definitely won't work on these.

    I am traveling this week so it may be mid next week before I can pick it up again. Thanks again for your help.

  10. #10
    Join Date
    Jan 2011
    Beans
    932

    Re: 12.04 PPC G3 R128 AGP Mesa DRI and Modelines

    Okay here is my considered opinion.....I'm studied the logs you've provided more closely....

    By disabling dri you don't have any drm messages. It is drm that sets the AGP mode as far as I am aware (guessing by the log messages I have). The software rasterizer is loaded with this option.

    By forcing PCI mode you get drm/dri. The log you gave loaded the swrast, but if you had downgraded mesa you would have had hardware acceleration.

    I can't see huge differences between the 'no xorg conf' log and the above. Sure you have the agp prefix instead of pci, but the majority of messages are the same. The one that is missing with forcepci is

    Code:
     [drm] loaded kernel module for "r128" driver.
    I don't understand if that is significant or if the code for pci/agp just logs things differently. With PCI mode is the r128 half of drm not loaded? Doesn't make much sense.

    I still think the significant error is

    Code:
    aty128fb 0000:00:10.0: putting AGP V2 device into 0x mode
    It points to a problem with the uninorth_agp module if you ask me. This is why it seems to be mostly a powerpc problem.

    My theory with compiling drm modules in [=y] as a solution is that I suspect that forces PCI mode. I may be wrong, but it would be interesting if you could achieve ~460fps with PCI. Maybe drop to 16 bit colour or enable hyperz?

    I have found an example where agp r128 powerpc appears to be working http://lists.debian.org/debian-x/2010/09/msg00479.html . Only agp mode 1 though. I've looked at the kernel configs from that time and I can't see anything that sticks out.

    I'm concluding that is just works for some machines and some it doesn't. A bit like radeon KMS (which is another uninorth_AGP problem).

    I maybe completely wrong though! I usually am!

    EDIT:

    you could try booting with the drm.debug=1 boot parameter to see if you get more information.

    lots of xorg.conf files here http://mac.linux.be/content/g3-imac-...sions-xorgconf
    Last edited by rsavage; July 3rd, 2012 at 10:03 PM.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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