GPD Pocket: Difference between revisions

From ArchWiki
(category)
m (→‎Screen rotation: expand contractions)
 
(28 intermediate revisions by 8 users not shown)
Line 1: Line 1:
[[Category:GPD]]
[[Category:GPD]]
[[de:GPD Pocket]]
[[de:GPD Pocket]]
[[fr:GPD Pocket]]
[[ja:GPD Pocket]]
[[ja:GPD Pocket]]
[[zh-hans:GPD Pocket]]
[[zh-hans:GPD Pocket]]
Notes for the [https://www.indiegogo.com/projects/gpd-pocket-7-0-umpc-laptop-ubuntu-or-win-10-os-laptop--2#/ GPD Pocket].
{{Laptop style|Stub}}
Notes for the [https://gpd.hk/gpdpocket GPD Pocket].


== Specs ==
== Specs ==
Line 17: Line 17:
* Audio: Realtek ALC5645
* Audio: Realtek ALC5645
* Ports: 1 x USB 3 type A, 1 x MicroHDMI, 1 x USB 3 type C, 1 x 3.5mm Headphone Jack
* Ports: 1 x USB 3 type A, 1 x MicroHDMI, 1 x USB 3 type C, 1 x 3.5mm Headphone Jack
== Installation ==
=== Automatic ===
You can download a pre-patched ISO from [https://github.com/sigboe/GPD-ArchISO/releases here].
=== Manual ===
Because WiFi is not working with the default configuration, you have to fix WiFi first<sup>(see [[#WiFi]])</sup>, or use a supported USB Ethernet/WiFi dongle.


== Configuration ==
== Configuration ==
=== Automatic ===
During install append the following to /etc/pacman.conf:
{{hc|/etc/pacman.conf|<nowiki>
...
[gpd-pocket-arch]
SigLevel = Never
Server = https://github.com/joshskidmore/gpd-pocket-arch/raw/master
...
</nowiki>}}
Install the changes necessary for the GPD Pocket to run Arch properly by running:
{{ic|# pacman -Syu gpd-pocket-support}}
Because the patch for alsa-lib is an optional dependency, it must be installed manually to get audio to work:
{{ic|# pacman -S gpd-pocket-alsa-lib}}


=== Manual ===
=== Manual ===
==== WiFi ====
Install the package {{AUR|gpd-pocket-support-bcm4356-git}} and reload the WiFi kernel module:
# modprobe -r brcmfmac
# modprobe brcmfmac


==== Backlight and KMS ====
==== Backlight and KMS ====


In order to enable backlight control with early KMS change {{ic|/etc/mkinitcpio.conf}} to match the following:
Change {{ic|/etc/mkinitcpio.conf}} to match the following:


{{hc|/etc/mkinitcpio.conf|2=
{{hc|/etc/mkinitcpio.conf|2=
...
...
MODULES=(pwm_lpss pwm_lpss_platform i915)
MODULES=(i915 pwm-lpss-platform)
...
...
}}
}}
This will enable backlight control, and fix a blackscreen on resume from suspend.
==== Screen rotation ====
Thanks to a kernel patch, the linux kernel should automatically hint screen rotation for the GPD pocket. If it does not, or if you do not use a desktop manager, follow instructions below.


==== Wayland ====
==== Wayland ====
Line 79: Line 48:
===== Right Click Emulation =====
===== Right Click Emulation =====


Unlike Xorg, under which right click emulation can be enabled by the standard Xorg configuration files, under Wayland, such configuration is supposed to be exposed by the compositor, and unfortunately, some compositors (e.g. GNOME Wayland) does not expose these configurations properly. However, the regarding functionality is still available in {{ic|libinput}}. Since these compositors normally loads {{ic|/etc/profile.d}}, {{ic|LD_PRELOAD}} can be used to hook into {{ic|libinput}} and force apply these configurations.
Unlike Xorg, under which right click emulation can be enabled by the standard Xorg configuration files, under Wayland, such configuration is supposed to be exposed by the compositor, and unfortunately, some compositors (e.g. GNOME Wayland) do not expose these configurations properly. However, the regarding functionality is still available in {{ic|libinput}}. Since these compositors normally load {{ic|/etc/profile.d}}, {{ic|LD_PRELOAD}} can be used to hook into {{ic|libinput}} and force apply these configurations.


A sample implementation of this approach is available [https://github.com/PeterCxy/scroll-emulation here].
A sample implementation of this approach is available [https://github.com/PeterCxy/scroll-emulation here].
Line 89: Line 58:
Create {{ic|/etc/X11/xorg.conf.d/30-monitor.conf}} to rotate the monitor:
Create {{ic|/etc/X11/xorg.conf.d/30-monitor.conf}} to rotate the monitor:


{{Note|The Identifier may be different depending on your display driver of choice (either {{ic|<nowiki>DSI-1</nowiki>}} <sup>(modesetting)</sup> or {{ic|<nowiki>DSI1</nowiki>}} <sup>(xf86-video-intel)</sup>)}}
{{Note|The Identifier may be different depending on your display driver of choice (either {{ic|DSI-1}} for modesetting or {{ic|DSI1}} for xf86-video-intel)}}


{{hc|/etc/X11/xorg.conf.d/30-monitor.conf|<nowiki>
{{hc|/etc/X11/xorg.conf.d/30-monitor.conf|
Section "Monitor"
Section "Monitor"
   Identifier "DSI-1"
   Identifier "DSI-1"
   Option    "Rotate" "right"
   Option    "Rotate" "right"
EndSection
EndSection
</nowiki>}}
}}


===== Gnome and GDM =====
===== Gnome and GDM =====
Line 138: Line 107:
===== KDE =====
===== KDE =====


In ''System Settings > Display and Monitor'' change ''Orientation'' to ''90° Clockwise'', and ''Scale Display'' to a comfortable size.
In ''System Settings > Display and Monitor'', change ''Orientation'' to ''90° Clockwise'', and ''Scale Display'' to a comfortable size.


===== Right Click Emulation =====
===== Right Click Emulation =====
Line 158: Line 127:
===== SDDM =====
===== SDDM =====


Change DPI to be readable, append the following lines to {{ic|/usr/share/sddm/scripts/Xsetup}}:
To change the DPI to be readable, append the following lines to {{ic|/usr/share/sddm/scripts/Xsetup}}:


{{hc|/usr/share/sddm/scripts/Xsetup|
{{hc|/usr/share/sddm/scripts/Xsetup|
Line 167: Line 136:
===== Touchscreen Gestures =====
===== Touchscreen Gestures =====


Install {{AUR|touchegg}}, then edit the following line in {{ic|/usr/share/touchegg/touchegg.conf}}:
Install {{Pkg|touchegg}}, then edit the following line in {{ic|/usr/share/touchegg/touchegg.conf}}:
{{hc|/usr/share/touchegg/touchegg.conf|2=
{{hc|/usr/share/touchegg/touchegg.conf|2=
...
...
Line 174: Line 143:
}}
}}


Create {{ic|/etc/X11/xinit/xinitrc.d/01_touchegg}}
[[Create]] the following file:
{{hc|/etc/X11/xinit/xinitrc.d/01_touchegg|2=
{{hc|/etc/X11/xinit/xinitrc.d/01_touchegg|2=
<nowiki>
#!/bin/sh
...
#!/bin/bash


# starts touchegg application
# starts touchegg application
Line 188: Line 155:
start_touchegg() {
start_touchegg() {
         (
         (
                 flock -n 9 || exit 1
                 flock -n 9 {{!}}{{!}} exit 1
                 touchegg 2>/dev/null >/dev/null &
                 touchegg 2>/dev/null >/dev/null &
                 PID=$!
                 PID=$!
Line 197: Line 164:


start_touchegg &
start_touchegg &
</nowiki>}}
Set the permissions on {{ic|/etc/X11/xinit/xinitrc.d/01_touchegg}}
# chmod 0755 /etc/X11/xinit/xinitrc.d/01_touchegg
===== Making use of 半/全 key on Pocket 2 =====
Out of the box the {{ic|半/全}} key is configured to send the {{ic|`}} symbol and keycode 49, making it a duplicated of a regular {{ic|`/~}} key.
In order to be able to map it to something more useful go to the [https://www.gpd.hk/gpdp2firmware GPD2 Firmware] and download "GPD Pocket 2 Keyboard Firmware (Japan)". This must be flashed with the Windows 10 OS supplied with the device. It is advised to have a USB mouse, since the keyboard and mouse will be disabled during the update.
After the update is done {{ic|半/全}} will send keycode 49 and {{ic|`}} symbol, while the dedicated {{ic|`/~}} key will send keycode 132. In order to fix this create a file {{ic|~/.Xmodmap}}
{{hc|~/.Xmodmap|2=
keycode  132 = grave asciitilde
keycode  49  = XF86Launch1 NoSymbol
}}
}}


Test it immediately
And make it [[executable]].
 
$ xmodmap ~/.Xmodmap
 
For more information read [[xmodmap]]


==== Fan ====
==== Fan ====


With the latest kernel your fan should work out of the box.
With the latest kernel, your fan should work out of the box.


{{Note|If you are having issues with your fan not functioning as intended - try the following:}}
{{Note|If you are having issues with your fan not functioning as intended, try the following:}}


  # modprobe -r gpd-pocket-fan
  # modprobe -r gpd-pocket-fan
  # modprobe gpd-pocket-fan temp_limits=40000,40001,40002
  # modprobe gpd-pocket-fan temp_limits=40000,40001,40002


Once this has been completed - you should hear your fan start up at 40c - if you hear a clicking sound - power off the device, remove the back panel and very gently push the fan around a few times. Then re-attach the panel and power on the device - running the above commands again once logged in. It seems to be an issue with some devices that the fan cannot start properly when it has not been powered on in a while.
Once this has been completed, you should hear your fan start up at 40c. If you hear a clicking sound, power off the device, remove the back panel and very gently push the fan around a few times. Then re-attach the panel and power on the device, running the above commands again once logged in. It seems to be an issue with some devices that the fan cannot start properly when it has not been powered on in a while.


Once you have completed these steps and the fan is working properly - you should then either reboot or reload the fan kernel module in order to return the temperature limits to default:
Once you have completed these steps and the fan is working properly, you should then either reboot or reload the fan kernel module in order to return the temperature limits to default:


  # modprobe -r gpd-pocket-fan
  # modprobe -r gpd-pocket-fan
  # modprobe gpd-pocket-fan
  # modprobe gpd-pocket-fan


{{Note|By default fan is always spinning when on AC [https://github.com/stockmind/gpd-pocket-ubuntu-respin#gpd-fan-always-spinning-on-ac]. To override this behavior add {{ic|1=gpd-pocket-fan.speed_on_ac=0}} to the [[Kernel parameters]].}}
{{Note|By default, the fan is always spinning when on AC [https://github.com/stockmind/gpd-pocket-ubuntu-respin#gpd-fan-always-spinning-on-ac]. To override this behavior, add {{ic|1=gpd-pocket-fan.speed_on_ac=0}} to the [[Kernel parameters]].}}


==== Power Saving ====
==== Power Saving ====
Line 254: Line 202:
}}
}}


==== PulseAudio ====
==== Audio ====
 
Pulseaudio needs to be installed for the sound card.


Append the following lines into {{ic|/etc/pulse/default.pa}}:
Append the following lines into {{ic|/etc/pulse/default.pa}}:
Line 274: Line 224:
It is possible to control the charge current, charge end voltage and a few more settings.
It is possible to control the charge current, charge end voltage and a few more settings.


See [http://reddit.com/r/GPDPocket/comments/cfyekh/limit_battery_charge/eudbwto this reddit post] for more information and an example script.
See [https://reddit.com/r/GPDPocket/comments/cfyekh/limit_battery_charge/eudbwto this reddit post] for more information and an example script.
 


== Known Issues ==
== Known Issues ==
==== USB-C Power source status ====
USB-C power source status does not work on Kernel 4.14-15. Hans' kernel has a patch fixing this.
==== systemd-gpt-auto-generator failed to dissect ====
Due to [https://github.com/systemd/systemd/issues/5806 this issue], an error message appears at boot:


{{ic|systemd-gpt-auto-generator[199]: Failed to dissect: Input/output error}}.
{{Out of date|No updates have been made to this section since 2021-07-09, are these issue still relevant today?}}


To avoid the error message, add this boot parameter to your boot loader.
=== Wifi not seeing channels 12/13/14 ===


systemd.gpt_auto=0
As of May 2021 with current kernel and firmware versions, the Broadcom 4356 adapter no longer accesses networks on channels beyond the globally-allowed 1-11 range. Setting the regulatory domain with {{ic|iw reg set <alpha2>}} does not fix this; apparently, the [https://wireless.wiki.kernel.org/en/users/drivers/brcm80211 kernel driver] does not support this. Instead, edit {{ic|/usr/lib/firmware/brcm/brcmfmac4356-pcie.gpd-win-pocket.txt}} and change {{ic|1=ccode=X2}} to your country (e.g. {{ic|1=ccode=DE}} enables channels 12/13 but not 14) and reboot (hint found in [https://lore.kernel.org/linux-wireless/8f8aa976-67c2-05bc-9cef-adb178a2eb88@redhat.com/ an older mailing list message]).


== See also ==
== See also ==


* https://github.com/njkli/gpd-pocket/
* https://github.com/njkli/gpd-pocket/
* http://hansdegoede.livejournal.com/
* https://hansdegoede.livejournal.com/

Latest revision as of 10:45, 18 August 2023

This article or section does not follow the Laptop page guidelines.

Reason: Stub (Discuss in Talk:GPD Pocket)

Notes for the GPD Pocket.

Specs

  • Display: 7inch IPS 1920x1200
  • CPU: Intel Atom X7-Z8750
  • RAM: 8GB LPDDR3-1600
  • Storage: 128GB eMMC SSD (non-replaceable)
  • Battery: 7000mAh
  • WiFi: Broadcom 4356 802.11ac
  • Bluetooth: Broadcom 2045
  • Audio: Realtek ALC5645
  • Ports: 1 x USB 3 type A, 1 x MicroHDMI, 1 x USB 3 type C, 1 x 3.5mm Headphone Jack

Configuration

Manual

Backlight and KMS

Change /etc/mkinitcpio.conf to match the following:

/etc/mkinitcpio.conf
...
MODULES=(i915 pwm-lpss-platform)
...

This will enable backlight control, and fix a blackscreen on resume from suspend.

Screen rotation

Thanks to a kernel patch, the linux kernel should automatically hint screen rotation for the GPD pocket. If it does not, or if you do not use a desktop manager, follow instructions below.

Wayland

Basic Configuration

Create /etc/udev/rules.d/99-goodix-touch.rules to rotate the touchscreen, and fill it with:

ACTION=="add|change", KERNEL=="event[0-9]*", ATTRS{name}=="Goodix Capacitive TouchScreen", ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1"
Right Click Emulation

Unlike Xorg, under which right click emulation can be enabled by the standard Xorg configuration files, under Wayland, such configuration is supposed to be exposed by the compositor, and unfortunately, some compositors (e.g. GNOME Wayland) do not expose these configurations properly. However, the regarding functionality is still available in libinput. Since these compositors normally load /etc/profile.d, LD_PRELOAD can be used to hook into libinput and force apply these configurations.

A sample implementation of this approach is available here.

Xorg

Basic Configuration

Create /etc/X11/xorg.conf.d/30-monitor.conf to rotate the monitor:

Note: The Identifier may be different depending on your display driver of choice (either DSI-1 for modesetting or DSI1 for xf86-video-intel)
/etc/X11/xorg.conf.d/30-monitor.conf
Section "Monitor"
  Identifier "DSI-1"
  Option     "Rotate" "right"
EndSection
Gnome and GDM

Edit ~/.config/monitors.xml (this file might not be present by default):

~/.config/monitors.xml
<monitors version="2">
  <configuration>
    <logicalmonitor>
      <x>0</x>
      <y>0</y>
      <scale>2</scale>
      <primary>yes</primary>
      <transform>
        <rotation>right</rotation>
        <flipped>no</flipped>
      </transform>
      <monitor>
        <monitorspec>
          <connector>DSI-1</connector>
          <vendor>unknown</vendor>
          <product>unknown</product>
          <serial>unknown</serial>
        </monitorspec>
        <mode>
          <width>1200</width>
          <height>1920</height>
          <rate>60.384620666503906</rate>
        </mode>
      </monitor>
    </logicalmonitor>
  </configuration>
</monitors>

This sets the correct rotation (<rotation>right</rotation>) and a scale factor of 2 (<scale>2</scale>). For fractional scaling, see HiDPI#GNOME.

For GDM, copy the above ~/.config/monitors.xml to /var/lib/gdm/.config/monitors.xml to set the correct rotation.

KDE

In System Settings > Display and Monitor, change Orientation to 90° Clockwise, and Scale Display to a comfortable size.

Right Click Emulation

Create /etc/X11/xorg.conf.d/50-trackpoint.conf to scroll while holding right click:

/etc/X11/xorg.conf.d/50-trackpoint.conf
Section "InputClass"
  Identifier      "GPD trackpoint"
  MatchProduct    "SINO WEALTH Gaming Keyboard"
  MatchIsPointer  "on"
  Driver          "libinput"
  Option          "MiddleEmulation" "1"
  Option          "ScrollButton" "3"
  Option          "ScrollMethod" "button"
EndSection
SDDM

To change the DPI to be readable, append the following lines to /usr/share/sddm/scripts/Xsetup:

/usr/share/sddm/scripts/Xsetup
# Set DPI  
xrandr --dpi 168"  
Touchscreen Gestures

Install touchegg, then edit the following line in /usr/share/touchegg/touchegg.conf:

/usr/share/touchegg/touchegg.conf
...
<action type="SCROLL">SPEED=7:INVERTED=true</action>
...

Create the following file:

/etc/X11/xinit/xinitrc.d/01_touchegg
#!/bin/sh

# starts touchegg application
PREFIX="$HOME/.config/touchegg/.run"
mkdir -p "$PREFIX"
PIDFILE="$PREFIX/touchegg.$USER$DISPLAY.pid"
LOCK="$PREFIX/touchegg.$USER$DISPLAY.lock"

start_touchegg() {
        (
                flock -n 9 || exit 1
                touchegg 2>/dev/null >/dev/null &
                PID=$!
                echo "$!" >"$PIDFILE"
                wait $PID
        ) 9>"$LOCK"
}

start_touchegg &

And make it executable.

Fan

With the latest kernel, your fan should work out of the box.

Note: If you are having issues with your fan not functioning as intended, try the following:
# modprobe -r gpd-pocket-fan
# modprobe gpd-pocket-fan temp_limits=40000,40001,40002

Once this has been completed, you should hear your fan start up at 40c. If you hear a clicking sound, power off the device, remove the back panel and very gently push the fan around a few times. Then re-attach the panel and power on the device, running the above commands again once logged in. It seems to be an issue with some devices that the fan cannot start properly when it has not been powered on in a while.

Once you have completed these steps and the fan is working properly, you should then either reboot or reload the fan kernel module in order to return the temperature limits to default:

# modprobe -r gpd-pocket-fan
# modprobe gpd-pocket-fan
Note: By default, the fan is always spinning when on AC [1]. To override this behavior, add gpd-pocket-fan.speed_on_ac=0 to the Kernel parameters.

Power Saving

Install tlp and then edit following lines in /etc/default/tlp:

/etc/default/tlp
...
# improve disk IO
DISK_DEVICES="mmcblk0"
DISK_IOSCHED="deadline"
...
# disable wifi power saving mode (wifi speed drops MASSIVELY!)
WIFI_PWR_ON_AC=off
WIFI_PWR_ON_BAT=off
...

Audio

Pulseaudio needs to be installed for the sound card.

Append the following lines into /etc/pulse/default.pa:

/etc/pulse/default.pa
set-card-profile alsa_card.platform-cht-bsw-rt5645 HiFi
set-default-sink alsa_output.platform-cht-bsw-rt5645.HiFi__hw_chtrt5645_0__sink
set-sink-port alsa_output.platform-cht-bsw-rt5645.HiFi__hw_chtrt5645_0__sink [Out] Speaker

Turn off realtime scheduling by editing /etc/pulse/daemon.conf:

/etc/pulse/daemon.conf
realtime-scheduling = no

Charge control

It is possible to control the charge current, charge end voltage and a few more settings.

See this reddit post for more information and an example script.

Known Issues

This article or section is out of date.

Reason: No updates have been made to this section since 2021-07-09, are these issue still relevant today? (Discuss in Talk:GPD Pocket)

Wifi not seeing channels 12/13/14

As of May 2021 with current kernel and firmware versions, the Broadcom 4356 adapter no longer accesses networks on channels beyond the globally-allowed 1-11 range. Setting the regulatory domain with iw reg set <alpha2> does not fix this; apparently, the kernel driver does not support this. Instead, edit /usr/lib/firmware/brcm/brcmfmac4356-pcie.gpd-win-pocket.txt and change ccode=X2 to your country (e.g. ccode=DE enables channels 12/13 but not 14) and reboot (hint found in an older mailing list message).

See also