Package Details: xp-pen-tablet 4.0.13-251226

Git Clone URL: https://aur.archlinux.org/xp-pen-tablet.git (read-only, click to copy)
Package Base: xp-pen-tablet
Description: XP-Pen (Official) Linux utility (New UI driver)
Upstream URL: https://www.xp-pen.com/download/index.html
Keywords: driver pen tablet xp xp-pen
Licenses: custom
Submitter: Poilrouge
Maintainer: labaman
Last Packager: labaman
Votes: 35
Popularity: 0.018547
First Submitted: 2020-06-12 15:35 (UTC)
Last Updated: 2026-01-13 10:26 (UTC)

Dependencies (0)

Required by (0)

Sources (1)

Pinned Comments

labaman commented on 2024-06-11 16:49 (UTC) (edited on 2024-06-11 16:56 (UTC) by labaman)

This is the driver for the new current models of XP-PEN graphics tablets, if you have a legacy model, use this package

Latest Comments

1 2 3 4 5 6 .. 11 Next › Last »

khing0_0 commented on 2026-06-03 04:29 (UTC) (edited on 2026-06-03 05:12 (UTC) by khing0_0)

Add in ~/.local/share/applications/xppentablet.desktop and using /usr/lib/pentablet/PenTablet makes the gui work in wayland

[Desktop Entry]
Name=xppentablet
Comment=XPPen driver
Exec=/usr/lib/pentablet/PenTablet
Icon=/usr/share/icons/hicolor/256x256/apps/xppentablet.png
Terminal=false
Type=Application
X-Ubuntu-Touch=true
Categories=Application;Utility;
StartupNotify=true
Name[en_US]=xppentablet
Name[en]=xppentablet
Name[en_US.UTF-8]=xppentablet
Comment[en]=XPPen driver
Comment[en_US]=XPPen driver
Comment[en_US.UTF-8]=XPPen driver
PrefersNonDefaultGPU=false
Hidden=false
NoDisplay=false

and override ~/.config/systemd/user/xppentablet.service.d/override.conf

[Service]
ExecStart=
ExecStart=/usr/lib/pentablet/PenTablet /mini

khing0_0 commented on 2026-06-03 04:04 (UTC) (edited on 2026-06-03 04:06 (UTC) by khing0_0)

Hi @matei so I am just trying to make it work on wayland. Then I discovered that /usr/lib/pentablet/PenTablet.sh forces the gui to use its bundled LD_LIBRARY_PATH

So I just run the raw binary/usr/lib/pentablet/PenTablet and it runs in wayland!

For maintainers,I know the /usr/lib/pentablet/PenTablet.sh was shipped from xppen but is it posible to add a patch to run it in wayland? Same approach would be this https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=xp-pen-tablet-systemlibs. (maybe adopt xp-pen-tablet-systemlibs )

tldr, running it with system libs, makes it work in wayland.

matei commented on 2026-05-29 16:40 (UTC)

I couldn't originally launch the app. I am using Hyprland, with the QT_QPA_PLATFORM set to "wayland;xcb". This worked until now for all apps, but for this driver I had to launch it with "QT_QPA_PLATFORM=xcb /usr/lib/pentablet/PenTablet.sh". Otherwise, I get the error message: This application failed to start because it could not find or load the Qt platform plugin "wayland;xcb" in "".

Available platform plugins are: xcb.

microcoder commented on 2026-03-23 12:28 (UTC)

New PKGBUILD:

pkgname=xp-pen-tablet
pkgver=4.0.13
pkgrel=251226
epoch=0
pkgdesc="XP-Pen (Official) Linux utility (New UI driver)"
arch=('x86_64')
url='https://www.xp-pen.com/download/index.html'
license=('custom')
source=("XPPenLinux${pkgver}-${pkgrel}.deb::https://download01.xp-pen.com/file/2026/01/XPPenLinux${pkgver}-${pkgrel}.deb")
install=${pkgname}.install
# options=('!strip')

sha512sums=('03bd071184f327adce3618b703b1e65338c2c83b5d8242e81c2f0184f6eafa1f1740441b9b88cd7f728f4f83e980ab0f1b28ff28274757fa61a601a028854205')

prepare() {
    ar x "${srcdir}/XPPenLinux${pkgver}-${pkgrel}.deb"
    tar -xf data.tar.xz -C "${srcdir}"
}

package() {
    cp -dr --preserve=mode,links usr "${pkgdir}/"

    chmod 755 "${pkgdir}/usr/lib/pentablet"
    chmod 755 "${pkgdir}/usr/lib/pentablet/lib"
    chmod 755 "${pkgdir}/usr/lib/pentablet/platforms"
    chmod 755 "${pkgdir}/usr/lib/pentablet/conf/xppen"

    find "${pkgdir}/usr/lib/pentablet/lib" "${pkgdir}/usr/lib/pentablet/platforms" \
        -type f -exec chmod 644 {} \;

    chmod 755 "${pkgdir}/usr/lib/pentablet/PenTablet"
    chmod 755 "${pkgdir}/usr/lib/pentablet/PenTablet.sh"
    chmod 644 "${pkgdir}/usr/lib/pentablet/conf/xppen"/*.xml
    chmod 644 "${pkgdir}/usr/lib/pentablet/conf/xppen"/*.ini
    chmod 755 ${pkgdir}/usr/share/applications/xppentablet.desktop
    chmod 644 ${pkgdir}/usr/share/icons/hicolor/256x256/apps/xppentablet.png

    install -Dm0644 "${pkgdir}/usr/lib/pentablet/doc/EULA" \
                    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

    #https://wiki.archlinux.org/title/Users_and_groups#Pre-systemd_groups
    #use udev uaccess for device permission
    install -Dm0644 /dev/null "${pkgdir}/usr/lib/udev/rules.d/10-xp-pen.rules"
    cat <<'EOF' > "${pkgdir}/usr/lib/udev/rules.d/10-xp-pen.rules"
KERNEL=="uinput",SUBSYSTEMS=="misc",MODE="0660",TAG+="uaccess",OPTIONS+="static_node=uinput"
SUBSYSTEMS=="usb",ATTRS{idVendor}=="28bd",MODE="0660",TAG+="uaccess"
EOF

    # === systemd user service ===
    install -Dm0644 /dev/null "${pkgdir}/usr/lib/systemd/user/xppentablet.service"
    cat <<'EOF' > "${pkgdir}/usr/lib/systemd/user/xppentablet.service"
[Unit]
Description=XPPen Driver
Requires=xdg-desktop-autostart.target
After=xdg-desktop-autostart.target

[Service]
ExecStart=/usr/lib/pentablet/PenTablet.sh /mini

[Install]
WantedBy=xdg-desktop-autostart.target
EOF

    if command -v setfacl &>/dev/null; then
        find "${pkgdir}" -exec setfacl -b {} +; 2>/dev/null || true
    fi
}

New xp-pen-tablet.install:

#! /bin/bash
get_valid_users() {
    _l="/etc/login.defs"
    _p="/etc/passwd"

    ## get min and max UID limit ##
    l=$(grep "^UID_MIN" "$_l")
    l1=$(grep "^UID_MAX" "$_l")

    ## use awk to print if UID >= $MIN and UID <= $MAX and shell is not /sbin/nologin ##
    awk -F':' -v "min=${l##UID_MIN}" -v "max=${l1##UID_MAX}" '{
        if ($3 >= min && $3 <= max && $7 != "/sbin/nologin") print $0
    }' "$_p" | cut -d: -f1
}

disable_user_service() {
    users=$(get_valid_users)
    for i in $users; do
        echo "Disabling xppentablet.service for user '$i'"
        sudo systemctl --machine "$i"@ disable --now --user xppentablet.service
    done
}

pre_install() {
    AppName=PenTablet
    pid=$(ps -e | grep $AppName)
    appScript=$AppName".sh"
    if [ -n "$pid" ]; then
        echo $pid
        arr=()
        while read -r line; do
            arr+=("$line")
        done <<<"$pid"
        for val in "${arr[@]}"; do
            appid=$(echo $val | awk '{print $1}')
            name=$(echo $val | awk '{print $4}')
            echo "ID:"$appid
            echo "Name:"$name
            if [ "$name" = "$appRunScript" ]; then
                echo "close $appRunScript"
                kill -15 $appid
            elif [ "$name" = "$AppName" ]; then
                echo "close $AppName"
                kill -15 $appid
            fi
        done
    fi
}

post_install() {
    RuleDir="/usr/lib/udev/rules.d"
    ruleName="10-xp-pen.rules"

    # Checking and applying the udev rule
    if [ -f "$RuleDir/$ruleName" ]; then
        udevadm control --reload-rules && udevadm trigger
    fi

    #Removing autostart scripts as the systemd service is now used.
    if [ -f "/etc/xdg/autostart/pentablet.desktop" ] || [ -f "/etc/xdg/autostart/xppentablet.desktop" ]; then
        rm -f /etc/xdg/autostart/ugee-pentablet.desktop
        rm -f /etc/xdg/autostart/pentablet.desktop
        rm -f /etc/xdg/autostart/xppentablet.desktop
    fi

    #Reload daemon
    systemctl daemon-reload

    cat <<EOF

********************"
installation successful!

to restart the xp-pen driver, please run:
systemctl --user restart xppentablet.service

if you want the driver to autostart, please run:
systemctl --user enable xppentablet.service

********************"

EOF
}

pre_upgrade() {
    pre_install
}
post_upgrade() {
    post_install
}
pre_remove() {
    pre_install
    lockfile="/tmp/qtsingleapp-Pentab-9c9b-lockfile"
    rm $lockfile
    #Remove service
    disable_user_service
}

post_remove() {
    echo "Uninstall succeeded."
}

microcoder commented on 2026-03-22 18:54 (UTC) (edited on 2026-03-22 18:54 (UTC) by microcoder)

piou, In addition, the installation script xp-pen-tablet.install sets maximum rights, creating a huge security hole!

post_install() {
    appDir=/usr/lib/pentablet
    confPath=$appDir/conf/xppen
    libPath=$appDir/lib
    platPath=$appDir/platforms
    RuleDir="/usr/lib/udev/rules.d"
    ruleName="10-xp-pen.rules"

    chmod +0755 /usr/share/applications/xppentablet.desktop
    chmod +0644 /usr/share/icons/hicolor/256x256/apps/xppentablet.png

    chmod +0755 $appDir/PenTablet
    chmod +0755 $appDir/PenTablet.sh
    #chmod +0666 $appDir/resource.rcc #not exist in this version

    # chmod +0777 $confPath #Move to package()
    # chmod +0777 $libPath
    # chmod +0777 $platPath

    chmod +0666 $confPath/config.xml
    chmod +0666 $confPath/language.ini
    chmod +0666 $confPath/name_config.ini

    chmod +0666 $libPath/libicudata.so.56
    chmod +0666 $libPath/libicui18n.so.56
    chmod +0666 $libPath/libicuuc.so.56
    chmod +0666 $libPath/libQt5Core.so.5
    chmod +0666 $libPath/libQt5DBus.so.5
    chmod +0666 $libPath/libQt5Gui.so.5
    chmod +0666 $libPath/libQt5Network.so.5
    chmod +0666 $libPath/libQt5Widgets.so.5
    chmod +0666 $libPath/libQt5X11Extras.so.5
    chmod +0666 $libPath/libQt5XcbQpa.so.5
    chmod +0666 $libPath/libQt5Xml.so.5

    chmod +0666 $platPath/libqxcb.so

    lockfile="/tmp/qtsingleapp-Pentab-9c9b-lockfile"
    touch $lockfile
    chmod +0666 $lockfile

    # Checking and applying the udev rule
    if [ -f "$RuleDir/$ruleName" ]; then
        udevadm control --reload-rules && udevadm trigger
    fi

    #Removing autostart scripts as the systemd service is now used.
    if [ -f "/etc/xdg/autostart/pentablet.desktop" ] || [ -f "/etc/xdg/autostart/xppentablet.desktop" ]; then
        rm -f /etc/xdg/autostart/ugee-pentablet.desktop
        rm -f /etc/xdg/autostart/pentablet.desktop
        rm -f /etc/xdg/autostart/xppentablet.desktop
    fi

    #Reload daemon
    systemctl daemon-reload

    cat <<EOF

piou commented on 2026-03-18 22:37 (UTC)

Hi, at the moment, by default, many .so files are installed with rights 777 (everything in /usr/lib/pentablet/lib and /usr/lib/pentablet/platforms).

Can you make it so the rights are dropped to something more reasonnable like 755 at install? At the moment this presents a security risk: as an unprivileged user I could replace the content of those libraries with my own code and wait for another user (hopefully more privileged) to start the driver and unknowingly execute my code with their rights. That's a privilege escalation, and it's easy to fix: chmod -R 755 /usr/lib/pentablet/{lib,platforms}

Stef99 commented on 2026-01-06 14:05 (UTC)

4.0.13 just got released.

zeparu commented on 2025-12-18 09:38 (UTC) (edited on 2025-12-18 09:39 (UTC) by zeparu)

new version released today, 4.0.9, available here

archkde_combo commented on 2025-03-05 06:06 (UTC)

Please update it to latest XPPenLinux4.0.7-250117.