GPD Win

From ArchWiki
Jump to navigation Jump to search

Tango-edit-clear.pngThis article or section does not follow the Laptop page guidelines.Tango-edit-clear.png

Reason: Stub (Discuss in Talk:GPD Win)

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: As of today (early 2021) everything works out of the box (Discuss in Talk:GPD Win#Out of date)

GPD Win is a small (5.5 inch screen) handheld device. More information about the GPD Win can be found here: https://hansdegoede.livejournal.com/17445.html

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
Note: If the Wi-Fi seems to fail, there may be an extra setting required to be set in the BIOS. Reboot, and hold the Del key while the device is starting up, and in the BIOS screen, go under the Chipset tab, and select South Bridge, then LPSS & SCC Configuration, then change SCC SDIO Support to PCI Mode. Save the BIOS changes then get back to the Copy the File step and retry.

Battery monitoring

Works out of the box since kernel 4.12. Earlier kernels require 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).

Note: Gnome will apply the rotation properly, even when using a third party application to change orientation of the display, such as arandr. XFCE, as it stands on 2018-02-16, does not auto-rotate the touch coordinates.

If your configuration does not auto-rotate touch, make sure you are running evdev drivers (the default. see Touchscreen for more info). Edit /usr/share/X11/xorg.conf.d/10-evdev.conf, and add Option TransformationMatrix "0 1 0 -1 0 1 0 0 1" to the touchscreen section. Yours should look similar to this:

/usr/share/X11/xorg.conf.d/10-evdev.conf

...

Section "InputClass"
        Identifier "evdev touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
	Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"
	Option "GrabDevice" "True"
EndSection

...

for different rotations:

90° = Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1"

180° = Option "TransformationMatrix" "-1 0 1 0 -1 1 0 0 1"

270° = Option "TransformationMatrix" "0 1 0 -1 0 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 out of the box since kernel 4.14. Earlier kernels require Hans de Goede's patched kernel.

Suspend/resume/waking up when opening the lid

Works out of the box since kernel 4.14. Earlier kernels require Hans de Goede's patched kernel.

Installation guide

Merge-arrows-2.pngThis article or section is a candidate for merging with Installation guide.Merge-arrows-2.png

Notes: This is partially duplicating the installation guide. Everything that is not device-specific should be removed (Discuss in Talk:GPD Win)

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 "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 fbcon=rotate:1 root=/dev/mmcblk0pZ rw

You have now installed Arch Linux on your GPD Win!