HP x2 laptop/tablet

I installed Ubuntu-MATE 20.04 LTS on my HP x2 laptop/tablet (detachable keyboard) without any problems, but after launching "firefox" and opening several tabs the system froze and I had to reboot it. This happened several times, but I had no reason to think that the laptop hardware was unreliable because it runs Windows 10 reliably...

After some investigation, I discovered that the Linux kernel OOM-killer was being triggered by "firefox" but too late to stop the system becoming catatonic and crashing. I was a bit surprised by this because the HP x2 has 2GiB RAM and was swapping to a 2GiB file created by the default Ubuntu-MATE 20.04 LTS installation.

Although it's a little controversial about what exactly this does, I set 100% 'swappiness' to make the kernel swap anonymous RAM pages more aggressively and the system seems much more reliable now. However, I'm aware that swapping to a file may incur a performance penalty because 'swappiness' actually sets the ratio of file-backed page reclaims to anonymous page reclaims not as is widely believed the ratio of physical RAM available to pages swapped to disk. Read this clear discussion about swappiness by Dave Mckay if you want to know more. To set 100% 'swappiness' I used:

sudo sysctl vm.swappiness=100

I created a 4GiB swap partition to replace the swap file and this does improve performance, but monitoring with "atop" I noticed that the 'vlimit' was flagged in red as over-committed so I increased the swap partition of 8GiB and the system is running quite well now with a 'vcommit' level of about 4.9GiB when running "firefox" with several tabs open + Thunderbird and it performs quite well.

I configured 100% 'swappiness' to be set at boot by adding a config file:

sudo -i
cat > /etc/sysctl.d/100-swappiness.conf <<EOF
vm.swappiness=100
EOF

You can check the current 'swappiness' setting with:

cat /proc/sys/vm/swappiness

I've now got a very nice Ubuntu-MATE 'focal' tablet (using the 'onboard' keyboard) and this experience might be useful to other 'netbook' users trying to run Ubuntu-MATE 20.04 LTS with 2GiB RAM.

Tony.

1 Like

Many thanks for your advice :slight_smile:

You can play a bit with touchegg to get more touch gestures on your hybrid device :slight_smile:

i have been also doing similar on a Lenovo Miix :
https://ubuntu-mate.community/t/ubuntu-mate-on-a-hybrid-lenovo-miix-320/

Hi, Olek.

Had a look at your very interesting write-up and your Lenovo Miix looks very similar to my HP x2, but I'm not sure how much RAM you have in yours?

I've tried using "zram/zswap", but it makes matters worse because you have to sacrifice RAM to make use of it for compressed swap and eMMC is quite fast so you might as well just swap to disk as I'm doing.

BTW, my HP x2 is extremely slow when running Windows 10 and running Ubuntu-MATE on it is so much faster that it's difficult to believe it's running on the same hardware :slight_smile:

Bye, Tony.

I like this statement :slight_smile:

I have now moved to a 11e Lenovo thinkpad with 4Gb of ram with regular swap partition + a extra swap file.

I have installed Ubuntu Mate 18.04 32bit on a dinosaur old ThinkPad x40 with 768Mb of RAM and guess what, it's not so bad :slight_smile:

Happy you enjoy your setup too :slight_smile:

Sad to say I've uninstalled Ubuntu-MATE 20.04 from my HP x2 laptop/tablet because even though it has 2GiB RAM and I installed zswap as well as setting 100% swappiness it still periodically freezes: Despite a lot of investigation I can't find out why, but it's not the OOM-killer. I've decided to use Ubuntu-MATE 20.04 on my Pinebook Pro instead.