# GPD Win

GPD Win is a small (5.5 inch screen) handheld device.

## Fixes

Things not mentioned below should work out-of-the-box.

#### Built-in Wi-Fi

Before Linux Bug 185661 is resolved, a fix is needed to get built-in Wi-Fi working. Current solution is to grab brcmfmac4356-pcie.txt from here and drop it into /lib/firmware/brcm and reload the brcmfmac module.

Note: The "txt" button at the bottom right corner of the web page does not download the correct file. You need to manually copy and paste the content to brcmfmac4356-pcie.txt.

Easiest way to get built-in Wi-Fi working on the Arch Linux installer is, from Windows 10, download the file above to C:\. Then from the installer do the following:

Make a directory and mount the Windows 10 partition (Replace mmcblk0p2 with your Windows 10 partition found by running lsblk)

    mkdir windows
    mount /dev/mmcblk0p2 windows

Copy the file

    cp windows/brcmfmac4356-pcie.txt /lib/firmware/brcm

Reload the module

    modprobe -r brcmfmac
    modprobe brcmfmac

Connect to Wi-Fi

    wifi-menu

#### Battery monitoring

Works but currently requires Hans de Goede's patched kernel. His kernel will also fix "Not charging when the power cable gets plugged in after boot" and "Only drawing max 0.5A from the charger, charging slowly if at all".

#### Rotating X Session

Because the device uses a phone screen, the display has to be rotated to function properly. Since kernel 4.9.2, rotating X session (manually with xrandr or within settings of a desktop environment) works out-of-the-box. (NB: before investing too much time (or buying the device) it is worth noting there may be idiosyncrasies in the gpdwin batches. Running 4.9.11-1 (March 7, 2017) did not fix the screen rotation issue on my gpdwin.).

If you are using Gnome and finding that everything is upscaled, you can restore scaling by running:

    $ gsettings set org.gnome.desktop.interface scaling-factor 1

#### Rotating touch screen

Since kernel 4.9.2, rotating X session will automatically rotate touch screen (so far, only tested with gnome-control-center). If not able to rotate, running the following command might work for you, but results seems to differ for people.

    xinput set-prop 'Goodix Capacitive TouchScreen' 'Coordinate Transformation Matrix' -1 0 1 0 -1 1 0 0 1

#### Fixing occasional crash when using all cores

Turbo Boost on this CPU is software-controlled and the Linux kernel (4.4) is not throttling down the CPU enough, running at or close to 2.4Ghz the whole time even with 4 cores active which crashes the CPU eventually. Disabling the Turbo Boost feature ("Turbo Mode" in the BIOS) fixed those crashes. More info here.

#### Sound

Works out of the box with latest and linux-lts kernel. Headphone jack works but currently requires Hans de Goede's patched kernel.

#### Memory card reader

Works out of the box with latest and linux-lts kernel.

#### Physical power and volume buttons

Works but currently requires Hans de Goede's patched kernel.

#### Adjusting screen brightness

Works but currently requires Hans de Goede's patched kernel.

#### Suspend/resume/waking up when opening the lid

Works but currently requires Hans de Goede's patched kernel.

## Installation guide

#### Boot the installer

Reboot holding either "Del" or "Esc" to enter BIOS. From the BIOS screen, either change the boot options to prioritize your usb drive or boot from it once.

On the Arch Linux boot option screen, with the first option highlighted, click "e" to edit boot options and add "i915.fastboot=1" to avoid black screen on boot and "fbcon=rotate:1" for screen to be rotated correctly.

#### Formating and mounting partitions for dual booting with Windows 10

Use "Disk Management" in Windows or similar tools to shrink the Windows 10 partition and use the space to create a new partition for Arch Linux.

Run lsblk to list partitions and note the numbers for the following partitions:

- (X) Windows Boot Loader, a 100MB partition
- (Y) Windows 10 partition
- (Z) New Linux partition

Format the new Linux partition and mount it

    mkfs.ext4 /dev/mmcblk0pZ
    mount /dev/mmcblk0pZ /mnt

Create boot directory and mount Windows Boot Loader

    mkdir /mnt/boot
    mount /dev/mmcblk0pX /mnt/boot

#### Install Arch Linux

Install base system

    pacstrap -i /mnt base base-devel

Copy the file from the Wi-Fi fix to the new installation

    cp /lib/firmware/brcm/brcmfmac4356-pcie.txt /mnt/lib/firmware/brcm

Continue by following the regular install guide until bootloader step, then continue below.

#### Install bootloader

Install bootloader

    bootctl install

Create and fill /boot/loader/entries/arch.conf

Note: If you use linux-lts, replace /vmlinuz-linux with /vmlinuz-linux-lts and /initramfs-linux.img with /initramfs-linux-lts.img

    title   Arch Linux
    linux   /vmlinuz-linux
    initrd  /initramfs-linux.img
    options i915.fastboot=1 fbcon=rotate:1 root=/dev/mmcblk0pZ rw

You have now installed Arch Linux on your GPD Win!

Category:

- Laptops