ferdium / ferdium-app

All your services in one place, built by the community
https://ferdium.org
Apache License 2.0
2.81k stars 169 forks source link

Bug: MacOS Preventing Sleep #524

Open opb1978 opened 2 years ago

opb1978 commented 2 years ago

Avoid duplicates

Ferdium Version

6.0.0

What Operating System are you using?

macOS

Operating System Version

macOS: 12.4 (21F70)

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Ferdium version

No response

Expected Behavior

Ferdium should not set the setting for "preventing Sleep" if no active Call, VideoCall, Video or Audio file is played / used

Actual Behavior

Ferdium prevents the Mac to go to sleep --> this results in not turning off the screen and Mac can not go to sleep

Steps to reproduce

Start Ferdium

Add the following services

Whatsapp Rocketchat Messanger Skype

Login in these services

Wait some time, the Setting in Activity Monitor will change to Preventing Sleep --> YES

Screenshot 2022-07-27 at 13 32 44

Debug link

No response

Screenshots

Screenshot 2022-07-27 at 13 32 44

Additional information

No response

slano commented 2 years ago

Same behavior on Linux Mint 20.3

yogasw commented 2 years ago

i use macbook m1 and it doesn't cause can't sleep

can you tell the recipt what you are opening, whether one of them is playing media, either audio or video because this can cause you to not be able to sleep @slano @opb1978

macos Monterey
Version 12.5
MacBook Pro (13-inch, M1, 2020)
Chip Apple M1
image
opb1978 commented 2 years ago

no there was no media playing. just the app open. but currently it does not show the problem anymore..

I am currently running

Version: 6.0.1-nightly.10 Server: Ferdium Server Electron: 20.0.1 Chrome: 104.0.5112.81 Node.js: 16.15.0 Platform: macOS Monterey Arch: arm64 Build date: Fri Aug 05 2022 04:44:18 GMT+0200 (Central European Summer Time) Git SHA: fbd1fe8f Git branch: nightly

will watch it if it happens again...

yogasw commented 2 years ago

You can turn off one by one services to see which services have problems, or tell us a list of your services so that we can help fix this issue @opb1978

yogasw commented 2 years ago

by the way ferdium does not have an indicator of which service rotates the media or causes it not to allow sleep I usually wear nosleep.js so that the chrome does not sleep, it also does not play the media so there are several factors that make ferdium not allow sleep

slano commented 2 years ago

Upgraded to 6.0.1-nightly.10, seems the problem is not present anymore.

The only service I have the same as @opb1978 is Whatsapp (together with Telegram and Discord)

coolapso commented 1 year ago

Sorry to necro this one ... This seems to be still an issue,

Ferdium 6.2.0 Arch linux X11

Services found causing issues:

Tweeter, No media playing. Facebook messenger, No Media playing


Edit:

Just found out that aparently any service that plays media can cause this, if you play the video and simply pause it. Verified this behavior on Facebook.

System was going to sleep. Played a video on facebook, Paused it. System not going to sleep anymore.

Edit 2:


The problem with this services is their behavior tends to be quite unpredictable and to start playing stuff automatically without user even knowing (Specialy if audio is muted. As far as i could find they lack any option to "Not auto play".

Wonder if its possible to prevent this behavior by default and have an option that lets users decide if they want ferdium to prevent sleeping when its playing media.

please let me know if you need more details or want me to open another issue.

coolapso commented 1 year ago

Some more insight and digging, This behavior also happens on Wayland both with gnome and sway.

Suspect this is tied with electron itself as i have tried the slack app and manage to reproduce this running the slack application as well.

This is as far as my knowledge goes, hope it helps and provides any valuable information.

coolapso commented 1 year ago

The behavior above was being verified with the aur ferdium-bin package. This seems not to be happening with the aur ferdium-electron package.

ioExpander commented 1 year ago

I encountered the same issue today and found a way to reproduce it with some consistency on MacOS.

Here is the content preventing sleep. I'm not sure what inside is causing Ferdium to prevent sleep.

image
inter-faced commented 1 year ago

I have the same issue. Currently I am using the services below. By activating one service at a time I found out that Messenger (Facebook) was causing the issue. I deactivated the service for now.

SERVICES Slack Whatsapp Messenger LinkedIn Google Keep

VERSION Version: 6.2.7 Server: No Server Electron: 24.2.0 Chrome: 112.0.5615.165 Node.js: 18.14.0 Platform: macOS Unknown Arch: arm64 Build date: Mon May 08 2023 21:46:55 GMT+0200 (Central European Summer Time) Git SHA: 3f365edb Git branch: release