ThaUnknown / miru

Bittorrent streaming software for cats. Stream anime torrents, real-time with no waiting for downloads.
https://miru.watch
GNU General Public License v3.0
2.36k stars 133 forks source link

[Bug]: Nvidia video throttling on linux #364

Closed EnergoStalin closed 10 months ago

EnergoStalin commented 10 months ago

Preflight checklist

What app version are you using?

v4.4.14

What operating system version are you using?

Linux

Expected Behavior

Play video smoothly without random throttling

Actual Behavior

I don't know even how to describe this let's say it looks like throttling or decoder issue but i'm not sure. On official electron build i have smooth playback if codec's supported of course otherwise i got black screen and sound or vice versa like expected. The problem is that even web native h264 (High 10) aac (LC) playback suffering which works perfectly when running miru with stock electron.

By my experience it throttle mostly in fullscreen mode and when you don't touch window for some time.

I found funny workaround how to avoid this you simply need to have something capturing Miru window. So with obs problem also disappears but not completely i think however it's indeed become less noticeable.

On my amd laptop i don't have such problem with mostly same system setup tho. So i'm concluding it's particularly linux with nvidia related.

GPU: NVIDIA GeForce GTX 1050 Ti Driver: nvidia-dkms 535.113.01-2

WM: Hyprland Session: Wayland

Miru running under xwayland. Somehow electron don't want create window under wayland on nvidia didn't test it on amd.

This whole time i was thinking it's electron problem but then realized what miru using it's custom build so here we are.

Screenshots

It's better noticeable when watching on graph. Don't know it's even reproducible on Xorg i don't have someone with similar setup in reach. But still better have it documented somewhere because i already struggling remembering all of details.

https://github.com/ThaUnknown/miru/assets/49844515/ca99cec8-69b2-4c9c-adf2-8aa8cd5d823c

Used torrent

ThaUnknown commented 10 months ago

https://github.com/ThaUnknown/miru/issues/305#issuecomment-1646980158