You are not logged in.
I've been trying to debug this for a few days and I haven't gotten very far. There are a lot of variables that I can't account for.
Symptoms:
Video playback randomly stutters. The video will freeze for an almost imperceptible amount of time then continue. This stuttering can happen once or multiple times within a few seconds. This happens with or without vsync.
How to reproduce:
- Download https://www.youtube.com/watch?v=RdA45Vk7DDY
- Play using any video player
Hardware:
- Nvidia 1660ti
- AOC monitor, DisplayPort to DisplayPort
- Samsung TV, DisplayPort to HDMI
- Huion tablet, HDMI to HDMI
Here's what I've tried:
- linux and linux-zen
- nvidia and nouveau
- software decoding and hardware decoding
- plasma and i3 both on X11
- playing the file from network, disk, and RAM
- nvidia Force Full Composite Pipeline and TripleBuffer
- nvidia opengl vsync on and off
- picom vsync on and off
- picom backend = glx and backend = xrender also xrender-sync-fence
- picom off
- mpv, vlc, kodi, firefox with or without hardware decoding
Any help is greatly appreciated.
Offline
Is your monitor set to an integer multiple of 60hz?
Please, post the output of xrandr.
Last edited by kokoko3k (2020-11-08 07:40:39)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
> xrandr
DP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 598mm x 336mm
1920x1080 60.00*+ 59.94 50.00
1680x1050 59.95
1440x900 59.89
1280x1024 75.02 60.02
1280x960 60.00
1280x720 60.00 59.94 50.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32 56.25
720x576 50.00
720x480 59.94
640x480 75.00 72.81 59.93 59.94
Offline
How frequent is the stuttering in a range of a minute? It can be normal if background processes are doing things.
I'd try to:
. start an empty Xorg session with nothing else than mpv playing.
. mpv's --video-sync methods.
They helped me in the past to have better timings and to exclude audio driver issues.
. switching mpv's video driver (gpu with opengl api, gpu with vulkan api or even plain xv)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
Using the youtube video I posted above, it skips a handful of times per loop. Sometimes it will go for a handful of loops without skipping.
When playing the videos through mpv without a window manager, they seem to skip less. One video was skipping at predictable periodic intervals but without a window manager it seems to be smooth.
I'm going to guess it has something to do with something in my xorg session or pulseaudio.
Offline
That video is too short to test anyway, try with a longer video, because players may need some seconds to settle.
Last edited by kokoko3k (2020-11-09 11:28:35)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
I tried again with this: https://www.youtube.com/watch?v=9uyyOHIidMA
When running with no window manager, it is flawless. When running with i3 and as much turned off as possible, I get a stutter every 14-15 seconds. Again I've tried various nvidia and picom options. I'm probably missing something.
mpv flags I've tried: --no-audio, --vo=gpu, --vo=vdpau, --hwdec=vdpau, --interpolation. The various --video-sync options made no difference.
For a much smaller file, the combined flags --vo=gpu --hwdec=vdpau --interpolation seemed to remove most of the stutter. At the minimum it was significantly decreased.
Offline
I think I've found the culprit though I don't know how to solve it.
While playing the video with no window manager, I had to unplug all the monitors except for the Samsung TV. The symptoms were most prominent on this device because of the 240hz smoothing feature (symptoms persisted with or without this feature).
I started my typical desktop session in i3 without disabling anything, only plugged in the Samsung TV and played the video with mpv. Like magic, no symptoms. So maybe an nvidia driver issue. Or maybe a flaw in the card itself. Or maybe a feature in the card?
Offline
I don't get it.
Why in the xrandr output those monitors do not appear?
That said, if the frequency is not PERFECTLY equal between the monitors, i suppose the driver has to sync to all of them and stutter is to be expected.
check and try to set __GL_SYNC_DISPLAY_DEVICE environment variable in the same shell before starting the player.
example:
export __GL_SYNC_DISPLAY_DEVICE=DP-1
mpv something.mkv
I think there is something similar regarding xvideo (xv) you can set in the nvidia-settings panel, but i cannot recall now, it may worth a try too.
Last edited by kokoko3k (2020-11-09 20:43:39)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
Why in the xrandr output those monitors do not appear?
I truncated the output. All monitors are running at 60hz
export __GL_SYNC_DISPLAY_DEVICE=DP-1 made no difference. nvidia-settings also shows the correct monitor being synced.
What I did notice was that if only the Samsung TV is on (configured with xrandr --output DP-3 --mode 1920x1080 --output HDMI-0 --off --output DP-1 --off) and all cables plugged in, the stuttering occurs. But if I extend the desktop (xrandr --output DP-3 --mode 1920x1080 --output HDMI-0 --off --output DP-1 --mode 1920x1080), the stuttering does not occur.
Offline
what if you:
disable mpv's vsync:--opengl-swapinterval=0
turn off picom
turn on nvidia's forcefullcompositionpipeline?
All together.
Last edited by kokoko3k (2020-11-09 21:29:20)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
Yes, turning vsync completely off remedies the symptoms with all monitors plugged in and only one switched on through xrandr. forcefullcompositionpipeline doesn't have an effect one way or the other. Of course turning vsync off results in a visible horizontal line during panning and fast moving scenes which is expected.
I'm still trying to understand why the symptoms disappear with just the Samsung TV physically plugged in. I would expect the symptoms to also disappear when all connections are plugged in but only the Samsung TV is switched on with xrandr.
Offline
I suspect a driver issue there, so you should ask to https://forums.developer.nvidia.com/c/g … aphics/145
...but as a workaround, forcefullcompositionpipeline should eliminate the orizontal line when mpv does not sync to vblanks, doesn't it?
You could have the compositor running too, if you disable picom's vsync.
Last edited by kokoko3k (2020-11-10 05:58:38)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
vsync off, picom killed, and forcefullcompositionpipeline on still produces the symptoms described. The horizontal line is gone. It seems the only solution is removing the other connections. I'll take a stab at the nvidia forum.
Offline