Install Manjaro KDE 18 on a Huawei Matebook X Pro Laptop
I recently bought a Huawei Matebook X Pro with the intention of installing Linux on it. Until now, my daily driver is a MacBook Pro so my quest is to keep a unixy feeling on an alternate laptop computer. Some day I would like to try FreeBSD on this laptop. This is because I fascinated by the fact of running an OS that has it's roots in the original Unix implementation. Maybe when my config of Linux will be satisfying, it'll be easier to replicate it on a FreeBSD based laptop.
Some people have successfully installed Linux on this laptop. My 2 main sources of information are these:
- Support HiDPI screen properly.
- Nvidia support for the MX150 GPU.
- Finger print login in Windows still works.
- The Matebook hardware keys seem to be well supported.
On this Quest, I will need a list of prerequisites that will define wether it will be considered a success or not.
- We want to preserve the existing Windows setup. OK
- Multimonitor support. TO DO.
- Ability to scale the HiDPI by a fractional factor (not just 2x or 3x like in Gnome). OK.
- Sound support. OK.
- Trackpad support ressembling the one of Windows.
- A smooth working system. Not getting hot or anything.
- Suspend to Disk (aka Hibernate).
- Good battery life.
- Bluetooth support.
- VS Code, ideally the OSS version
Make a bootable USB
Head to Manjaro Download and choose the KDE edition. This guide is conceived to this edition because there are some specifics which are nicely supported by KDE IMHO. More on this later. Make a bootable USB using Rufus. I used the DD option which worked great.
Backup your SSD drive
I would really backup the entire drive with all it's partition. The UEFI setup of the MBXP is quite complex, in case anything bad happens it would be neat to be able to restore it completely.
Resize the D: drive
You will need to make some room for your Linux installation. If you want to keep Windows on this machine, a simple option is to resize the D: partition using diskmgmt.msc. There is an explanation on how to do this here. I reduced the partition to around 40 GB to leave 100GB to my future Linux install.
Disable Secure Boot
First of all, you have to restart into the Bios Setup to disable Secure Boot. Without that you will not have the option to boot an alternate disk drive. A good explanation on how to do it is here
Booting into the Live CD
At first look, you will have the impression that everything works ok and you will be able to use the live cd without problems. But precisely, after a while problems will come up and the system will become unstable. For me going through the install crashed at around 90%. I tried two times with the same results. Another time, I could go through the whole install but then after rebooting the system was incredibly unstable.
As I understand it, the problem comes from the support from the free driver for this newer Nvidia card present in the MBXP. But good news, there is way to go around that. On the Manjaro boot screen, choose the Boot line and press e (edit). You should now edit set param line and change the following:
nouveau.modeset=0 i915x.modeset=1 radeon.modeset=0
That's basically all modeset entries set to 0 except i915x.modeset. This way you will be able to boot and =free get a stable live CD and proceed to the installation.
Here your mileage may vary, I am sure that to do the install I had to use drivers=non-free but when reproducing the behaviour and making the pictures, it seemed to work with drivers=free. I would advise to try different possibilities but be sure that there is a way to get a stable configuration.
During installation you will need to setup the partition scheme on your target drive. To do this, you will need to use the free space which you normally made available by resizing your D: drive in a previous step. If you keep your existing Windows installation, be sure to use Manual Partitioning. The internal SSD is seen by Linux as /dev/nvme0n1, indidual partitions are seen as /dev/nvme0n1pX.
Manjaro will require the following configuration:
- A uefi boot partition. You already have that, this is the first partition on the disk (/dev/nvme0n1pX). It's size is 100MB, all you have to do is to request the installer to mount it as /boot/uefi. Do not reformat
- A swap partition. I made a 4GB swap in the available space. This is not absolutely mandatory but recommended for better performance.
- Your root partition. Also from the available space, make it the size available, format it as ext4, and mount as / (root).
The following screenshot shows my current drive layout.
Post install configuration
So, hopefully your install will go smooth and you can reboot to your brand new setup of Manjaro KDE. The problem is that the way Manjaro configures the boot is that it still tries to use the Nouveau drivers. In order to boot correctly, you still have to edit the boot line in grub and add nouveau.modeset=0. To fix this, launch System Settings in KDE and choose Auto Install Prorietary Drives. When doing that and after having done all Manjaro updates, you should be able to boot normally and have stable system.
- Spotify HiDPI Problem
- The 'Windows' key stops working after a while.
- Charging seems to take a lot of time.