If you're familiar with GPD's devices, you might know that they almost always (short of the P2 Max, I believe) have a rotated display panel, so by default an operating system will boot up with a sideways display. Normally you can just set this up once and it will remember it moving forward, but every now and then you might run into some additional challenges that might result in a less than stellar experience pre-login, or things like screen tearing issues that are more challenging to solve than with normal display setups.

The Win Max is no different here, and is actually a little worse out of the box, it seems. Booting up a live USB stick you'll be greeted with a heavily distorted display that is just plain unusable. But fret not, the solution is pretty easy, and once you have changed a few configurations once, every part of the process – including the login screen.

Let's walk through installing Manjaro on the GPD Win Max.


Before we start

Besides an actual Win Max, I recommend you use an external monitor for the initial setup. You can alternatively also use an SSH session and log in from a separate device, but I think using an external monitor is probably a bit easier. You'll also need a USB stick that you can use for the Manjaro installer.

This guide will assume you're installing Manjaro as the sole OS on the internal drive. If you want you can make changes where needed for a dual-boot setup or so, but that's outside the scope of this guide.

At the time of writing and publishing this guide, Manjaro is at version 20.2.1. The same approach should apply for later versions too, though.

We'll be installing the GNOME version and we'll use Wayland (as supposed to X11), these two choices are important as other flavors will have their own set of tweaks that might have to be applied. I went with this combination as Wayland has gotten really good, with things like screen tearing just not being an issue out of the box for example, really nice stuff.


Installing Manjaro

With your bootable Manjaro USB stick prepared, and your GPD Win Max ready with a secondary monitor plugged in, go ahead and start the Win Max. As soon as you do, start hitting the DEL key to enter the BIOS.

In your BIOS, head over to the Boot menu and in the FIXED BOOT ORDER Priorities section, adjust the sorting so that your USB stick is the first boot option, with the NVMe listed as the second boot option. You can leave the rest to their defaults, this is all you need to do. Head over to the Save & Exit screen and select Save changes and Reset. Your Win Max should reboot straight into the USB boot selector.

Select the Boot with open source drivers option after optionally first changing the timezone. You'll now see Manjaro boot up on your Max' internal display and look quite messed up. This is where the external monitor comes in.

Artistic.

Hit the Super (Windows) key on your keyboard, type "Displays" and hit enter. This will open the Settings panel, most likely on your Max' distorted display. Try grabbing it with your mouse and drag it over to your external monitor – virtually speaking this will be located to the right of your internal display. Change the primary display to be your external display.

Now you can go ahead and start the installation with the settings of your choosing. This part is the same as it would normally be. We'll be making some Win Max specific tweaks after installation is finished.

When the installation is finished, reboot with the installer USB stick removed, and log in to your fresh new Manjaro installation. We'll have to temporarily change the primary display again just like before, so hit Super (Windows), type "Displays", drag the settings panel over to your external monitor, and configure it to be your primary display.

Now let's fix the internal display.


Fixing the internal display

We'll start by adding the correct EDID information of the Max' display. Hat tip to Reddit user yann-v for sharing this, which makes it a lot easier for us.

Add the EDID firmware

Open up a Terminal window on your Win Max, and copy/paste the following. This needs sudo, so it will ask you to enter your password:

❯ sudo mkdir -p /lib/firmware/edid && echo "AP///////wAJ5QMAAwAAAAEdAQOACxF4LwAAoFdJmyYQSE8AAAABAQEBAQEBAQEBAQEBAQEBwhog
UDAAEFAQEDIAbKwAAAAYAAAA/ABUVjA4MFdVTS1OTDAKAAAA/QA8PBAQBwAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAMM=" | base64 --decode | sudo tee /lib/firmware/edid/gpdwinmax.bin

What this does is:

  • Creates an edid folder inside /lib/firmware if it does not already exist
  • Decodes the base64 encoded data shared by yann-v and writes it to a file called gpdwinmax.bin inside the newly created /lib/firmware/edid folder.

Updating initramfs

In order to have certain settings "stick," (like perf_stream_paranoid mentioned below) we need to make sure the i915 (Intel iGPU) module is loaded as soon as possible. We'll do this by adding it to the modules to be loaded into initramfs. We'll also have it copy over the firmware file we just created too.

Open the /etc/mkinitcpio.conf file in your favorite text editor using sudo, and locate the MODULES="" and FILES="" variables. We'll modify both so that they instead read like this:

MODULES=(i915)

# (...snip...)

FILES="/lib/firmware/edid/gpdwinmax.bin"

Save your changes, and then run the following command to have new initramfs images generated:

❯ sudo mkinitcpio -P

Configure Grub

Next, we need to modify the Grub config file so that your system will start using this new edid firmware. Using your favorite text editor and using sudo, open /etc/default/grub and add the following to the GRUB_CMDLINE_LINUX variable:

video=eDP-1:800x1280 drm.edid_firmware=eDP-1:edid/gpdwinmax.bin fbcon=rotate:1

The end result should look like this:

GRUB_CMDLINE_LINUX="video=eDP-1:800x1280 drm.edid_firmware=eDP-1:edid/gpdwinmax.bin fbcon=rotate:1"

I personally also removed splash from the GRUB_CMDLINE_DEFAULT variable so I can see the boot messages come by. It also seems like Plymouth (which is what splash controls here) does not honor our rotation settings for some reason, so disabling it is a quick and easy way to "solve" that problem. It's up to you if you want to do this though.

Run sudo update-grub to have these changes applied. It's now time to reboot your Max, so go ahead and do that.

Fixing the login screen orientation

After rebooting, your internal display should now look a lot better. Things are actually readable now, albeit still sideways. You can go ahead and log in, open display settings once again, and change the orientation of the internal display to Portrait Left. You can also set it back to being the primary display. This will fix the screen orientation once you have successfully logged in, but it will not fix the login screen. Let's do that next.

Before you do this next step, please make sure you have configured your display as you want it, and that the proper orientation is set already.

Open up a Terminal window, and run the following command:

❯ sudo cp ~/.config/monitors.xml /var/lib/gdm/.config/monitors.xml

What this command does is copy your manually configured monitor setup over as a system default, which the login screen will then also be able to use. With this login screen should also appear correctly. Nice!

Well hello there.

Setting things up

At this point you should have a fully working basic installation of Manjaro on your Win Max. All built-in hardware will work out of the box, including WiFi, Bluetooth, the built-in controller and even the hardware switch to toggle between gamepad and mouse emulation modes. Quite amazing, isn't it?

But as this is the Win Max we're talking about, let's continue onward by installing and configuring some game-specific bits to help you get the most out of your Max.

Be sure to update your system and all installed packages to their recent-most versions before you proceed. Depending on where in the world you're located, it might also be beneficial to select the best mirrors too. As I am based in South Korea I did this by running the following command, substituting Korea with where you are based:

❯ sudo pacman-mirrors --country South_Korea && sudo pacman -Syu

Or you could instead let Pacman choose the best-most mirror on its own with this command:

❯ sudo pacman-mirrors --fasttrack && sudo pacman -Syu

Latest Mesa drivers

Let's install the recent-most version of Mesa, so we get the latest and greatest:

❯ sudo pacman -S mesa-git lib32-mesa-git

Sensor reading (optional)

If you plan on using something like Mangohud or similar tool to monitor your Max' temperatures, install and configure the following package:

❯ sudo pacman -S lm_sensors
❯ sudo sensors-detect

Disable Intel's perf_stream_paranoid mode

Mesa drops a warning encouraging setting dev.i915.perf_stream_paranoid to 0, though the way it recommends it only lasts until your next reboot. Let's set this up the permanent way. In a Terminal window, run the following:

❯ echo "dev.i915.perf_stream_paranoid=0" | sudo tee /usr/lib/sysctl.d/60-mdapi.conf

The difference with this mode set is quite noticeable, reducing or even completely removing stuttering and frame dips with certain games. Nothing on its own is a golden bullet, of course, but putting everything together certainly helps.

Note: The change is applied after rebooting. If you'd like to apply it right away you can run sudo sysctl dev.i915.perf_stream_paranoid=0. This change will be lost on reboot, however, so you'll need to set up the configuration file as mentioned to have the change be made permanent.

Lutris (including Wine)

First we should make sure the [multilib] section is enabled in /etc/pacman.conf, so open that file with your favorite text editor and sudo. Un-comment-out that section if it is commented out, save, and run sudo pacman -Syu. Now we can install all libraries required by Lutris along with Lutris itself with this decidedly intimidating looking command:

❯ sudo pacman -S wine-staging giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls mpg123 lib32-mpg123 openal lib32-openal v4l-utils lib32-v4l-utils libpulse lib32-libpulse libgpg-error lib32-libgpg-error alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib libjpeg-turbo lib32-libjpeg-turbo sqlite lib32-sqlite libxcomposite lib32-libxcomposite libxinerama lib32-libgcrypt libgcrypt lib32-libxinerama ncurses lib32-ncurses opencl-icd-loader lib32-opencl-icd-loader libxslt lib32-libxslt libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs vulkan-icd-loader lib32-vulkan-icd-loader lutris

Steam & custom proton runner

Installing steam is pretty easy: sudo pacman -S steam. Start Steam up for the first time, log in and then quit it right away.

Next, let's download the recent-most version of GloriousEggroll's custom proton build from here. Open up a Terminal window and run the following commands:

❯ mkdir -p ~/.steam/root/compatibilitytools.d;
❯ tar -xvf ~/Downloads/Proton*GE*.tar.gz -C ~/.steam/root/compatibilitytools.d/

What this does is create a folder called compatibilitytools.d inside Steam's root folder, and then extract the custom proton build you have just downloaded into it.

Now re-launch Steam, open Settings > Steam Play, and enable Enable Steam Play for all other titles. Select the custom GE version you have just downloaded as the default version. Alternatively you can stick with one of Steam's default options (including their latest cutting-edge Steam Experimental) if you prefer. As you can override which version you'd like to use on a per-game basis, you can just pick a sane default here. Something you think will work well most of the games you're planning on playing, for example.

MangoHud (optional)

Download the recent-most version of MangoHud from here. Unpack the file, and using a Terminal screen, run the included installer:

❯ tar -xvf ~/Downloads/MangoHud*.tar.gz;
❯ cd ~/Downloads/MangoHud && ./mangohud-setup.sh install

Copy the default configuration file over as a starting point, then edit the file to your liking using your favorite text editor.

❯ mkdir -p ~/.config/MangoHud && cp /usr/share/doc/mangohud/MangoHud.conf.example ~/.config/MangoHud/MangoHud.conf

You can also create game-specific configuration files, as described in MangoHud's readme. Note that displaying GPU information will not work, as this information is apparently not available to MangoHud without root access.

Due to a vulnerability more recent versions of the Linux kernel disable reading the CPU's power consumption value without root access, so if you are looking to display that in your MangoHud, you'll have to modify the read permission. This change is lost after each reboot, but as there's a known vulnerability, that's probably for the best. To enable displaying power consumption in MangoHud, do this:

❯ sudo chmod o+r /sys/class/powercap/intel-rapl\:0/energy_uj

I have created a simple bash script on my Desktop that I invoke if I plan on monitoring the power consumption, perhaps you can do something similar, or if you're not worried about the vulnerability you could even automatically set this on boot.


Closing thoughts

This covers the basics and should result in your Win Max running Manjaro very nicely. I hope you'll have a lot of fun with your Max, now running an OS that's arguably a better fit for the device's form factor. Although that's entirely personal preference of course :).

In upcoming posts I will cover additional subjects, including power management, limiting TDP and turbo boost, and undervolting. These will result in even better performance and battery life as compared to a stock configuration. Even if you are not comfortable making changes in those areas though, at this point you should already have a pretty great machine.

Have fun, and thank you.