YouTube videos lag in chromium-vaapi

Youtube video get sluggish and lags if I do multitask. I have set up chromium-vaapi. And enable Hardware Accelerating.
But in Windows 10 no matter how much multitask I do, youtube video won’t sluggish. It is always smooth.
My best guess is Linux doesn’t give much priority to browser that I am using. Can anyone help me in this matter. How can I give chromium more priority in cpu? I want to watch youtube smoothly while I am multitasking.

#################### inxi -Fxzc0 ########################

System:    Kernel: 5.8.9-2-MANJARO x86_64 bits: 64 compiler: N/A Desktop: KDE Plasma 5.19.5 
           Distro: Manjaro Linux 
Machine:   Type: Laptop System: ASUSTeK product: X550JK v: 1.0 serial: <filter> 
           Mobo: ASUSTeK model: X550JK v: 1.0 serial: <filter> BIOS: American Megatrends 
           v: X550JK.304 date: 04/16/2019 
Battery:   ID-1: BAT0 charge: 11.3 Wh condition: 11.4/32.6 Wh (35%) model: ASUSTeK X550A30 
           status: Not charging 
CPU:       Topology: Dual Core model: Intel Core i5-4200H bits: 64 type: MT MCP arch: Haswell 
           rev: 3 L2 cache: 3072 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 22359 
           Speed: 3291 MHz min/max: 800/3400 MHz Core speeds (MHz): 1: 3273 2: 3279 3: 3254 
           4: 3243 
Graphics:  Device-1: Intel 4th Gen Core Processor Integrated Graphics vendor: ASUSTeK driver: i915 
           v: kernel bus ID: 00:02.0 
           Device-2: NVIDIA GM107M [GeForce GTX 850M] vendor: ASUSTeK driver: N/A bus ID: 01:00.0 
           Device-3: Realtek USB Camera type: USB driver: uvcvideo bus ID: 1-7:5 
           Display: x11 server: X.Org 1.20.8 driver: modesetting resolution: 1: 1366x768~60Hz 
           2: 1600x900~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4600 (HSW GT2) v: 4.5 Mesa 20.1.7 
           direct render: Yes 
Audio:     Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio driver: snd_hda_intel 
           v: kernel bus ID: 00:03.0 
           Device-2: Intel 8 Series/C220 Series High Definition Audio vendor: ASUSTeK 
           driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
           Sound Server: ALSA v: k5.8.9-2-MANJARO 
Network:   Device-1: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter vendor: AzureWave 
           driver: ath9k v: kernel port: e000 bus ID: 03:00.0 
           IF: wlp3s0 state: up mac: <filter> 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK 
           driver: r8169 v: kernel port: d000 bus ID: 04:00.1 
           IF: enp4s0f1 state: up speed: 100 Mbps duplex: full mac: <filter> 
           IF-ID-1: anbox0 state: down mac: <filter> 
Drives:    Local Storage: total: 1.02 TiB used: 91.29 GiB (8.7%) 
           ID-1: /dev/sda vendor: Western Digital model: WDS120G2G0A-00JH30 size: 111.80 GiB 
           ID-2: /dev/sdb vendor: Seagate model: ST1000LM024 HN-M101MBB size: 931.51 GiB 
Partition: ID-1: / size: 109.54 GiB used: 27.78 GiB (25.4%) fs: ext4 dev: /dev/sda1 
Swap:      ID-1: swap-1 type: file size: 4.00 GiB used: 0 KiB (0.0%) file: /swapfile 
Sensors:   System Temperatures: cpu: 95.0 C mobo: N/A 
           Fan Speeds (RPM): cpu: 25500 
Info:      Processes: 233 Uptime: 1h 33m Memory: 7.66 GiB used: 3.00 GiB (39.1%) Init: systemd 
           Compilers: gcc: 10.2.0 Packages: 1345 Client: KDE Plasma v: 5.19.5 inxi: 3.1.05

It might be more than a little bit helpful if you detailed your ‘multitasking’ (ie: are you trying to compile a kernel while watching youtube)?

Moving to Browsers

no. let’s just say. I have opened a video with smplayer with hardware accelerating enabled by vaapi.

https://duckduckgo.com/?q=linux+give+program+cpu+priority

https://www.tecmint.com/set-linux-process-priority-using-nice-and-renice-commands/

1 Like

This sounds like a potential XY problem. If it’s a laptop, it may not be using your NVIDIA GPU to render when it should.

Please post your system info as outlined here:

1 Like

@Yochanan I have updated the system info.

There’s your problem. You’ll want to install the non-free NVIDIA drivers. I’ve got to head to work now, I’ll let someone more knowledgeable than myself about NVIDIA drivers take it from here.