I am just moving to Kubuntu from Windows. And i feel that browsers on Kubuntu cost so much CPU to work.
Example: When I watch Youtube:
- In windows, CPU is around 12%.
- In Kubuntu, CPU is around 50%. Same result w/18.04 & 19.10, plus Ubuntu 18.04.
Or When I surf the Web, especially when I watch video or listen song, CPU on Kubuntu is always higher.
I tried Firefox, Chrome, Chromium but the CPU usage is always too high.
And here is my PC's information:
- Intel core I5-6200U
- VGA Intel HD Graphics 520
- 4GB Ram
Have anybody know how to solve this issue? Please help me. Thank you so much.
The main reason you're seeing higher CPU consumption is the lack of hardware acceleration of video-related functions: mostly video decoding and possibly rendering. Intel's open source GPU drivers are of great quality and support these features, however browsers have some troubles implementing support.
The following information is to my best knowledge as of March 11 2020:
GPU acceleration
Both Firefox and Chrome/Chromium support GPU acceleration for rendering, but it is not enabled by default.
Firefox
You need to enable two things: Off-Main-Thread Compositing (OMTC) and WebRender.
I personally have the next settings in
about:config
:That results in everything in
about:support
's Decision Log is enabled. But you might need to experiment with the settings to get a combination that works for you, because some hardware/driver combinations might experience problems.Chrome/Chromium
GPU acceleration needs to be enabled by setting browser feature flags.
chromium-flags.conf
might not work depending on your browser version, but the same flags are available throughchrome://flags
.My personal configuration has these flags:
That results in all features in
chrome://gpu
being green, enabled and hardware accelerated, except for Vulkan. Once again that may vary depending on you hardware, drivers and even browser version, so experiment and find the settings that work for you.Video decoding
No browsers implement hardware video decoding by default. Good news is that is about to change.
Firefox
Next Firefox version (75) will ship GPU video decoding feature under Wayland. You'll probably have to enable it manually.
Chromium
There is a patch for Chromium that enables GPU video decoding, but it is not merged into the main branch. That means you have to install a special version from a PPA.
I'd blame the video drivers ...
On windows it is known that most video codecs shove work if possible to the graphics card away from CPU, and typically manufacturers spend much more time optimizing windows-drivers than any other.
Especially open source drivers where they would have to reveal their optimizations to any competitor. And you mention specifically video playback
One possible issue is problems when having multiple desktops installed with all sharing the same home folder. Settings changed in one can affect another. Less so a problem with Gnome vs. Plasma, for example, but more likely in multiple desktops with the same underlying base (i.e. Unity, Gnome, Cinnamon). I've had minor issues with Unity & Gnome, for example.
You are likely to get the best user experience by installing an official flavour with your preferred desktop, if one exists. I would suggest preparing some Live USBs with the flavours you'd like to try (Lubuntu, Xubuntu... have you tried Mate, it is also lightweight and very polished), testing things in the live USB, and then installing the flavour you like best.
At the end of the day, though, I suspect that @sudodus is correct, and the Intel GPU drivers just aren't as good for Linux (a not uncommon situation). If this is the case you might not see any improvement changing desktop environment.