You are not logged in.

#1 2022-10-14 06:23:34

Miuzore
Member
Registered: 2022-10-14
Posts: 30

[SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

Hey, I am having an issue that started happening around 5 months ago where when watching YouTube videos or when playing non-native games via proton, the display for the game/video and only for the game/video would freeze for 2 seconds seemingly out of nowhere every 10 minutes or so. Everything around the game or video wouldn't be frozen, and there's still sound and the application still reacts to my keyboard inputs like nothing is wrong.

It doesn't seem to happen with games that run natively such as Old School Runescape, which is an Appimage.

I've got ryzen 5 1600x, with nvidia 1060 6gb using latest proprietary drivers (520.56.06-2), 16 gb of RAM.

As for software, I use awesomewm and picom as my window manager/compositor. I had briefly gone on voidlinux on the same machine with pretty much the same configs and software, yet I didn't notice the issue happening there.I should note that I did reinstall archlinux once a few days ago, and the issue still happens.

Potentially relevant logs:

Journalctl > https://dpaste.com/HYJMFJRLV

Xorg.0.log > https://dpaste.com/CQ3YFK3QT

Xorg.0.log.old > https://dpaste.com/95LAPLYL4

If there's anything else that might help, do let me know.

Last edited by Miuzore (2022-10-20 15:45:26)

Offline

#2 2022-10-14 15:45:38

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,464

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

I am betting on network issues.  It looks like you are using WiFi.

Please post the output of find /etc/systemd
Thanks.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2022-10-14 16:34:21

Miuzore
Member
Registered: 2022-10-14
Posts: 30

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

ewaller wrote:

I am betting on network issues.  It looks like you are using WiFi.

Please post the output of find /etc/systemd
Thanks.

There you go https://dpaste.com/ABQW3A4W4

And yes, I am using Wi-Fi via IWD and DHCPCD. Though, if you ask me, I'd be really surprised if networking was at fault, as when the freeze/stutter happens, the video/game keeps playing/running as it should judging from the audio and from keyboard input during the freeze.

Last edited by Miuzore (2022-10-14 16:49:48)

Offline

#4 2022-10-14 17:54:12

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,464

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

I am not certain as I don't personally use IWD, but I think it manages the dhcpcd deamon itself.  I don't think you want to enable the dhcpcd.service which also manages the dhcpcd daemon.
Try disabling and stopping the dhcpcd, then restart iwd.  See what that does.  If I am wrong, just reenable dhcpcd and start it.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2022-10-14 19:59:54

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,362

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

See also https://bbs.archlinux.org/viewtopic.php?id=280421
Can you play a video w/ mpv and yt-dlp w/o freezes?
If not, do the freezes happen if you download the video and play it locally?

Offline

#6 2022-10-15 06:19:17

Miuzore
Member
Registered: 2022-10-14
Posts: 30

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

ewaller wrote:

I am not certain as I don't personally use IWD, but I think it manages the dhcpcd deamon itself.  I don't think you want to enable the dhcpcd.service which also manages the dhcpcd daemon.
Try disabling and stopping the dhcpcd, then restart iwd.  See what that does.  If I am wrong, just reenable dhcpcd and start it.

After disabling/stopping dhcpcd and restarting iwd service, the internet connection does stop working. Re-enabling and starting dhcpcd makes it work again.

Offline

#7 2022-10-15 06:21:47

Miuzore
Member
Registered: 2022-10-14
Posts: 30

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

seth wrote:

See also https://bbs.archlinux.org/viewtopic.php?id=280421
Can you play a video w/ mpv and yt-dlp w/o freezes?
If not, do the freezes happen if you download the video and play it locally?

I tried to play a video with mpv using "mpv youtube_url" command, and it does work flawlessly - no freezes. I guess it's also worth it to mention that in the same session I did still encounter freezes in games and while watching youtube (on Firefox), but mpv worked flawlessly.

Last edited by Miuzore (2022-10-15 06:22:13)

Offline

#8 2022-10-15 08:23:11

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,362

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

If we ignore the games for a moment, HW acceleration in linux browsers is pitiful sad
https://wiki.archlinux.org/title/Firefo … celeration

https://aur.archlinux.org/packages/youtube-viewer
https://archlinux.org/packages/?q=youtube

For "non-native games via proton",

glxinfo32 -B
pacman -Qs nvidia

Offline

#9 2022-10-15 09:32:19

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,759

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

Fwiw Firefox videos does something wonky to accelerated other contexts with nvidia from what I've seen, can you repro using a YouTube video in chromium?

Am i right in assuming the issue only happens in that combination i.e. you have a video playing and are gaming at the same time?

Offline

#10 2022-10-15 11:49:54

Miuzore
Member
Registered: 2022-10-14
Posts: 30

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

seth wrote:

If we ignore the games for a moment, HW acceleration in linux browsers is pitiful sad
https://wiki.archlinux.org/title/Firefo … celeration

https://aur.archlinux.org/packages/youtube-viewer
https://archlinux.org/packages/?q=youtube

For "non-native games via proton",

glxinfo32 -B
pacman -Qs nvidia

glxinfo output > https://dpaste.com/7LJ4SF6VQ

pacman -Qs nvidia output > https://dpaste.com/53J59HH6U

Offline

#11 2022-10-15 11:52:58

Miuzore
Member
Registered: 2022-10-14
Posts: 30

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

V1del wrote:

Fwiw Firefox videos does something wonky to accelerated other contexts with nvidia from what I've seen, can you repro using a YouTube video in chromium?

Am i right in assuming the issue only happens in that combination i.e. you have a video playing and are gaming at the same time?

I've installed ungoogled-chromium (mentioning in case it makes any difference), and I didn't get any freezes/stutters.

And no, it happens independently. I can be playing a game and get those stutters regardless if I have a youtube video in another workspace running, and vice versa.

Last edited by Miuzore (2022-10-15 11:53:14)

Offline

#12 2022-10-15 13:27:12

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,362

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

The 32bit GL installation looks og, did you check the FF wiki about HW accelerated video playback?

Offline

#13 2022-10-15 14:42:13

Miuzore
Member
Registered: 2022-10-14
Posts: 30

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

seth wrote:

The 32bit GL installation looks og, did you check the FF wiki about HW accelerated video playback?

Sorry, I hadn't setup the VA-API at the time of my last reply. However, now I have via the libva-nvidia-driver, setting the relevant environment variables and firefox configs.

Here's the updated output of those commands:

glxinfo32 -B (is pretty much identical) > https://dpaste.com/HD2FMUAVG

pacman -Qs nvidia > https://dpaste.com/HF6LBC2DF

Offline

#14 2022-10-15 14:53:35

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,362

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

libva has no impact on those commands, more interesing would be how firefox (make sure to restart the process) now behaves.
And what it says about GPU usage/HW acceleration (settings and effect)

Offline

#15 2022-10-16 03:00:19

Miuzore
Member
Registered: 2022-10-14
Posts: 30

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

seth wrote:

libva has no impact on those commands, more interesing would be how firefox (make sure to restart the process) now behaves.
And what it says about GPU usage/HW acceleration (settings and effect)

After confirming that VA-API works by running MOZ_LOG="PlatformDecoderModule:5" firefox, the stutters do still happen.

I'm not sure what you mean by "settings and effect", or how to properly give benchmarks, but Video Engine Utilization in nvidia-settings sits at around 3-4% when watching a video, and GPU Dedicated Memory usage goes up about 200MB. GPU utilization also goes up by about 5%.

Offline

#16 2022-10-16 07:01:15

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,362

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

I'm not sure what you mean by "settings and effect"

The status as represented in "about:support"

Offline

#17 2022-10-16 08:45:05

Miuzore
Member
Registered: 2022-10-14
Posts: 30

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

seth wrote:

I'm not sure what you mean by "settings and effect"

The status as represented in "about:support"

Not quite sure what exactly send in that regard - it just shows that HARDWARE_VIDEO_DECODING is available by default, and force-enabled by user, so it should be working if that's what you're asking?

Anyway, here's all the relevant sections from about:support, apologies if this isn't what you asked for > https://dpaste.com/6YFF7C6TX

Offline

#18 2022-10-16 09:10:51

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,362

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

HW decoding looks fine…
Do you get better results w/ https://addons.mozilla.org/de/firefox/addon/h264ify/ ?

Offline

#19 2022-10-16 11:09:13

Miuzore
Member
Registered: 2022-10-14
Posts: 30

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

seth wrote:

HW decoding looks fine…
Do you get better results w/ https://addons.mozilla.org/de/firefox/addon/h264ify/ ?

They do still happen, but they last like half a second now instead of the jarring 1-2 seconds. It's still noticeable when it happens, but I can definitely live with that, thanks.

Though, the root of the issue is still present - when gaming those 2 second freezes are definitely quite jarring. I'm wondering what running games through proton and watching YouTube through Firefox have in common.

Offline

#20 2022-10-16 13:13:46

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,362

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

What if you kill picom?
Though the codec having some impact doesn't lend itself to some vsync issues…

Offline

#21 2022-10-16 15:39:42

Miuzore
Member
Registered: 2022-10-14
Posts: 30

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

seth wrote:

What if you kill picom?
Though the codec having some impact doesn't lend itself to some vsync issues…

The stutters still seem to happen without picom running.

Offline

#22 2022-10-17 07:08:59

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,362

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

What if you export "__GL_SYNC_TO_VBLANK=0" to firefox, eg.

killall firefox
__GL_SYNC_TO_VBLANK=0 firefox

Offline

#23 2022-10-17 15:00:01

Miuzore
Member
Registered: 2022-10-14
Posts: 30

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

seth wrote:

What if you export "__GL_SYNC_TO_VBLANK=0" to firefox, eg.

killall firefox
__GL_SYNC_TO_VBLANK=0 firefox

I've been watching for about 2 hours with that option enabled and I haven't noticed any stutters, either due to low sample size and luck or it actually working.

I say that, because I went on nvidia-settings and disabled "sync to vblank" option and the stutters are still there.

Though, I will stay on the lookout for more stutters on firefox, see if the variable has actually fixed the issue there.

Offline

#24 2022-10-17 15:24:42

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,362

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

Altering the option will not apply to running processes and in doubt just not enforce VSYNC, not prevent it when attempted by the client.
If this fixes it, the VAAPI implementation might cause double syncing (though we're facing this with some games, too?)
You could try sth. like

Section "Device"
    Identifier "Default nvidia Device"
    Driver	"nvidia"
    Option	"TripleBuffer"			"True"
EndSection

To activate triple buffering what will unblock the glSync calls.

Offline

#25 2022-10-18 12:45:43

Miuzore
Member
Registered: 2022-10-14
Posts: 30

Re: [SOLVED]Games and YouTube randomly freeze for 1-2 seconds every 10 min

seth wrote:

Altering the option will not apply to running processes and in doubt just not enforce VSYNC, not prevent it when attempted by the client.
If this fixes it, the VAAPI implementation might cause double syncing (though we're facing this with some games, too?)
You could try sth. like

Section "Device"
    Identifier "Default nvidia Device"
    Driver	"nvidia"
    Option	"TripleBuffer"			"True"
EndSection

To activate triple buffering what will unblock the glSync calls.

Yup, after putting that and launching Firefox normally, I'm not noticing any freezes anymore. Though, it doesn't do anything to gaming - still the same issue.

Offline

Board footer

Powered by FluxBB