You are not logged in.

#1 2023-07-23 18:50:53

Gravel
Member
From: [object Object]
Registered: 2022-06-01
Posts: 34

mpv either lags computer or itself

Every time I run mpv the video plays fine but the rest of the computer lags a lot and is overall much slower. However when I use the --vo=xv flag, the opposite happens, as the video is laggy but the rest of the system is not.
I'm using nvidia graphics, and here's the output of nvidia-smi when:

vo=xv: https://0x0.st/HeLd.txt (30% cpu)
vo=gpu: https://0x0.st/HeLC.txt (1-5% cpu)

hwdec=auto always used, any help appreciated :)


"A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature."

Offline

#2 2023-07-23 19:05:50

seth
Member
Registered: 2012-09-03
Posts: 60,722

Re: mpv either lags computer or itself

Though you're not restricted to the old driver, try https://bbs.archlinux.org/viewtopic.php?id=286492
That aside, the output of mpv and "loginctl session-status" (notably whether you're using a compositor, which, and whether this is maybe waylad) would be more interesting.

Offline

#3 2023-07-23 19:16:30

Gravel
Member
From: [object Object]
Registered: 2022-06-01
Posts: 34

Re: mpv either lags computer or itself

Oh my bad, I completely forgot about mentioning the compositor tongue

I'm running X11 with picom as comp, though disabling or tweaking it in any way has made no apparent impact in mpv's performance.
As for mpv o/p: https://0x0.st/He9q.txt

I'll try that mpv build as soon as I can, hopefully it fixes the issue

Update: It didn't. Same slow as before, made sure to include gpu-context=x11 && hwdec=vdpau flags but they made no impact either.

Last edited by Gravel (2023-07-23 19:33:13)


"A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature."

Offline

#4 2023-07-23 19:36:26

seth
Member
Registered: 2012-09-03
Posts: 60,722

Re: mpv either lags computer or itself

mpv output for playing the video (you can obfuscate the video title)

Does picom though have impact on the system performance when playing w/ the GPU backend?
Also probably post your xorg log (for whether this is a hybrid and/or multihead system and what drives the other GPU, if any)

Also explain the nature of the overall slowness.
Is it limited to X11/graphics stuff or does

echo "scale=7000; a(1)*4" | bc -

perform worse while running mpv vo=gpu than when not running mpv?
(Don't post the bc result, it's Pi)

Offline

#5 2023-07-23 20:22:05

Gravel
Member
From: [object Object]
Registered: 2022-06-01
Posts: 34

Re: mpv either lags computer or itself

mpv o/p: https://0x0.st/He96.txt
xorg log: https://0x0.st/Heps.txt

Does picom though have impact on the system performance when playing w/ the GPU backend?

Not really, picom hasn't given me any issues ever and based on the fact that the xv flag fixes the problem I'm pretty sure it has nothing to do with it and is rather a drivers issue or something alike.

Also explain the nature of the overall slowness.

Starts out fine then gets progressively worse in the span of around 3s. Most noticeable example I can give is ff, it becomes incredibly slow and clunky to scroll through a website or to even type in it, as there's also input lag though that's probably just the time it takes to show the inputs rather than register them.

does

echo "scale=7000; a(1)*4" | bc -

perform worse while running mpv vo=gpu than when not running mpv?

Pi prints out exactly the same in both occasions (time registers the same... time), so its 100% graphical.

One side question, is there any way to see the live nvidia logs? I've been noticing recently some graphical glitches on my screen (Particularly an occasional black flicker covering around the half top of my screen) so the drivers might be the problem.


"A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature."

Offline

#6 2023-07-23 20:39:55

seth
Member
Registered: 2012-09-03
Posts: 60,722

Re: mpv either lags computer or itself

"time registers the same... time" is the more relevant part (I've faith in bc being able to calculate Pi wink

    31.906] (==) Log file: "/home/gravel/.local/share/xorg/Xorg.0.log", Time: Sat Apr 22 09:23:41 2023

xorg log is dated

Fatal server error:
[    31.919] (EE) xf86OpenConsole: Cannot open virtual console 1 (Permission denied)
[    31.919] (EE) 
[    31.919] (EE) 

and failed (but that's not relevant since it's no april)

[vo/gpu/x11] Display 0 (HDMI-0): [1920, 0, 3840, 1080] @ 59.933878 FPS
[vo/gpu/x11] Display 1 (DP-2): [0, 0, 1920, 1080] @ 143.999864 FPS

There're two outputs w/ different Hz, one pot. VRR

[vo/gpu] Window size: 960x1080 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 3840x2160 (1:1)
[vo/gpu] Video display: (0, 0) 3840x2160 -> (0, 270) 960x540
…
[vo/gpu] Assuming 143.999864 FPS for display sync.

and you're playing a 4k video in a tiny window, the assumed FPS is 144, but

[vo/gpu/x11] Display 0 (HDMI-0): [1920, 0, 3840, 1080] @ 59.933878 FPS
[vo/gpu/x11] Display 1 (DP-2): [0, 0, 1920, 1080] @ 143.999864 FPS
[vo/gpu/x11] Current display FPS: 59.933878

=> Simplify that, remove the output on DP-2: still same issue?

Edit:

any way to see the live nvidia logs

The kernel module logs to dmesg, the x11 driver to the X11 log, but I don't think those symptoms would get logged…

Last edited by seth (2023-07-23 20:42:32)

Offline

#7 2023-07-23 20:58:59

Gravel
Member
From: [object Object]
Registered: 2022-06-01
Posts: 34

Re: mpv either lags computer or itself

"time registers the same... time" is the more relevant part (I've faith in bc being able to calculate Pi wink

I know, I meant that the printing time was the same tongue

Simplify that, remove the output on DP-2: still same issue?

Not at all, was mpv somehow forcing my 144hz monitor to refresh at 60hz?
If so, how could I make it work on 2 monitors?
(Also, I removed HDMI-0, since DP-2 is my main one, but the problem fixes on either one regardless)


"A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature."

Offline

#8 2023-07-23 21:22:45

seth
Member
Registered: 2012-09-03
Posts: 60,722

Re: mpv either lags computer or itself

https://wiki.archlinux.org/title/Variab … _on_NVIDIA
Does nvidia-settings indicate that either output is G-Sync compatible (and is VRR enabled)?
Do you get the problem when setting DP-2 to 60Hz?
(The wiki points out that the mesa drivers blacklist video players from VRR, there's probably a reason for that …)

Offline

#9 2023-07-24 10:25:45

Gravel
Member
From: [object Object]
Registered: 2022-06-01
Posts: 34

Re: mpv either lags computer or itself

No, neither are compatible at all and the problem does still persist when setting DP-2 to 60hz


"A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature."

Offline

#10 2023-07-24 13:17:14

seth
Member
Registered: 2012-09-03
Posts: 60,722

Re: mpv either lags computer or itself

Please post the relevant xorg log to record the actual server configuration (notably any explicit config to the nvidia driver)

Offline

#11 2023-08-02 12:01:27

Gravel
Member
From: [object Object]
Registered: 2022-06-01
Posts: 34

Re: mpv either lags computer or itself

Deeply sorry for the delay, it was a busy week and didn't remember if I replied or not (Turns out, I didn't)

Here's a newer log, which hopefully should be useful:
https://0x0.st/H2vb.txt


"A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature."

Offline

#12 2023-08-02 12:48:45

seth
Member
Registered: 2012-09-03
Posts: 60,722

Re: mpv either lags computer or itself

I'm not under any pressure by a situation that affects you, so delays are no problem for me wink

Let's throw some stuff  against the wall:

__GL_SYNC_TO_VBLANK=0 __GL_GSYNC_ALLOWED=0 mpv favoriteporn.mp4

In addition try /etc/X11/xorg.conf.d/20-nvidia.conf

Section "Device"
    Identifier "GeForce RTX 2070"
    Driver  "nvidia"
    Option "ForceFullCompositionPipeline" "true" # I'd expect that to "break" the single-output case
    Option  "TripleBuffer"          "true" # while this might mitigate the issue
EndSection

and to use the outputs in clone-mode (ie. both display the same and the entire size is 1920x1080)

Offline

Board footer

Powered by FluxBB