A little over a month ago I wrote about an issue I was having in Linux, where playing a video would cause processor usage to skyrocket, and hence, increase the heat output considerably, causing the fans in my laptop to spin up loudly. This behaviour was Linux-specific, as it didn’t happen when using the same laptop in Windows.
I experienced the problem on KDE Neon and the latest KDE release and on Linux Mint running Cinnamon. After publication of the article, and at the suggestion of lakerssuperman2, I tried the latest release of Ubuntu running GNOME, but there, too, I experienced the problem. Many other readers were quite helpful in trying to get the problem fixed – or at least diagnosed – but I wasn’t getting anywhere.
Until just-me pointed something out:
I have the same laptop. I watch YouTube daily and don’t remember the fans ever kicking in for that.
[…]But I just noticed that you have the 4K screen (my model has the FHD screen – by choice) – so that might explain the difference.
This turned out to be an interesting avenue of investigation. I had considered the resolution of my display as a possible culprit before, but disregarded it since I couldn’t imagine the difference between 1080p and 4K having any meaningful impact. After some fiddling with my settings, however, I concluded that while the resolution indeed was not the problem – something related to it was: user interface scaling.
As soon as I turned off 200% scaling and set it to 100% – making the user interface near-unusably small in the process – the problem disappeared entirely. Finally, after years of fighting this problem, I seemed to have nailed the cause, with the help of the OSAlert readership (thank you!). I couldn’t believe it looked like it was something as simple as UI scaling.
Of course, running 4K at 100% scaling on a 13″ display is not exactly ideal, so I set to experiment with different combinations of resolutions and scaling factors to pinpoint if certain combinations were more or less problematic than others. Running a quick command to enable fractional scaling (gsettings set org.gnome.mutter experimental-features "['x11-randr-fractional-scaling']"
) to give me access to 125%, 150%, and 175% scaling factors, I discovered that setting the factor to anything but 100% would cause the problem.
I eventually settled on a decent middle ground of 2048×1152 at 100% scaling, with the UI fonts set to 11. Of course, this doesn’t make optimal use of a 4K display, but things look great and crisp, correctly sized, and completely usable. But most importantly, temperatures and processor usage is now effectively on par with Windows.
This means that there is an issue somewhere with how scaling seems to be implemented in either X.org, the Intel driver, the Mutter/Kwin window managers, or any combination thereof. Since both Mutter and Kwin seem to have the problem, my gut feeling is that there’s an issue somewhere in the Intel driver or in how the driver interacts with X.org (as a side note, I tried running Ubuntu with Wayland and GNOME, but performance as a whole seemed problematic there).
Ever since, I’ve been running Linux on my XPS 13 without any issues, the fans never even turn on, temperatures remain well within expected values, and I have no more issues playing videos. Thanks to you, OSAlert readers, I’ve been able to solve – or at least, circumvent – an issue that has been frustrating me for a long, long time.
Interesting. In Solus Budgie (and I believe also in Gnome 3) there is a general “Text Scaling” function that works extremely well. The only thing I personally always have to do is change the Firefox setting “layout.css.devPixelsPerPx” in about:config to something around 1.5 because most websites (like this one too) use way too tiny font sizes for my eyes.
That said my XPS 13’s fans do come on every now and then. It doesn’t bother me enough to try to make it go away though.
X.org is ill-advised for resolutions above 1440p – it’s a well-known fact.
Don’t know why but it struggles with 4K and Wayland is not yet there.
Wouldn’t it be more fair to say that X.org is ill-advised for high-DPI setups?
I’ve never had a problem spreading 4480×1080 over three monitors and I anticipate that it’d probably be comparably suitable if I were to suddenly have the cash to buy a large-format 4K display that is the same width as my three-monitor spread but twice as tall.
EDIT: Ahh, there’s the “Edit Post” option. Had to whitelist another domain in uMatrix for some “it’s now illegal to design sane architectures” reason.
Some graphics data is resolution independent (most fonts, SVG) and can be rendered at any size. Some graphics data is inherently resolution dependent (MPEG, JPEG, PNG) and anything other than 100% scale causes extra work. (e.g. “decode to pixels; then scale pixels if necessary”).
In the same way, some graphics APIs are resolution dependent and some are not. Both X11 and Wayland are resolution dependent – e.g. a window is represented as a buffer of pixels (and not a list of commands describing how to render the window at any resolution).
To completely avoid the extra cost of scaling pixel data (and the inferior quality caused by “generate lower resolution data then scale it up”) you need everything (source data formats and APIs) to be resolution independent. Replacing X11 with Wayland will not solve anything.
Scaling pixel data (ie, raster images) has been “free” thanks to your GPU for decades now. So, I’m going to guess at a couple of things:
* GPU driver uses its slow path (software in the driver, rather than hardware in the GPU) when UI scaling is enabled.
* Or maybe there’s an architectural failure in the way X11.org handles this scenario… maybe it’s doing the scaling in software before passing the data on up to the GPU.
I use a Linux XPS13 with the 4k display at work, scaled to 150% I think. This is one of those “I don’t have time/energy to deal with this crap” things that frustrates me about Linux on the desktop. I’m certainly not going to rearchitect X11.org to deal with DPI scaling properly, and I’m not qualified to hack on device drivers…
I have Dell XPS 13, 9434, with the unfortunate choice of 4k display. I don’t know if “Wayland will not solve anything”, and I do suspect it may depend on various things *but* when playing videos on youtube over Gnome/X11, Gnome/Wayland and KDE/X11, the fans start spinning immediatelly. The CPU usage is high also > 50% as shown by htop.
When, however, I do the same thing from KDE/Wayland *it is quiet*. Fans are not spinning. CPU usage 20-25%. I know it’s weird but it does seem to be solving the problem for me.
All other options the same, resolution, scaling etc.
(but then again KDE/Wayland it’s not quite there yet…)
What happens if you set UI scaling to 100% and dpi to 200? And use the full 4k resolution.
That’s my question as well. Why bother with scaling? Just set the correct dpi so that a 12 pt font will be sized correctly, and carry on from there.
In reality, a 2160p screen shouldn’t “show you more”, it should “show you better”. A 12 pt font should be the same physical size regardless if the underlying screen resolution is 640×480, 1280×720, 1920×1080, or 3840×2160.
Trying to make it “show you more” is just asking for trouble; been that way all the way back to CRTs.
And I am looking forward to a piece discussing the reasons to get a 4K display on a 13″ screen. (really, no pun intended.)
My thoughts exactly. What’s the point of 4K on 13″ other than bragging rights.
Not only are there more aspects to a panel than just resolution – the 4K panel is simply a better panel than the 1080p one – it also happened to be non-optional with the i7/16GB combination in The Netherlands at the time.
You are entirely correct Thom. That 4K display is great. I just wish they would turn that quality 4K display into a 2K/FullHD display which would be better for battery life/noise/heat
I also wish they would start putting in 144op (or my personal 16:10 favorite 2560 x 1600) in 17″ laptops instead of the “too low” Full HD or the “too high” 4K.
Windows Display scaling works really well, but there is just no reason to waste so many resources on something that you will not notice
You don’t think that you notice. But you do.
I’ve gotten really used to my 15″ 4K screens on both Dell and Thinkpad laptops. The Surface tablet is also a pretty high resolution screen.
Then I helped someone out with their 1080p laptop. The text is fine, very readable, but it is definitely and noticeably not as smooth. I thought something was wrong with their font settings at first.
I’m wondering, Thom, why you don’t just use half the resolution of your panel (i.e. FHD or 1920×1080) instead of a non-rounded divisor 0.5333… while using 2048×1152. You say your screen is crisp at 2048×1152 but I reckon it’d be even crispier at 1920×1080. Can you have a try? Or is the reason for using 2048×1152 not a calculation error but rather because you like the UI to be that little bit smaller than it normally would be when using FHD?
The reason why I ask is that I thought it was common knowledge to downscale resolution on a TFT monitor only by whole fractions, so that for the downscaled resolution one virtual pixel covers exactly two or three physical pixels, to not lose image sharpness.
I would normally also put that 4K screen on “half/quarter” of that resolution, but maybe Thom likes just that bit of extra vertical space?
On Windows I don’t see any problem at all with non-integer divisors for screen resolution or scaling. Since Windows 10 (8?) this just works really well, looks really good and sharp both for UI and text. Can anyone confirm if non-integer divisors are even possible on MacOS? And do others also have Thoms problem with the Intel-drivers or even other drivers?
Good advice in general, but unfortunately even when given a 1920×1080 signal the display probably uses a non-integer upscaling method. This sounds dumb, but I believe it’s the norm and it’s certainly the case for me. I just tried switching from 1080 to 1152 on my “faux-K” / WRGB laptop screen and it doesn’t look any worse than it already did.
A mention on the front page?!! Pretty cool. I did a Ben Kenobi when I saw my username, “of course I know him! He’s me!!”
I’m happy you got a solution if not an outright resolution to your issue from that discussion!
This. This is why I don’t like running Desktop Linux on my laptop: It gives me the sense the hardware runs in a kludgy, inferior manner: The GPU drivers are crap, Optimus doesn’t work, the Intel HD Audio drivers are missing the processing that makes laptop speakers sound ok, touchpad is missing gestures, video decoding acceleration is hit and miss, dual screen support and DPI scaling is bad. Desktop Linux doesn’t have to support every laptop out there (badly), just pick a single laptop and support it well. Makes you wonder where all that money Canonical is spending are going if they can’t invest on something as basic.
Then they can focus on solving the mess of repos hosting outdated versions on LTSes. Or get rid of the repo system entirely for real…
kurkosdr,
Have you ever bought a linux laptop from a manufacturer that officially supports linux? IMHO a big part of the problem is that most of us end up installing linux on unsupported hardware that is officially designed for windows and not linux. Then when it doesn’t totally work we get a negative impression, but in a way expecting linux to run perfectly on hardware with no manufacturer support is holding it to a higher standard than windows and macos. Microsoft benefits from it’s defacto desktop monopoly, which means windows support is far more pervasive. Macos benefits from significantly lower expectations of hardware diversity.
For an OS developer it’s one of the most fundamentally difficult problems to solve. Unless you get to dictate the hardware to your users, you face the nearly impossible task of supporting all of their hardware. Linux’s first 15 years were pretty bad for hardware support. Now, for all it’s faults, it’s actually much better than it was. For better or worse, I think hardware support is directly proportional to popularity, which creates a bit of a catch-22.
“Have you ever bought a linux laptop from a manufacturer that officially supports linux?”
No, please point me to a linux laptop that:
– Comes with good GPU drivers (offering performance on par to Windows)
– Supports something resembling Optimus
– Comes with Dolby processing for Intel HD Audio
– Comes with Synaptics-like gestures for the touchpad
– Gets DPI scaling and dual screen support right
It’s like hearing those Windows Phone 7 fanboys complaining about how Android got all the good hardware, before it was revealed their darling OS didn’t support things like HD screens, dual-core CPUs (for 1080p recording) and MicroSDs in the first place because Microsoft was too slow to respond to hardware advances or simply couldn’t be arsed. And we all know what happened next…
kurkosdr,
Well, I understand your reason for wanting that, but it’s very difficult to make any generalizations due to the fact that some applications significantly favor windows and others significantly favor linux and I’m really not sure how much of an impact is caused by the drivers themselves. Look at counterstrike running on nvidia cards for example, linux is already on par or better windows whereas AMD cards fare worse under linux.
https://www.phoronix.com/scan.php?page=article&item=win10-ubuntu-gpufresh&num=2
https://www.phoronix.com/scan.php?page=article&item=win10-ubuntu-gpufresh&num=5
The thing is you can cherry pick data to make either platform look better.
Linux does pretty well in 2019 browser benchmark scores…
https://www.phoronix.com/scan.php?page=article&item=gen11-win10-ubuntu&num=5
But going down the list you see wins on both sides.
https://www.phoronix.com/scan.php?page=article&item=gen11-win10-ubuntu&num=3
Also if you look carefully at these benchmarks you may notice a trend where linux tends to improve at higher resolutions and regress at lower resolutions. I may be over analyzing it, but generally high resolution graphics are bottlenecked by GPU pushing so many pixels whereas low resolutions are bottlenecked by CPU logic pushing instructions to the GPU, which renders them faster than the CPU can feed them. So with this in mind, the benchmarks *might* suggest that the GPU/drivers are not a bottleneck on linux, but the CPU is for some reason. More detailed CPU/GPU usage data could help reveal the underlying botlenecks.
I guess none of this is of help to you, but it does highlight why it’s more complicated than just wanting “gpu drivers on par with windows”.
I’m just pointing out the fact that expecting linux to your on your own hardware is very high.
I rushed writing this, sorry. You complain that “It’s like hearing those Windows Phone 7 fanboys complaining about how Android got all the good hardware, “. The thing is, people expect to have as much choice as they have with windows even though linux is a very niche desktop platform. Windows is where the desktop ecosystem is at, so if you want/need the most ubiquitous support then go with windows, full stop. It sucks for linux that most manufactures don’t care about linux support. You’ve never bought an officially supported linux laptop, so be it, but you should be complaining to the manufactures themselves, not the linux community who are doing their best to accommodate your unsupported hardware.
Sometimes I’m stunned at the sense of entitlement over things that people are literally getting for free.
> No, please point me to a linux laptop that:
> – Comes with good GPU drivers (offering performance on par to Windows)
> – Supports something resembling Optimus
> – Comes with Dolby processing for Intel HD Audio
> – Comes with Synaptics-like gestures for the touchpad
> – Gets DPI scaling and dual screen support right
nvidia’s drivers have been unified for at least a few years now. Linux performance is on par to Windows. If a game uses Vulcan, it can actually be faster than Windows under linux. AMD has also moved to a unified driver in the last few years. A big difference in performance from one platform to another is basically just Intel anymore.
Optimus has been on linux since 2013, and there’s also Bumblebee to improve it.
You want to bug Dolby to release drivers for linux since all that is proprietary. It’s not up to linux. However, PulseEffects’ Convolver has some Dolby settings that gets you close, among other things it can do.
Since Ubuntu 18.04, there’s been the Gestures app, which allows you to control and create gestures on touchpads, and provides better than Windows and MacOS gesture control.
DPI… I think we’re stuck waiting on the successor to xorg for that one. Dual screen support, however, has always been better on linux than Windows. At least in my experience it is.
Have a look at the KDE laptop that was just released: Kubuntu Focus.
Quick blurb from Phoronix:
The specs on the laptop come in as an Intel Core i7 9750H, NVIDIA GeForce RTX 2060, 32GB RAM, 1TB Samsung NVMe SSD, 16.1-inch 1080p display, LED backlit keyboard, metal+plastic chassis, and backed by a two-year warranty.
The KDE news story is here:
https://kubuntu.org/news/kubuntu-focus/
From the founder of Mindsharemanagement, the MSRP is $2400 US, so it’s not an inexpensive laptop.
https://www.phoronix.com/forums/forum/software/mobile-linux/1146227-a-kubuntu-powered-laptop-is-launching-in-2020-for-high-end-kde-computing?p=1146270#post1146270
phoenix,
Pricey, but great specs. I can’t afford such nice laptops though. I’ve found that my money goes further buying higher end secondhand laptops, which means that I don’t have the newest & greatest. Still, when you consider that CPU performance hasn’t been improving much between generations and many “high end” laptops face severe thermal throttling issues anyways due to inadequate cooling, it’s not so bad.
It’s really a shame they ruined the laptop with such a terrible keyboard layout. I don’t know who thinks it’s a good idea to cram all the keys together such that there’s no space at all between different types of keys. Why does this even make it past the drawing board? I use computers professionally on a daily basis but I cannot for the life of me touch type on keyboards like that. Even with laptop form factors, smaller keys with more spacing is so much more usable than bigger keys with no spacing to discern them without looking. I had an excellent keyboard on an acer laptop years ago, and ever since then it’s been harder and harder to find usable layouts. I’m proficient at using keyboard navigation & shortcuts, which are so much faster than using the mouse to do the same thing. My typing productivity falls 50% when I don’t have distinct navigation keys that I can use by touch alone. A bad keyboard makes me miserable, so I’d don’t think I could use this laptop at any price
Yes. Dell XPS 13 from two different generations. None of the pre-installed operating system actually worked, both for me and my colleagues on those two different generations. To be honest we wouldn’t want to use a pre-installed system anyway and the XPS has really good mainstream GNU/Linux support, but it was a disappointing experience.
Shifting the goal post. Didn’t ask about “mainstream support” (whatever this means in Linuxspeak), please provide a checklist of how many things I mentioned above (which just work in Windows) are available in your Linux-friendky laptop of choice.
It’s like hearing Windows Phone 7.x fanboys saying how the HTC Titan II was the best flagshipWP7 to date, while still missing several flagsi hardware features because WP7 didn’t support them
Thank you for following up with more information!