4

I'm send my laptop to sleep ( -> Sleep) and when I open it later, it starts loading system from the beggining as if I powered off it. I lose progress in my work because of this.
I don't found where I may disable this behavior in settings. This is started a few weeks ago (after system's update, I guess).

Is a way fix it?

macOS 10.13.4 (17E202)
MacBook Pro (15-inch, 2016)

EDIT

log show --style syslog --predicate 'eventMessage contains "shutdown cause"'
Filtering the log data using "eventMessage CONTAINS "shutdown cause""
Skipping info and debug messages, pass --info and/or --debug to include.
Timestamp                       (process)[PID]
2018-04-15 08:51:07.711622+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-04-15 21:10:28.630796+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-04-16 11:17:11.904271+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-04-16 22:55:42.824319+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-04-17 11:11:09.854747+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-04-23 22:13:08.794049+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-04-24 12:35:29.716396+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-04-24 23:28:13.687568+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-04-26 12:44:34.810162+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-04-28 23:35:48.521694+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-04-30 12:44:19.742698+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-05-04 09:12:50.828762+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-05-07 09:25:51.552046+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-05-08 09:34:15.499520+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-05-09 14:11:55.925660+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-05-09 22:51:10.543749+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-05-11 10:38:06.734522+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-05-12 12:20:26.007011+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-05-12 18:47:26.901257+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-05-13 10:35:58.837702+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-05-13 21:56:02.764590+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-05-14 11:15:37.522934+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5
2018-05-16 14:27:42.723753+0300  localhost kernel[0]: (AppleSMC) Previous shutdown cause: 5

EDIT 2

My actions after work day:
- unplugging power cable from laptop
- clicking to sleep ( -> Sleep)
- closing laptop's cover

Laptop go to power off not because low battery in sleeping mode, I'm checked it (after sleeping the battery always no less 80%).

EDIT 3

Battery Information:

  Model Information:
  Serial Number:    D867074D0YRHDWCAX
  Manufacturer: SMP
  Device Name:  bq20z451
  Pack Lot Code:    0
  PCB Lot Code: 0
  Firmware Version: 702
  Hardware Revision:    1
  Cell Revision:    3925
  Charge Information:
  Charge Remaining (mAh):   6345
  Fully Charged:    Yes
  Charging: No
  Full Charge Capacity (mAh):   6606
  Health Information:
  Cycle Count:  33
  Condition:    Normal
  Battery Installed:    Yes
  Amperage (mA):    0
  Voltage (mV): 12815

System Power Settings:

  AC Power:
  System Sleep Timer (Minutes): 0
  Disk Sleep Timer (Minutes):   10
  Display Sleep Timer (Minutes):    10
  Wake on AC Change:    No
  Wake on Clamshell Open:   Yes
  Wake on LAN:  Yes
  AutoPowerOff Delay:   28800
  AutoPowerOff Enabled: 1
  Current Power Source: Yes
  DarkWakeBackgroundTasks:  1
  Display Sleep Uses Dim:   Yes
  GPUSwitch:    2
  Hibernate Mode:   3
  PrioritizeNetworkReachabilityOverSleep:   0
  Standby Delay:    10800
  Standby Enabled:  1
  TCPKeepAlivePref: 1
  Battery Power:
  System Sleep Timer (Minutes): 1
  Disk Sleep Timer (Minutes):   10
  Display Sleep Timer (Minutes):    2
  Wake on AC Change:    No
  Wake on Clamshell Open:   Yes
  AutoPowerOff Delay:   28800
  AutoPowerOff Enabled: 1
  DarkWakeBackgroundTasks:  0
  Display Sleep Uses Dim:   Yes
  GPUSwitch:    2
  Hibernate Mode:   3
  Reduce Brightness:    Yes
  Standby Delay:    10800
  Standby Enabled:  1
  TCPKeepAlivePref: 1

Hardware Configuration:

  UPS Installed:    No

AC Charger Information:

  Connected:    Yes
  Wattage (W):  55
  Charging: No
  • 1
    Welcome to Ask Different. It's helpful if you provide us with the model of your Mac (model, year, etc.) as well as the version of macOS you're running. How do you put it to sleep? When did this start occurring? Was there an update? Please edit your quesiton with these and any additional relevant details. – Allan May 14 '18 at 16:47
  • @Allan thanks for your remark, I'm edited my question. – canny_wasp May 14 '18 at 17:21
  • See this post on how to obtain shutdown cause codes. then post your findings. – Allan May 15 '18 at 13:14
  • @Allan, added info. – canny_wasp May 16 '18 at 12:57
  • That's a clean shutdown meaning something told your Mac to shutdown and it did so. It's not a crash or a power failure. Are you on AC power when this happens or is your battery low? – Allan May 16 '18 at 17:30
2

The system is powering off because AutoPowerOff is enabled.

To disable it, issue the following command in Terminal:

sudo pmset -a autopoweroff 0

That command will set autopoweroff to "disabled" for all profiles (-a). This means it covers you when on battery and on A/C. If you just want autopoweroff disabled when on battery, use the following command:

sudo pmset -b autopoweroff 0
  • -b = battery
  • -c = (wall) charger
  • -u = UPS
  • -a = all profiles

See man pmset for more details.

  • Hm, problem is still have. I'm explored pmset man page and disabled standby by command "sudo pmset -a standby 0". If this will help for me, I will write about it. – canny_wasp May 20 '18 at 19:42
  • Is this a mistake regarding the meaning of autopoweroff. From man pmset: > autopoweroff is enabled by default on supported platforms as an implementation of Lot 6 to the European Energy-related Products > Directive. After sleeping for <autopoweroffdelay> seconds, the system > will write a hibernation image and go into a lower power chipset > sleep. Wakeups from this state will take longer than > wakeups from regular sleep. – kslstn May 22 '18 at 19:25
  • Try setting your autopoweroffdelay> value to a large number like 36000 (10 hours). sudo pmset -a autopoweroffdelay 36000` – Allan May 22 '18 at 20:04
0

Disabling standby in pmset was helped me.

sudo pmset -a standby 0

P.S. Before disabling standby I'm disabled autopoweroff by command:

sudo pmset -a autopoweroff 0

Maybe solution in disable and autopoweroff and standby, I'm don't checked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .