Youtube videos are laggy

Youtube videos are laggy special in full screen, what is the problem? and how to fix it? I’m using Lenovo Ideapad gaming 3 16IAH7 with nividia rtx 3060

1 Like

Increase the number of VCPUs assigned to your qube.
Maybe also this issue with youtube specifically:

2 Likes

Also relevant:

2 Likes

Disable ambient/theater mode.

1 Like

@OvalZero I don’t think that this is the problem as the gpu is somewhat powerful.

1 Like
2 Likes

how do you check how many VCPU your system has total and what happens to other qubes if you max it?

1 Like

You can get the number of pCPUs using this command in dom0 terminal:

lscpu

Or:

xl cpupool-list
1 Like

First I’m on Qubes (4.2.3) / Fedora 41 and I’m also having these issues on watching laggy youtube videos using Firefox (133.03) especially in full-screen. So I tried Mullvad Browser (14.03) and Microsoft Edge (131.0.2903.112) and for me it was better no more laggy videos even in 4K. Hope this helps :smiley:

1 Like

I wonder if a GPU passthrough will fix this issue? I also tried using brave browser but no result.

This turned into a bit of a rant. Someone buy me a coffee for my first reply.

Improved lag problem slightly by

  • Limiting Max Ram in QUBE to at least 1gb less than total system memory
  • Doubled vCPU’s from default (prob not a good thing)
  • Turned off ‘Include in memory balancing’
  • Youtube Turn off AMbient Lighting (Gear Icon bottom left of any video thats playing)
  • Youtube Turn Off ‘Stable Volume’ (Gear Icon)
  • Youtube Change Resolution to the one which is most likely to be prioritized and optimized for delivery by youtube to consumers ( 1080p most PC devices 720p is better if youve an old computer or on mobile / consumer probably try to default to this if possible so likely more capacity could be counter-intuitive but it worked (720p) for me on a dinosaur lappy ) [[1]]
  • Shutdown all other possible qubes
  • If using HDMI for Audio Change profile to Stereo not 5.1 and select profile with no input sources ( Click mixer under volume slideer in Qubes Desktop and then right arrow on right hand side of tabs at top of Mixer window till you get to profiles)

IMO after some experience transcoding in the Film/TV sector the issue is most likely due to a mismatch / non-ideal Client-side Audio Visual Device interpretation of youtubes output Codec’s which I believe from memory can be multiple depending on the responsiveness of your device. Things like bitrate 16/32/48? Sample Rate 48khz on device hardware but possible multiple conversions happening as the signal is sent from yt in one av code to your client qube and then into dom0 which may be another and not all nicely aligned and matching up.

Does that make sense.

You can tell because

You get the same issues with audio that you do with video ie laggy or sped up in certain parts like you have the speed set to 1.5 times so you get what we in the Jungle DrumnBass community call a Timestretch (made famous {possibly} by Goldie [[2]] ) Anyway ya audio sounds robotic and your frames get smooshed together or spaced further apart. A tell tale sign of a mismatched or funky bit/sample configuration.

The 5.1 Audio changed alot visually for me because your using less of the available stream bandwidth/allocation for probably non existent 5.1 audio channels. So the system can spend more time calculating visual content.

I would like to see a more comprehensive tolling for AV in qubes, most definitely based on ffmpeg,

But im a forevern00b script kiddy when it comes to the real dev nuts n bolts of FFMPEG implementation.

What i would do if i could wuld be create an AV/MultimediaVM lets call it sys-mux
Have it run auto tests on initial setup of the sys-mux qube and then provide you with the optimal setup configuration to receive input from a selection of source ,ie streaming tube sites? multiple web based sources at once (itunes,spotify, whilst using tiktok tok or whatever, workstation-audio, workstation-video, workstation-games-engine, etc) Like if your watching a tutorial youll only need 128kbps mono mp3 freeing up cpu and mem for your working SW and finer video if needed)

[[1]] I think I know that YT does not store all resolutions of a video that are available -why would you? when all you need is the best quality version and decent remuxing to downsample live, (Generally done by the client SW/HW Decoders) YOu can see an example of this when dropping a stream url into VLC or PotPlayer you can select SW or HW decoding and choose the stream res in app not because they are data files being served but because you can decode/transcode down to the available options. And you get better / faster processing and quality from different SW/HW/Codec/Target Wrapper combinations.

[[2]] (https://www.discogs.com/group/thread/998105)
That scatter on the drums is a classic example of how youtube audio glitches when the video gets laggy, its cos the audios been chopped up into bit and then sent out with a different time signature for each bitch.

#netuffnutsaudioqubersoutthere