Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have a 2011 27" iMac running OS X Lion. There is a known bug when iMac, after waking up from sleep mode, freezes while playing video (Flash in my case). It does not respond to any key combination and mouse clicks. I can still move mouse pointer and hear iTunes playing. It does not happen if iMac has been rebooted and was not put into sleep mode after that. So when it freezes, I have to turn it off and on again with the power button. The question is, does it affect hard drive, power supply or anything else that I need to worry about?

share|improve this question
    
Although the hardware is safe, you might trying to ssh into them mac - sometimes you can still issue a software shutdown even if the graphics interface is non-responsive. –  bmike Aug 8 '11 at 15:11
add comment

3 Answers

up vote 6 down vote accepted

Holding the power button and letting the System Management Controller SMC perform an immediate halt is no worse than letting the software initiate the halt.

I suppose you could come up with a scenario with the mac in free fall or something relating to the head not being parked, but modern hardware is designed to handle power losses from the wall outlet with great grace and here the SMC is still controlling a soft landing.

The power implications are the same even though the applications and operating system don't get their normal opportunity to save work, close files and get ready for the next time they start.

Your files and data could be at risk from this, but not the hardware.

share|improve this answer
    
Sorry, -1 for the first paragraph. Putting data at risk is worse than a normal software-controlled shut down – HFS Plus journaling is not entirely reliable. Also, we should be careful with the word halt; there are differences between shutdown(8) and halt(8) and neither is as graceful as a shut down (or restart) that is begun in the normal way. –  Graham Perrin Aug 15 '13 at 7:05
    
@GrahamPerrin This question is about forcibly restarting a hung software stack. Your comment is good general information, but the OP was asking about the degree of bad - not if it were bad as I read things... –  bmike Aug 15 '13 at 10:32
    
Thanks … to put this in context, I added an answer where forcing a shutdown is a last resort. –  Graham Perrin Aug 19 '13 at 17:52
add comment

Observation

Somewhere between these two extremes:

  1. the pointer alone moving (the primary symptom)
  2. a forced shut down or forced restart (last resorts, with some risk)

– there may be actions that are less likely to put at risk the data; less likely to put at risk the consistency of the HFS Plus file system.

Essentially

There's on-screen movement, so:

  • probably no need to kill (or force quit) the WindowServer process
  • hopefully no need to force a shut down or restart of the computer.

First and second steps, and beyond

For three seconds, press and hold four keys:

  • Command-Shift-Option-Esc

If the screen was not locked, then that action will Force Quit the front-most application. (The Force Quit Applications window is not required.)

If – after releasing the keys – the first force quit has no visible effect, then proceed with a second round:

  • the four keys, three seconds

… and so on.

With luck a forced quit will effectively clear, from screen, the app that appeared to prevent use of the Mac.

Reference

OS X keyboard shortcuts (2012-11-02) – this document may change after OS X 10.9 is released.


Test environment

Mountain Lion here, I don't have Lion handy to test with a normally locked screen.

Obscure side note

Avoid the four-key combination if your Mac is a client of a kernel core dump server. It might cause a USB Programmer Key debug call, a time-consuming system dump routine.

share|improve this answer
add comment

Power cycling puts extra strain on spinning metal hard drives, and you could probably argue that the onrush current puts extra strain on the power supply. While technically true, it's not the hardware that I would be concerned about.

The software is what would concern me; if you don't shut down cleanly, files may only be partially written or be open and in some inconsistent state, which amounts to data loss and could lead to further flakiness down the line depending on what gets corrupted. Having file system journaling helps with these issues somewhat, so I suggest double-checking that in Disk Utility: select your hard drive on the left, look at the "Format:" string on the bottom, it should say "Mac OS Extended (journaled)".

Have you considered sidestepping the problem by uninstalling Flash, browsing with Safari as a rule, and only starting Chrome (with built-in Flash) long enough to deal with Flash-only content? Not the most convenient, but it might work for you.

Also, I wonder if the kernel actually halts, or if it's just the GUI that freezes up? You might be able to use another computer or iDevice to log in through SSH and do a clean reboot depending on how "deeply" frozen the Mac is.

share|improve this answer
1  
Apple power buttons are not simple blade switches so it's not like pulling the plug (or worse). By holding the power button down, the SMC sees that the user wants a safe, controlled shutdown without the OS getting to cleanly unmount the filesystems. Nothing horrible happens to the hardware. Only the filesystem is at risk and if yours is journaled, you basically lose one file if you have bad luck. –  bmike Aug 8 '11 at 14:52
    
The issue is not "how" the shutdown is done, but the fact that it occurs vs. not occurring. If I power cycle over and over for an hour, it's technically harder on the hardware than just keeping it on continuously for that same hour. As I said, while technically true, it's not worth worrying about. –  Tom Aug 8 '11 at 15:17
    
Thanks, I'll go with uninstalling flash and running it in Chrome until the fix comes out. –  Artem Pakk Aug 8 '11 at 15:46
    
Tom - you have valid points. However this question implies the need for a restart as a precondition. Unless the OP can somehow ssh in - a restart is going to happen via the SMC or the power cord. –  bmike Aug 8 '11 at 17:17
1  
apple.stackexchange.com/questions/7609/… might be a place to see some commentary on HFS+ journaling. Please ask your own question as precise or general as you wish. I'd love to take a stab at answering it. –  bmike Aug 16 '11 at 19:33
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.