CopyQ on macOS prevents system from sleeping

Created on 26 Jan 2020  路  8Comments  路  Source: hluk/CopyQ

Describe the bug
Launching CopyQ on macOS prevents the system from sleeping.

To Reproduce
Steps to reproduce the behavior:

  1. Launch CopyQ.
  2. System no longer goes into sleep mode after 10 minutes.

Expected behavior
System should sleep after 10 minutes.

Screenshots
Screenshot 2020-01-26 at 11 44 27

Screenshot 2020-01-26 at 11 45 22

Version, OS and Environment

CopyQ Clipboard Manager v3.9.3
Qt: 5.13.2
Compiler: GCC
Arch: x86_64-little_endian-lp64
OS: macOS 10.15

Additional context
I've also tried quitting CopyQ, deleting CopyQ config in ~/.config/copyq, using AppCleaner, and restarting CopyQ, but the issue persists.

Running pmset -g or opening Activity Monitor > Energy (View > All Processes) sort by Preventing Sleep shows running applications that are preventing the system from automatically going into sleep mode.

bug macOS

Most helpful comment

Great! I'll try to make new release soon.

Thanks for testing this and providing all the info! :+1:

All 8 comments

Can you share logs (F12 shortcut in the main window or copyq logs command)?

Sure no problems, here's the output from copyq logs:

~ copyq logs
CopyQ ERROR [2020-01-26 12:30:29.255] <Client-21408>: Cannot connect to server! Start CopyQ server first.
CopyQ Note [2020-01-26 12:30:29.256] <Client-21408>: Ended activity
CopyQ Note [2020-01-26 12:30:43.766] <Client-21605>: Ended activity
CopyQ Note [2020-01-26 12:30:44.208] <Client-21608>: Ended activity
CopyQ Note [2020-01-26 12:32:09.847] <Client-21606>: Ended activity
CopyQ Note [2020-01-26 12:32:09.847] <monitorClipboard-21604>: Ended activity
CopyQ Note [2020-01-26 12:32:10.317] <Client-21898>: Ended activity
CopyQ Note [2020-01-26 12:32:10.968] <Client-21899>: Ended activity
CopyQ Note [2020-01-26 12:34:31.672] <Client-21900>: Ended activity
CopyQ Note [2020-01-26 12:34:34.641] <Client-21902>: Ended activity
CopyQ Note [2020-01-26 12:34:42.895] <Client-21904>: Ended activity
CopyQ Note [2020-01-26 12:34:57.582] <Client-21905>: Ended activity
CopyQ Note [2020-01-26 12:35:03.326] <Client-21906>: Ended activity
CopyQ Note [2020-01-26 12:35:04.270] <Client-21907>: Ended activity
CopyQ Note [2020-01-26 12:35:12.701] <Client-21896>: Ended activity
CopyQ Note [2020-01-26 12:35:12.722] <Client-21908>: Ended activity
CopyQ Note [2020-01-26 12:35:12.726] <monitorClipboard-21897>: Ended activity
CopyQ Note [2020-01-26 12:35:12.751] <Server-21578>: Ended activity
CopyQ Note [2020-01-26 12:35:18.203] <Client-21913>: Ended activity
CopyQ Note [2020-01-26 12:35:18.596] <Client-21915>: Ended activity
CopyQ Note [2020-01-26 12:35:25.633] <Client-21916>: Ended activity
CopyQ Note [2020-01-26 12:35:44.238] <Client-21914>: Ended activity
CopyQ Note [2020-01-26 12:35:44.259] <Client-21917>: Ended activity
CopyQ Note [2020-01-26 12:35:44.263] <monitorClipboard-21912>: Ended activity
CopyQ Note [2020-01-26 12:35:44.283] <Server-21909>: Ended activity
CopyQ Note [2020-01-26 12:35:47.880] <Client-21922>: Ended activity
CopyQ Note [2020-01-26 12:35:48.257] <Client-21924>: Ended activity
CopyQ Note [2020-01-26 12:35:57.015] <Client-21927>: Ended activity
CopyQ Note [2020-01-26 12:36:05.442] <Client-21928>: Ended activity
CopyQ Note [2020-01-26 12:36:11.771] <Client-21929>: Ended activity
CopyQ Note [2020-01-26 12:37:40.588] <Client-21938>: Ended activity
CopyQ Note [2020-01-26 12:37:52.785] <Client-21923>: Ended activity
CopyQ Note [2020-01-26 12:37:52.807] <Client-21941>: Ended activity
CopyQ Note [2020-01-26 12:37:52.810] <monitorClipboard-21921>: Ended activity
CopyQ Note [2020-01-26 12:37:52.832] <Server-21918>: Ended activity
CopyQ Note [2020-01-26 12:38:02.945] <Client-21948>: Ended activity
CopyQ Note [2020-01-26 12:38:03.333] <Client-21950>: Ended activity
CopyQ Note [2020-01-26 12:38:18.840] <Client-21953>: Ended activity
CopyQ Note [2020-01-26 12:38:22.339] <Client-21954>: Ended activity
CopyQ Note [2020-01-26 12:38:26.088] <Client-21955>: Ended activity
CopyQ Note [2020-01-26 12:38:32.702] <Client-21956>: Ended activity
CopyQ Note [2020-01-26 21:55:25.682] <Client-22080>: Ended activity
CopyQ Note [2020-01-26 21:56:00.113] <Client-22083>: Ended activity
CopyQ Note [2020-01-26 21:56:07.010] <Client-21949>: Ended activity
CopyQ Note [2020-01-26 21:56:07.031] <Client-22085>: Ended activity
CopyQ Note [2020-01-26 21:56:07.034] <monitorClipboard-21947>: Ended activity
CopyQ Note [2020-01-26 21:56:07.054] <Server-21944>: Ended activity
CopyQ Note [2020-01-26 21:56:10.378] <Client-22090>: Ended activity
CopyQ Note [2020-01-26 21:56:10.746] <Client-22092>: Ended activity
CopyQ Note [2020-01-26 21:56:13.969] <Client-22094>: Ended activity
CopyQ Note [2020-01-26 21:56:20.656] <Client-22091>: Ended activity
CopyQ Note [2020-01-26 21:56:20.677] <Client-22095>: Ended activity
CopyQ Note [2020-01-26 21:56:20.681] <monitorClipboard-22089>: Ended activity
CopyQ Note [2020-01-26 21:56:20.697] <Server-22086>: Ended activity
CopyQ Note [2020-01-26 21:56:23.211] <Client-22100>: Ended activity
CopyQ Note [2020-01-26 21:56:23.585] <Client-22103>: Ended activity
CopyQ Note [2020-01-26 21:56:25.767] <Client-22104>: Ended activity
CopyQ Note [2020-01-26 21:56:42.438] <Client-22105>: Ended activity
CopyQ Note [2020-01-26 21:57:02.678] <Client-22108>: Ended activity

Thanks. I don't see anything wrong in the log.

Can you launch CopyQ from console instead (quit the app beforehand) with the following command, activate the sleep mode and check messages in console?

COPYQ_LOG_LEVEL=DEBUG copyq

Sure, here are the debug logs and Activity Monitor:

Screenshot 2020-01-27 at 21 40 00

Thanks. Hmm, I was expecting to see a session manager message in logs -- it could block the shutdown and maybe suspend/sleep mode.

Is it possible to figure out what are the arguments of the process that is preventing sleep? Perhaps it's not the main GUI app.

It could be blocked by a started user or internal copyq command. I'm trying to change the activity type of these commands, but I'm afraid it may break some other things.

I've built a development version containing possible fix (changes the activity type for processes): https://github.com/hluk/CopyQ/releases/tag/fix-mac-sleep

That seems to have fixed it 馃帀

Screenshot 2020-01-28 at 15 00 17

Great! I'll try to make new release soon.

Thanks for testing this and providing all the info! :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

beefeater7 picture beefeater7  路  8Comments

reagle picture reagle  路  4Comments

davidawad picture davidawad  路  9Comments

happysurf picture happysurf  路  9Comments

orschiro picture orschiro  路  7Comments