TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
Subsystems (2)
(Message cross-posted to several lists, please do _NOT_ reply to all of them).
NOTE: Owners of _OTHER_ Apple laptops that could already sleep, like earlier iBooks, or Titanium PowerBooks, please test this patch as well for regression. More specifically, test if sleep still works, X/DRI, and backlight control as I have made significant changes to radeonfb in ways that could affect those areas.
NOTE2: This is still quite experimental, be careful if something goes wrong (like lots of oopses or crashes on wakeup), you'd rather hard-restart the machine right away than let corrupted memory buffers be written back to your disk ;)
First, let's give credit where it's due, as a lot of the work on the original Aluminium PowerBook sleep code was done by Paul Mackerras, happy owner of one of these beasts, and thanks to Rob Weir too who gave me his iBook G4 for a few days, just long enough to get the stuff working...
So here's the new patch, it replaces the previous one for Aluminium PowerBooks, and is still against 2.6.9. I'll do something against 2.6.10 when that one is out (it's a bit late to get that merged with Linus, 2.6.10 is in freeze mode now) and I hope to get all of that in 2.6.11.
The support for sleep on desktop G4s & dual CPU machines, including support for "hotplug CPU" (allowing to put a CPU to sleep dynamically) for dual machines isn't in this patch neither, it will be coming spearately. It will only support one desktop video card at first anyway, though it will be possible to extend that over time.
Get it at:
http://gate.crashing.org/~benh/albook-ibookg4-sleep.diff
Enjoy !
Ben.
Quoted 2 lines · Benjamin Herrenschmidt
(Message cross-posted to several lists, please do _NOT_ reply to all of them).
I forwarded it to [email protected] too.
Since I started using the previous patch and actually suspending, I've been seeing the GNOME panel and window list die frequently, and occasionally other X apps. When X apps have died which were started from the command line it seemed to be a spurious SIGPIPE, strangely.
I don't _think_ I've ever seen it immediately after booting; only after suspend/resume. But that could be just a coincidence. Likewise the way it started when I added the sleep patch _could_ just be a coincidence -- I was still running Fedora rawhide and updating other packages (and there were other kernel changes) at that time, so a lot of other things changed too... but has anyone else seen similar behaviour?
Signature · 1 line
dwmw2
Quoted 11 lines · David Woodhouse
Quoted 2 lines · Benjamin Herrenschmidt
(Message cross-posted to several lists, please do _NOT_ reply to all of them).
I forwarded it to [email protected] too.
Since I started using the previous patch and actually suspending, I've been seeing the GNOME panel and window list die frequently, and occasionally other X apps. When X apps have died which were started from the command line it seemed to be a spurious SIGPIPE, strangely.
Quoted 6 lines
I don't _think_ I've ever seen it immediately after booting; only after suspend/resume. But that could be just a coincidence. Likewise the way it started when I added the sleep patch _could_ just be a coincidence -- I was still running Fedora rawhide and updating other packages (and there were other kernel changes) at that time, so a lot of other things changed too... but has anyone else seen similar behaviour?
Try the new patch. Note that I posted a second one today, right after the first one, that fixes a engine lockup bug (see my second mail).
The original patch had a bug where some of the CPU "HID" registers weren't properly restored for 7447A type CPUs. If you had one of these, it could explain the issue.
Ben.
Quoted 5 lines · Benjamin Herrenschmidt
NOTE: Owners of _OTHER_ Apple laptops that could already sleep, like earlier iBooks, or Titanium PowerBooks, please test this patch as well for regression. More specifically, test if sleep still works, X/DRI, and backlight control as I have made significant changes to radeonfb in ways that could affect those areas.
Everytime my Pismo wakes up I have the following:
Badness in enable_irq at kernel/irq/manage.c:106
Call trace: [c0006db4] dump_stack+0x18/0x28 [c0004dfc] check_bug_trap+0x84/0xac [c0004f84] ProgramCheckException+0x160/0x1a0 [c00044e0] ret_from_except_full+0x0/0x4c [c002f8dc] enable_irq+0xa0/0xa8 [c0205570] ohci_pci_resume+0xe4/0xfc [c01fc018] usb_hcd_pci_resume+0xb0/0x114 [c013a9f0] pci_device_resume+0x4c/0x50 [c0181474] resume_device+0x44/0x4c [c01815ac] dpm_resume+0x130/0x148 [c01815fc] device_resume+0x38/0x78 [c0424ac8] 0xc0424ac8 [c0424fb0] 0xc0424fb0 [c042581c] 0xc042581c [c0064680] sys_ioctl+0xdc/0x2f4 Badness in enable_irq at kernel/irq/manage.c:106 Call trace: [c0006db4] dump_stack+0x18/0x28 [c0004dfc] check_bug_trap+0x84/0xac [c0004f84] ProgramCheckException+0x160/0x1a0 [c00044e0] ret_from_except_full+0x0/0x4c [c002f8dc] enable_irq+0xa0/0xa8 [c0205570] ohci_pci_resume+0xe4/0xfc [c01fc018] usb_hcd_pci_resume+0xb0/0x114 [c013a9f0] pci_device_resume+0x4c/0x50 [c0181474] resume_device+0x44/0x4c [c01815ac] dpm_resume+0x130/0x148 [c01815fc] device_resume+0x38/0x78 [c0424ac8] 0xc0424ac8 [c0424fb0] 0xc0424fb0 [c042581c] 0xc042581c [c0064680] sys_ioctl+0xdc/0x2f4
It happens when reenabling USB interrupts (before the recent irq consolidation it was a one line message about unbalanced irq_enable IIRC). The appended patch fixes the problem for my machine, the explanation being that some higher level code now does an explicit free_irq() before suspending and request_irq() on resume (in drivers/usb/core/hcd-pci.c).
Gabriel
===== drivers/usb/host/ohci-pci.c 1.33 vs edited =====
drivers/usb/host/ohci-pci.c +3 -13
@@ -119,14 +119,11 @@/* let things settle down a bit */ msleep (100 ); - -#ifdef CONFIG_PMAC_PBOOK -if (_machine == _MACH_Pmac) -disable_irq ((to_pci_dev (hcd->self.controller))->irq); +#ifdef CONFIG_PMAC_PBOOK { -struct device_node *of_node; - +struct device_node *of_node; +/* Disable USB PAD & cell clock */ of_node =pci_device_to_OF_node (to_pci_dev (hcd->self.controller));if (of_node)
@@ -164,13 +161,6 @@ retval =ohci_hub_resume (hcd);usb_unlock_device (hcd->self.root_hub);#endif - -if (retval ==0 ) { -#ifdef CONFIG_PMAC_PBOOK -if (_machine == _MACH_Pmac) -enable_irq (to_pci_dev (hcd->self.controller)->irq); -#endif - }return retval; }
Quoted 10 lines · Gabriel Paubert
Quoted 5 lines · Benjamin Herrenschmidt
NOTE: Owners of _OTHER_ Apple laptops that could already sleep, like earlier iBooks, or Titanium PowerBooks, please test this patch as well for regression. More specifically, test if sleep still works, X/DRI, and backlight control as I have made significant changes to radeonfb in ways that could affect those areas.
Everytime my Pismo wakes up I have the following:
Badness in
enable_irqatkernel/irq/manage.c:106
.../...
Yah, it's known, and harmless, just didn't find the time to fix it yet, thanks for the patch. It's due to a change in the main OHCI code which nowadaws frees and re-requests the interrupt on sleep.
Ben.
A message that is not in the archive (sent off-list or not yet received): 1100852423.3855.2.camel@gaston
Quoted 10 lines · Benjamin Herrenschmidt
Quoted 6 lines · Benjamin Herrenschmidt
So here's the new patch, it replaces the previous one for Aluminium PowerBooks, and is still against 2.6.9. I'll do something against 2.6.10 when that one is out (it's a bit late to get that merged with Linus, 2.6.10 is in freeze mode now) and I hope to get all of that in 2.6.11.
.../...
Ok, I already found a bug, occasional lockups on boot and when setting the backlight. I uploaded a new version at:
Here's a 3rd version. It may or may not help, as I didn't have a chance to test this one on either albook or ibook g4 yet. I added saving and restoring of a few more registers that may fix the Xv problem (or not... depends what X does at this point) and eventually some corruption problem (the bandwidth related registers weren't restored).
It also adds an unrelated fix to the cpufreq code for powerbooks using PMU-based frequency switching which would occasionally cause hangs at boot.
http://gate.crashing.org/~benh/albook-ibookg4-sleep-3.diff
Ben.
Quoted 9 lines · On 2004-11-20 19:01:08 -0500 Benjamin Herrenschmidt <[email protected]>…
Here's a 3rd version. It may or may not help, as I didn't have a chance to test this one on either albook or ibook g4 yet. I added saving and restoring of a few more registers that may fix the Xv problem (or not... depends what X does at this point) and eventually some corruption problem (the bandwidth related registers weren't restored).
It also adds an unrelated fix to the cpufreq code for powerbooks using PMU-based frequency switching which would occasionally cause hangs at boot.
Using 'NoAccel' in xorg.conf seems to hide the symptoms of the bug, or remove the bug.
However, without that option, with this patch, the problem seems "less bad", if that's even possible. It takes longer for the root window to get "ridiculously speckled." Not sure if that info helps at all. :-)
Not sure if I mentioned that, the first patch (the one sent a couple weeks ago) did not seem to have this problem.
Thanks,__Armando Di Cianno
Quoted 9 lines · Armando Di Cianno
Using 'NoAccel' in xorg.conf seems to hide the symptoms of the bug, or remove the bug.
However, without that option, with this patch, the problem seems "less bad", if that's even possible. It takes longer for the root window to get "ridiculously speckled." Not sure if that info helps at all. :-)
Not sure if I mentioned that, the first patch (the one sent a couple weeks ago) did not seem to have this problem.
Yes, you did mention it, which is weird. I'll have to spend some time comparing the 2 versions and see if I can spot something.
Ben
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 2 lines
Ok, I already found a bug, occasional lockups on boot and when setting the backlight. I uploaded a new version at:
Here's a 3rd version. It may or may not help, as I didn't have a chance to test this one on either albook or ibook g4 yet. I added saving and restoring of a few more registers that may fix the Xv problem (or not... depends what X does at this point) and eventually some corruption problem (the bandwidth related registers weren't restored).
This one caused problems for me. Looks like the backlight got turned off at boot, I had to sleep it and wake it up to get it back.
-Olof
Quoted 4 lines · Olof Johansson
Quoted 3 lines · Benjamin Herrenschmidt
Quoted 2 lines
Ok, I already found a bug, occasional lockups on boot and when setting the backlight. I uploaded a new version at:
Quoted 8 lines
Quoted 5 lines
Here's a 3rd version. It may or may not help, as I didn't have a chance to test this one on either albook or ibook g4 yet. I added saving and restoring of a few more registers that may fix the Xv problem (or not... depends what X does at this point) and eventually some corruption problem (the bandwidth related registers weren't restored).
This one caused problems for me. Looks like the backlight got turned off at boot, I had to sleep it and wake it up to get it back.
There have been no change regarding backlight at boot, could just be some latent problem... Next time it happens, test what happens if turn the backlight all the way down to 0 (with the backlight keys), wait a bit, then back up.
Ben.
Quoted 4 lines · Olof Johansson
Quoted 3 lines · Benjamin Herrenschmidt
Quoted 2 lines
Ok, I already found a bug, occasional lockups on boot and when setting the backlight. I uploaded a new version at:
Quoted 8 lines
Quoted 5 lines
Here's a 3rd version. It may or may not help, as I didn't have a chance to test this one on either albook or ibook g4 yet. I added saving and restoring of a few more registers that may fix the Xv problem (or not... depends what X does at this point) and eventually some corruption problem (the bandwidth related registers weren't restored).
This one caused problems for me. Looks like the backlight got turned off at boot, I had to sleep it and wake it up to get it back.
I've seen that since the first version. I also have to restart pbbuttonsd to make it work again after sleep. I keep logging in on tty1 to run 'fblevel 15'.
Actually the backlight tends to turn off some time later, too. It's not just that it's off after sleep.
Signature · 1 line
dwmw2
TEST: Sleep patch #4
In reply to a message not in the archiveOk, here's the 4th iteration of the patch. It includes John Steele Scott fixes for cpufreq and the sound driver and fixes a problem where memory refresh wouldn't properly be re-enabled on the video chip upon wakeup. I also cleaned a bit more the MDLL reset code for r300, plus a couple of other things.
http://gate.crashing.org/~benh/albook-ibookg4-sleep-4.diff
Ben.
Re: TEST: Sleep patch #4
Quoted 4 lines · On 2004-11-21 19:32:58 -0500 Benjamin Herrenschmidt <[email protected]>…
Ok, here's the 4th iteration of the patch. It includes John Steele Scott fixes for cpufreq and the sound driver and fixes a problem where memory refresh wouldn't properly be re-enabled on the video chip upon wakeup. I also cleaned a bit more the MDLL reset code for r300, plus a couple of other things.
Tested the 4th version of this patch, and things do seem to be working as expected on the AluBook I have (1.5Ghz, 15'').
Once again, Ben: you rock! :-)
__Armando Di Cianno
Re: TEST: Sleep patch #4
In reply to Benjamin HerrenschmidtQuoted 7 lines · Benjamin Herrenschmidt
Ok, here's the 4th iteration of the patch. It includes John Steele Scott fixes for cpufreq and the sound driver and fixes a problem where memory refresh wouldn't properly be re-enabled on the video chip upon wakeup. I also cleaned a bit more the MDLL reset code for r300, plus a couple of other things.
Works great now (15" 1.5GHz PB).
Many thanks!
Re: TEST: Sleep patch #4
Hi,
Works great here also (15" 1GHz PB). One issue which may be unrelated I have some sound issues. For instance one a sound is played it sounds fine but if a sound is played right after its volume is extremely low. But with headphones this doesn't occur.
Thanks again for your hard work.
Keith
Quoted 22 lines · Sean Neakums
Quoted 7 lines · Benjamin Herrenschmidt
Ok, here's the 4th iteration of the patch. It includes John Steele Scott fixes for cpufreq and the sound driver and fixes a problem where memory refresh wouldn't properly be re-enabled on the video chip upon wakeup. I also cleaned a bit more the MDLL reset code for r300, plus a couple of other things.
Works great now (15" 1.5GHz PB).
Many thanks!
--
To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]
Signature · 3 lines
Keith Conger keith DOT conger AT gmail DOT com http://pimpstation.org
Re: TEST: Sleep patch #4
Hi,
Two things I forgot to include, the sound problem happens with or without going to sleep. Also here is something that apears in my dmesg:
Oops: kernel access of bad area, sig: 11 [#3]
PREEMPT
NIP: D22FB074 LR: D22FB8C0 SP: C548FDB0 REGS: c548fd00 TRAP: 0300 Not taintedMSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: D23032A4, DSISR: 40000000
TASK = cfe60c90[10505] 'gst-launch-0.8' THREAD: c548e000Last syscall: 4
GPR00: 000007FC C548FDB0 CFE60C90 CDE724A0 C0BA6AA0 C0BA6580 00000200 00000B03
GPR08: C0BA6AE8 D2302AA8 000007FC D2302AE8 CDE72244 1001C6C4 00000014 10021340
GPR16: 00000003 100213F8 00000000 10021340 3007502C 00001000 1002D028 00000000
GPR24: 00000000 00000000 C07579A0 00000000 C0BA6AA0 CDE72510 CDE724A0 00000200 NIP [d22fb074] resample_expand+0x44/0x35c [snd_pcm_oss]
LR [d22fb8c0] rate_transfer+0x80/0x88 [snd_pcm_oss]
Call trace: [d22fb8c0] rate_transfer+0x80/0x88 [snd_pcm_oss] [d22f8798] snd_pcm_plug_write_transfer+0xd4/0x14c [snd_pcm_oss] [d22f3520] snd_pcm_oss_write2+0xb0/0x128 [snd_pcm_oss] [d22f3774] snd_pcm_oss_write1+0x1dc/0x20c [snd_pcm_oss] [d22f6180] snd_pcm_oss_write+0x64/0xb4 [snd_pcm_oss] [c0069c44] vfs_write+0xdc/0x158 [c0069da4] sys_write+0x50/0x94 [c0007e30] ret_from_syscall+0x0/0x4c
adt746x: Setting speed to: 128 for CPU fan.
adt746x: Stopping CPU fan.
adt746x: Setting speed to: 0 for CPU fan.
adt746x: Setting speed to: 128 for CPU fan.
Oops: kernel access of bad area, sig: 11 [#4]
PREEMPT
NIP: D22FB074 LR: D22FB8C0 SP: C5C33DB0 REGS: c5c33d00 TRAP: 0300 Not taintedMSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: D23032A4, DSISR: 40000000
TASK = c78cac90[10759] 'gst-launch-0.8' THREAD: c5c32000Last syscall: 4
GPR00: 000007FC C5C33DB0 C78CAC90 CDE724A0 CF2D97C0 CFFD7BA0 00000200 00000B03
GPR08: C0BA6A88 D2302AA8 000007FC D2302AE8 CDE72844 1001C6C4 00000014 10021340
GPR16: 00000003 100213F8 00000000 10021340 3007502C 00001000 1002D028 00000000
GPR24: 00000000 00000000 C07579A0 00000000 CF2D97C0 CDE72510 CDE724A0 00000200 NIP [d22fb074] resample_expand+0x44/0x35c [snd_pcm_oss]
LR [d22fb8c0] rate_transfer+0x80/0x88 [snd_pcm_oss]
Call trace: [d22fb8c0] rate_transfer+0x80/0x88 [snd_pcm_oss] [d22f8798] snd_pcm_plug_write_transfer+0xd4/0x14c [snd_pcm_oss] [d22f3520] snd_pcm_oss_write2+0xb0/0x128 [snd_pcm_oss] [d22f3774] snd_pcm_oss_write1+0x1dc/0x20c [snd_pcm_oss] [d22f6180] snd_pcm_oss_write+0x64/0xb4 [snd_pcm_oss] [c0069c44] vfs_write+0xdc/0x158 [c0069da4] sys_write+0x50/0x94 [c0007e30] ret_from_syscall+0x0/0x4c
Quoted 44 lines · Keith Conger
Hi,
Works great here also (15" 1GHz PB). One issue which may be unrelated I have some sound issues. For instance one a sound is played it sounds fine but if a sound is played right after its volume is extremely low. But with headphones this doesn't occur.
Thanks again for your hard work.
Keith
Quoted 12 lines · Sean Neakums
Quoted 7 lines · Benjamin Herrenschmidt
Ok, here's the 4th iteration of the patch. It includes John Steele Scott fixes for cpufreq and the sound driver and fixes a problem where memory refresh wouldn't properly be re-enabled on the video chip upon wakeup. I also cleaned a bit more the MDLL reset code for r300, plus a couple of other things.
Works great now (15" 1.5GHz PB).
Quoted 10 lines
Many thanks!
--
To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]--
Keith Conger
keith DOT conger AT gmail DOT com
http://pimpstation.org
Signature · 3 lines
Keith Conger keith DOT conger AT gmail DOT com http://pimpstation.org
Re: TEST: Sleep patch #4
Quoted 9 lines · Keith Conger
Hi,
Two things I forgot to include, the sound problem happens with or without going to sleep. Also here is something that apears in my dmesg:
Oops: kernel access of bad area, sig: 11 [#3]PREEMPT
.../...
Alsa bugs (as well). You should probably report this to the proper driver author/maintainer.
Ben.
Re: TEST: Sleep patch #4
In reply to Keith CongerQuoted 4 lines · Keith Conger
Works great here also (15" 1GHz PB). One issue which may be unrelated I have some sound issues. For instance one a sound is played it sounds fine but if a sound is played right after its volume is extremely low. But with headphones this doesn't occur.
I have a similar problem post-resume -- sound from the speakers is very quiet (although it seems to be louder at the very beginning) and I had to plug and re-plug the headphones to get sound from them. I tried unloading and reloading snd_powermac, to no avail.
Re: TEST: Sleep patch #4
Quoted 11 lines · Sean Neakums
Quoted 4 lines · Keith Conger
Works great here also (15" 1GHz PB). One issue which may be unrelated I have some sound issues. For instance one a sound is played it sounds fine but if a sound is played right after its volume is extremely low. But with headphones this doesn't occur.
I have a similar problem post-resume -- sound from the speakers is very quiet (although it seems to be louder at the very beginning) and I had to plug and re-plug the headphones to get sound from them. I tried unloading and reloading
snd_powermac, to no avail.
Tried playing with the DRC setting in Alsa mixer ?
Ben.
Re: TEST: Sleep patch #4
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 7 lines · Sean Neakums
Quoted 4 lines · Keith Conger
Works great here also (15" 1GHz PB). One issue which may be unrelated I have some sound issues. For instance one a sound is played it sounds fine but if a sound is played right after its volume is extremely low. But with headphones this doesn't occur.
Quoted 6 lines
Quoted 4 lines
I have a similar problem post-resume -- sound from the speakers is very quiet (although it seems to be louder at the very beginning) and I had to plug and re-plug the headphones to get sound from them. I tried unloading and reloading
snd_powermac, to no avail.Tried playing with the DRC setting in Alsa mixer ?
I hadn't noticed that this was happening pre-suspend, too, and cranking DRC up fixed it. Thanks!
On resume this morning, though, the display was behaving oddly, both in X and on the console: it was sort of shimmering, split and repeated about 1/5 of the screen's width to the right in what looked like 8-pixel horizontal stripes. Rebooting seemed to sort it.
Re: TEST: Sleep patch #4
Quoted 4 lines · Sean Neakums
On resume this morning, though, the display was behaving oddly, both in X and on the console: it was sort of shimmering, split and repeated about 1/5 of the screen's width to the right in what looked like 8-pixel horizontal stripes. Rebooting seemed to sort it.
Next time, please try to take a picture of the screen. Also, try sleeping & waking up again and tell me if that helps.
Ben.
Re: TEST: Sleep patch #4
In reply to Sean NeakumsQuoted 11 lines · Sean Neakums
Quoted 4 lines · Keith Conger
Works great here also (15" 1GHz PB). One issue which may be unrelated I have some sound issues. For instance one a sound is played it sounds fine but if a sound is played right after its volume is extremely low. But with headphones this doesn't occur.
I have a similar problem post-resume -- sound from the speakers is very quiet (although it seems to be louder at the very beginning) and I had to plug and re-plug the headphones to get sound from them. I tried unloading and reloading
snd_powermac, to no avail.
Could you check if:
http://honk.physik.uni-konstanz.de/~agx/linux-ppc/kernel/alsa-2.6.9-rc2-revert.diff
helps?
-- Guido
Re: TEST: Sleep patch #4
Quoted 8 lines · Guido Guenther
Quoted 7 lines · Sean Neakums
Quoted 4 lines · Keith Conger
Works great here also (15" 1GHz PB). One issue which may be unrelated I have some sound issues. For instance one a sound is played it sounds fine but if a sound is played right after its volume is extremely low. But with headphones this doesn't occur.
Quoted 7 lines
Quoted 4 lines
I have a similar problem post-resume -- sound from the speakers is very quiet (although it seems to be louder at the very beginning) and I had to plug and re-plug the headphones to get sound from them. I tried unloading and reloading
snd_powermac, to no avail.Could you check if:
http://honk.physik.uni-konstanz.de/~agx/linux-ppc/kernel/alsa-2.6.9-rc2-revert.diff
helps?
Increasing DRC Range as suggested by Ben seems to fix my problem.
I note that this patch seems to have a few hunks relating to 48KHz -- does this do anything to help applications that do not resample audio to 44.1KHz? The asoundrcs using dmix to adjust the rate that I have seen posted produce rather poor sound.
Re: TEST: Sleep patch #4
In reply to Keith CongerQuoted 5 lines · Keith Conger
=20
Works great here also (15" 1GHz PB). One issue which may be unrelated I have some sound issues. For instance one a sound is played it sounds fine but if a sound is played right after its volume is extremely low. But with headphones this doesn't occur.
Make sure that DRC is disabled or that it's set up to operate on a reasonable (i.e. non-empty :) range.
--=20
Earthling Michel D=C3=A4nzer | Debian (powerpc), X and DRI develop=
er
Libre software enthusiast | http://svcs.affero.net/rm.php?r=3Ddaenzer
Re: TEST: Sleep patch #4
In reply to Keith CongerQuoted 6 lines · Keith Conger
Hi,
Works great here also (15" 1GHz PB). One issue which may be unrelated I have some sound issues. For instance one a sound is played it sounds fine but if a sound is played right after its volume is extremely low. But with headphones this doesn't occur.
That's problems with the sound drivers...
Ben.
Re: TEST: Sleep patch #4
In reply to Benjamin HerrenschmidtQuoted 6 lines
Ok, here's the 4th iteration of the patch. It includes John Steele Scott fixes for cpufreq and the sound driver and fixes a problem where memory refresh wouldn't properly be re-enabled on the video chip upon wakeup. I also cleaned a bit more the MDLL reset code for r300, plus a couple of other things.
Sorry for coming late to the party ... the current code works nicely on the 17" PB. On the first boot with that code, I had the PLL freak out (or so it looked like) but I couldn't reproduce that. Needless to say, the new PLL fixup code produces the same dividers as the hardcoded fixup before, so it should work :-)
Michael
Re: TEST: Sleep patch #4
Quoted 5 lines · Michael Schmitz
Quoted 5 lines
Ok, here's the 4th iteration of the patch. It includes John Steele Scott fixes for cpufreq and the sound driver and fixes a problem where memory refresh wouldn't properly be re-enabled on the video chip upon wakeup. I also cleaned a bit more the MDLL reset code for r300, plus a couple of other things.
Quoted 7 lines
Sorry for coming late to the party ... the current code works nicely on the 17" PB. On the first boot with that code, I had the PLL freak out (or so it looked like) but I couldn't reproduce that. Needless to say, the new PLL fixup code produces the same dividers as the hardcoded fixup before, so it should work :-)
It reads them from OF at boot. What do you mean by "freak out" ? the usual problem with those models where the display gets all fuzzy ? I'm not completely sure what's up, I tend to blame the panel power sequence nowadays ...
Ben.
Re: TEST: Sleep patch #4
Quoted 10 lines
Quoted 7 lines
Sorry for coming late to the party ... the current code works nicely on the 17" PB. On the first boot with that code, I had the PLL freak out (or so it looked like) but I couldn't reproduce that. Needless to say, the new PLL fixup code produces the same dividers as the hardcoded fixup before, so it should work :-)
It reads them from OF at boot. What do you mean by "freak out" ? the usual problem with those models where the display gets all fuzzy ? I'm
Yep - the display get totally unreadable, worse than before when the PLL wouldn't lock properly. When I turned down the backlight (using the f-keys), it would switch off and not come back up until X had fully started. Though that might be a bug in pbbuttonsd as well, to be honest (I turned the backlight off before pbbuttonsd started, perhaps).
Quoted 2 lines
not completely sure what's up, I tend to blame the panel power sequence nowadays ...
Anything I can do to test that?
Michael
Re: TEST: Sleep patch #4
In reply to Benjamin HerrenschmidtQuoted 4 lines
It reads them from OF at boot. What do you mean by "freak out" ? the usual problem with those models where the display gets all fuzzy ? I'm not completely sure what's up, I tend to blame the panel power sequence nowadays ...
Just got a garbled display when waking up from sleep. That seems to support your panel powerup idea. A second sleep/wake cycle fixed it.
Looking at radeon_base.c:radeon_screen_blank() (line 1045) we have:
val &= ~(LVDS_BL_MOD_EN);
udelay(100);
val &= ~(LVDS_ON | LVDS_EN);
OUTREG(LVDS_GEN_CNTL, val);Is there an OUTREG(LVDS_GEN_CNTL, val); missing before the udelay(100) ??
That's in the panel blank code, not the unblank code though. Doesn't seem to hurt to put the OUTREG in.
Michael
Re: TEST: Sleep patch #4
Quoted 9 lines
Looking at radeon_base.c:radeon_screen_blank() (line 1045) we have:
val &= ~(LVDS_BL_MOD_EN); udelay(100); val &= ~(LVDS_ON | LVDS_EN); OUTREG(LVDS_GEN_CNTL, val);
Quoted 4 lines
Is there an
OUTREG(LVDS_GEN_CNTL, val); missing before the udelay(100) ??That's in the panel blank code, not the unblank code though. Doesn't seem to hurt to put the OUTREG in.
won't hurt, dunno if it will help tho... could also be a different issue, like the spread spectrum PLL not locking properly or something like that ... I don't really know.
Ben.
Re: TEST: Sleep patch #4
In reply to Benjamin HerrenschmidtQuoted 8 lines · Benjamin Herrenschmidt
Ok, here's the 4th iteration of the patch. It includes John Steele Scott fixes for cpufreq and the sound driver and fixes a problem where memory refresh wouldn't properly be re-enabled on the video chip upon wakeup. I also cleaned a bit more the MDLL reset code for r300, plus a couple of other things.
http://gate.crashing.org/~benh/albook-ibookg4-sleep-4.diff
Ben.
Works like a charm here.
Quoted 7 lines
Signature · 3 lines
-- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]
Signature · 3 lines
Chris Anderson <[email protected]> ICQ: 72021847 Jabber: [email protected] 20B2 CB34 8AA5 05BC A90C 2CDD 2768 D4B4 2B93 424B
Quoted 4 lines · Benjamin Herrenschmidt
So here's the new patch, it replaces the previous one for Aluminium PowerBooks, and is still against 2.6.9. I'll do something against 2.6.10 when that one is out (it's a bit late to get that merged with Linus, 2.6.10 is in freeze mode now) and I hope to get all of that in 2.6.11.
Seems to work well on my 1.2GHz 12" iBook. First attempt caused a failure while I had the WUSB12 adapter plugged in (after reboot when the device was reinitialized the keyboard stopped working and the mouse went crazy). If I unplug the adapter before sleep, it seems to wakeup without problem.
No observed problems with backlight or anything else either, but I haven't been stress testing anything.
Good work, Ben! I owe you a beer next time you're in Austin! :)
-Olof