Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sleep problem with ibook G4, 2.6.11 kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
aronchi
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2004
Posts: 94

PostPosted: Sun Apr 10, 2005 11:47 pm    Post subject: Sleep problem with ibook G4, 2.6.11 kernel Reply with quote

I don't know why sleep doesn't work now for me (some time ago it worked).
I tried also a new install on the same machine, but with no result.

My ibook goes to sleep, but it doesn't wake up (my monitor is black, but the ibook seems to use energy).

I have pbbuttons 0.6.9, gentoo-sources 2.6.11-r6, no pmud and no hal.
What can I do? Where can I search for the problem?

Thank in advance, sleep is very important for me.
_________________
Alessandro Ronchi Home Page
SOASI: Sviluppo Software e Sistemi Open Source Forlì
Back to top
View user's profile Send private message
l33tmmx
Tux's lil' helper
Tux's lil' helper


Joined: 12 Mar 2005
Posts: 91
Location: Pirkkala, Finland

PostPosted: Mon Apr 11, 2005 3:20 pm    Post subject: Re: Sleep problem with ibook G4, 2.6.11 kernel Reply with quote

aronchi wrote:
Thank in advance, sleep is very important for me.


...as it is very important for every people in the world :D zzZZ

Seriously, I know that this doesn't help much, but on my 1.2GHz iBook G4 with pbbuttonsd 0.6.9, kernel 2.6.11-gentoo-r6, no pmud, no hal, sleep is working just fine. Is it possible that you have some error either in kernel configuration or in /etc/pbbuttonsd.conf?
_________________
"Trust me, I know what I'm doing!"
- Sledge Hammer

Follow me on Twitter
Back to top
View user's profile Send private message
cyberb0b
n00b
n00b


Joined: 09 Mar 2005
Posts: 22

PostPosted: Mon Apr 11, 2005 10:25 pm    Post subject: Reply with quote

I had the same problem until I modified pbbuttonsd.conf. For me changing the "UseFBBlank" fixed it.

the pbbuttonsd.conf man page is here:

http://pbbuttons.sourceforge.net/projects/pbbuttonsd/man-pbbuttonsd.conf.html
Back to top
View user's profile Send private message
aronchi
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2004
Posts: 94

PostPosted: Tue Apr 12, 2005 7:14 am    Post subject: Reply with quote

Can you post here a working pbbuttons.conf file and maybe also an xorg.conf?
Is there any other conf file that could be useful?
_________________
Alessandro Ronchi Home Page
SOASI: Sviluppo Software e Sistemi Open Source Forlì
Back to top
View user's profile Send private message
l33tmmx
Tux's lil' helper
Tux's lil' helper


Joined: 12 Mar 2005
Posts: 91
Location: Pirkkala, Finland

PostPosted: Tue Apr 12, 2005 1:06 pm    Post subject: Reply with quote

My pbbuttonsd.conf:
Code:
# Configuration file for PBButtonsd >= Version 0.5
# for complete list of options please see pbbuttonsd.conf man-page

# [SYSTEM]
#userallowed           = "paranoid"   ; user who is allowed to use IPC
autorescan            = no      ; automatic rescan of event devices
CmdTimeout            = 4

# [MODULE POWERSAVE]
onAC_policy           = performance   ; nochange, performance, custom or powersave
onAC_TimerAction      = none      ; none, suspend-to-ram, suspend-to-disk, blankscreen
onAC_CoverAction      = suspend-to-ram
onAC_KeyAction        = suspend-to-ram   ; SleepKey
onAC_SuspendTime      = 0      ; time in 1/10 seconds
onAC_DimTime          = 0      ; time in 1/10 seconds

onBattery_policy      = powersave
onBattery_TimerAction = suspend-to-ram   ; none, suspend-to-ram, suspend-to-disk, blankscreen
onBattery_CoverAction = suspend-to-ram
onBattery_KeyAction   = suspend-to-ram   ; SleepKey
onBattery_SuspendTime = 3000      ; time in 1/10 seconds
onBattery_DimTime     = 600      ; time in 1/10 seconds

SleepKey              = 116
SleepKeyDelay         = 0      ; values > 0 may be dangerous, if the power key is used to trigger sleep
BWL_first             = 20      ; first battery warnlevel, time in minutes
BWL_second            = 10      ; second battery warnlevel, time in minutes
BWL_last              = 3      ; last battery warnlevel, time in minutes
Script_PMCS           = "/etc/power/pmcs-pbbuttonsd %s %s %s"
EmergencyAction       = sleep      ; action, if battery is critically low
HeartbeatBeep         = no      ; beep, if nothing else showed that the computer lives
CPULoad_sleeplock     = yes
CPULoad_min           = 20      ; value in percent
CPULoad_period        = 20      ; time in seconds
NETLoad_sleeplock     = yes
NETLoad_min           = 4096      ; traffic in Bytes/s
NETLoad_period        = 20      ; time in seconds
NETLoad_device        = "eth0"

# [MODULE DISPLAY]
LCD_Brightness        = 12      ; initial LCD brightness level
LCD_FadingSpeed       = 5      ; 0 = no smooth fading
#LCD_AutoAdjust        = yes      ; only on Aluminum PowerBooks
LCD_IllumUpKey        = 225
LCD_IllumDownKey      = 224
#LCD_Threshold         = 94
#LCD_AutoAdjMin_Bat    = 2      ; autoadjust parameter
#LCD_AutoAdjMax_Bat    = 7
#LCD_AutoAdjMin_AC     = 1
#LCD_AutoAdjMax_AC     = 15
#KBD_Brightness        = 0      ; initial keyboard illumination level
#KBD_OnBrightness      = 5      ; initial level if KBD on/off key is pressed
#KBD_FadingSpeed       = 5      ; 0 = no smooth fading
#KBD_AutoAdjust        = yes      ; only on Aluminum PowerBooks
#KBD_IllumUpKey        = 230
#KBD_IllumDownKey      = 229
#KBD_IllumOnKey        = 228
#KBD_Threshold         = 28      ; only on Aluminum PowerBooks
dev_FrameBuffer       = "/dev/fb0"
UseFBBlank            = yes
DimFullyDark          = no
CRT_MirrorKey         = 65 + ctrl

# [MODULE MIXER]
SoundSystem           = ALSA      ; none, auto, OSS or ALSA
Volume                = 75      ; initial volume level
Speakers_muted        = no      ; mute after startup?
VolumeUpKey           = 115
VolumeDownKey         = 114
MuteKey               = 113
OSS_Mixer             = "/dev/mixer"   ; settings for OSS
OSS_Channels          = "volume, speaker"
ALSA_Card             = "default"   ; settings for ALSA
ALSA_Elements         = "Master, 'PC Speaker'"
MixerInitDelay        = no

# [MODULE CDROM]
dev_CDROM             = "/dev/cdrom"
EjectCDKey            = 88
EjectCDKeyDelay       = 2000

# [MODULE PMAC]
dev_PMU               = "/dev/pmu"
dev_ADB               = "/dev/adb"
TPModeUpKey           = 225 + alt
TPModeDownKey         = 224 + alt
TPMode                = notap
KBDMode               = fkeysfirst
Batlog                = none
NoTapTyping           = no

What part of the xorg.conf are you interested in? It's quite a large file to be posted as such.
_________________
"Trust me, I know what I'm doing!"
- Sledge Hammer

Follow me on Twitter
Back to top
View user's profile Send private message
aronchi
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2004
Posts: 94

PostPosted: Tue Apr 12, 2005 7:04 pm    Post subject: Reply with quote

it's possible that the problem is into the fb device? My xorg.conf is here:
http://www.aronchi.org/LinuxOnIBookG4
Can you see something wrong?
_________________
Alessandro Ronchi Home Page
SOASI: Sviluppo Software e Sistemi Open Source Forlì
Back to top
View user's profile Send private message
l33tmmx
Tux's lil' helper
Tux's lil' helper


Joined: 12 Mar 2005
Posts: 91
Location: Pirkkala, Finland

PostPosted: Wed Apr 13, 2005 1:07 pm    Post subject: Reply with quote

I'm using "radeon" drivers instead of "ati", and I don't have an 'Option "UseFBDev"'. Otherwise, our xorg.conf's are very similar.
You can download my kernel config from here, check if there are any significant differencies.
_________________
"Trust me, I know what I'm doing!"
- Sledge Hammer

Follow me on Twitter
Back to top
View user's profile Send private message
l33tmmx
Tux's lil' helper
Tux's lil' helper


Joined: 12 Mar 2005
Posts: 91
Location: Pirkkala, Finland

PostPosted: Wed Apr 13, 2005 5:28 pm    Post subject: Reply with quote

Well, now I noticed one occasion when my iBook doesn't (seemingly) want to wake up :? :

When I was running it on battery power, and the timer put iBook to sleep, I was unable to wake it up with keyboard. I had to momentarily close the display cover, then it woke up normally. If I put iBook to sleep manually, it wakes up when I press any key.

So you were right, after all :o : There still seems to be some issues with sleep, but fortunately nothing fatal
_________________
"Trust me, I know what I'm doing!"
- Sledge Hammer

Follow me on Twitter
Back to top
View user's profile Send private message
aronchi
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2004
Posts: 94

PostPosted: Wed Apr 13, 2005 11:00 pm    Post subject: Reply with quote

I have used your kernel and your pbbuttons.conf, but my problem remains.
Can you say to me what modules have you loaded when your ibook goes to sleep?

can you send also you yaboot.conf?

Maybe I will find the problem, one day :)
_________________
Alessandro Ronchi Home Page
SOASI: Sviluppo Software e Sistemi Open Source Forlì
Back to top
View user's profile Send private message
eniac
Apprentice
Apprentice


Joined: 11 Aug 2003
Posts: 233
Location: Belgium, Brussels

PostPosted: Thu Apr 14, 2005 5:48 pm    Post subject: Reply with quote

l33tmmx wrote:
. If I put iBook to sleep manually

How do you do that ?
_________________
Turns out the pony only had one trick.
Back to top
View user's profile Send private message
l33tmmx
Tux's lil' helper
Tux's lil' helper


Joined: 12 Mar 2005
Posts: 91
Location: Pirkkala, Finland

PostPosted: Sat Apr 16, 2005 11:24 am    Post subject: Reply with quote

For eniac:

eniac wrote:
l33tmmx wrote:
. If I put iBook to sleep manually

How do you do that ?


I just press briefly the power button, or close the lid. The actions are configurable via the pbbuttonsd.conf file. If that doesn't work, then, obviously, your 'sleep' function isn't working.

For aronchi:

I finally found out why the display stayed blank on awakening, when the iBook was put to sleep via the timer. It seems that the X-window system's energy saving functions and the pbbuttons/sleep system are clashing with each other. I disabled the former by adding the following lines to a file, which gets executed when you start the X window system (I use Fluxbox as a window manager, so I put the lines in ~/.fluxbox/startup. Another possible file is .xinitrc, if you are using 'startx'. If you are using a graphical login, you have to find out a suitable file for yourself):

Code:
xset -dpms
xset s off


The latter disables also the screensavers, hopefully you're not too fond of them :wink:

I hope this helps 8) Anyway, because you asked for them, here are my /etc/modules.autoload.d/kernel-2.6:

Code:
ohci-hcd
#ehci-hcd
ohci1394
therm_adt746x
apm_emu
uinput
uninorth-agp
radeon
sungem


and /etc/yaboot.conf:

Code:
boot=/dev/hda2
device=/pci@f4000000/ata-6@d/disk@0:
timeout=120
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot

image=/boot/kernel-2.6.11-gentoo-r6
   partition=4
   root=/dev/hda4
   label=Linux
   read-only

macosx=/dev/hda5

_________________
"Trust me, I know what I'm doing!"
- Sledge Hammer

Follow me on Twitter
Back to top
View user's profile Send private message
l33tmmx
Tux's lil' helper
Tux's lil' helper


Joined: 12 Mar 2005
Posts: 91
Location: Pirkkala, Finland

PostPosted: Sat Apr 16, 2005 11:42 am    Post subject: Reply with quote

One belated thought: aronchi, what are you using for CPU frequency control? Cpudyn? Speedfreq?
I use cpudyn.
_________________
"Trust me, I know what I'm doing!"
- Sledge Hammer

Follow me on Twitter
Back to top
View user's profile Send private message
aronchi
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2004
Posts: 94

PostPosted: Sat Apr 16, 2005 4:50 pm    Post subject: Reply with quote

I'm using speedfreq.
_________________
Alessandro Ronchi Home Page
SOASI: Sviluppo Software e Sistemi Open Source Forlì
Back to top
View user's profile Send private message
mil0t
n00b
n00b


Joined: 24 Jun 2003
Posts: 62

PostPosted: Sat Apr 16, 2005 5:09 pm    Post subject: Reply with quote

And i am using cpufreqd.

So if someone want my /etc/pbbuttonsd.conf here it is:

Code:

# Konfiguracion fajlli per pbbuttonsd.conf e gjeneruar prej Milot Shales
# Autor: Milot Shala < milot@albalinux.org >
# Kjo osht e gjeneruar per Apple iBook G3 ;)

autorescan            = no      ; automatic rescan of event devices
CmdTimeout            = 4

# Moduli per "PowerSave" me ta rujt baterin
onAC_policy           = performance   ; nochange, performance, custom or powersave
onAC_TimerAction      = none      ; none, suspend-to-ram, suspend-to-disk, blankscreen
onAC_CoverAction      = suspend-to-ram
onAC_KeyAction        = suspend-to-ram   ; SleepKey
onAC_SuspendTime      = 0      ; time in 1/10 seconds
onAC_DimTime          = 0      ; time in 1/10 seconds

onBattery_policy      = powersave
onBattery_TimerAction = suspend-to-ram   ; none, suspend-to-ram, suspend-to-disk, blankscreen
onBattery_CoverAction = suspend-to-ram
onBattery_KeyAction   = suspend-to-ram   ; SleepKey
onBattery_SuspendTime = 3000      ; time in 1/10 seconds
onBattery_DimTime     = 600      ; time in 1/10 seconds

SleepKey              = 116
SleepKeyDelay         = 0      ; values > 0 may be dangerous, if the power key is used to trigger sleep
BWL_first             = 20      ; first battery warnlevel, time in minutes
BWL_second            = 10      ; second battery warnlevel, time in minutes
BWL_last              = 3      ; last battery warnlevel, time in minutes
Script_PMCS           = "/etc/power/pmcs-pbbuttonsd %s %s %s"
EmergencyAction       = sleep      ; action, if battery is critically low
HeartbeatBeep         = no      ; beep, if nothing else showed that the computer lives
CPULoad_sleeplock     = yes
CPULoad_min           = 20      ; value in percent
CPULoad_period        = 20      ; time in seconds
NETLoad_sleeplock     = yes
NETLoad_min           = 4096      ; traffic in Bytes/s
NETLoad_period        = 20      ; time in seconds
NETLoad_device        = "eth0"

# Ktu modulat per ndriqim qe me ta rujt pak laptopin per bateri t'me tutjeshme
LCD_Brightness        = 12      ; initial LCD brightness level
LCD_FadingSpeed       = 5      ; 0 = no smooth fading
#LCD_AutoAdjust        = yes      ; kjo vlen veq nese ki PowerBook G3-sh ose G4
LCD_IllumUpKey        = 225
LCD_IllumDownKey      = 224
dev_FrameBuffer       = "/dev/fb0"
UseFBBlank            = yes
DimFullyDark          = no
CRT_MirrorKey         = 65 + ctrl

# Miximi i Moduleve
SoundSystem           = OSS      ; none, auto, OSS or ALSA
Volume                = 75      ; initial volume level
Speakers_muted        = no      ; mute after startup?
VolumeUpKey           = 115
VolumeDownKey         = 114
MuteKey               = 113
OSS_Mixer             = "/dev/mixer"   ; settings for OSS
OSS_Channels          = "volume, speaker"
MixerInitDelay        = no

# CDROM-i
dev_CDROM             = "/dev/cdrom"
EjectCDKey            = 88
EjectCDKeyDelay       = 2000

# Moduli i PowerMAC
dev_PMU               = "/dev/pmu"
dev_ADB               = "/dev/adb"
TPModeUpKey           = 225 + alt
TPModeDownKey         = 224 + alt
TPMode                = notap
KBDMode               = fkeysfirst
Batlog                = none
NoTapTyping           = no


So there are Albanian Language comments if someone want to know them i would translate them in English, Spanish, Italian, Serbian, Macedonian and German languages.

//mil0t
_________________
emerge --pretend love | genlop --pretend
Back to top
View user's profile Send private message
DrZoidberg
Tux's lil' helper
Tux's lil' helper


Joined: 03 May 2003
Posts: 119
Location: New Port Richey, Florida

PostPosted: Fri Jun 10, 2005 6:52 pm    Post subject: Reply with quote

Is sleep working reliably on your iBooks? I have done everything suggested in this thread and sleep kinda works but there are often problems on wakeup--either a blank screen or a kernel oops. I have an iBook 12" G4 1.2GHz 768MB with ATI radeon 9200.

On the occasions wakeup works but the screen stays blank, I think something has turned DPMS back on even though I have:
Code:

xset -dpms
xset s off
startkde

in my ~/.xinitrc

I like to keep things simple, so I'm not using X/K/G-DM. I just run startx.

I don't understand why I sometimes get a lockup on wakeup.
I seem to have gotten several kernel oopses in the last month using 2.6.11-r8 that were related to USB, IEEE1394, and SCSI emulation. I don't really understand what that stuff is all about. Sometimes the oops happens on wakeup. The SCSI oops usually hangs the system and can be reproduced by using cdrdao to copy an audio CD in DAO mode. The other oopses are recorded in the system log but everything seems fine afterward. I upgraded to 2.6.11-r10 yesterday and took out stuff like firewire and WiFi which I do not use.

Do you guys unload all your modules before sleep? I think I remember reading a discussion ( You can find it here: http://lists.debian.org/debian-powerpc/2005/03/msg00111.html ) with benh in which he says this is a bad idea which might even cause problems with sleep/wake.
Back to top
View user's profile Send private message
aronchi
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2004
Posts: 94

PostPosted: Sat Jun 11, 2005 9:50 am    Post subject: Reply with quote

Try to unload only usb and firewire modules, they are the most problematic ones.
_________________
Alessandro Ronchi Home Page
SOASI: Sviluppo Software e Sistemi Open Source Forlì
Back to top
View user's profile Send private message
DrZoidberg
Tux's lil' helper
Tux's lil' helper


Joined: 03 May 2003
Posts: 119
Location: New Port Richey, Florida

PostPosted: Sat Jun 11, 2005 2:48 pm    Post subject: Reply with quote

So you are removing ALL USB & firewire modules? And this makes your iBook sleep/wake reliably?

To summarize my config:

    gentoo-sources-2.6.11-r10 with aronchi's .config (minus a few things I don't use like Wifi/1394)

    xorg 6.8.2 with aronchi's xorg.conf.merged (I added Option "AGPMode" "4")

    pbbuttonsd 0.6.10 (default config with UseFBBlank = yes)

In addition to the problems mentioned above, sometimes my iBook will go to sleep the moment it is unplugged, even though the battery is nearly full.

I'm still occasionally having the blank screen on wakeup problem. Sometimes closing the cover, causing it to go back to sleep, and then opening the cover will wake it up properly. But this doesn't always work and I have to type shutdown -r now. So far, no oopses in the logs.
I wish there was something I could do to get to the bottom of this.

How do you put your iBook to sleep? Do you press the power button, close the lid, or do you type
Code:
pbbcmd config GOTOSLEEP 0

from an xterm?

I usually use the command line method.
I unplug my USB keyboard/mouse before sleep, as suggested by benh. At first, I was using aronchi's /etc/power/event.d/modules script (which removes all modules) but there were problems waking up so I removed it. Doesn't seem to make much difference.

I notice that apm_emu is enabled in aronchi's config but the module is not loaded. What is this for? Does it work?
Back to top
View user's profile Send private message
Cenrim
Tux's lil' helper
Tux's lil' helper


Joined: 04 Dec 2004
Posts: 142
Location: Germany

PostPosted: Mon Jun 13, 2005 10:16 am    Post subject: Reply with quote

got a nice prob, too...
an Kernel oops after snooze (commands pmud to put the iBook to sleep), much output but I was to slow to write everything down before it rebooted (the last line was something about reboot in 180secs...)

it began with
Code:

{irrelevant std-output about going to sleep}
Maschine check in kernel mode.
Caused by (from SRR1=149030): Transfer error ack signal
Oops: Machine check, sig 7 [#1]
NIP: C0224D98   LR: C02128AC    SP:EDA59B0   REGS:eda59a70 TRAP:0200 Not tainted.

{and much more, i couldn't write down in time...}

...gotta go, mechanics stuff...

edit:
I'm running a 2.6.11-gentoo-r9 on a 12" 1.2GHz iBook... the problem appears sporadicly
Back to top
View user's profile Send private message
DrZoidberg
Tux's lil' helper
Tux's lil' helper


Joined: 03 May 2003
Posts: 119
Location: New Port Richey, Florida

PostPosted: Mon Jun 13, 2005 2:48 pm    Post subject: Reply with quote

Not sure what has changed but since upgrading to 2.6.11-r10 sleep seems to be working better. I also removed firewire support. I am still using my USB keyboard/mouse but I always unplug them before sleep. (Laptop keyboard/pointers suck!) The only module I unload is therm-adt746x because I had some oopses after sleep reading /sys/devices/temperatures/cpu_temperature.
It has worked 5 times in a row. 3 instances were intentional from the command line, 2 were due to some bizarre problem I'm having with pbbuttonsd where it suspends even though the battery is at 88%. But wakeup has been perfect every time.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum