The trials and tribulations of video decoding on Linux
I like using Linux. I use it on my desktop - especially now that League of Legends runs incredibly well on Linux thanks to the Lutris and League of Linux reddit community. I'd also like to use Linux on my laptop (an XPS 13 9370), but here I run into a major hurdle that despite a lot of trials and tribulations, I have been unable to overcome: playing video. Of course, Linux - in my case, Linux Mint - can play any format under the sun just fine, either locally, on-demand, or streaming, and in my case, it's YouTube video that matters (720p-1080p). The problem lies not in what desktop Linux can play, but in how it does so. Decoding video on my laptop running Linux is apparently remarkably inefficient, to the point where the processor reaches temperatures of 60-70C, and since the fan kicks in at around 60C, watching video on Linux means constant fan noise. When playing the same videos on Windows on the exact same laptop, temperatures stay comfortably below 40C, without ever even coming close to spinning up a fan. I have tried everything. Here's an itemised list of things I've tried, including multiple different combinations: I've installed tlp. This has had no effect. I've manually configured my processor - through tlp - to make sure it doesn't turbo beyond 50%. This has had no effect. I've disabled Intel Turbo Boost in UEFI altogether. This has had no effect. I've undervolted my CPU. This gives me maybe 1-2 degrees every now and then, so effectively it hasn't helped. I've tried the latest mainline kernel just to see if there's been improvements in power management or any Intel drivers. This has had no effect. I've tried the Chromium builds with VAAPI support to enable hardware acceleration on YouTube video. This has had no effect. I've tried downloading YouTube videos with youtube-dl and playing them back locally. This has had no effect. I've tried forcing H264 on YouTube. This has had no effect. There's probably things I've tried that I've forgotten about and thus aren't on this list. As you can imagine, my past few days and weeks have been frustrating, to say the least. I even decided to install Linux Mint on my Surface Pro 4 to see if similar problems pop-up there, and lo and behold, that device, too, sees massive temperature spikes when using Linux instead of Windows. I understand and can accept if Linux isn't as efficient as Windows when it comes to power management and decoding video, and am okay with a few degrees here and there. However, I just cannot understand nor accept a 20-30C difference with something as elemental as decoding video. After all of this, I can only conclude that desktop Linux has an incredibly bad video decoding pipeline compared to Windows, and considering I've been struggling with this several times over the past few years without any noticeable improvement, it seems like it's not something high on anybody's list of things to improve. Linux' inefficient video decoding pipeline won't be much of an issue on desktop machines - playing video has virtually no material temperature impact on my desktop since my custom watercooled GTX 1070 and i7-7700K are way overkill - but on thermally constrained laptops, the problem becomes massively apparent. It is frustrating. I prefer Linux over Windows, I want to use it on my laptop, but as it stands now, I simply can't. I'm at my wits' end.