System freezes shortly after reaching the desktop (Ubuntu MATE 16.04, PowerPC)

Bug #1571416 reported by ernsteiswuerfel on 2016-04-17
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Linux
Confirmed
Medium
linux (Ubuntu)
High
Unassigned

Bug Description

The freeze happens every time unless I use "radeon.agpmode=-1" as a kernel parameter.

Affected machines:
PowerBook G4 5,6 + PowerMac G5 7,3 (w. "ATI Radeon 9600 AP (AGP)".

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-4.4.0-18-powerpc-smp 4.4.0-18.34
ProcVersionSignature: Ubuntu 4.4.0-18.34-powerpc-smp 4.4.6
Uname: Linux 4.4.0-18-powerpc-smp ppc
ApportVersion: 2.20.1-0ubuntu2
Architecture: powerpc
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CasperVersion: 1.373
CurrentDesktop: MATE
Date: Sun Apr 17 21:08:40 2016
IwConfig:
 lo no wireless extensions.

 enP2p36s15f0 no wireless extensions.
LiveMediaBuild: Ubuntu-MATE 16.04 LTS "Xenial Xerus" - Release powerpc (20160417.1)
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 radeondrmfb
ProcKernelCmdLine: ro ramdisk_size=1048576 file=/cdrom/preseed/username.seed boot=casper quiet --- radeon.agpmode=-1
RelatedPackageVersions:
 linux-restricted-modules-4.4.0-18-powerpc-smp N/A
 linux-backports-modules-4.4.0-18-powerpc-smp N/A
 linux-firmware 1.157
RfKill:
 0: hci0: Bluetooth
  Soft blocked: no
  Hard blocked: no
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)

ernsteiswuerfel (erhard-f) wrote :

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1571416

tags: added: iso-testing
Martin Wimpress (flexiondotorg) wrote :

Please try the following boot options:

  radeon.agpmode=-1 radeon.modeset=1 video=offb:off video=radeonfb:off

ernsteiswuerfel (erhard-f) wrote :

My PowerMac G5 7,3 is also affected. One time it had a total freeze, another time there was severe graphics corruption on the desktop but the machine kept usable.

Graphics card according to Xorg.0.log: "ATI Radeon 9600 AP (AGP)" (ChipID = 0x4150), DRI driver: r300

ernsteiswuerfel (erhard-f) wrote :

@Martin:

Thanks! As I suggested in the original bug description "radeon.agpmode=-1" works as boot option. But as it's a bug and I didn't find an up-to-date bug description I filed one. I am sure this affects some more users of Apple PPC hardware.

Interestingly enough my Powerbook 5,8 is not affected by this bug though it is equipped with a very similar r300-class graphics board! "ATI Radeon Mobility 9600/9700 (M10/M11) NP (AGP)", (ChipID = 0x4e50).

description: updated
Joseph Salisbury (jsalisbury) wrote :

Did this issue start happening after an update/upgrade? Was there a prior kernel version where you were not having this particular problem?

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.6 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-rc4-wily/

Changed in linux (Ubuntu):
importance: Undecided → High
status: Confirmed → Incomplete
ernsteiswuerfel (erhard-f) wrote :

@Joseph:

This issue also exists in Ubuntu MATE 15.10 PowerPC. I did not try versions older than 15.10.

I will try the latest mainline kernel and report back as you suggested.

ernsteiswuerfel (erhard-f) wrote :

@Joseph:

Ahm, well, had a look at http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-rc4-wily/. There is only a ppc64el PowerPC kernel. The Apple G4 machines are 32bit, big endian. So I cannot test this latest upstream kernel on the affected hardware.

Please try the following boot options:

  radeon.agpmode=-1 radeon.modeset=1 video=offb:off video=radeonfb:off

Download full text (4.5 KiB)

I am installing a Debian Jessie on a Mac Mini PowerPC G4 system.

After a couple of seconds of using the system, it generally freeze, looking at dmesg from another ssh connection I can see:

[ 21.314765] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 21.459715] b43-phy0: Loading firmware version 666.2 (2011-02-23 01:15:07)
[ 21.531076] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 23.719199] gem 0002:20:0f.0 eth0: Link is up at 100 Mbps, full-duplex
[ 23.719318] gem 0002:20:0f.0 eth0: Pause is disabled
[ 23.719357] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 180.631048] radeon 0000:00:10.0: ring 0 stalled for more than 16096msec
[ 180.631062] radeon 0000:00:10.0: GPU lockup (waiting for
0x000000000000031b last fence id 0x0000000000000301 on ring 0)
[ 180.768184] radeon: wait for empty RBBM fifo failed ! Bad things
might happen.
[ 180.905284] Failed to wait GUI idle while programming pipes. Bad
things might happen.
[ 180.908156] radeon 0000:00:10.0: Saved 827 dwords of commands on ring 0.
[ 180.908176] radeon 0000:00:10.0: (r100_asic_reset:2551)
RBBM_STATUS=0x8002C139
[ 181.405690] radeon 0000:00:10.0: (r100_asic_reset:2572)
RBBM_STATUS=0x8002C139
[ 181.899237] radeon 0000:00:10.0: (r100_asic_reset:2580)
RBBM_STATUS=0x8002C139
[ 181.899264] radeon 0000:00:10.0: GPU reset succeed
[ 181.899269] radeon 0000:00:10.0: GPU reset succeeded, trying to resume
[ 181.899281] radeon 0000:00:10.0: (r100_asic_reset:2551)
RBBM_STATUS=0x8002C139
[ 182.396784] radeon 0000:00:10.0: (r100_asic_reset:2572)
RBBM_STATUS=0x8002C139
[ 182.890328] radeon 0000:00:10.0: (r100_asic_reset:2580)
RBBM_STATUS=0x8002C139
[ 182.890351] radeon 0000:00:10.0: GPU reset succeed
[ 182.890376] radeon 0000:00:10.0: WB disabled
[ 182.890384] radeon 0000:00:10.0: fence driver on ring 0 use gpu
addr 0x0000000000000000 and cpu addr 0xe2819000
[ 183.027494] radeon: wait for empty RBBM fifo failed ! Bad things
might happen.
[ 183.164599] Failed to wait GUI idle while programming pipes. Bad
things might happen.
[ 183.164643] [drm] radeon: ring at 0x0000000000001000
[ 183.171448] [drm] ring test succeeded in 0 usecs
[ 193.171046] radeon 0000:00:10.0: ring 0 stalled for more than 10000msec
[ 193.171061] radeon 0000:00:10.0: GPU lockup (waiting for
0x000000000000031c last fence id 0x0000000000000301 on ring 0)
[ 193.171068] [drm:r100_ib_test] *ERROR* radeon: fence wait failed (-35).
[ 193.171079] [drm:radeon_ib_ring_tests] *ERROR* radeon: failed
testing IB on GFX ring (-35).
[ 193.171084] radeon 0000:00:10.0: ib ring test failed (-35).
[ 193.308210] radeon: wait for empty RBBM fifo failed ! Bad things
might happen.
[ 193.445310] Failed to wait GUI idle while programming pipes. Bad
things might happen.
[ 193.446307] radeon 0000:00:10.0: (r100_asic_reset:2551)
RBBM_STATUS=0x8002C136
[ 193.943817] radeon 0000:00:10.0: (r100_asic_reset:2572)
RBBM_STATUS=0x8002C136
[ 194.437363] radeon 0000:00:10.0: (r100_asic_reset:2580)
RBBM_STATUS=0x8002C136
[ 194.437390] radeon 0000:00:10.0: GPU reset succeed
[ 194.437395] radeon 0000:00:10.0: GPU reset succeeded, trying to resume
[ 194.437407] radeon 0000:00:10.0: (r100_asic_reset:2551)
R...

Read more...

Download full text (16.7 KiB)

If I update to debian jessie/backports here is what I get:

[ 23.665906] b43-phy0: Loading firmware version 666.2 (2011-02-23 01:15:07)
[ 25.930036] gem 0002:20:0f.0 eth0: Link is up at 100 Mbps, full-duplex
[ 25.930164] gem 0002:20:0f.0 eth0: Pause is disabled
[ 67.501888] radeon 0000:00:10.0: ring 0 stalled for more than 10212msec
[ 67.501904] radeon 0000:00:10.0: GPU lockup (current fence id 0x0000000000000144 last fence id 0x0000000000000164 on ring 0)
[ 67.640696] radeon: wait for empty RBBM fifo failed ! Bad things might happen.
[ 67.776370] Failed to wait GUI idle while programming pipes. Bad things might happen.
[ 67.781185] radeon 0000:00:10.0: Saved 1019 dwords of commands on ring 0.
[ 67.781206] radeon 0000:00:10.0: (r100_asic_reset:2567) RBBM_STATUS=0x8002C139
[ 68.278804] radeon 0000:00:10.0: (r100_asic_reset:2588) RBBM_STATUS=0x8002C139
[ 68.772351] radeon 0000:00:10.0: (r100_asic_reset:2596) RBBM_STATUS=0x8002C139
[ 68.772379] radeon 0000:00:10.0: GPU reset succeed
[ 68.772384] radeon 0000:00:10.0: GPU reset succeeded, trying to resume
[ 68.772396] radeon 0000:00:10.0: (r100_asic_reset:2567) RBBM_STATUS=0x8002C139
[ 69.269899] radeon 0000:00:10.0: (r100_asic_reset:2588) RBBM_STATUS=0x8002C139
[ 69.763445] radeon 0000:00:10.0: (r100_asic_reset:2596) RBBM_STATUS=0x8002C139
[ 69.763466] radeon 0000:00:10.0: GPU reset succeed
[ 69.763520] radeon 0000:00:10.0: WB disabled
[ 69.763529] radeon 0000:00:10.0: fence driver on ring 0 use gpu addr 0x0000000000000000 and cpu addr 0xe2905000
[ 69.898991] radeon: wait for empty RBBM fifo failed ! Bad things might happen.
[ 70.034453] Failed to wait GUI idle while programming pipes. Bad things might happen.
[ 70.034497] [drm] radeon: ring at 0x0000000000001000
[ 70.043419] [drm] ring test succeeded in 0 usecs
[ 80.537888] radeon 0000:00:10.0: ring 0 stalled for more than 10496msec
[ 80.537903] radeon 0000:00:10.0: GPU lockup (current fence id 0x0000000000000144 last fence id 0x0000000000000165 on ring 0)
[ 80.538132] [drm:r100_ib_test [radeon]] *ERROR* radeon: fence wait failed (-35).
[ 80.538206] [drm:radeon_ib_ring_tests [radeon]] *ERROR* radeon: failed testing IB on GFX ring (-35).
[ 80.674747] radeon: wait for empty RBBM fifo failed ! Bad things might happen.
[ 80.810215] Failed to wait GUI idle while programming pipes. Bad things might happen.
[ 80.828174] radeon 0000:00:10.0: Saved 252827 dwords of commands on ring 0.
[ 80.829341] radeon 0000:00:10.0: (r100_asic_reset:2567) RBBM_STATUS=0x8002C135
[ 81.326863] radeon 0000:00:10.0: (r100_asic_reset:2588) RBBM_STATUS=0x8002C135
[ 81.820409] radeon 0000:00:10.0: (r100_asic_reset:2596) RBBM_STATUS=0x8002C135
[ 81.820436] radeon 0000:00:10.0: GPU reset succeed
[ 81.820441] radeon 0000:00:10.0: GPU reset succeeded, trying to resume
[ 81.820452] radeon 0000:00:10.0: (r100_asic_reset:2567) RBBM_STATUS=0x8002C135
[ 82.317955] radeon 0000:00:10.0: (r100_asic_reset:2588) RBBM_STATUS=0x8002C135
[ 82.811520] radeon 0000:00:10.0: (r100_asic_reset:2596) RBBM_STATUS=0x8002C135
[ 82.811541] radeon 0000:00:10.0: GPU reset succeed
[ 82.811594] radeon 0000:00:10.0: WB disabled
[ ...

Does disabling AGP help? Load the radeon module with agpmode=-1

Indeed that solve the symptoms. I discover this was also documented here:

https://wiki.debian.org/PowerPC/FAQ#How_do_I_get_graphics_working.3F

[...]
image=/boot/vmlinux
        label=Linux
        read-only
        initrd=/boot/initrd.img
        append="radeon.agpmode=-1 modprobe.blacklist=ams"
[...]

I am not sure what the 'ams' thingy is doing, but I am using it over here.

The funny thing is that dragging window and moving them around makes the pointer and the window out-of-sync. Still usable though after a while.

If AGP is simply not supported on PowerPC, it would be nice to have a clearer message (or at least a warning).

Thanks

(In reply to Mathieu Malaterre from comment #3)
> If AGP is simply not supported on PowerPC, it would be nice to have a
> clearer message (or at least a warning).

It is supported, it's just unstable on many PowerMacs.

A patch disabling AGP by default on PowerMacs or even PPC in general probably wouldn't be rejected. :)

Created attachment 123411
default to PCI for PowerPC

(In reply to Michel Dänzer from comment #4)
> (In reply to Mathieu Malaterre from comment #3)
> > If AGP is simply not supported on PowerPC, it would be nice to have a
> > clearer message (or at least a warning).
>
> It is supported, it's just unstable on many PowerMacs.
>
> A patch disabling AGP by default on PowerMacs or even PPC in general
> probably wouldn't be rejected. :)

Something like the patch: defaulttopci_powerpc.patch ? Should I submit it first on mesa-dev ?

FWIW on nouveau we just default agpmode=0 in a #ifdef __powerpc__. Perhaps the same thing can work for radeon.

(In reply to Ilia Mirkin from comment #7)
> FWIW on nouveau we just default agpmode=0 in a #ifdef __powerpc__. Perhaps
> the same thing can work for radeon.

Well radeon_agpmode is already set to 0 already[*]. My patch force to PCI(-1) when user did not specify any value.

[*]https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/radeon/radeon_drv.c#L173

(In reply to Mathieu Malaterre from comment #8)
> (In reply to Ilia Mirkin from comment #7)
> > FWIW on nouveau we just default agpmode=0 in a #ifdef __powerpc__. Perhaps
> > the same thing can work for radeon.
>
> Well radeon_agpmode is already set to 0 already[*]. My patch force to
> PCI(-1) when user did not specify any value.
>
> [*]https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/radeon/
> radeon_drv.c#L173

Oh, the logic is flipped from nouveau... on nouveau, -1 == autodetect and 0 == no agp. So in your case, just set it to -1 instead of 0 for powerpc. i.e.

#ifdef __powerpc__
int radeon_agpmode = -1;
#else
int radeon_agpmode = 0;
#endif

or something similar.

(In reply to Michel Dänzer from comment #4)
> (In reply to Mathieu Malaterre from comment #3)
> > If AGP is simply not supported on PowerPC, it would be nice to have a
> > clearer message (or at least a warning).
>
> It is supported, it's just unstable on many PowerMacs.
>
> A patch disabling AGP by default on PowerMacs or even PPC in general
> probably wouldn't be rejected. :)

Hi, Michel

I don't understand. I know about the coherency issues on some UniNorth bridges (DMA writes through the GART going directly to RAM, IIRC), but how did OS X cope with them? Did it also disable AGP transfers? If not, what can be done to fix this bug for real, instead of working around it? (I have a very vague memory that these hangs didn't happen before KMS, but I may be completely wrong.)
Also, on a somewhat related note, there are still issues with the Radeon (R600, not SI) DRM on big endian, as for https://bugs.freedesktop.org/show_bug.cgi?id=95015.

Thanks,

Rui

Also been hit by this bug on 2 of my 3 machines: PowerMac 7,3 (A1047) w. Radeon 9600 Pro and PowerBook 5,6 (A1106).

My PowerBook 5,8 (A1138) magically works with AGP! Which is interesting because both the 5,6 and the 5,8 use a Mobility Radeon 9700.

Changed in linux:
importance: Unknown → Medium
status: Unknown → Confirmed
ernsteiswuerfel (erhard-f) wrote :

Finally got around compiling a proper mainline Ubuntu 4.8-rc3 kernel. Unfortunately it does not boot into my root partition due to an btrfs error... So ATM no news if this freezing issue got fixed in more recent kernels.

ernsteiswuerfel (erhard-f) wrote :

After a reinstall with an ext4 / partition I finally got a 4.8.0-rc4 mainline build running. At least there's no instant crash any longer. The system was running for about 3 hours or so, but with some drm CP ring warnings.

tags: added: kernel-fixed-upstream
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
ernsteiswuerfel (erhard-f) wrote :

Tested todays new Ubuntu MATE ppc iso. Unfortunately this bug is still around and my PowerBook 5,6 still affected.

tags: added: kernel-bug-exists-upstream
removed: kernel-fixed-upstream
Artem (artem4) wrote :

This bloody bug happens not only on PowerPC. I have AMD Radeon 5670 graphic card. I have this bug on Ubuntu 16.10 x64 and i have it on Ubuntu 17.04 x64 development version. Now any fresh Linux version is almost unusable for me.

Already reported: https://bugs.freedesktop.org/show_bug.cgi?id=99195

And there: http://askubuntu.com/questions/858301/radeon-00000200-0-ring-0-stalled-for-more-than-10492msec

Marshall (mkiker2089) wrote :

How do I add the boot options and have them stick? I tried modifying the yaboot but I ended up breaking my install.

I can get it installed with the live radeon.agpmode=-1
then I was able to boot it by typing at the first boot Linux radeon.agpmode=-1

that's where it breaks down, I don't know how to make that change stick. I'm used to using Linux Mint which is similar, but just different enough that it breaks things when I try to adjust them.

K1773R (k1773r) wrote :

change /etc/yaboot.conf
run: sudo ybin -v

Marshall (mkiker2089) wrote :

I tried that and got a syntax error on reboot that I couldn't recover from. I'll look at it again.

K1773R (k1773r) wrote :

you'll have to add the parameter in the append section for the two entries, ie:

append="radeon.agpmode=-1"
or if you want the splash thingy
append="radeon.agpmode=-1 splash quiet"

Marshall (mkiker2089) wrote :

I put quotes around both, that must be what broke it. Then I tried to fix it using live CD to re-edit but I couldn't make it stick as the live CD couldn't update the bin. Mint always warns me of syntax errors so if this did as well I missed it.

I'll try it again. I might just switch back to Tiger though, nothing against Ubuntu (well Mint, but it's all the same) on a modern laptop. Antique computers can be a pain compared to modern ones.

Marshall (mkiker2089) wrote :

Got it fixed, thanks. Now I'm having other issues but I don't think they are related.

K1773R (k1773r) wrote :

your likely facing issues with 3D acceleration now. which is unrelated to this bug, anyway: till mesa gets an update, you have to specify a 16 bit color depth:

/etc/X11/xorg.conf
Section "Screen"
        Identifier "Default Screen"
        Monitor "Configured Monitor"
        Device "Configured Video Device"
        DefaultDepth 16
EndSection

Feel free to open new bugs and add me on the notification list to help you (and others reading it) about those bugs :)

ernsteiswuerfel (erhard-f) wrote :

K1773R: 16-bit color depth is no longer necessary since mesa 12.x, which got updated in Ubuntu MATE 16.04.2.

K1773R (k1773r) wrote :

nice, thanks for the info!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.