Vencord / Vesktop

Vesktop is a custom Discord App aiming to give you better performance and improve linux support
GNU General Public License v3.0
4.34k stars 193 forks source link

Vesktop suspends when not focused #320

Open s-cd opened 10 months ago

s-cd commented 10 months ago

When you have vesktop unfocused on fedora sliverblue 39 after a few minutes the program seems to "hibernate" and disconnects from any calls until i refocus again and it reloads. After checking this doesn't seem to happen with the official app.

Vendicated commented 10 months ago

please provide more info

how did you install vesktop what desktop environment do you use what vesktop version

s-cd commented 10 months ago

Flatpak Hyprland Vencord 5dee2e8 (Vesktop V0.4.4)

Curve commented 10 months ago

I have the same issue on Arch Linux (with KDE) with vesktop from the aur - I can't seem to reproduce this consistently though, however it happens fairly often and always when Vesktop is minimized or sometimes even when it's merely unfocused.

When regaining focus (or being restored) the discord (re-)loading screen is shown and shortly after I'm thrown back into discord as if it just started

I've been having this issue with any vesktop version as well

Vendicated commented 10 months ago

this is really strange because i've never had this happen. likely related to power saving. we should check what flags Discord passes and see if any of them could relate to this issue. but it's very hard (impossible) for me to debug because i cant reproduce

Madmaxispog commented 10 months ago

im having the same issue

dowttie commented 10 months ago

same issue here. i'm on arch, kde plasma, got vesktop from the aur. it seems to happen inconsistently as described before. worth mentioning that i started using vesktop last week and i had this with vencord on regular discord before as well.

Noden2048 commented 9 months ago

Same issue here Everything goes quiet and after refocusing, the connection status says something along the lines of "Reconnecting...", logo then flashes and then it reconnects to the call

x11 Debian, Vesktop (version 1.5.0 4bb0db5), installed the Vesktop app from the .deb

purepani commented 8 months ago

I used to have this not happening, but after updating to the most recent plasma6 rc, ive had this issue. Just thought I'd give some more info in case it's helpful. I wasn't on wayland until then, so that might be part of it.

s-cd commented 8 months ago

okay i thought this problem solved itself but I realized that this only happens in calls, maybe try that?

QuietTR55 commented 8 months ago

I have the same issue, I Use Pop_os and I have enabled "Run in background" for this app but still, it still suspends when out of focus.

Curve commented 8 months ago

I have the same issue on Arch Linux (with KDE) with vesktop from the aur - I can't seem to reproduce this consistently though, however it happens fairly often and always when Vesktop is minimized or sometimes even when it's merely unfocused.

When regaining focus (or being restored) the discord (re-)loading screen is shown and shortly after I'm thrown back into discord as if it just started

I've been having this issue with any vesktop version as well

Managed to reproduce this on my desktop as well, when minimized vesktop will silently hibernate it seems, when restored it shortly shows "No Route" and reloads.

I doubt this is related to power saving as my desktop has any options related to that disabled. Interesting to note may be that I seem to encounter this issue a lot more frequently since switching from mainline to linux-tkg (this may be entirely unrelated though, I've made a lot of changes to my system lately and can't quite remember all of them) - Normal discord does not suffer from this issue

RafaelJust commented 7 months ago

I have exactluy the smae issue here. I use Linux mint (Cinnamon DE), and installed it via the .deb file.

0xAnansi commented 7 months ago

After a lot of tries, seems that adding the following while starting Vesktop drastically reduced the number of crashes.

--enable-features=UseOzonePlatform --ozone-platform=wayland

This is obviously only an option if you run Wayland and not X11.

My full options chain, for transparency, is:

--enable-features=UseOzonePlatform,VaapiIgnoreDriverChecks,VaapiVideoEncoder,VaapiVideoDecoder,CanvasOopRasterization,UseMultiPlaneFormatForHardwareVideo --ozone-platform=wayland

which also solves a few issues with streaming on my setup.

enscott89 commented 6 months ago

After a lot of tries, seems that adding the following while starting Vesktop drastically reduced the number of crashes.

--enable-features=UseOzonePlatform --ozone-platform=wayland

This is obviously only an option if you run Wayland and not X11.

My full options chain, for transparency, is:

--enable-features=UseOzonePlatform,VaapiIgnoreDriverChecks,VaapiVideoEncoder,VaapiVideoDecoder,CanvasOopRasterization,UseMultiPlaneFormatForHardwareVideo --ozone-platform=wayland

which also solves a few issues with streaming on my setup.

Thank you SOOOO much! This fixed my issues!

Vendicated commented 6 months ago

anyone experiencing this issue, try running vesktop with --disable-renderer-backgrounding and see if it fixes it

Vendicated commented 6 months ago

please see https://github.com/Vendicated/Vencord/issues/2478, specifically https://github.com/Vendicated/Vencord/issues/2478#issuecomment-2118886403

Tiagoquix commented 5 months ago

Running Vesktop on Fedora Linux 40 KDE on X11 with the command-line option --disable-renderer-backgrounding seems to fix my issues regarding messages "hibernating"/having a delay (only sending when Vesktop is focused). I don't use Disable Call Idle.

(By the way: https://github.com/Vencord/Vesktop/commit/d3b94fc4df6eec3f93a0689309760e2bb3e96249#commitcomment-142196978)

Vendicated commented 5 months ago

flags disabling backgrounding have been added now, so please test with the latest commit (instructions for running from source are provided in the README) and report back if it is fixed for you

lucasreis1 commented 4 months ago

Still facing this issue with --disable-renderer-backgrounding

ClangPan commented 1 day ago

This issue is becoming quite old, but it's still an issue, it even sometimes disconnects me during voice call, causing great confusion since it doesn't make sound

Also, it seems that using the flag --disable-renderer-backgrounding actually makes it worse for me. I haven't tested it extensively, but with the flag it disconnected very frequently when unfocused, and it seems to happen less without it

Tiagoquix commented 1 day ago

@ClangPan AFAIK, --disable-renderer-backgrounding is automatically applied since a specific Vesktop version (1.5.0 I believe), so using it makes no difference, because you were already using it. Without it, sometimes messages aren't sent until Vesktop is focused again, so I would say the flag may help in calls too.

Curve commented 1 day ago

Are you on Nvidia? I've been noticing strange behavior with browsers on latest KDE with latest Nvidia drivers lately, Firefox and Chromium seem to randomly suspend/freeze for me when minimized

ClangPan commented 1 day ago

@ClangPan AFAIK, --disable-renderer-backgrounding is automatically applied since a specific Vesktop version (1.5.0 I believe), so using it makes no difference, because you were already using it. Without it, sometimes messages aren't sent until Vesktop is focused again, so I would say the flag may help in calls too.

I see, that is good to know, I might've just had an unlucky streak, or maybe applying the flag twice does wonky things idk

Are you on Nvidia? I've been noticing strange behavior with browsers on latest KDE with latest Nvidia drivers lately, Firefox and Chromium seem to randomly suspend/freeze for me when minimized

I am, on KDE too, but I haven't had issue with Firefox at all, so I do not think it is linked

Tiagoquix commented 1 day ago

Can you try using X11 to see if that helps? (Assuming you're on Wayland.)

ClangPan commented 1 day ago

I might try some time, but it's very inconsistent idk

Vendicated commented 1 day ago

just wait for electron to fix it. we did everything possible to work around it, if it doesn't work for you there's nothing that can be done