Ubuntu

No sound in linux-image-2.6.20-8-powerpc G4

Reported by Jonathan Hudson on 2007-02-24
50
Affects Status Importance Assigned to Milestone
hw-detect (Ubuntu)
Medium
Colin Watson
linux (Debian)
Fix Released
Unknown
linux-ports (Ubuntu)
Medium
Ubuntu PowerPC Architecture Team
linux-source-2.6.20 (Ubuntu)
Medium
Ubuntu PowerPC Architecture Team
linux-source-2.6.22 (Ubuntu)
Medium
Ubuntu PowerPC Architecture Team

Bug Description

Binary package hint: linux-image-2.6.20-6-powerpc

Audio plays (via any audio application) for about 3 seconds, then it blocks, and no further audio is heard until the player is killed.

Powerbook G4, c. 2002 vintage with snd_powermac.

Audio was fine in Edgy.

Example of blocked app:

jrh 5289 0.5 0.8 22072 4148 pts/0 SLl+ 20:43 0:00 ogg123 /home/shared/audio/cd/Berlioz/TeDeum/00.Te_Deum_Hymne.ogg

Snd Modules:

snd_powermac 49984 1
snd_aoa_i2sbus 24292 0
snd_pcm_oss 53984 0
snd_mixer_oss 20960 1 snd_pcm_oss
snd_pcm 95812 3 snd_powermac,snd_aoa_i2sbus,snd_pcm_oss
snd_page_alloc 11368 1 snd_pcm
snd_seq_dummy 4004 0
snd_seq_oss 40660 0
snd_seq_midi 10016 0
snd_rawmidi 29632 1 snd_seq_midi
snd_seq_midi_event 8192 2 snd_seq_oss,snd_seq_midi
snd_seq 61888 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer 26404 2 snd_pcm,snd_seq
snd_seq_device 9388 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
snd 69812 12 snd_powermac,snd_aoa_i2sbus,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore 8996 1 snd
snd_aoa_soundbus 7812 1 snd_aoa_i2sbus

this is known to effect the following macs (code name/numbers from cat /proc/cpuinfo)
PowerBook3,5 - TiBook 15 inch 1GHz
PowerMac3,5 - PowerMac G4 silver, 933 MHz (Audio: PowerMac Tumbler)

Jonathan Hudson (jh+lpd) wrote :

Further tests:

If I use a Logitech USB headphone set (usb-audio), and use OSS emulation, I do get sound. No other combination appears to give sound (other an a couple of seconds, then blockage).

Thanks for taking the time to report this bug. Unfortunately we can't fix it, because your description didn't include enough information.

Please include the information requested from https://help.ubuntu.com/community/DebuggingSoundProblems as separate attachments.

Changed in linux-source-2.6.20:
assignee: nobody → caravena
status: Unconfirmed → Needs Info
Jonathan Hudson (jh+lpd) wrote :
Jonathan Hudson (jh+lpd) wrote :
Jonathan Hudson (jh+lpd) wrote :
Jonathan Hudson (jh+lpd) wrote :
Jonathan Hudson (jh+lpd) wrote :
Jonathan Hudson (jh+lpd) wrote :
Jonathan Hudson (jh+lpd) wrote :
Jonathan Hudson (jh+lpd) wrote :

Requested files attached. Please note that these files as based on what has been the case of the last two or so years where /etc/modules contains an entry from snd-powermac. If this entry is removed from /etc/modules, then no sound driver is detected or loaded (an old feature, dating back to at least pre-Dapper).

If the machine is booted with an empty /etc/modules, then later snd_powermac is modprobed, the original symptoms are displayed; i.e. only a short burst (between 1 - 5 secs) of sound is heard, then the playing application blocks.

Previously, with snd-powermac loaded, this machine has played sound in all versions of Ubuntu except Feisty (which was installed today).

-jonathan

* Assigning to ubuntu-kernel-team

Changed in linux-source-2.6.20:
assignee: caravena → ubuntu-kernel-team
Jonathan Hudson (jh+lpd) wrote :

It would appear to be an upstream kernel issue.

kernel.org 2.6.20.1: Same fault
kernel.org 2.6.19.5: Sound works as expected (as it did in Edgy)

In order to maintain marital harmony, I shall stick with 2.6.19.5 unless anyone needs any further testing / debugging performed.

-jonathan

Changed in linux-source-2.6.20:
status: Needs Info → Confirmed
flower (otherego) wrote :

to be complete install ubuntu feisty rel 4 on my g4 no sound issue
i install same release, but kubuntu no sound car at all.

Jonathan Hudson (jh+lpd) wrote :

Just FYI, same problem in upstream 2.6.20.2 (and Ubuntu 2.6.20-9-powerpc)

sam tygier (samtygier) wrote :

same on powerbook 3,5 g4 (titanium)

if login sound is enabled then the login hangs. you need to run 'killall esd' to continue the boot

sam tygier (samtygier) wrote :

I did some testing this afternoon.
herd1 does not have this problem, herd2 does.

it seems that herd2 was the first herd with a 2.6.20 kernel.

Ben Collins (ben-collins) wrote :

Confirmed bugs should have their Importance set.

Changed in linux-source-2.6.20:
importance: Undecided → Medium
Michael Flaig (mflaig) wrote :

Any news on this matter?

Problem still there running 2.6.20-11-powerpc

Has been a while that sound is not working anymore on G3 and G4 Powermacs
Is this reported upstream if not a ubuntu problem?

sam tygier (samtygier) wrote :

still get the problem with 2.6.20-12

sam tygier (samtygier) wrote :

I have been going through old versions with git

6706860d711b83f628dc89eed70b2fac641af683 Ubuntu-2.6.20-0.0

sam@titania-test:~/kernel/ubuntu-2.6$ uname -a
Linux titania-test 2.6.20-1-ref-powerpc #1 Thu Mar 22 21:46:39 GMT 2007 ppc GNU/Linux

works.

when i use git bisect most version seem not to have debian/rules. so i have been using git reset --hard to get to versions that look like the might (by looking at git bisect visulize). is there a better way of doing this?

sam tygier (samtygier) wrote :

this bug also occurs with a vanilla 2.6.20.4 kernel

Jonathan Hudson (jh+lpd) wrote :

Just an FYI (and the devs probably already know this), but this is fixed in upstream 2.6.21-rc7. As well as sound working, this has the massive advantage that gnome-power-manager no longer works, thus allowing suspend and resume to work rather than locking up the machine.

sam tygier (samtygier) wrote :

jh, do know which patch fixed it?

i looked through http://kernel.org/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.21-rc7 and could not see anything obvious

thanks

Jonathan Hudson (jh+lpd) wrote :

sam,

I don't know. I fumbled upon a LKML posting (via Google) that suggested that this RC fixed some similar macpro sound issues, so it seemed worth a try.

-jh

Cannot get sound to work even after upgrading to 2.6.21-rc7 (and libasound2 1.0.14rc3) my Tibook 1 Ghz (Feisty)
@jh:
What version of 2.6.21-rc7 are you using/any patches applied?

Jonathan Hudson (jh+lpd) wrote :

I'm just going to plead insanity on this one. I can't get it to work (again). Either I'm hallucinating, or I'd installed dmasound_pmac or ...

Sorry for the noise.

-jh

libasound2 built with --enable-debug=yes:

(gdb) run Desktop/test_48.wav
Starting program: /usr/bin/aplay Desktop/test_48.wav
(no debugging symbols found)...[Thread debugging using libthread_db enabled]
[New Thread 805439280 (LWP 11360)]
Spelar WAVE 'Desktop/test_48.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

Sound stops after a couple of seconds ... I kill aplay:

Program received signal SIGINT, Interrupt.
[Switching to Thread 805439280 (LWP 11360)]
0x0fd2a9e0 in poll () from /lib/libc.so.6
(gdb) bt
#0 0x0fd2a9e0 in poll () from /lib/libc.so.6
#1 0x0fd2a99c in poll () from /lib/libc.so.6
#2 0x0ff46f34 in snd_pcm_wait (pcm=Variable "pcm" is not available.
) at pcm.c:2271
#3 0x0ff48f7c in snd_pcm_write_areas (pcm=0xffffffff, areas=0x7fc9f260, offset=268585248, size=1, func=0x1) at pcm.c:6487
#4 0x0ff5479c in snd_pcm_mmap_writei (pcm=0xffffffff, buffer=Variable "buffer" is not available.
) at pcm_mmap.c:186
#5 0x0ff403a0 in snd_pcm_writei (pcm=Variable "pcm" is not available.
) at pcm_local.h:401
#6 0x100058e8 in ?? ()

ScottMiller (stmiller) wrote :

I just compiled a 2.6.19.7 kernel and the snd-powermac driver works perfectly. Looks like a possible bug with the x.20 kernel and alsa.

I did not include the PowerMac dma sound support, as advised on the Gentoo PPC FAQs. All other components are as modules, as set by a pmac32_defconfig

Ubuntu Feisty
Powerbook3,5
Titanium IV
alsa 1.0.13 (built in the 2.6.19.7 kernel)

I'm having this problem on a G4 PowerMac (QuickSilver).

Scott, can you provide some minimal instructions? Something like the
kernel config file would be great.

--

On 5/1/07, ScottMiller <email address hidden> wrote:
> I just compiled a 2.6.19.7 kernel and the snd-powermac driver works
> perfectly. Looks like a possible bug with the x.20 kernel and alsa.
>
> I did not include the PowerMac dma sound support, as advised on the
> Gentoo PPC FAQs. All other components are as modules, as set by a
> pmac32_defconfig
>
> Ubuntu Feisty
> Powerbook3,5
> Titanium IV
> alsa 1.0.13 (built in the 2.6.19.7 kernel)
>
> --
> No sound in linux-image-2.6.20-8-powerpc G4
> https://bugs.launchpad.net/bugs/87652
> You received this bug notification because you are a direct subscriber
> of the bug.
>

ScottMiller (stmiller) wrote :

Probably a quick and dirty fix is to just install a past ubuntu kernel deb, like this one:

http://packages.ubuntu.com/edgy/base/linux-image-2.6.17-11-powerpc

Otherwise, I followed these instructions, roughly, with a 2.6.19.7 kernel from kernel.org:

http://ubuntuforums.org/showpost.php?p=1359285&postcount=5

but doing a
make pmac32_defconfig
instead of the g5_defconfig on that thread.

Then I made sure to uncheck the module
PowerMac dma sound support

so the sound configuration looks like this:

http://ubuntuforums.org/showpost.php?p=2572887&postcount=30

Otherwise, it's a stock pmac32_defconfig kernel config.

There's probably a more proper ubuntu-way of compiling your own kernel, but this works.

--------
FWIW I tried the newer 2.6.21 kernel, and varying releases of alsa with no luck. So seems that something happened in the 2.6.20 kernel.

Matteo Settenvini (tchernobog) wrote :

I'm seeing this problem today doing a brave (or stupid?) dist-upgrade to 7.10 with my iMac G5:

matteo@Dahlia:~$ uname -a
Linux Dahlia 2.6.22-3-powerpc64-smp #1 SMP Tue May 15 05:42:03 GMT 2007 ppc64 GNU/Linux

2.6.20-15-powerpc64-smp worked flawlessy with the snd-powermac driver.

My /proc/cpuinfo:

processor : 0
cpu : PPC970FX, altivec supported
clock : 799.999000MHz
revision : 3.0 (pvr 003c 0300)

timebase : 33333333
platform : PowerMac
machine : PowerMac8,1
motherboard : PowerMac8,1 MacRISC4 Power Macintosh
detected as : 338 (iMac G5)
pmac flags : 00000000
L2 cache : 512K unified
pmac-generation : NewWorld

Both snd-aoa and snd-powermac give no sound.

sam tygier (samtygier) wrote :

>doing a brave (or stupid?) dist-upgrade
just to note dist-upgrades are not recommended in ubuntu. see
http://www.ubuntu.com/getubuntu/upgrading

Matteo Settenvini (tchernobog) wrote :

>just to note dist-upgrades are not recommended in ubuntu. see
>http://www.ubuntu.com/getubuntu/upgrading

Yes, sorry: I used "update-manager -c -d", and not "apt-get dist-upgrade". I just wrote like that as a shortcut for what I wanted to say.

Pertaining to this bug: I also have to note that snd-aoa works well for me in 2.6.20-15-powerpc64-smp (better than snd-powermac, in fact). So the problem may lay there.

ScottMiller (stmiller) wrote :

> 2.6.20-15-powerpc64-smp worked flawlessy with the snd-powermac driver.

>Pertaining to this bug: I also have to note that snd-aoa works well for me in
> 2.6.20-15-powerpc64-smp (better than snd-powermac, in fact). So the problem may lay there.

Matteo:

This bug report is for the 32bit ppc kernel, which has a bug with the snd-powermac module which older ppc hardware uses. Snd-aoa is recommended for newer ppc hardware, esp G5 machines. So that is the module you should use.

sam tygier (samtygier) wrote :

the bug is still present on in gutsy
$ uname -a
Linux titania-test 2.6.22-5-powerpc #1 Fri May 18 23:59:52 GMT 2007 ppc GNU/Linux

(clean feisty final install, dist-upgraded to gutsy)

Changed in linux-source-2.6.22:
assignee: nobody → ubuntu-powerpc
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Changed in linux-source-2.6.20:
assignee: ubuntu-kernel-team → ubuntu-powerpc
Ben Collins (ben-collins) wrote :

I suspect the bug in gutsy is different. Please see bug #115597 for more details.

Changed in linux-source-2.6.22:
assignee: ubuntu-powerpc → nobody
status: Confirmed → Rejected
sam tygier (samtygier) wrote :

I tried removing snd-powermac from /etc/modules. this cause alsa to not see any sound card at all

sam@titania-test:~$ aplay /usr/share/sounds/login.wav
ALSA lib confmisc.c:670:(snd_func_card_driver) cannot find card '0'
ALSA lib conf.c:3500:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device
ALSA lib confmisc.c:391:(snd_func_concat) error evaluating strings
ALSA lib conf.c:3500:(_snd_config_evaluate) function snd_func_concat returned error: No such device
ALSA lib confmisc.c:1070:(snd_func_refer) error evaluating name
ALSA lib conf.c:3500:(_snd_config_evaluate) function snd_func_refer returned error: No such device
ALSA lib conf.c:3968:(snd_config_expand) Evaluate error: No such device
ALSA lib pcm.c:2145:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:550: audio open error: No such device

I also tried adding
snd-aoa-codec-tas
snd-aoa-i2sbus
to /etc/modules

this gave the same error. loading the tas module however does result in dmesg saying
[ 571.607450] snd-aoa-codec-tas: found 'deq' node
[ 571.608655] snd-aoa-codec-tas: tas found, addr 0x35 on /pci@f2000000/mac-io@17/i2c@18000/deq@6a

Bug #115597 is on G5. For newer powermacs (including G5 and some G4) snd-aoa (http://johannes.sipsolutions.net/Projects/snd-aoa) seems to have taken over frm snd_powermac. but according to the reply to http://ozlabs.org/pipermail/linuxppc-dev/2007-May/035089.html it does not (yet) support older g4 powerbooks yet.

in a private email johannes has said
"I don't think such old machines use snd-aoa. Try

find /proc/device-tree -name layout-id

if something shows up snd-aoa may be to blame, otherwise you need to use
snd-powermac."

"find /proc/device-tree -name layout-id" returns nothing on my PowerBook3,5

Matteo Settenvini (tchernobog) wrote :

I still can't get any sound in linux-2.6.22-5-ppc64-smp, using snd-aoa (nor using snd-powermac, for what matters).
This is a major bug affecting also linux-source-2.6.22 from my point of view.
The last working kernel I can trace back working for me, is 2.6.20-15-powerpc64-smp.

Machine specs are those of comment #32.

Matteo Settenvini (tchernobog) wrote :

Sound is back in 2.6.22-7-powerpc64-smp!

Maybe it was due to this:

commit 41e904dee22066ae7ac3a7f695b2c8bd43ce4e04
Author: Benjamin Herrenschmidt <email address hidden>
Date: Tue Jun 19 14:37:39 2007 +1000

    [POWERPC] Fix snd-powermac refcounting bugs

    The old snd-powermac driver has some serious refcounting issues when
    initialisation fails, which is the case on all new machines with
    a layout-id since those are handled by the new snd-aoa driver.

    Some of those bugs seem to have been under the radar for some time
    (like double pci_dev_put), but one was actually added in 2.6.22 with
    Stephen attempt at teaching refcounting to the driver which didn't
    do it at all.

    This patch fixes both, thus removing all sort of kref errors that
    would happen if that driver gets loaded on a G5 machine or a recent
    PowerBook due to OF nodes left around with a 0 refcount.

    Signed-off-by: Benjamin Herrenschmidt <email address hidden>
    Signed-off-by: Paul Mackerras <email address hidden>

sam tygier (samtygier) wrote :

Matteo Settenvini

judging you are running on a G5, this bug is for G4 mac that can't use the aoa modules.

sam tygier (samtygier) wrote :

Matteo Settenvini

see Bug #115597 (please can you comment on it that you think it is fixed)

ScottMiller (stmiller) wrote :

New vanilla 2.6.22 kernel still has this bug. Any ideas from the Ubuntu PowerPC team? I would be glad to test anything on my 867Mhz Powerbook G4. I opened a bug report on alsa which has not sparked any news: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3126

sam tygier (samtygier) wrote :

also occurs in debain http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=436723
still occurs in gutsy (i have to use workaround from Bug #131150 to boot gutsy cds)

Dave Vasilevsky (djvasi) wrote :

I'm running on a G4 Quicksilver (Tumbler audio), and this bug is still present in vanilla kernels (and Ubuntu, Debian, Fedora, and every other distro I've tried lately). I used git-bisect on a vanilla kernel and it spat out this commit:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=68a64357d15ae4f596e92715719071952006e83c
    [POWERPC] Merge 32 and 64 bits asm-powerpc/io.h
    Benjamin Herrenschmidt [Sun, 12 Nov 2006 22:27:39 +0000 (09:27 +1100)]
    powerpc: Merge 32 and 64 bits asm-powerpc/io.h

    The rework on io.h done for the new hookable accessors made it easier,
    so I just finished the work and merged 32 and 64 bits io.h for arch/powerpc.

If I add some logging in sound/ppc/pmac.c, I see that snd_pmac_pcm_update (in sound/ppc/pmac.c) eventually gets a struct dbdma command with xfer_status == 0x8088, which as far as I can tell is nowhere near a valid value. Normally it should continue to get xfrer_status == RUN | ACTIVE, ie: 0x84.

I unfortunately am quite new to the kernel, so I have no idea how to continue looking for a fix. I guess I'll just point benh over here and see if he's able to help.

sam tygier (samtygier) wrote :

this is still present in 2.6.22. all discussion, and its appearance in all distros suggests that this is a kernel bug that has not been fixed yet

Changed in linux-source-2.6.22:
status: Invalid → Confirmed
ScottMiller (stmiller) wrote :

For the heck of it I tried kernel 2.6.23.8 and it still has the same problem. I then manually updated alsa to the latest 1.0.15 since there were a couple of notes in the changelog of fixes for the snd-powermac module. But still no fix with that new alsa either.

Changed in linux-source-2.6.22:
assignee: nobody → ubuntu-powerpc
thh (th-huth) wrote :

I have the same problem on my PowerMac G4. After reading the note from Dave Vasilevsky, I also checked the status in the snd_pmac_pcm_update function, and it seems that the failing DMA transfer has the status DEAD.
I've then checked the old OSS powermac sound driver in sound/oss/dmasound/dmasound_awacs.c (which used to work with newer kernels) - and yes, this driver handles DEAD DMA transfers!

So I've spent some time porting the DEAD DMA transfer handling code from the old driver to the new one - and now sound it working for me again with kernels 2.6.22 / Ubuntu 7.10.

I've attached my patch, would be nice if other users here could try it out, too!

Ka-Hing Cheung (kahing) wrote :

This patch works for me

Works for me too on a TiBook still running Feisty (Patched Gutsy kernel 2.6.22.9)...
Great work!

Dave Vasilevsky (djvasi) wrote :

thh, your patch works for me on git HEAD (1a1b285c24e1468afe82b09330dde5192a6e0013). Thanks so much for fixing this! Would you mind telling me how the dmasound_awacs.c fix came to your attention? I was completely stuck when I tried looking into this earlier, maybe I'll learn something :-)

I'm also wondering whether this counts as a fix or a workaround. It's somewhat weird that we're now seeing the same problem in the ALSA driver as OSS used to have--but for years these DEAD DMA transfers never showed up in ALSA.

ScottMiller (stmiller) wrote :

Thank you thh for your patch! Works okay on my TiBook 867Mhz running Feisty with a 2.6.23.13 kernel (have playback now), but there are constant pops while playing back. (It sounds like popcorn.) Alsa version is that kernel is 1.0.13. The popping seems to increase in intensity when moving the cursor. I may go back to a 2.6.22 kernel if that seems to be working better.

Dave Vasilevsky (djvasi) wrote :

ScottMiller, before applying the patch how quickly did sound tend to die on your TiBook? On my Quicksilver sound would work for a minute or two before ceasing, and with the patch I think I heard a couple of small pops but nothing very noticeable. If sound fails very quickly on your TiBook that could explain why you're hearing so many pops.

ScottMiller (stmiller) wrote :

Hi Dave with the patch the sound plays back and does not die out. But there are those tiny pops throughout, continuously. In the kernel config I specified a low-latency kernel which could be the culprit. (?)

thh (th-huth) wrote :

 Hi Dave!

> Thanks so much for fixing this! Would you mind telling me how the dmasound_awacs.c fix came to your attention? I was completely stuck when I tried looking into this earlier, maybe I'll learn something :-)

Pure luck :-) I am also completely new to kernel hacking... I read your message about the xfer_status in snd_pmac_pcm_update, added some debugging printks in my sources in this function, then found out that the DEAD bit is set as soon as the sound dies. Since I knew that the old OSS driver was still working with newer kernels (at least 2.6.20, I was not able to use it in 2.6.22 anymore), I peeked into the sources there and spotted the DEAD DMA transfer handling in it.

> I'm also wondering whether this counts as a fix or a workaround. It's somewhat weird that we're now seeing the same problem in the ALSA driver as OSS used to have--but for years these DEAD DMA transfers never showed up in ALSA.

Agreed, maybe it's just a workaround. Maybe this patch from Ben Herrenschmidt is causing some troubles with DMA that haven't been there before? Looking at Ben's patch, there is some stuff related to DMA and IDE (which also uses DMA) in it... have you already been in contact with Ben Herrenschmidt because of this?

thh (th-huth) wrote :

 Hi Scott!

All i can say that sound is now working quite good on my system again with that patch. I don't have a second Mac for testing, and I am also new to this kernel stuff, so I don't have a clue what could cause these plopping noises on your system. There is a disabled printk line in the snd_pmac_pcm_dead_xfer function. You could enable that line, recompile and then "tail -F /var/log/messages" to see how often the DMA transfers die on your system. If they die very often, this might be the cause.

Jonathan Hudson (jh+lpd) wrote :

Almost one year one, it's good to have sound again on the PPC. Like Scott, I get "crackle" if I move the mouse vigorously, just like I recall with dmasound (this is a machine that previously, sound locked up in < 10secs).

I also recall someone (Dave?) asked BenH about the issue on LKML some time ago. Ben said "bug me is a few weeks if you don't hear from me". We never did (hear or bug him).

-jh

Jonathan Hudson (jh+lpd) wrote :

It was Dave (wrt BenH) <http://lists.openwall.net/linux-kernel/2007/09/02/91>. Did you ever hear anything?

sam tygier (samtygier) wrote :

thanks thh. (who are you? are you in the forums?)

i bugged benh a few times but then i felt that i was pestering him, so i stopped. somebody should let him know of the new patch. and quick before 2.6.24 comes out.

the patch also works on 2.6.20 as well (i put some instructions on the forum http://ubuntuforums.org/showthread.php?p=4136327#post4136327 )

i also get the popping when moving the mouse (on a 1ghz 15inch tibook)

Dave Vasilevsky (djvasi) wrote :

I tried a low-latency kernel (PREEMPT, 1000HZ) just to investigate ScottMiller's hunch that it's related to the popping. It doesn't seem to be the case on my Mac. I still get very few (if any) pops, and they're barely noticeable.

jh, sam: I already send benh a mail about the patch.

Changed in linux:
assignee: nobody → ubuntu-powerpc
importance: Undecided → Medium
status: New → Triaged

At this stage, I haven't reproduced that. Paul Mackerras has a QuickSilver and tells me that with current upstream, sound seems to work just fine... I'm a little bit at a loss trying to understand what is happening, it would help if I could reproduce of course.

We could implement support for recovering from DEAD in snd-powermac I suppose. But that's probably just the consequence of something else. I wonder if maybe we are tweaking the DBDMA lists the wrong way around or something like that.

Is that specific to CONFIG_PREEMPT or some HZ setting ?

Dave Vasilevsky (djvasi) wrote :

Hi Ben, thanks for dropping by.

At least on my Mac, the bug occurs both with and without PREEMPT, and with at least two different HZ settings. Also happens with every (post-2.6.20) distro I've tried, as well as the default pmac vanilla kernel, so it's not looking too config-specific. Sometimes it can take up to a couple of minutes for the sound to hang--maybe Paul didn't give it enough time?

Anyhow I've attached my current kernel config so Paul can try it just to make sure. Or if he'd prefer I'll duplicate his kernel; or he could even just send me the kernel and module binaries.

sam tygier (samtygier) wrote :

can everyone effected add their mac model to bug description.

description: updated
thh (th-huth) wrote :

I encountered this bug on my silver PowerMac G4:

cat /proc/cpuinfo
[...]
machine : PowerMac3,5
motherboard : PowerMac3,5 MacRISC2 MacRISC Power Macintosh
detected as : 69 (PowerMac G4 Silver)
[...]

cat /dev/sndstat
[...]
Card config:
PowerMac Tumbler (Dev 21) Sub-frame 0
Audio devices:
0: PowerMac Tumbler
[...]

I am currently using the normal Ubuntu 7.10 kernel (linux 2.6.22), without PREEMPT, and using CONFIG_HZ=250.
I also had this problem on Ubuntu 7.04 with kernel 2.6.20.
I did _not_ have this problem on Ubuntu 6.10 with kernel 2.6.17 !

description: updated
sam tygier (samtygier) wrote :

Ben, is there any further information we can give you? I could give you shell access to my powerbook3,5 if that would be usefull (if so send me a private email).

sam tygier (samtygier) wrote :

now that the ubuntu 2.6.24 kernel boot on my powerbook, i can confirm that it is still broken :-(

digger vermont (digver) wrote :

With a powerbook g4 I've had the same problem for the last several kernels and is still a problem with 2.6.24-7-powerpc.

I've discovered that the powerpc-smp image does not have the problem, audio plays fine. I have been using vmlinux-2.6.22-14-powerpc-smp with no audio problems.

Unfortunatly 2.6.24-powerpc-smp is not configured with IDE_PMAC so I can't test it.

~$ cat /proc/cpuinfo
processor : 0
cpu : 7455, altivec supported
clock : 667.000000MHz
revision : 0.1 (pvr 8001 0201)
bogomips : 66.56
timebase : 33331265
platform : PowerMac
machine : PowerBook3,4
motherboard : PowerBook3,4 MacRISC2 MacRISC Power Macintosh
detected as : 73 (PowerBook Titanium III)
pmac flags : 0000001b
L2 cache : 256K unified
pmac-generation : NewWorld

z0ul (z0ul4i502) wrote :

Slackintosh user here. I lost sound between kernels 2.6.21 and 2.6.22. The fix was to compile i2c-powermac into the kernel, instead of as a module. This ensured the i2c subsystem was initialized before the snd-aoa module was loaded, which allowed the tas sound device to be detected properly.

Not sure what the underlying issue was (udev?) but this resolved the issue for me.

Quick specs:

PowerBook5,4 (15" 1.5GHz G4 AlBook)
kernel 2.6.24.2

sam tygier (samtygier) wrote :

z0ul, if the snd-aoa works for you then you have newer hardware, and so this bug does not apply. thanks for the info anyway.

z0ul (z0ul4i502) wrote :

sam: I see that now... I thought I was on to something, since my symptoms were similar, and especially since my machine doesn't show up on the list of supported machines types at: http://johannes.sipsolutions.net/Projects/snd-aoa

Oh well. I hope you all find a solution, I'm sure you're even more frustrated than I was... :-/

mog (launchpad-net-mog) wrote :

I have this problem. Sound plays for less than a second before the app freezes.

$ cat /proc/cpuinfo
processor : 0
cpu : 7455, altivec supported
clock : 800.000000MHz
revision : 0.1 (pvr 8001 0201)
bogomips : 79.83
timebase : 33331495
platform : PowerMac
machine : PowerBook3,4
motherboard : PowerBook3,4 MacRISC2 MacRISC Power Macintosh
detected as : 73 (PowerBook Titanium III)
pmac flags : 0000001b
L2 cache : 256K unified
pmac-generation : NewWorld

digger vermont (digver) wrote :

I am happily listening to music on my powerbook g4. For me the linux-powerpc-smp images work fine.

ii linux-image-2.6.24-12-powerpc 2.6.24-12.19 -- audio stalls after a few seconds.
ii linux-image-2.6.24-12-powerpc-smp 2.6.24-12.19 -- audio works fine.

Has anyone else had luck getting audio to work by using the smp image? I've been using the smp kernel to get audio working since the problem first started.

I've attached the results of 'diff config-2.6.24-12-powerpc config-2.6.24-12-powerpc-smp'.
There's nothing easy that I can spot that make a difference.

~$ cat /proc/cpuinfo
processor : 0
cpu : 7455, altivec supported
clock : 667.000000MHz
revision : 0.1 (pvr 8001 0201)
bogomips : 66.56

total bogomips : 66.56
timebase : 33331265
platform : PowerMac
machine : PowerBook3,4
motherboard : PowerBook3,4 MacRISC2 MacRISC Power Macintosh
detected as : 73 (PowerBook Titanium III)
pmac flags : 0000001b
L2 cache : 256K unified
pmac-generation : NewWorld

driven1 (dbaldwin1911) wrote :

Can I install this directly (I got sound working in gutsy by install an earlier kernel as descibed above). Now that I'm experimenting with Hardy, I have no sound again. Can I download linux-image-2.6.24-12-powerpc-smp 2.6.24-12.19 and install the deb or install it through Synaptic? There are warnings about installing the meta package, but I'm not sure that I should be concerned with that. Thanks.

btw, here's my cpu info

processor : 0
cpu : 7455, altivec supported
clock : 867.000000MHz
revision : 0.3 (pvr 8001 0303)
bogomips : 86.51
timebase : 33331035
platform : PowerMac
machine : PowerBook3,5
motherboard : PowerBook3,5 MacRISC2 MacRISC Power Macintosh
detected as : 80 (PowerBook Titanium IV)
pmac flags : 0000001a
L2 cache : 256K unified
pmac-generation : NewWorld

digger vermont (digver) wrote :

On Mon, 2008-03-10 at 04:30 +0000, driven1 wrote:
> Can I install this directly (I got sound working in gutsy by install an
> earlier kernel as descibed above). Now that I'm experimenting with
> Hardy, I have no sound again. Can I download linux-image-2.6.24-12
> -powerpc-smp 2.6.24-12.19 and install the deb or install it through
> Synaptic? There are warnings about installing the meta package, but I'm
> not sure that I should be concerned with that. Thanks.

These are probably not "approved" methods, but you gotta do what works.

You should be able install linux-powerpc-smp.

sudo aptitude install linux-powerpc-smp

Or use what ever package manager you like. That will install the image
and related module pkgs.

If you're keeping a gutsy image around you may want to add an entry
to /etc/yaboot.conf so it can easily be booted. I have:

image=/boot/vmlinux-2.6.22-14-powerpc-smp
 label=22.14-smp
 read-only
 initrd=/boot/initrd.img-2.6.22-14-powerpc-smp

I also usually check the links in /boot to make sure they point to what
I want. Look at vmilinux, vmlinux.old, initrd.img, and initrd.img.old
Currently my boot directory looks like this:

-rw-r--r-- 1 root root 398880 2007-10-14 19:49
abi-2.6.22-14-powerpc-smp
-rw-r--r-- 1 root root 427386 2008-03-07 23:35 abi-2.6.24-12-powerpc
-rw-r--r-- 1 root root 430402 2008-03-07 23:37
abi-2.6.24-12-powerpc-smp
-rw-r--r-- 1 root root 63973 2007-10-14 19:49
config-2.6.22-14-powerpc-smp
-rw-r--r-- 1 root root 72400 2008-03-07 23:35 config-2.6.24-12-powerpc
-rw-r--r-- 1 root root 72077 2008-03-07 23:37
config-2.6.24-12-powerpc-smp
lrwxrwxrwx 1 root root 32 2008-03-09 11:14 initrd.img ->
initrd.img-2.6.24-12-powerpc-smp
-rw-r--r-- 1 root root 8963197 2008-02-26 16:38
initrd.img-2.6.22-14-powerpc-smp
-rw-r--r-- 1 root root 9115394 2008-03-09 10:50
initrd.img-2.6.24-12-powerpc
-rw-r--r-- 1 root root 9188312 2008-03-10 09:27
initrd.img-2.6.24-12-powerpc-smp
lrwxrwxrwx 1 root root 28 2008-03-09 11:15 initrd.img.old ->
initrd.img-2.6.24-12-powerpc
-rw-r--r-- 1 root root 0 2008-02-26 16:36
initrd.img-vmlinux-2.6.22-14-powerpc-smp.new
-rw-r--r-- 1 root root 774125 2007-10-14 19:49
System.map-2.6.22-14-powerpc-smp
-rw-r--r-- 1 root root 835825 2008-03-07 23:35
System.map-2.6.24-12-powerpc
-rw-r--r-- 1 root root 854309 2008-03-07 23:37
System.map-2.6.24-12-powerpc-smp
lrwxrwxrwx 1 root root 29 2008-03-09 11:16 vmlinux ->
vmlinux-2.6.24-12-powerpc-smp
-rw-r--r-- 1 root root 4819134 2007-10-14 19:49
vmlinux-2.6.22-14-powerpc-smp
-rw-r--r-- 1 root root 5117249 2008-03-07 23:35
vmlinux-2.6.24-12-powerpc
-rw-r--r-- 1 root root 5315723 2008-03-07 23:37
vmlinux-2.6.24-12-powerpc-smp
lrwxrwxrwx 1 root root 25 2008-03-09 11:16 vmlinux.old ->
vmlinux-2.6.24-12-powerpc

Then of course you have to select the image when you boot.

If you got all that done you should be fine. Let me/us know if it
works.

Have Fun,

digger

thh (th-huth) wrote :

I've tested an Ubuntu Linux SMP kernel today (2.6.22-14-powerpc-smp), and I can confirm that sound is working again with this kernel!
 (I have a Silver PowerMac G4 and sound was not working with the normal non-SMP kernel)

driven1 (dbaldwin1911) wrote :

After trashing my install three times, finally success. I've installed 2.6.24-12-powerpc-smp on my Ti867 Powerbook in Hardy, and I can confirm that sound now works for the first time since installing 2.6.17 in Gutsy. I've only tried it on a couple of file types because I still have codecs to find and load, however, I have sound now working without any other patching or work arounds. I did add snd-powermac to /etc/modules prior to the install. I can also confirm that sound did not work in the non-SMP 2.6.24-12 kernel.

 Thanks for the help.

driven1 (dbaldwin1911) wrote :

I can't get sound working from youtube nor from my mp3s. They all worked under Gusty. Anyone encountered this problem?

driven1 (dbaldwin1911) wrote :

Another side effect is that I no longer have the ability to put the Powerbook to sleep since I installed the smp

Jonathan Hudson (jh+lpd) wrote :

I also have sound with -smp. Suspend / resume also works if I do the following (see also <https://bugs.launchpad.net/bugs/144305>) :

* Disable gnome-power-manager. I find rm -f /usr/bin/gnome-power-manager on a regular basis is the best way;

* Using pbbuttonsd, have suspend.d / resume.d scripts that double switch consoles on both suspend and resume;

* Works even with compiz.

-jh

marshall (marshall-his) wrote :

I've also had success with adding the -smp module to Fiesty to enable sound on Quicksilvers. However, When I try it on a dual-processor Quicksilver it enables the second CPU as it should but doesn't fix the sound. Any suggestions?

Roy

sam tygier (samtygier) wrote :

seems the patch has been accepted upstream :-)
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=436723

thanks thh

I'm having the sameaudio problems with this kernel.... Sound is great over 4-5 then the app crashes.

Anybody could help me? There's a solution?

Ty for the help.

Obs: kernel 2.6.24-18powerpc

Changed in linux:
status: Unknown → Fix Released

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

The 18 month support period for Feisty Fawn 7.04 has reached it's end of life - http://www.ubuntu.com/news/ubuntu-7.04-end-of-life . As a result we are closing the linux-source-2.6.20 task. I'm also reassigning this to the 'linux-ports' package. It would be great to know if this is still an issue with the most recent Intrepid release. Thanks.

Changed in linux-source-2.6.20:
status: Confirmed → Won't Fix
Changed in linux:
status: Triaged → Incomplete
carvinzager (carvinzager) wrote :

I installed Intrepid on my G4 PowerBook this morning (an upgrade from Hardy). The good news is, Intrepid correctly recognized my Airport card and put me on my home wireless connection.

The bad news is, sound is still missing. I loaded a DVD under VLC, good video but no sound. And the speaker icon at the top of the screen still shows a red X and reports "No volume control GStreamer plugins and/or devices found - despite Synaptic Package Manager showing a good install of virtually GStreamer option that exists.

I'll try editing the /etc/... file and see if that works. This is a bug that has taken way waaaay too long to be fixed.

Doug Clark (Sacramento)

carvinzager (carvinzager) wrote :

OK - double good news.

I did a sudo gedit on the /etc/modules file, and added "snd-powermac". On reboot, sound works perfectly.

Yeah!! Finally!!!

Doug Clark

P.S. I'm running a 12" titanium PowerBook G4. I've got two partitions: 5GB formatted as Mac OS Extended (so that the G4 will boot properly, but with no actual installation of OS X; the partitioning was done by Disk Utility on the install disks I have for my new MacBook Pro), and the remaining 35GB as unallocated (Hardy installed without a hitch into this second partition, and accepted the upgrade to Intrepid equally well).

Try adding snd-powermac to the /etc/modules file and reboot. You may
also need to change the sound to PC Speaker. I do that regularly to
fix G3/G4 macs when sound isn't present

roy

At 12:28 PM 11/21/2008, you wrote:
>I installed Intrepid on my G4 PowerBook this morning (an upgrade from
>Hardy). The good news is, Intrepid correctly recognized my Airport card
>and put me on my home wireless connection.
>
>The bad news is, sound is still missing. I loaded a DVD under VLC, good
>video but no sound. And the speaker icon at the top of the screen still
>shows a red X and reports "No volume control GStreamer plugins and/or
>devices found - despite Synaptic Package Manager showing a good install
>of virtually GStreamer option that exists.
>
>I'll try editing the /etc/... file and see if that works. This is a bug
>that has taken way waaaay too long to be fixed.
>
>Doug Clark (Sacramento)
>
>--
>No sound in linux-image-2.6.20-8-powerpc G4
>https://bugs.launchpad.net/bugs/87652
>You received this bug notification because you are a direct subscriber
>of the bug.

Colin Watson (cjwatson) wrote :

I only just noticed https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/87652/comments/40 - sorry about that. The installer hadn't been putting snd-powermac into /etc/modules because of the lock-up on G5s, but I hadn't noticed that this was fixed. I'll put it back in for Jaunty.

Changed in hw-detect:
assignee: nobody → kamion
importance: Undecided → Medium
status: New → Triaged
Colin Watson (cjwatson) on 2008-11-24
Changed in hw-detect:
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hw-detect - 1.70ubuntu3

---------------
hw-detect (1.70ubuntu3) jaunty; urgency=low

  * Reinstate snd-powermac for i2s-a devices since apparently the lock-up
    has been fixed (LP: #87652).

 -- Colin Watson <email address hidden> Thu, 27 Nov 2008 17:46:21 +0000

Changed in hw-detect:
status: Fix Committed → Fix Released
David S. (d-sylva) wrote :

Can anyone else confirm that this problem disappears under the Intrepid kernel? (After adding snd-powermac to /etc/modules, of course.)

Before upgrading my kernel, I'd like to know that carvinzager isn't the only one who has found audio happiness using the Intrepid kernel.

louvann (tmpp-att) wrote :

I have a G4 MDD 1.25 dual, Live CD install of Hardy, adding smp, upgraded to Intrepid. The problem still exists. I see un-edited file has an underscore whereas the prior comments have a dash for snd-powermac.

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

fuse
snd_powermac
apm_emu
sbp2
therm_windtunnel

louvann (tmpp-att) wrote :

Revision to "no' audio. If I max the audio controls, AND I plug in amplified speakers at max volume control, then I can barely hear the desired audio, however quite weak. I guess no doesn't mean none.

Just updated to jaunty on Power G5. Everything was working on intrepid. Now, no sound. And no visible errors. Alsa still reports SoundByLayout card - but produces no sound at all. Is is the same issue or should I open another one?

David S. (d-sylva) wrote :

No, G5's use a different sound module than G4's, so that's probably a different problem.

Luke Yelavich (themuso) wrote :

Open up alsamixer in a terminal and check your volume levels. There has been a lot of bugs about sound levels not being turned up/muted recently.

thh (th-huth) wrote :

I just installed Ubuntu 9.04 on my G4 Silver PowerMac, with vmlinux-2.6.28-6-powerpc kernel (NOT the smp version!), And yes, sound is working completely right again. I think this bug can now be closed for the new Ubuntu version.

Onkar Shinde (onkarshinde) wrote :

Just did a fresh install of Jaunty on my ibook G4. Sound works out of box.

Luke Yelavich (themuso) wrote :

Marking fixed due to comments.

Changed in linux-ports (Ubuntu):
status: Incomplete → Fix Released
Sergio Zanchetta (primes2h) wrote :

The 18 month support period for Gutsy Gibbon 7.10 has reached its end of life -
http://www.ubuntu.com/news/ubuntu-7.10-eol . As a result, we are closing the
linux-source-2.6.22 kernel task.

Changed in linux-source-2.6.22 (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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