Can pmset be used in OS X Yosemite?

Since the update to Yosemite, we cannot utilise the power management features to reboot the Mac unless we have the user logged into the Mac.


So instead, we tried to use pmset to override the power management features, however it has not worked. The command I entered was as follows;


sudo pmset repeat shutdown U 00:01:00 poweron U 00:05:00


Entering the command did not present any error messages so assumed it has worked, however when I checked the uptime on the Mac following the scheduled reboot, we found it had not rebooted.


The same commands have been used in OS X Maverick and we found it to work.


Can anyone help?

Mac mini, OS X Yosemite (10.10.1)

Posted on Apr 30, 2015 4:04 AM

Reply
9 replies

Apr 30, 2015 6:21 AM in response to VikingOSX

Thanks, we have tried this, however it doesn't work if the user isn't logged into the Mac.


Our Mac's are being used as recording servers. They sit on the network without any keyboard, monitor, mouse etc connected to them. Every so often, the Mac's will crash and will require a hard reboot. However these Mac's are located all across the country so it makes physically rebooting them very difficult. We have found on the Maverick OSX Mac's, a weekly reboot schedule prevents them from crashing.

Apr 30, 2015 7:19 AM in response to cdhw

Okay, I've just done an experiment. Used an iMac and OS X 10.10.3 machine awake showing login screen with no user logged in and schedule a shutdown followed by a restart. The power management system did try to shut the machine down at the specified time but was prevented from doing so by a dialog that said 'There is a user sharing this computer if you shutdown they will be disconnected' and offered Cancel and Shutdown options. My guess is that this 'user' was associated with file sharing. I waited 7 minutes before getting bored, but it may well have sat there forever.


Anyway, I think this rules out having 'no user logged in' as the root cause of your problem.


OS X does have a 'helpful' habit of refusing to restart if applications don't quit gracefully or there are active network connections. You may find a solution that wraps shutdown(8) in a launch agent/daemon is a bit more robust.


It seems to me that this whole approach is a bit crass. You are not specific about what you mean by 'Mac's will crash and will require a hard reboot' but assuming you are not getting kernel panics it would be a lot easier to kill and restart the application/daemon that is flakey.


C.

Aug 25, 2015 8:38 AM in response to eddie233

In many cases this sort of messing around is pointless. According to:


http://images.apple.com/ca/environment/reports/


a sleeping iMac 21.5" consumes ca 0.9 W and one that is 'off' consumes ca 0.2 W. In order to achieve that 0.7 W saving you are waking them up with ARD, shutting down and then restarting the following morning. It wouldn't surprise me if this activity, along with the server that is needed to run ARD, wrote off most of the power saving. Assuming you are not causing additional 'wear and tear' and are getting the full 0.7 W reduction for, say, 16 hours a day on 365 days a year that's saving you 4 kWhr, or about $0.50 per machine per year.


C.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can pmset be used in OS X Yosemite?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.