Panther: Screen saver freezes (continued)

Posted by Pierre Igot in: Macintosh
May 15th, 2004 • 5:03 am

Another week, another Panther freeze… While I haven’t experienced any more system freezes while working on my G4 since removing my apparently defective internal hard drive a week ago, I have experienced two pseudo-freezes, each time with the same symptoms: I leave my computer for a while, which causes the screen saver to kick in after approximately 15 minutes, and the displays to go to sleep after 20 minutes.

When I return to the computer later on, things seem OK. The displays are asleep and the G4 is humming along. I press a key on the keyboard (usually the space bar) and the displays come back on, displaying the last screen saver pictures they were displaying just before they went to sleep. Usually at this stage, almost immediately both displays go black and Panther displays the login dialog asking for my password. But in both cases (last Monday and this afternoon), this never happened. The displays stayed stuck with the screen saver pictures in a frozen state. (Usually these pictures are moving as part of the screen saver animation.)

Each time, I try pressing all the keys on my keyboard or using the mouse, to no avail. The only thing that works is if I press the Power button on one of the displays for about a second. After a delay of up to 30 seconds, this causes the whole setup (displays + computer itself) to go into deep sleep, with the fans, the hard drives and the displays shutting down. The Power buttons on the main display and on the G4 itself start glowing. (This is normal: Manually triggering sleep causes the computer to go into deep sleep.) But then if I press a key again to wake the computer and the displays up, I hear the fans and hard drives spinning up, and the lights on the Power buttons on the main display and on the G4 stay on instead of glowing. But the displays themselves stay black. And there’s nothing I can do after that.

I go to my PowerBook and try to ping the G4 through Terminal. This works fine. But if I try to ssh into the G4, it doesn’t work, even though it should. (“Remote Login” is on on the G4.) I have no choice but to do a hard reset on the G4.

I am starting to think that this is either a bug in Panther itself or a problem related to the fact that I am using two displays, both Apple displays with ADC connection. The main one is connected to the ADC connector on my G4’s Radeon 9000, and the other one is connected to an Apple ADC-to-DVI adapter, which in turn is connected to the Radeon 9000’s DVI port and to one of the G4’s USB ports. I have had problems with the USB ports on this second display connected via the ADC-to-DVI adapter before, which have never really gone away, although they only occur once every few weeks or so. I wonder if there isn’t something fishy with the ADC-to-DVI adapter itself, which has its own power supply and might be involved. When I lose the USB connections on that second display, restarting the computer doesn’t bring them back. The only way that I have found to force them to resuscitate is to turn everything off, unplug the ADC-to-DVI adapter, plug it back in, and then start everything up.

Maybe the freezes occur when the USB connections are lost while the displays are asleep. I don’t know.

Sleep-related problems in Mac OS X are nothing new, of course. Even in Puma (10.1) and Jaguar (10.2), there were on-going problems that are pretty widely documented, and I had some myself. But things have definitely taken a turn for the worse since upgrading to Panther. Maybe the problem is a combination of my particular hardware setup and underlying Panther sleep issues.

It sure is annoying. It’s not the daily freezes while working that I was experiencing with my defective hard drive, but we are still talking about system freezes occurring on a regular basis — something like once a week. Of course, since the freezes are unpredictable, I can never be entirely sure that I had saved everything before a freeze happens. Fortunately, it looks like applications running in the background, such as Mail, which regularly updates the contents of its In mailboxes when checking for new mail, are doing a good job of automatically saving the important stuff. (The only problem with Mail is that it doesn’t automatically update mailbox indexes, which means that, after I get a freeze, when I restart Mail I usually have in my “In” box new — duplicate — copies of messages that I had already trashed or filed away. But it’s a relatively minor inconvenience. Better duplicate messages than lost messages!)

The one application where I always lose a number of things in case of a freeze is Safari, because it has no automatic feature that would save currently open web pages. I use an AppleScript script that saves references to all the pages currently open to a file on the hard drive, but I still have to remember to run this script regularly, and I don’t do it often enough.

The bottom-line here is that sleep-related problems in Mac OS X are still there. (Check out the MacInTouch reader reports if you think I am the only one.) And there’s not much we can do about it, because there are no crash logs that we could send to Apple as evidence of the problems. Does Apple have the ability and willingness to try and reproduce these problems in-house? It remains to be seen… The longevity of these problems is not an encouraging sign.

16 Responses to “Panther: Screen saver freezes (continued)”

  1. Pierre Igot says:

    Like you, I’ve been suspecting various things, including Mail (which can be flaky on a modem connection). But I haven’t been able to isolate the problem. Note that, in my case, I am not seeing the spinning beachball. I have nothing, just a black screen.

  2. Henry Neugass says:

    I’m stuck on the fact that –in one of your reports– you were presented with a log-in screen even though, as I understand it, you didn’t log out or do anything that should cause that.

    Yeah, no log files… I guess sleep is outside the standard Unix framework — no surprise there. (I’m still trying to find out Apple’s “official” position on how sleep functions and what happens to periodic system housekeeping as a result.

    Thinking out loud –quarter-backed idea– maybe there’s something you can do to create your own log files based on some “interesting” information about the system state. Seems to me I recall something about system status and/or control in the developer tools. It might help to dump such status to a file, say, every second. Alternatively, send it to another system via LAN or even serial port at short intervals. Might show something. If the utility I’m recalling won’t do the trick, then there’s probably some code to write and compile, shouldn’t be too difficult.

  3. MacDesigner says:

    I’ve had similar problems in the past. In the mornings or afternoons when I would move my mouse to get the login window I would get the spinning beach ball. Only a hard reset would work. My screens would remain black. It always seemed to happen if I had set an alarm in iCal to send a text message to my cell phone. The message would always send after the restart. So I always assumed it was Mail somehow locking the system. It was very random, it wasn’t always the same alarm so I assumed it to be server access problems. It hasn’t happened in awhile, however I haven’t been sending many alarms lately either.

  4. Pierre Igot says:

    The reason I get the login dialog is that I’ve set Mac OS X to do it :-). Under Security in System Prefs, there’s an option to require the user’s password when waking the computer from sleep.

    What’s disappointing is that this is just display sleep, not system-wide sleep. In other words, everything is running except for the displays, so the logging function should still be working (and it is: there are things that are recorded in the log, such as the maintenance tasks scheduled for 3 am).

    I might explore these additional logging options you mention. Thanks for the tip.

  5. Henry Neugass says:

    Any particular reason to require a password? From what I know about your enviable living environment, the only security risk you face is a cat walking across your keyboard.

    This is a backwards way of suggesting that you might want to simplify as much as possible. I _would_ try working with only one display, for example.

    I’m to the point of speculating that Apple has simply not every tried to figure out the contradiction of a Unix system that can be put to sleep. I imagine they have no easy way of accurately determining how users actually use their systems in this respect, so they gave up gave up trying to guess, and decided to “see what happens”.

    And with absolutely no evidence whatsoever –just a gut feeling– I’m going to guess there are some Unix processes that were writen with the assumption that they would never be interrupted. That’s true — they aren’t ever interrupted on a “traditional” Unix box. If we put our systems to sleep or wake up at some very narrowly defined places — Kablooie. Now, we just have to find those places.

  6. Pierre Igot says:

    Well, the password requirement isn’t one — I don’t really need to do it, it’s just a habit, probably influenced by the use of the PowerBook when on the road. I could turn it off and see if the problem occurs again. I’ll try that :-).

    I can also try to work with only one display for a while. That would be more frustrating (I usually need all the space), but I might try it if all else fails.

    I agree with what you say about Unix and sleep issues. It’s probably quite true. But display sleep shouldn’t have any impact, since Unix is also designed to work just fine on a “headless” machine. The status of the display itself should be indifferent. Maybe Apple just hasn’t figured out how to treat display sleep features separately from system-wide sleep issues.

  7. Henry Neugass says:

    (I guess you haven’t yet reached the limitation of failing eyesight — the advantage of more display area counteracted by the restrictioned visibility of reading glasses.)

    Display sleep _should_ not be an issue, as you say. But there’s that Mac functionality grafted on to Unix. Hmmmm, maybe we’re seeing two different issues: One is specific to display sleep and causes freezes when a transition occurs at a vulnerable time. Another is specific to system sleep.

  8. Henry Neugass says:

    Maybe … _three_ distinct issues?

    Are you using dial-up or cable/DSL? I’ve got Entourage checking about 5 accounts via DSL, and I have noted some strangeness around sleeping and waking up in the midst of external ISP accesses. No crashes, but some rather alarming hesitations. I would imagine it would be worse with dial-up.

  9. MacDesigner says:

    “I _would_ try working with only one display, for example.” In my experience with this problem, it happened with one display. Again, as far as I could discern it only happened when Mail was trying to send an email, that was the only constant. My screens would stay black and I’d only get the spinning ball. There was also no consistency to the time of day this would occur. So, it didn’t lead me to believe it was anything but one of the programs or the combination of programs I have open at all times.

    Pierre, my suggestion, while being a pain, would be to close Mail whenever you leave the system. However, I don’t think that’s a real possibility. Do your logs give you any indication as to the last process that was running. Maybe something in there can give you a clue. Maybe you can find a pattern in what was supposed to be processed next.

  10. Pierre Igot says:

    My eyesight might not be as good as it used to be (although I’ve been short-sighted since childhood), but it definitely doesn’t mind the visual gymnastics of going from a 23″ Cinema Display to a 17″ Studio Display and back. :-) The good thing about OS X is that most things are scalable. (Not all, and it’s still something that needs to be worked on, but most.)

    Anyway, when it comes to display sleep, as far as I can tell, the freeze occurs at a time when there is no change in the sleep status. For example, based on the last e-mail messages I had in Mail when I restarted the machine, the last freeze (see this post) occurred after midnight last night, i.e. at least 2 full hours after I left the machine. The screen saver kicks in after 15 minutes and the display sleep after 20 minutes, so the displays were already fast asleep when this happened.

    I am using dialup, but via an AirPort Base Station. I have noticed some flakiness in Mail in relation to the slow modem connection, but no freeze.

  11. Henry Neugass says:

    The eyesight issue: For me, the magnifying glasses limit the screen area that’s in focus, thus reducing the utility of any display. In other words, I’m not getting as much out of my Cinema display as I used to.

    Freezes: Just for fun, disable your screen saver and display sleep entirely. If one of your monitors is a CRT, power it when you’re done each evening. See what happens.

    But that’s probably not going to make any difference.

    Here’s a thought. When you’re done each evening, open a command window and type

    % top -l 0 > reallybiglogfile

    which might save something useful about what was going on near the end. You can simply delete the log file if nothing happened.

    Second thought: this probably won’t work. You need a variant that executes often –say, once a second– and closes the log file after each output. This will look something like this as a script:

    rm biglogfile
    sleep 1
    top -l 1 >> biglogfile

    but the exact form of the endless loop will depend on the shell you are using. I could look into this a bit more — I’m not an instant shell script writer.

    What you want to do is have top tell you the “most” active process within 1 second of your actual crash. This method ought to catch the culprit, gui or daemon.

    Before you do that –I think someone suggested this already– try quitting before you quit for the evening and see if this fixes the issue. That would be my best guess at this point.

  12. Pierre Igot says:

    Well, since the freezes are not happening every day (thank God!), I am going to take things one at a time. So first I’ve turned off the security feature asking for my password when waking from sleep. Let’s see if that eliminates the problem or not. If it does, then it’s definitely a bug in the sleep feature. If not, then I’ll take it to the next level and try a log script like you are suggesting.

    FYI, I am using the default shell in Panther, i.e. bash.

  13. Nate Friedman says:

    i have a similar issue, and a way to reliably reproduce it!

    the following is a copy/paste from a bug i submitted to apple:

    03-May-2004 04:20 PM Nate Friedman:
    Locking the screen and locking the keychain may cause the computer to get stuck when waking from sleep.

    Steps to reproduce the problem:
    1. Set the keychain to lock when you put the computer to sleep
    2. Set the computer to lock the screen when you put the computer to sleep
    3. Run a program that accesses the keychain on a timer (I use Microsoft Entourage X)
    4. Put the computer to sleep
    5. Wake the computer to sleep. Do not unlock the screen
    6. Wait until you know that your timer has gone off to try to access the keychain
    7. Put the computer back to sleep
    8. Wake the computer

    Alternate Step 5-6 (unverified)
    5. Wake the computer from sleep
    5a. Unlock the screen
    6. Wait until the timer goes off to try to access the keychain. Do not unlock the keychain

    Expected Result:
    I would expect it to prompt me for a password to unlock the screen

    Actual Result:
    The computer wakes to a black screen with a busy curser. The unlock prompt never appears.

    My guess as to what is going on is that the security server has blocked waiting for me to unlock the keychain. Unfortunately, i can’t unlock it because i can’t get to the password prompt!

    This issues seems to happen to me around once every 2 weeks, and aside for not being sure if i’ve unlocked the screen, this is the only situation that forces me to 3 finger solute my machine. (i’m sure i could SSH in, to cleanly reboot it, but that’s even more work)

    Don’t try to access the keychain on a schedule near the time you plan to wake the computer.
    Don’t set the keychain to lock on sleep.
    Don’t set the computer to lock the screen on sleep.

    This happens both on my old PowerBook G4 and new iBook G3

    I’ve been having the problem since 10.3.0, but i didn’t know about the bug reporter until now.

  14. Pierre Igot says:

    Nate: Very interesting… I think you might be on to something here. However, whenever I have experienced a screen saver freeze, I have been unable to use ssh for remote login, even though it’s enabled on the G4 and works just fine under normal conditions.

  15. mare6 says:

    I have not had on mail at all as a clean install was suggested by apple and still got the freezes. Also had the dual proccessor replaced as suggested by apple. Also tried the deal out w/a newer 23. Still froze in screen saver.

    Disabled the screen saver. Fine for now.


  16. mare says:

    I have been having the bigtime crashes. 10 months. Sometimes every few minutes, sometimes not for a couple hours. Apple support has handled this very poorly. Not at all.

    since I put the screen saver to never, none at all. The bad restart black box.

    Also, using a cinema 22. When I put my PB on it got the freezes. Never did before or since.

    Have not put the PB back since disabling the screen saver but will. Have swapped out to another cinema though and got the same lock. A 23 but a lock in screen saver and no bad black restart box.

    Quicksilver G4 now. But I got the cinema while I was still using a turquoise G4 and had the similar problem.

    In Panther now.


Leave a Reply

Comments are closed.