[TRACKING] Linux Hardware Video Decoding Power Consumption

We don’t actively provide direct support for Arch, but tracking in the meantime.

Is power consumption better on other distros?

We do have a TLP guide for Ubuntu, Fedora matches this as well.

(I don’t have a framework jet, preordered a r7 13, and me preordering something is a really rare thing)

Do you have some rough numbers, idle (sitting on a simple desktop with as little as possible running, 20% brigthness, wifi on and connected), firefox playing a 720p youtube video (not full screen) and maybe firefox playing a 4k60 youtube video (also not full screen)?

I am asuming the amd version is going to do better in this reguard but if the intel version is actually doing this bad that’s not good.

I can share my experiences with the Framework 13. My use case and the hours we see are expressed on the TLP guide. That said, we have users seeing far better numbers by taking additional steps. Again, note the + sign next to the numbers.

Additionally we’re working on internal changes to further battery life with expansion modules in use as well. This is an ongoing process that will be reflected in BIOS updates.

We recommend following the guide, which goes beyond just TLP.

I use my Framework 13 12th Gen throughout my workday without needing to charge it with this TLP config and following the guide.

Unused expansion modules removed, TLP enabled per the guide and brightness down, keyboard lights off with Bluetooth turned off as well, you will see far better battery life than without these changes.

1 Like

Well, I’ve only been using linux for about a year, but I also found the issue of video decoding on linux to be bewildering, and I also undertook a sort of survey. See this thread I made. I’m now using Endeavour OS on the Framework laptop, and hardware acceleration isn’t working with this distro either. Last week I tried again to follow the directions on the arch wiki and clean things up, and what I got for my efforts was a non-booting system.

It seems like this is neither an arch-specific issue nor a framework-specific issue. I hope it gets resolved eventually. I see people on this forum reporting incredibly low power usage, like under 5W. I’d sure like to see that performance on my machine.

As a new linux convert, I think that this might actually be my biggest gripe with the linux experience.

Hi @Aidan , I’m curious about the non-booting arch setup, do you have a separate thread for that issue?

are you still using Endeavour OS at the moment? cheers!

@Loell_Framework Yes, I’m using that Endeavour OS system right now. I got it fixed with help from the Endeavour OS forum. I didn’t come here for help because I don’t think it was a Framework-specific issue. I wish I could tell you the whole story, but unfortunately I don’t remember what I did which broke it. I thought I was being very careful with what I tried, but I guess when you don’t know linux, you don’t know what it means to be careful with linux.

I switched to Endeavour because someone suggested it might be better with hardware acceleration. It wasn’t, but it seemed to work better “out of the box” with framework than other Distros, at least with KDE on top of it, and the Endeavour/Arch community is just more knowledgeable than others. My new attitude is that linux WILL break, severely and unpredictably, so it’s better to be among people who can help you fix what’s broken than to use an “easy” distro that won’t break.

1 Like

What exactly are you trying to hardware accelerate?

HW video decode has worked in kodi and some other video players for ages, firefox only recently and for chromium only recently (without a cutom build that is). In the browsers it still may need to be force enabled and the power savings are not as big as in the case of a dedicated video player like kodi but still noticable, asuming you are actually streaming a codec that can be hardware decoded by your cpu.

I have been messing with hw decode on linux for a while and it has got a lot better (at least in the browser space, kodi has worked great for ages) recently.

1 Like

@Adrian_Joachim what kind of power usage are you seeing on Kodi running youtu e videos for instance. On Firefox it is around 9-10w on a i7-1260p. Obviously it has room for improvement.

Don’t really have youtube videos in kodi but as I said, high bitrate 4k60 streamed via sshfs on kodi takes about 7w on my t480s.

Is firefox actually using the hw decoder in your case?

@Adrian_Joachim yeah I have full hardware acceleration enabled. It works. Without it it bounces around between 10-15w. Just wild. I will see if Kodi gets better power efficiency. Strangely enough the T480s is my emergency backup, i.e. my old daily driver. Great machine.

How much is your idle power? Like on the desktop with nothing going on at low ish brightness with wifi connected?

I sit at with Firefox, evolution, and a terminal open at 4.54-4.87w and get 9.5-11hrs on battery while doing work. 35% brightness (I use this on battery or plugged in the display is damn bright), no turbo, no Bluetooth, and I avoid video while on battery or in the case of zoom etc I keep it short. This is an i7-1260p 64GB RAM, and a 2TB Sk Hynix P41. Looking forward to picking up a new higher capacity battery, should keep the numbers the same while giving me a 30m video buffer, which is as much as I really need for an on board battery experience. Forgota I use all usb-c on battery and have the latest BIOS.

I have noticed some recent improvements in power consumption. It would be interesting if some of you can confirm (or deny) this. From what I have observed it seems that the system uses between 0.5W up to 1W less power during youtube video playback than say 3 months ago. Both in Firefox and MPV. This puts my 1240p system at around 7-7.5W for 1080p60 playback in MPV and 7.5-8W in Firefox. This also depends on whether the video is downloading or not. MPV just buffers the whole thing while in firefox it only buffers 90s… which is less efficient.
This is on Fedora 37, kernel 6.2.15 and lowest screen brightness. I’m gonna do some more testing on this.

Is there a specific machine state (e.g. Firefox 113.0.1 with a single private window containing a single YouTube tab as the only foreground application) and/or a specific sequence of commands or actions to capture comparative power consumption data?

Dino

Hi @truffaldino ,

you may need powerstat command and have it logged to a file to do comparative data.

You don’t need to use h265ify as 11th, 12th and 13th Gen Intel Core processors can hardware decode AV1 streams.

Looking at the information provided by intel_gpu_top allows verifying that hardware decoding is indeed well done. I also noticed that Chromium, at least 7-8 months ago, doesn’t hardware decode AV1 streams, even with the relevant command-line flags set, while Firefox/LibreWolf always uses hardware decoding, through vaapi, when testing Youtube content.

This was on an 8th gen system, that unfortunately can’t hw decode av1 XD

I use a single (normal) Firefox tab with Youtube in Fullscreen mode. Audio output is the internal audio, bluetooth off, wifi on and used for streaming. Only USB-A/C cards inserted.
For mpv you need the yt-dlp plugin and possibly predefined profile(s) to make it use 1080p and option –hwdec=auto to make it use the hardware decoding feature. No mouse/keyboard inputs during playback and nothing else going on.
Versions of everything are whatever is currently up to date on Fedora 37 which for me is 113.0.1. The real question of interest is whether there have been recent (and decent) improvements in power consumption.
To get the current (dis)charge wattage the simplest way is probably upower -i /org/freedesktop/UPower/devices/battery_BAT1 |grep energy-rate. This updates fairly slowly so just switch to a terminal, run the command and that’s that. From my testing the power consumption is very stable once everything settled in after 10-20 seconds or so. It only changes significantly once there is nothing more to download. Also the Vitals gnome extension adds power and other interesting info to the gnome bar thing at the top of the display.

If we wanted to standardise this to compare different distros and machines we probably need to use the same test video first. If someone wants to propose a standard video, I’ll give it a try as well and share my results.

1 Like