How well do web videos work on Linux on Framework? Is playback smooth?

Hello,

I am currently using a Dell XPS 13 9360, which is from 2017. It’s been serving me very well, but there’s one major annoyance I’ve been having: watching web videos and in particular Youtube on this thing has been a terrible nightmare. I use Firefox on Wayland on Manjaro Linux. Videos do not run smoothly no matter what I do. I get frequent stutters, freezes, and frame timing problems, and it gets worse the higher the bitrate and resolution. The CPU gets hot and the fans start running high and the battery drains quickly.. all just for watching Youtube. However, videos played back with MPV or VLC are fine… and I don’t get this issue on my desktop which has an Nvidia card, so I can’t really tell what’s going on.

When I had Windows on this laptop, I had the same problem on Firefox, but not on Microsoft Edge. So that means that the laptop can definitely handle these videos, but perhaps the issue is in software. Is it a Linux issue? Driver issue? Firefox issue? Wayland issue? Fractional scaling issue? or a hardware+software issue? who knows!

Anyways, I’ve given up trying to solve the problem and just lived with it, not asking for support here. But I want to make sure that my next laptop does not have this problem. The laptop has become a bit old now, and I am eyeing the Framework laptop (with AMD) as a replacement once my current laptop’s battery has worn out. Have people using Linux on the Framework faced similar issues? How about heat and battery life? I’d like to keep using Manjaro, so I’m interesting in particular on what Manjaro/Arch users have experienced. Also if you have fractional scaling enabled, how well it can handle it.

I’m watching Youtube on my FW13 right now! It’s working just fine. And I’m using 125% scaling, on Wayland. ETA: it’s on my lap, the bottom is warm to the touch, but even if I put my ear up to the bottom grill I don’t hear the fan. I’m plugged in to the charger but I happen to have my energy settings set to optimize battery life at the moment.

By the way my last laptop didn’t have the problems you’re describing either (a i7-7500U w/ 20GB RAM), but it did sometimes lock up if I was playing Youtube while on battery power, I suspect that was an overheating problem or something.

I know you said you’ve given up on solving that & not asking for support, but I have a similar age laptop that is still currently handling youtube fine via Firefox on linux. Fan speeds up but no issue with the actual video playing.

If Microsoft Edge did not have this problem, at all, then I’d say it definitely sounds like a problem with Youtube+Firefox, and / or drivers. What it can be is that Youtube is sending videos in a format that Firefox can only do “software” decoding for. That is problematic, as it’s demanding, and not all CPUs can handle that.

I’d say give this extension that I’ve used a shot: addons.mozilla.org/en-US/firefox/addon/enhanced-h264ify/ Try checking the VP9 and AV1 boxes & test if youtube it better. If not, add another checkbox & test, repeat.

For my 2017 laptop I went and installed a better driver that’s able to decode (and encode) more types of video in “hardware” which dosen’t tax the CPU. There is a table of what generation intel + which drivers can handle what here: github.com/intel/media-driver/?tab=readme-ov-file#decodingencoding-features They are under generation codenames like, Kaby Lake, Ice Lake, etc. So you need to know check which generation you have & use google to check its codename. Like googling “Core i5-6200 codename”.

Not sure which generation intel you’d have, as I’m seeing it could be a 6th, 7th or 8th gen intel for a a Dell XPS 13 9360.

The 7x40x chips have very good hw decoders, they may still use a bit more power than I’d like on linux but they can handle pretty much anything I could throw at them in firefox or otherwise.

Intel has even better hw decoders but they are attached to an intel plrtform XD.

In the case of your xps it is likely missing hw decoders for the codecs youtube is using these days (av1 and vp9) so it has to cpu decode them which at higher resolutions gets quite intense. As mj1 already mentioned you can improve that situation by fording youtube to give you codecs you can hw decode (that may limit the available qualities though).

None of those have av1 decoding and only limited vp9 decoding.

That’s good, cause I only guessed when I suggested blocking those two specific codecs! :upside_down_face:
But they are the newest, so it had to be one or both of them, right.

Youtube seems to use av1 for lower resolutions and vp9 for the higher ones last time I checked. Without h264ify you usually don’t get any h264/h265 anymore these days.

According to this 6th gen doesn’t have any vp9 at all and 7 and 8th gen have vp9 8 and 10bit. I don’t remember them working with youtube on my 8th gen thinkpad though.

I never looked before, but I had to test.

I tried a random 8k video.
For 8k / 4320p I got av1 high framerate / itag format code 571. For 4k: vp9 / 313, for 1440p: vp9 / 271, and for 1080p and every lower resolution: av1. My 2017 Thinkpad with Kaby Lake i5-7200U, Intel HD Graphics 620 has no problem whatsoever playing any of those codecs and resolutions, except for 8k. As expected, the CPU chokes trying to software decode 8k av1. No significant added CPU demand for any other resolutions. Software decode of 1080p av1 and below is no problem at all. sudo intel_gpu_top shows “Video” in use for vp9 only.

If I block av1 with h264ify then I get vp9 for every resolution. Except the 8k option is just gone.

Are you plugged in? What distro are you using? Are you using Firefox? and is the video buttery smooth with absolutely no hitches, similar to how it is on your smartphone? (assuming it’s an iPhone or an Android device). If it is, that’s happy to hear!

Can you try watching a 4k60 video and maybe speed it up a bit too? (I usually watch my youtube videos sped up to 1.5x or 2x).

This is the video I usually use to test:

I didn’t want to turn this thread into a support thread for my Dell, but ahhh since people are asking… I’ve really gone in depth into it in the past couple of years of using it. The conclusion is that my CPU (i7-7500U) definitely supports VP9 but somehow Firefox fails to use it sometimes and it’s just unpredictable for some reason. I’ve also monitored my CPU clock rate while watching videos. It sometimes stays at a nice 600MHz while playing videos, and the video is smoother than usual (but not 100% perfect), which indicates to me that the video is accelerated. But sometimes it goes to 2.6GHz and plays it back and the laptop gets hot, and playback isn’t smooth.. indicating it fell back to software decoding. Sometimes a reboot fixes it, sometimes it doesn’t. Maybe suspending or hibernating causes some failure somewhere, I don’t know. It’s rather temperamental.

I’ve tried Microsoft Edge on Linux (which I use exclusively for work) which is installed as a flatpak… I figured it’s chromium based so it might work better… but it didn’t play back videos very well either. But I didn’t explore this too much because it’s a Flatpak and MS Edge which may have introduced its own problems.

I usually use the laptop unplugged, and the smoothness does seem to be better when i’m plugged in, but not 100% perfect either. It’s not really a solution anyway.

I just gave it a try while plugged in. It doesn’t fix the problem, the video still isn’t buttery smooth. The issue with h264ify is that it doesn’t offer higher resolutions than 1080p. The video quality also isn’t great.

Just to emphasize, if I try this another time, it might work fine. As I mentioned, it’s temperamental.

If this is the case, then I would have problems playing back the videos in mpv. But youtube videos play back very smoothly in MPV and in VLC. MPV with default settings can’t play back things properly, but if I use --hwdec=vaapi and --vo=dmabuf-wayland, it becomes smooth as I expect. Actually, this is my current workaround, but it means that I can’t browse comments or mark videos as watched automatically when going through a playlist, so it’s not ideal.

My laptop does not support AV1 for sure. MPV cannot play back AV1 videos properly on this laptop, which sometimes happens when I try to play a newer youtube video. But that’s a hardware limitation. VP9 should be fine.

1 Like

At least on my 8th gen thinkpad it used signifficantly more power to do that than hw decoding.

Might have been fixed since I last actually used my 8th gen XD

Sorry you did not state you were playing back the same videos in mpv and people usually don’t have vp9 files laying around so I asumed you were playing back h264/5 in mpv.

Check about:support in firefox to see what decoders are available.

1 Like

Ok, looking harder, I guess I should call the power it takes significant. But, eh, I still have headroom left :grinning: And with h264ify it changes to vp9 and hw decoding, so it’s all good anyway as far as youtube is concerned.

Before they improved it it was straight up more efficient so sw decode everything below 1080p60 on the 7840u cause that thing has just insane performance per watt and the hw decoder was probably just turned on full tilt or not at all. It’s a lot better now but it still has room to improve.

I am still debating if I should turn off hw decoding on my desktop cause the 7900xtx has garbage power management and just draws like an extra 50w cause it has to clock up the memory to run the hw decoder and apparently they only got “just barely not off” and “full send” as options there and I don’t seem to be able to force firefox to use the decoders on the igpu.

I gotta retest vp9 on my thinkpad at some point.

In order to test this, I first downloaded a video with yt-dlp making sure to pick a 4k60 VP9 format, and then try to play it back with VLC or MPV.

This is what I get in about:support


So HW decoding of VP9 is definitely supported by Firefox.

As I mentioned, I went through this several times, and I’m really stumped at this point and gave up, and didn’t want to turn this thread into a support thread. But since the topic was opened, I’d appreciate any other insights or clues.

Might as well try to get to the bottom of this at this point.

First of all can we get some info on the platform, what processor (gotta be 7 or 8th if you got vp9 I guess) is the thing actually running, what os and so on?

On youtube when you right click you can get the “stats for nerds” overlay that shows you what codec you got. Check if you get vp9 or av1 for your test video at the test settings. (Youtube seems to prefer av1 when availble and the video has 4k60 av1 available).

You can also use hwinfo(windows) or something like intel_gpu_top to see if the hw decoders are used.

You could also try downloading the 4k60 av1 and check how that runs in mpv.

Edit: looks like youtube is giving me 4k60 vp9 despite me even having av1 hw decoding available so I guess my understanding of the preferences was wrong.

Also check above the available codecs (in about:support) if there is something blocked/blacklisted for some reason.

I’ve got an Intel 7500U. Thats a kaby lake processor. It supports VP9 hardware decode, but not AV1

On youtube, I tend to get AV01 now (but at lower resolutions) despite not having a AV1 hardware decoder. It wasn’t like that before, so I explicitly disabled it in Firefox in about:config to try to get it to force VP9, for the purpose of testing. I now get VP9 codecs when I play back videos. However, the bad stutter still occurs.

In intel_gpu_top, I do see some usage in the video engines but it does occasionally drop to 0 when playing back the video.. that’s when the stutter occurs.

Though… you’re not getting any of these issues in Framework? What distro/cpu/browser are you using?

It’s not thermal throttling right?

Are you getting stutters playing more reasonable resolutions (the display isn’t 4k is it?) or just 4k60?

Definitely not getting stutters, not 100% happy with the power consumption though but that’s nitpicking at this point. I am using arch/7840u/firefox .

Hell the 7840u can comfortably cpu decode anything short of 8k60 but above 1080p60 the power consumption gets a bit out of hand.

I played that Costa Rica video at 1.5x in Firefox, fullscreen, on battery. Pop OS 22.04, kernel 6.12.10, optimization settings for battery life. No stutter that I noticed. Laptop on a wooden table. Only when I muted the audio and held my ear up to the bottom could I faintly hear the fan.

My system is the 7640U with the lower res screen, 16GB RAM.

PS I never thought about how snakes could climb trees!

1 Like

So I just dug up my t480s and did some experimenting. Looks like vp9 hw decoding does actually work now but it really struggles with that costa rica video, especially without power plugged in.

The problem may actually be the compositing/drawing and not just the decoding bit. I really hope direct scannout gets more love in firefox and stuff.

I don’t think it is. Temperatures do go high at around 70-80ish, but not close to the maximum temperature of 100C. It might be power throttling when on battery, since performance does get better when I plug in.

The resolution is 3200x1800, which is not quite 4k, but close. It’s somewhere between 1440p and 4k. So 4k videos still look good on it.

I do get stutters playing lower resolutions, but not as much. it’s a little smoother. Youtube often switches to a lower resolution automatically when it sees that my laptop is struggling with 4k video. Also, 30fps video plays back a lot smoother.

But 4k60 shouldn’t be unreasonable to render for a premium 2017 laptop, I think, especially when it can do that just fine on other programs like MPV, and on MS Edge on Windows.

That’s good to hear.

Perhaps the issue I’m facing is to do with my hidpi 3200x1800 screen that’s being driven by integrated graphics. I now wonder how well the framework can handle videos if it has the higher resolution screen, which is what I’m interested in.

Thank you for testing this for me. Indeed, plugging in the laptop does make things smoother for me.

Have you tried downloading the video with youtube-dl, then watching it with mpv?

I’m not sure what “direct scannout” is, but I get the feeling that this is the core of the problem, because of how videos seem to get rendered in Firefox vs MPV, and what I’m setting in intel_gpu_top.

My laptop uses a hidpi 3200x1800 screen. Not quite 4k which is 3840x2160, but close. So 4k videos look nice on it.

On MPV, if I set --vo to GPU, then it struggles. But if it’s “dmabuf-wayland”, then it’s smooth. I don’t really fully understand these settings, but it sounds to me that the “gpu” setting would try to render the decoded video using 3D rendering with textures/shaders which is more intense, whereas dmabuf-wayland just does a DMA copy of the decoded video when wayland draws to the screen. Maybe 3D rendering is what firefox tries to do with video, but as a result it stutters.

So it sounds like firefox indeed is the problem here, and maybe the fact that I’m on wayland as well. But if Framework doesn’t have this problem, then that’s great.

Yeah I don’t think that’s it. Power limit throttling is definitely involved but ultimately it’s just a lot less efficient to do video playback in a browser than a dedicated video player (at least until they put direct scanout in them)

Nice

That bit is already a lot better on 8th gen then. 1080p60 was not problem in firefox even with 2x playback speed and on battery.

It should not but efficient video playback in a browser is pretty hard.

I don’t think the output resolution is the problem and the framework can easily handle putting out whatever it wants to my 4k120hz tv. My media pc running that is actually a much weaker intel n100 that does just fine using a dedicated video player.

No but It does play back high bitrate h264/265 4k60 in mpv just fine, even before dmabuf-wayland was a thing.

It’s basically telling the hw decoding pipeline “here’s an encoded video stream, decode it and put it here on the screen” instead of decoding a frame, copying somewhere, scaling it, copying it somewhere, put it on a web page, render that and then put it on the screen. This is the reason phones can do video playback so well and unfortunately both windows and macos are quite ahead of linux in that department too but things are moving.

Dmabuf-wayland is a step towards that.

Given X11 is barely on life support and people are actually working on direct scannout on wayland I don’t think wayland is especially at fault here. For proper direct scanout you need the whole chain from top to bottom to work together and that is just pretty hard. A dedicated video player can skip a lot of those steps, especially the rendering a webpage part so they got it easier.

This isn’t a problem on the framework cause they are a lot stronger than a 6/7th gen mobile dual core so they can easily just power through those issues. Sure playing back 4k60 in firefox draws a few extra w compared to mpv but it does it just fine.

1 Like

Thanks for all the information, it’s very interesting. So it looks like it’s a combination of factors: firefox and no scan-out making things less efficient, VP9 and 4k60 (often played back at high speeds) putting a lot of demand on the system, and perhaps power/thermal throttling as a result of this inefficiency. Also, I revise my statement, it does actually thermally throttle if I keep the laptop plugged in and in performance mode. On battery however, its probably a power throttle. Ahhh time for a new laptop I guess. I just never thought I’d want to get a new laptop mainly cause I can’t watch videos smoothly on a web browser anymore.

So an AMD Framework should be a good replacement for this laptop. Now the only other concerns I have are:

  • Ordering from my country, which doesn’t have it officially launched (I got ways around it)
  • Actually trying the laptop out before buying (I don’t know anyone who has one, and there’s no store here that has it on display)

But those are separate topics, so let’s not discuss them here.

As I type this, I am watching a YouTube video at 1440p60 with no stutter. My laptop is plugged in to power and a 3840x1440 external monitor. But interestingly, it did start stuttering after a bit because it started thermally throttle as the CPU was boosting to 3.5GHz. Once again showing how temperamental the whole thing is.

1 Like