Installing Manjaro Linux and Windows 10 in Dual Boot on a Surface Pro 4

1. Installation

0. Preparation and a Few Notes on Using Manjaro

  1. A computer. I tested this on a Surface Pro 4 and also on a regular desktop with a 2K monitor.

  2. A USB drive.

  3. An installation image: https://manjaro.org/download/. The link points to the GNOME edition, but you can choose any desktop edition you prefer.

  4. A USB writing tool. I recommend Rufus. Mirror download, password: 1096

1. Write the USB Installer

Plug in the USB drive, open Rufus, and write the image to it. Remember to use DD image mode.

Rufus

2. Install

Use Windows 10’s Disk Management to shrink a volume and create some unallocated space.

Shrink volume

Set the computer to boot from USB, then reboot with the USB drive inserted. The Surface setup is worth calling out separately:

[collapse status=“false” title=“Click to view the Surface USB boot steps”] Hold Power + Volume Up while turning it on. Surface boot key combo Disable TPM, then choose Change configuration, and set it to None. Disable TPM Also make sure USB Storage is moved to the top of the boot order. Set USB Storage as first boot option After that, reboot the Surface with the USB drive inserted and you should enter the Manjaro boot screen. [/collapse]

Configure the time zone and other basic options as needed. Make sure the driver option is set to nonfree, then proceed to boot into the installer.

Boot options You can choose the language in the upper-left corner, then click to launch the installer.

Start installer Most of the earlier steps are straightforward. Here, choose manual partitioning. Note: I am not especially familiar with partitioning best practices, so you may want to read more on that yourself.

Manual partitioning

First, select the FAT32 partition and mount it as /boot/efi. Important: set the content option to keep.

If you do not already have one, create a 100 MB partition yourself and mount it as /boot/efi.

Mount /boot/efi

Then select the unallocated space you created earlier and simply mount it as /.

Mount the root partition

After that, you can go ahead and install.

Installation progress 1 Installation progress 2

2. Configuration

0. HiDPI Scaling

On the Surface, the display scaling is automatically set to 200%, which is already usable.

For other high-resolution displays, such as a 25-inch 2K monitor, 100% scaling is too small while 200% is too large.

I recommend the following article as a reference: https://www.jianshu.com/p/ad7452239bc5

Scaling settings

1. Mirror Selection and System Update

Rank mirrors and choose one. This article uses Tsinghua’s mirror.

1
sudo pacman-mirrors -i -c China -m rank

Mirror ranking

Add the archlinuxcn and antergos repositories

1
echo -e "\n[archlinuxcn]\nSigLevel = TrustAll\nServer = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/\$arch\n\n[antergos]\nSigLevel = TrustAll\nServer = https://mirrors.tuna.tsinghua.edu.cn/antergos/\$repo/\$arch\n"|sudo tee -a /etc/pacman.conf
1
2
sudo pacman -Syyu    # Upgrade the system
sudo pacman -S --noconfirm archlinuxcn-keyring antergos-keyring    # Install the signing keyrings

2. AUR Helper

1
sudo pacman -S --noconfirm yaourt

Then remember to enable it in the software center.

3. Install a Chinese Input Method

Installation and Configuration

1
2
3
4
5
sudo pacman -S fcitx-im # install the default full set
sudo pacman -S fcitx-configtool
yaourt -S fcitx-sogoupinyin

sudo vim ~/.xprofile    # configure the input method

Add the following lines, save the file, and reboot the computer:

1
2
3
4
5
export LANG=zh_CN.UTF-8
export LC_ALL=zh_CN.UTF-8
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=”@im=fcitx”

Input method settings

Then add Sogou Pinyin in the input-method configuration and it should work.

Postscript

1
2
3
4
# If the input method still does not work, try the following packages
sudo pacman -S --noconfirm firefox-i18n-zh-cn thunderbird-i18n-zh-cn gimp-help-zh_cn man-pages-zh_cn    # Chinese localization

yaourt -S fcitx-qt4

On a high-DPI screen like the Surface, you may also want to increase the input-method font size so it is easier to read.

Input method font size

3. Common Software

Manjaro ships with its own app store, so if you do not like using the command line, you can install software directly there.

Software center

1. OneDrive

I had been using OneDrive for years, and most of my documents and photos were already there, so once I started using Linux I naturally wanted to at least keep document sync working.

1. Install

Project page: https://github.com/skilion/onedrive

Run the following commands:

1
2
3
4
5
sudo pacman -S curl sqlite dlang # install dependencies
git clone https://github.com/skilion/onedrive.git
cd onedrive
make
sudo make install

2. Configure

The configuration here mainly decides which folders should be synchronized. Otherwise, OneDrive will try to download everything.

1
2
3
mkdir -p ~/.config/onedrive
cp ./config ~/.config/onedrive/config
vim ~/.config/onedrive/config    # the default content can usually be left as-is

For the folders you actually want to sync, put them into sync_list:

1
sudo vim ~/.config/onedrive/sync_list # each line is a file or folder to sync

For example:

OneDrive sync list example

The paths here are relative to the root of your OneDrive account.

Finally, you can either sync manually or enable automatic sync:

1
2
3
4
5
6
# Manual sync
onedrive --resync --verbose
# Automatic sync. I recommend enabling the following two commands directly.
# Future cloud updates will be downloaded automatically, and local changes will be uploaded automatically.
systemctl --user enable onedrive
systemctl --user start onedrive

3. Authorize

Run onedrive in the terminal. It will output a URL. Open that link in your browser, sign in, then paste the final URL from the browser address bar back into the terminal. Once that is done, the authorization is complete.

OneDrive authorization

Here is one more reference article: https://www.moerats.com/archives/740/

2. WPS

1
2
sudo pacman -S wps-office    # install the application
sudo pacman -S ttf-wps-fonts # install the missing fonts

Install WPS

If WPS cannot input Chinese:

1
2
3
4
sudo vim /usr/bin/wps
# Add the following below the first line:
export XMODIFIERS="@im=fcitx"
export QT_IM_MODULE="fcitx"

Fix Chinese input in WPS