I reported this bug several times in the bugthread of plexamp but never got any reaction so I hope this time this gets acknowledged.
On the latest macOS High Sierra Plexamp prevents the display from going into sleep when playing music. Even if I pause playback, display sleep is still prevented. Additionally when the music is paused the mac should be able to go to sleep, too, which is currently also prevented.
Check Application.log; when you are not actively playing music we should disable power-save mode. The two logs are:
POWER: Disabling power save mode.
...
POWER: Enabling power save mode.
When enabled, it shouldn’t block sleep (assuming no bug).
Sorry we missed your raising this in a thread, it can be a bit tricky to track multiple issues in a single thread 
Thanks for your response! Where can I find this logfile? Didn’t find it in the ApplicationSupport folder nor in /var/log.
Nervermind, I found the logfile. The log indicates that power save mode is correctly enabled/disabled when playing/pausing but in reality it has no effect. For me the only way the get my mac sleeping is quiting plexamp.
Does plexamp differentiate between display sleep and computer sleep? It seems that plexamp is blocking display sleep which shouldn’t be blocked by an audio player. I believe when display sleep is disabled, mac sleep will be disabled too.
These are the types of suspensions allowed in Electron:
prevent-app-suspension - Prevent the application from being suspended. Keeps system active but allows screen to be turned off. Example use cases: downloading a file or playing audio.
prevent-display-sleep - Prevent the display from going to sleep. Keeps system and screen active. Example use case: playing video.
We use prevent-app-suspension, which I think is correct?
That seems correct!
I think I found the offender by using pmset -g assertions with and without plexamp running:
Plexamp not running:
pmset -g assertions
2018-04-08 09:57:00 +0200
Assertion status system-wide:
BackgroundTask 1
ApplePushServiceTask 0
UserIsActive 1
PreventUserIdleDisplaySleep 0
PreventSystemSleep 0
ExternalMedia 0
InternalPreventDisplaySleep 1
PreventUserIdleSystemSleep 1
NetworkClientActive 0
Listed by owning process:
pid 392(useractivityd): [0x0000fd830001851d] 00:00:00 PreventUserIdleSystemSleep named: "BTLEAdvertisement"
Timeout will fire in 60 secs Action=TimeoutActionTurnOff
pid 56(powerd): [0x0000fd38001081c1] 00:01:15 InternalPreventDisplaySleep named: "com.apple.powermanagement.delayDisplayOff"
Timeout will fire in 224 secs Action=TimeoutActionTurnOff
pid 370(cloudphotosd): [0x0000f7a3000b8399] 00:25:07 BackgroundTask named: "com.apple.cloudphotosd.darkwake.sync"
Details: cloudphotosd darkwake power assertion for initial and large iCPL downloads/uploads
Timeout will fire in 293 secs Action=TimeoutActionTurnOff
pid 366(sharingd): [0x0000fd47000184ff] 00:01:00 PreventUserIdleSystemSleep named: "Handoff"
pid 100(hidd): [0x0000f7a30009839a] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4294970274.3"
Timeout will fire in 900 secs Action=TimeoutActionRelease
Kernel Assertions: 0x8=BT-HID
id=506 level=255 0x8=BT-HID mod=01.01.70, 01:00 description=com.apple.driver.IOBluetoothHIDDriver owner=BNBTrackpadDevice
id=507 level=255 0x8=BT-HID mod=01.01.70, 01:00 description=com.apple.driver.IOBluetoothHIDDriver owner=AppleBluetoothHIDKeyboard
Idle sleep preventers: IODisplayWrangler
Plexamp running:
pmset -g assertions
2018-04-08 09:57:27 +0200
Assertion status system-wide:
BackgroundTask 1
ApplePushServiceTask 0
UserIsActive 1
PreventUserIdleDisplaySleep 1
PreventSystemSleep 0
ExternalMedia 0
InternalPreventDisplaySleep 1
PreventUserIdleSystemSleep 1
NetworkClientActive 0
Listed by owning process:
pid 85589(Plexamp): [0x0000fd9c00018538] 00:00:02 NoIdleSleepAssertion named: "Electron"
pid 56(powerd): [0x0000fd38001081c1] 00:01:42 InternalPreventDisplaySleep named: "com.apple.powermanagement.delayDisplayOff"
Timeout will fire in 198 secs Action=TimeoutActionTurnOff
pid 370(cloudphotosd): [0x0000f7a3000b8399] 00:25:33 BackgroundTask named: "com.apple.cloudphotosd.darkwake.sync"
Details: cloudphotosd darkwake power assertion for initial and large iCPL downloads/uploads
Timeout will fire in 266 secs Action=TimeoutActionTurnOff
pid 156(coreaudiod): [0x0000fd9c00018529] 00:00:02 PreventUserIdleSystemSleep named: "com.apple.audio.AppleHDAEngineOutputDP:3,0,1,1:0:{6D1E-5B09-00015569}.context.preventuseridlesleep"
Created for PID: 85637.
pid 156(coreaudiod): [0x0000fd9c0005852a] 00:00:02 PreventUserIdleDisplaySleep named: "com.apple.audio.AppleHDAEngineOutputDP:3,0,1,1:0:{6D1E-5B09-00015569}.context.preventuseridledisplaysleep"
Created for PID: 85637.
pid 366(sharingd): [0x0000fd47000184ff] 00:01:27 PreventUserIdleSystemSleep named: "Handoff"
pid 100(hidd): [0x0000f7a30009839a] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4294970274.3"
Timeout will fire in 900 secs Action=TimeoutActionRelease
Kernel Assertions: 0x8=BT-HID
id=506 level=255 0x8=BT-HID mod=01.01.70, 01:00 description=com.apple.driver.IOBluetoothHIDDriver owner=BNBTrackpadDevice
id=507 level=255 0x8=BT-HID mod=01.01.70, 01:00 description=com.apple.driver.IOBluetoothHIDDriver owner=AppleBluetoothHIDKeyboard
Idle sleep preventers: IODisplayWrangler
As your can see with plexamp running there is a coreaudio process running which prevents systemSleep and displaySleep.
Even if the music is paused these preventions are still active.
Mystery solved: because I’m using HDMI audio, coreaudio is preventing display sleep. I think there is some logic behind this, when the display sleeps, audio can’t be played. However I’m curious how Itunes handles this because when Itunes in playing music at least the screensaver is not prevented.
The only thing you guys could potentially fix is that Plexamp still has coreaudio open even if playback is paused.
Ah, fascinating, thanks for the update! That’s super helpful.