Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Threema desktop preventing standby on Windows #1159

Open
aurorasmiles opened this issue Nov 26, 2022 · 6 comments
Open

Threema desktop preventing standby on Windows #1159

aurorasmiles opened this issue Nov 26, 2022 · 6 comments
Labels
awaiting triage Should be triaged by a developer. bug It's a bug!

Comments

@aurorasmiles
Copy link

Bug Description

While the desktop client is open Windows is unable to automatically enter standby.

Steps to Reproduce (for bugs)

  1. Install Threema Desktop & connect it
  2. Set your automatic standby in the windows power settings to a small time, like one minute
  3. Wait for a while, Computer will not go into standby
  4. To control: close Threema & wait again. Computer will now go into standby after the set amount of time and no input

Potential Solution

Your Environment

  • Threema Web version: 2.4.4
  • Threema App version: 4.9-beta6
  • Browser name and version: n/a
  • Computer operating system and version: Windows 11 Home Build 22621.819
  • Smartphone operating system and version: OneUI 4.1 with Android 12
@aurorasmiles aurorasmiles added awaiting triage Should be triaged by a developer. bug It's a bug! labels Nov 26, 2022
@ghost
Copy link

ghost commented Nov 28, 2022

Thank you for your report!

Unfortunately, we're not able to reproduce this on our test machines.

Which version of Threema for Windows are you using? Please post the full version number, including the number in the brackets.

Does the same issue happen if there is no active session in Threema for Windows and only the reconnect button is shown?

@aurorasmiles
Copy link
Author

I was able to replicate this consistently, as long as there is an active, connected session.
On Windows I'm using 2.4.4 (1.2.21).
I was also able to replicate this on Arch Linux using version 2.4.4 in chromium.
I assume WebRTC has some setting to prevent sleep when there are active connections. Checking powercfg /requests on Windows while Threema is open & connected returns

[PROCESS] \Device\HarddiskVolume2\..\threema-web.exe
WebRTC has active PeerConnections

@lgrahl
Copy link
Contributor

lgrahl commented Nov 29, 2022

Thanks! This makes sense in general because WebRTC is usually used for audio/video which, if played out, should prevent standby and/or display auto-locking (although it is questionable why the <video> element can't take care of it). But we only use WebRTC for data transmission. It is likely that this is an oversight in the WebRTC implementation (wouldn't be the first one) used by Chromium/Electron and that we have no influence over it.

Edit: Did some digging and it is indeed something we cannot influence without shipping a custom Electron build.

@aurorasmiles
Copy link
Author

aurorasmiles commented Nov 29, 2022

Is this something that might be addressed in a future new threema web?
I assume that is also one of the reasons why apps like Discord for example ship custom electron builds then...

@lgrahl
Copy link
Contributor

lgrahl commented Nov 29, 2022

It will be a non-issue for Threema Web based on Threema Desktop 2.0 since that will no longer use WebRTC for data transmission.

(I don't think Discord is affected because they do not have a persistent WebRTC connection unless you're in a voice chat.)

@lgrahl
Copy link
Contributor

lgrahl commented Nov 29, 2022

Looks like this is a bug in the diagnostics for WebRTC (thanks @fippo): https://bugs.chromium.org/p/chromium/issues/detail?id=866200#c45
But I have a hunch that it won't be fixed quickly. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting triage Should be triaged by a developer. bug It's a bug!
Development

No branches or pull requests

2 participants