Vencord / Vesktop

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

[Bug] Windows wont go to sleep automatically after VC session #649

Open bagusnl opened 3 months ago

bagusnl commented 3 months ago

Discord Account

bagusnl

Operating System

Windows 11

Linux Only ~ Desktop Environment

No response

What happens when the bug or crash occurs?

I noticed for awhile that my PC will not automatically go to sleep after disconnecting from VC. When it happened again today, I saw that Vencord did not release the audio stream and mic input even after disconnected (not from AFK, manual disconnect).

Here is the screenshot of me, not being in a call with Windows still thinking that Vencord currently using my mic and the powercfg /request that states audio stream is in use (I was mistakenly used my Oculus audio earlier then I changed to my USB audio, but it also did not free the device).

image

What is the expected behaviour?

Audio stream should be freed and system should be able to go to sleep after a VC session ended.

How do you recreate this bug or crash?

  1. Join voice call
  2. Talk for awhile
  3. Switch some audio inputs/outputs
  4. Disconnect from call
  5. Open cmd as admin and do powercfg /requests with no other audio source/input app is running.
  6. Open Windows Settings > Privacy > Microphone. Check if Vesktop still using the mic

Debug Logs

C:\Users\bagusnl>powercfg /requests
DISPLAY:
None.

SYSTEM:
[DRIVER] Oculus Virtual Audio Device (ROOT\MEDIA\0000)
An audio stream is currently in use.
[DRIVER] USB Audio Device (USB\VID_0951&PID_16A4&MI_00\b&3321d09b&0&0000)
An audio stream is currently in use.
[DRIVER] Legacy Kernel Caller

AWAYMODE:
None.

EXECUTION:
None.

PERFBOOST:
None.

ACTIVELOCKSCREEN:
None.

Nothing relevant seems to be on the Vesktop console but here it is

C:\Users\bagusnl>C:\Users\bagusnl\AppData\Local\vesktop\Vesktop.exe

C:\Users\bagusnl>
[15120:0609/183425.143:ERROR:network_sandbox.cc(317)] Failed to grant sandbox access to shared dictionary directory C:\Users\bagusnl\AppData\Roaming\vesktop\sessionData\Shared Dictionary: Access is denied. (0x5)
[15120:0609/183425.143:ERROR:network_sandbox.cc(406)] Failed to grant sandbox access to network context data directory C:\Users\bagusnl\AppData\Roaming\vesktop\sessionData\Network: Access is denied. (0x5)
[15120:0609/183425.368:ERROR:network_service_instance_impl.cc(282)] Encountered error while migrating network context data or granting sandbox access for C:\Users\bagusnl\AppData\Roaming\vesktop\sessionData\Network. Result: 11: The operation completed successfully. (0x0)

Request Agreement

redlikemethodz commented 2 weeks ago

Every figure this out?