swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.4k stars 1.1k forks source link

Video buffers on unfocused workspace #8130

Open analyticmind opened 4 months ago

analyticmind commented 4 months ago

Recently installed intel-media-driver to get hardware acceleration, and after installing it I noticed that whenever a video is left playing in an unfocused workspace, it will buffer. In some cases, it will just stop playing. This happens whether the video is in a browser or a standalone application like FreeTube or mpv.

Searching through this repository, I found a workaround for a similar issue (#3716), i.e. set the environment variable vblank_mode=0. However, the initial purpose of getting hardware acceleration was to save some battery, whereas the workaround is said to negate this by maxxing the GPU.

I was able to replicate the issue in 2 laptops and 1 desktop PC.

Any ideas for a better workaround?

azsatr commented 2 months ago

I can reproduce this with Sway 1.9 on Debian testing with a CometLake-U GT2.

I can also observe this with FreeTube 0.21.0 and Chromium 125.0.6422.60. However, mpv (0.38.0) is not affected.

vblank_mode=0 also fixes the issue for me.