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?
3 Answers
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 (think erase and install OS and restore backup files as worst software case), but the hardware doesn't care of the open files or some pending changes are not flushed from caches before the lights go out.
-
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) andhalt
(8) and neither is as graceful as a shut down (or restart) that is begun in the normal way. Aug 15, 2013 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, 2013 at 10:32
-
Thanks … to put this in context, I added an answer where forcing a shutdown is a last resort. Aug 19, 2013 at 17:52
-
-
@TheOddbodNumber Thanks for the comment - see my edit on a brief treatment of what OS X might need. Basically, this is about hardware effects as I read the question.– bmike ♦Mar 20, 2016 at 13:10
Observation
Somewhere between these two extremes:
- the pointer alone moving (the primary symptom)
- 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.
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.
-
1Apple 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, 2011 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.– TomAug 8, 2011 at 15:17
-
Thanks, I'll go with uninstalling flash and running it in Chrome until the fix comes out. Aug 8, 2011 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, 2011 at 17:17
-
1apple.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, 2011 at 19:33