This is a description on how to get Debian GNU/Linux with XFCE4 or KDE Plasma 6 on the GPD DUO. I have a GPD DUO AMD Ryzen™ AI 9 HX 370 with 64GB RAM and a 2TB SSD.
Setup Windows
I wanted to keep the Windows 11 Home installation, so I booted into it and cleaned it up a bit.
Next I downloaded the latest BIOS (2.10 at the time of writing) and installed it. There are instructions in the package, but you basically download an archive. unzip it, copy the files onto a USB stick, restart and press F7 to install the update.
I also updated the firmware for my 2TB SSD.
Finally I shrunk the D: drive to 200GB.
My partitioning scheme:
- 300 GB Windows 11 Home installation
- 200 GB Windows data
- 300 GB debian root
- 64 GB swap
- 500 GB debian data
- 500+ GB other future OS, eg Bazzite
Install Debian
I downloaded Debian 12 Testing (“trixie”) with non-free drivers. I used the weekly build for DVD.
Next I created a USB boot stick. Your USB stick must have UEFI boot enabled. Burn your ISO image to stick using Rufus. Open Rufus and under Partitioning Options select “GPT Partition Scheme for UEFI computer” (or something similar).
You can select the boot drive by pressing F7. Esc takes you to BIOS.
During installation I created a 300 GB debian root ext4 partition and a 64 GB swap partition.
XFCE
Initial
I selected the XFCE4 desktop environment, to run with X11 (not Wayland).
Fix main screen. Go to Settings > Display, invert main screen and place it below the upper screen. Go to the Advanced tab and save the profile as “dual”. (This profile is used later.)
I make myself “superuser” by typing su -
, then nano /etc/sudoers
, and add the line <myusernamn> ALL=(ALL) NOPASSWD:ALL
. You can change this later.
Remove the USB stick from /etc/apt/sources.list
if you have trouble running apt update
, by running sudo nano /etc/apt/sources.list
.
Install a firewall, sudo apt install ufw
, then ufw enable
.
XFCE4 seems to “lock up” after a while has passed after suspend. Fix it by rebooting and press Esc to enter BIOS. Go to ACPI Settings > ACPI Sleep State and set it to “S3 (Suspend to RAM)”. (At the same time, fix the Firefox freeze issue – see Programs > Firefox below. This might have to do with the same adjustment, not the S3 sleep.)
Remove autostart items that you don’t want, Settings > Session and Startup.
Appearance
Things I did to customize XFCE4 to my liking (and for my eyesight).
Settings > Appearance. Select “Adwaita Dark” and set custom DPI: 192.
Settings > Desktop. Set desktop background to Transparent, ie a black background.
Settings > Windows Manager > Theme: Default x-hdpi.
Settings > Workspaces: 1. This is The DUO after all!
Panels. Right click a panel and enter Panel > Panel Preferences. Remove Panel 2. Select Panel 1, uncheck Lock and move it to the main screen, then reapply Lock. Row size: 40. Add any items you like.
Windows management
Settings > Windows Manager > Keyboard. Set Shift + Super + Up/Down to Move window to lower monitor/to upper monitor.
Create a shortcut to make the active window cover (most of) both screens. sudo apt install xdotool
. Go to Settings > Keyboard > Application Shortcuts.
Add the following command bash -c "xdotool windowsize $(xdotool getwindowfocus) 2870 3500 && xdotool getactivewindow windowmove 0 0"
to Super + F.
Add bash -c "xdotool windowsize $(xdotool getwindowfocus) 2000 1000 && xdotool getactivewindow windowmove 0 0"
to Shift + Super + F to restore.
Fix monitor selection with touch and stylus
Preparation
sudo apt install xinput
Use xinput --list
to see all available input devices. Note how they change depending on if screens are on or off. Each device has a name and an id. Use xinput --list-props <device>
to see what properties a device has. A device can be identified by name (in quotation marks), or by id.
You can list your screens by running xrandr -q
. My screens are called DisplayPort-2 (upper) and eDP (main).
Create a directory somewhere in your home directory where all four scripts will go.
I made four scripts that setups the GPD DUO for: main screen only, both screens, upper screen only and upper screen only in tablet mode. The scripts works best if the “dual” display profile is applied before adjustments are made by the scripts. You can do this by going to Settings > Display > Advanced and apply the profile. But I have baked this into the scripts so you don’t have to.
To set this up, go to Settings > Display > Advanced and apply the “dual” profile. In the terminal, go to the directory where the scripts are (going to be) located and run: xfconf-query -c displays -p /ActiveProfile > profile.txt
. This will save the id of the display profile in a text file that the scripts will use.
These scripts not only turn the screens on and off, but also rotates them, and it does them same with the two touchscreens and the stylus (and trackpad, for the tablet mode script). It also turns off touch input for screens that are not on.
Script for main screen only
Never turn off upper screen with Fn+F3. Use the scripts instead.
After running this script, all open windows might be moved to the lower border of the screen. Restore them by selecting them in the panel and press Super + Left/Right/Up/Down.
Save this script as gpd_duo_main.sh
.
#!/bin/bash
# Re-apply saved Display Profile
MYDIR="$(dirname "$(readlink -f "$0")")"
profile="$(<$MYDIR/profile.txt)"
xfconf-query --create --type string -c displays -p /Schemes/Apply -s $profile
# Upper screen off
xrandr --output DisplayPort-2 --off
# Upper touch screen off
xinput disable "Jieli Technology USB Composite Device"
# Upper stylus off
xinput disable "Jieli Technology USB Composite Device Stylus"
# Main screen on
xrandr --output eDP --auto
# Main touch screen on
xinput enable "GXTP7380:00 27C6:0113"
# Main stylus on
xinput enable "GXTP7380:00 27C6:0113 Stylus"
# Main stylus
xinput set-prop "GXTP7380:00 27C6:0113 Stylus" "libinput Calibration Matrix" -1 0 1 0 -1 1 0 0 1
# Main touch
xinput set-prop "GXTP7380:00 27C6:0113" 'Coordinate Transformation Matrix' -1 0 1 0 -1 1 0 0 1
# Touchpad, CCWSP3105FT:00 0911:5288
# Reset
xinput set-prop "SP3105FT:00 0911:5288 Touchpad" "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1
Script for both screens
Save this script as gpd_duo_both.sh
.
#!/bin/bash
# Re-apply saved Display Profile
MYDIR="$(dirname "$(readlink -f "$0")")"
profile="$(<$MYDIR/profile.txt)"
xfconf-query --create --type string -c displays -p /Schemes/Apply -s $profile
# Upper screen off
xrandr --output DisplayPort-2 --off
# Upper touch screen off
xinput disable "Jieli Technology USB Composite Device"
# Upper stylus off
xinput disable "Jieli Technology USB Composite Device Stylus"
# Main screen on
xrandr --output eDP --auto
# Main touch screen on
xinput enable "GXTP7380:00 27C6:0113"
# Main stylus on
xinput enable "GXTP7380:00 27C6:0113 Stylus"
# Main stylus
xinput set-prop "GXTP7380:00 27C6:0113 Stylus" "libinput Calibration Matrix" -1 0 1 0 -1 1 0 0 1
# Main touch
xinput set-prop "GXTP7380:00 27C6:0113" 'Coordinate Transformation Matrix' -1 0 1 0 -1 1 0 0 1
# Touchpad, CCWSP3105FT:00 0911:5288
# Reset
xinput set-prop "SP3105FT:00 0911:5288 Touchpad" "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1
Script for upper screen only
Save this script as gpd_duo_upper.sh
.
#!/bin/bash
# Re-apply saved Display Profile
MYDIR="$(dirname "$(readlink -f "$0")")"
profile="$(<$MYDIR/profile.txt)"
xfconf-query --create --type string -c displays -p /Schemes/Apply -s $profile
# Upper screen on
xrandr --output DisplayPort-2 --auto
# Upper touch screen on
xinput enable "Jieli Technology USB Composite Device"
# Upper stylus on
xinput enable "Jieli Technology USB Composite Device Stylus"
# Turn off main screen
xrandr --output eDP --off
# Main touch screen off
xinput disable "GXTP7380:00 27C6:0113"
# Main stylus off
xinput disable "GXTP7380:00 27C6:0113 Stylus"
# Upper touch screen, Jieli Technology USB Composite Device
# Reset
xinput set-prop "Jieli Technology USB Composite Device" "libinput Calibration Matrix" 1 0 0 0 1 0 0 0 1
# Upper screen stylus, Jieli Technology USB Composite Device Stylus
# Reset
xinput set-prop "Jieli Technology USB Composite Device Stylus" "libinput Calibration Matrix" 1 0 0 0 1 0 0 0 1
# Touchpad, CCWSP3105FT:00 0911:5288
# Reset
xinput set-prop "SP3105FT:00 0911:5288 Touchpad" "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1
Scripts for upper screen only, tablet mode
Save this script as gpd_duo_tablet.sh
.
#!/bin/bash
# Re-apply saved Display Profile
MYDIR="$(dirname "$(readlink -f "$0")")"
profile="$(<$MYDIR/profile.txt)"
xfconf-query --create --type string -c displays -p /Schemes/Apply -s $profile
# Rotate left
# Upper screen on
xrandr --output DisplayPort-2 --auto --rotate left
# Upper touch screen on
xinput enable "Jieli Technology USB Composite Device"
# Upper stylus on
xinput enable "Jieli Technology USB Composite Device Stylus"
# Turn off main screen
xrandr --output eDP --off
# Main touch screen off
xinput disable "GXTP7380:00 27C6:0113"
# Main stylus off
xinput disable "GXTP7380:00 27C6:0113 Stylus"
# Upper touch screen, Jieli Technology USB Composite Device
xinput set-prop "Jieli Technology USB Composite Device" "libinput Calibration Matrix" 0 -1 1 1 0 0 0 0 1
# Upper screen stylus, Jieli Technology USB Composite Device Stylus
xinput set-prop "Jieli Technology USB Composite Device Stylus" "libinput Calibration Matrix" 0 -1 1 1 0 0 0 0 1
# Touchpad, CCWSP3105FT:00 0911:5288
xinput set-prop "SP3105FT:00 0911:5288 Touchpad" "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1
Last
Make all scripts executable, chmod +x *.sh
.
Bind the scripts to shortcuts, Settings > Keyboard > Application Shortcuts. I bound them like this:
- Script – Main screen only: Super + 1
- Script – Both screens: Super + 2
- Script – Upper screen only: Super + 3
- Script – Upper screen only, tablet mode: Super + 4
Stylus buttons
I have a MPP stylus, a GPD stylus that I bought for my GPD Pocket 3. It has two buttons on the side. They seem to map to left and middle mouse buttons. But I want the upper to map to right click. Run xinput list
to get the id of the main screen stylus (for me it is GXTP7380:00 27C6:0113 Stylus Pen (0) id=19
).
Run xinput set-button-map 19 1 3 2 4 5 6 7
to reorder the buttons. Note that you have to do it for the upper screen too (id 18 in my case).
Programs
Firefox
Fix touch input (zoom and scrolling) in Firefox by adding the lineMOZ_USE_XINPUT2 DEFAULT=0 OVERRIDE=1
to the file /etc/security/pam_env.conf
. Log in and out.
Firefox might freeze after a while. Enable compositor (Settings > Window Manager Tweaks > Compositor) and turn off vblank_mode:xfconf-query -c xfwm4 -p /general/vblank_mode -t string -s "off" --create
.
Shortcuts
After following this guide you can control both screens, and windows, by using shortcuts. Move windows between screens, make them smaller, tile them etc.
- Applications menu Alt + F1-F3
- Tile to left: Super + Left
- Tile to right: Super + Right
- Tile to top: Super + Up
- Tile to bottom: Super + Down
- Terminal Ctrl + Alt + T
- File Mgr Ctrl + Alt + F (add)
- Web browser Ctrl + Alt + W (add)
- Window to upper screen: Shift + Super + Up
- Window to lower screen: Shift + Super + Down
- Maximize over both screens (if not Fullscreen): Super + F
- Make window smaller again: Super + Shift + F
- Fullscreen: F11
- Maximize window: Alt + F11 (same to reverse)
- Thunar context menu: Fn + Right Ctrl (menu key)
- Script – Main screen only: Super + 1
- Script – Both screens: Super + 2
- Script – Upper screen only: Super + 3
- Script – Upper screen only, tablet mode: Super + 4
Tips
- Brightness. Shortcuts and slider under Battery only affects Main screen, use hardware buttons for upper screen.
- Lost ability to click using touchpad? Ctrl + Alt + F1 to go to a TTY, then Ctrl + Alt + F7 to go back. Might fix other unwanted things!
KDE Plasma
I selected the “KDE Plasma” desktop environment (for Wayland).
I let the installation finish and rebooted.
After rebooting I had to remove my USB stick from /etc/apt/sources.list.
I logged in using the KDE Plasma (Wayland) session.
In System Settings > Display Configuration:
- Built-in Screen: Orientation: Upside Down
- I placed the top screen “Stargate Technology 16” above the “Laptop” screen
In System Settings > Touch Screen you must map the right touchscreen to the right display:
- Device: Jieli*, Enabled, Target display: DP*
- Device: GXTP*, Enabled, Target display: eDP-1*
Now touchscreens and pen works!.
Tip: Moving between screens
Bring window from screen A to screen B: Use Meta + Shift + Right and Meta + Shift + Left.
More useful shortcuts can be found here: System Settings > Keyboard > Shortcuts, Application: KWin, search for “Window to”.
Fix: Graphic artifacts
Some random graphic artifacts appear sometimes. Also, bringing media in Firefox to fullscreen hangs the UI.
To fix this (temporarily) set Color Profile to Built in in the Display Configuration (https://bbs.archlinux.org/viewtopic.php?id=298355).
TBD: Rotate grub
I have this in my /etc/default/grub:
GRUB_CMDLINE_LINUX_DEFAULT="video=eDP-1:panel_orientation=upside_down i2c_touchscreen_props=GXTP7380:touchscreen-inverted-x:touchscreen-inverted-y"
And it rotates after a while, but…
TBD: Login screen
Touch screen is inverted on login screen. So to bring up the on screen keyboard press on the opposite corner.
Final words
If you have any questions and/or suggestions, contact me, and I will try to answer/fix things.