Ubuntu 22.04 is (for me?) a failure so far, i.e. a hopeless fight for every MW

– It’s a choice between plague and cholera. – Such opinions could be found on the Sunday elections in France, and sometimes I have this feeling when I have to choose computer equipment.

Advertisements and claims from sellers often seem as serious as the emergence of a certain dictator (I’ve mentioned this many times on my blogs), and even simple purchases can turn into something like this:

For those unfamiliar with the story – I had been looking for writing materials for a while. The following points were important:

  1. big battery, matte screen,
  2. (in the case of tablets) water resistance and pen support,
  3. (in the case of laptops) flat unfolding, good keyboard, no bottom grilles, black casing if possible and quiet.

I was seriously considering the Macbook Air, but this one didn’t/doesn’t have a matte screen (and I didn’t follow the beautiful sheet). When I couldn’t find anything in the ARM world (for example the shells the phones are inserted in have fallen off, and they allow the use of an external keyboard, touchpad and display via Samsung DEX ), I tested the following devices: Medion Akoya E4251, Acer Swift 1 SF114-32 and HyperBook L14 / Clevo L140MU (detailed descriptions on the links).

Theoretically, the power issue is simple – we run the editor, press the key once in a while, the interrupt is triggered, and the hardware/software performs the action associated with it (e.g. display the text), and the rest of the time there is nothing to do (in fact, just the screen and the RAM are on)

On popular equipment, things are not so obvious – there are several background processes, not just the editor (they prevent the assembly components from going to sleep), moreover, we cannot often not cut power to unnecessary items (eg USB works all the time).

Everything is complicated by the fact that the popular x86 was not designed for economy and security – at first all elements worked at full speed all the time, and the addition of blocks related to the separation of processes meant that the processor (colloquially speaking) was not annoying.

Is the matter then hopeless? And what are the most important points?

Large battery and energy efficient components

The 14-inch Clevo proposal is the only one on the market with a 73Wh battery and a matte screen with reduced energy consumption.

The CPU is definitely a problem – if I could I’d run away from x86 (of all those Intel ME builds and other similar freaks) or I’d choose AMD because that one comes in 7nm and seems to have a much better design way to execute commands (notebookcheck.net already confirms that in the case of Intel’s 12th generation, newer machines will have shorter battery life as Intel tries to catch up to AMD in performance, and with its technology, it can only achieve this by conquering the TDP).

Broadly speaking, the choice between Intel and AMD is like the aforementioned choice between plague and cholera (I don’t want to get into conspiracy theories, but for example MSI’s new model with Ryzen did much worse than the old, and current x86 is “flawed by design”, and frankly it would be interesting to see what the situation would look like if you took old, very simple designs with a small amount of transistors and implemented them in 7 nm).

However, if you like it, what you like and you like it, what you got: Clevo laptops mentioned come with 10th Gen Intel processor (L14xCU), 11th Gen Intel processor (L14xMU) , and they will also be sold with the 12th generation (L14xPU). The first two notebookcheck.net tests in standby mode reached 4.6W and 2.9W respectively – based on this, I bought a copy with eleven (from the Polish supplier Hyperbook).

I thought a lot about the Hynix Gold P31, but in the end I had to choose Samsung.

RAM is soldered down – I don’t like this solution, but 8GB is more than enough, it’s probably LPDDR for this (I’m not sure).

Operating system support for power savings and minimal background processes

As for the operating system, again, the choice on the market does not spoil – we have either Windows with its debauchery, or something from Linux (did I say something about the plague and other diseases?) , The rest are rather original inventions.

I chose Ubuntu for my experiments – decided the hardware should work on its own, but I’m not going to spoil it (because it’s Linux, some configuration options remain).

892282

In retrospect, until last Thursday, it was a good choice – I wrote an even bigger article on how to configure Ubuntu 21.10 at:

  1. writes little data to disk
  2. Limited TDP and CPU speed (the Clevo factory limits were pretty absurd)
  3. limited TDP and graphics card speed
  4. at least turn off the camera programmatically

Ubuntu 22.04, unfortunately, doesn’t cause such enthusiasm anymore – the CPU load isn’t drastic (I don’t suddenly have 100%), but even in idle mode there are 20% spikes, in addition, the Gnome and Xorg related processes doing something all the time (it’s a 1% load), things related to snap, updates, etc. also appear in the background.

And don’t get me wrong – October 21 could have been the same… but if the laptop suddenly shows a good few hours less battery life overnight when used the same way, something is much worse in the new distribution. Maybe it’s just childhood diseases, but… Linux itself has a lot of ways to do things “right” (for example, you can set a trigger and order the process to start in 24 hours, and not running it regularly when not needed), and it would be appropriate to maintain the level.

I’m at the research stage to see if I can get anything done by changing the kernel etc, but so far it’s a dud. The steps I took (these are additional commands to the script I described earlier):

Trying to disable three services that I don’t need (as an exercise I recommend researching what they do):

sudo systemctl stop systemd-oomd
sudo systemctl mask systemd-oomd
sudo systemctl stop irqbalance
sudo systemctl stop fwupd.service
sudo systemctl mask fwupd.service

(+ disable automatic time synchronization)

Additional CPU TDP limitation:

sudo rapl-set -p 0 -c 0 -l 8000000 -e 1
sudo cpupower frequency-set -u 2400000
sudo cpupower --cpu 2,3,6,7 frequency-set -u 400000

and tries to reduce the speed further:

sudo cpupower --cpu 1 frequency-set -u 1200000
sudo cpupower --cpu 4,5 frequency-set -u 800000
PIDOF=$(pidof Xorg)
taskset -cp 4 $PIDOF
PIDOF=$(pidof gnome-shell)
taskset -cp 4 $PIDOF

The commands mentioned above force the lower maximum speeds of the following CPU cores and assign two processes used all the time to a specific core (I can’t drop Xorg due to using screen gamma correction) .

Incidentally, I also checked that the new kernel does not have a faster timer, characteristic of real-time applications (we have the configuration in /boot).

The ability to physically disconnect unused items

Here we have a problem – UEFI by Clevo/Insyde (at least in the Hyperbook edition) doesn’t allow you to disable USB or camera or CPU cores (something that appears in Dell or HP).

With the camera, at least programmatically, the Tuxedo script (I wrote some), but what it looks like in hardware (if the power is physically off) – I have no idea.

On Linux I currently have an extra “isolcpus=2,3,6,7” in kernel options (edit GRUB_CMDLINE_LINUX in /etc/default/grub and run update-grub). This causes the kernel to not allocate any processes to them… and since I have 400Mhz speed on them, theoretically and practically they should be completely disabled.

Two things are confusing here:

  1. Powertop doesn’t show me C9 and C10 mode with CPU, and I don’t know if it’s motherboard on this gear (no support proper voltage cutoff), UEFI, Intel ME or Linux itself (processor-based CPU wake-up).
  2. when I tried to turn off the PCI devices by playing with the registers, the power consumption seemed to increase

Summary

We buy modern equipment and we have a choice – energy saving or efficiency (plague tilts again and damn it).

The new Ubuntu disappointed me a lot. It seems that the distro is not very well prepared (e.g. Remote Desktop is always on, Xorg is used with Nvdii cards, virtualization options are changed, some people are reporting sleep issues, etc.) and my bug has been closed …

A few things should also be specified here:

  1. the number of wakeups/second in the powertop tool should be as small as possible (for me it can go down to around 90, but when writing texts in Libre Office it’s already around 400-600, and c is relatively much)
  2. CPU and graphics card must “eagerly” enter higher saving states (meanwhile with the card I have maximum RC6 and CPU C8)
  3. it may happen that we have a lot of power saving modes or few alarm clocks, but the power drawn from the battery (seen in the powertop) is high. 11th Gen Intel has all the cores the same in theory (although the hyperthreaded ones could probably use less power). And now you should ask yourself: is it more cost effective to run individual processes on separate cores? What gives HT? Is the accumulated power consumption for a long time at a lower clock speed less than that for a short time at a high clock speed? Does the kernel really do everything optimally? (maybe 5.13 was better than 5.15)
  4. it’s not all about measuring every dose of energy in the drugstores, but about finding a happy medium so that the machine is fast enough and the amount of energy consumed is as low as possible for as long as possible
  5. We are talking about such a high level of optimization that even displaying seconds in the watch on the desktop or frequently saving logs can lead to “very high” power consumption. If Dear Reader, you’re into the “oh, we have a new Gnome!” How cool that it has different colors! then everything I wrote is probably irrelevant.
  6. the only thing i haven’t tried is just the undervoltage

And now the numbers: in sleep mode (no network, computer only shows desktop) with my screen brightness (probably 10%) I can temporarily drop to 1.83W, average values ​​are d ‘about 2-2.2 W, while with writing texts in Free I enter at least 2.8-3.5 W.

Everything is fine, but… it’s not (see point 5 above)

cdn can take place.

Leave a Comment