Oct 07 19:37:32 ... Segmentation fault ... ugeeTabletDriver
Oct 07 19:37:36 ... Segmentation fault ... ugeeTabletDriver
Oct 07 19:37:36 ... QLocalServer::listen: Address in use
同一时段 ~/.local/share/xorg/Xorg.0.log 先出现笔设备,随后被移除:
text
1(--) wacom: UGTABLET 10 inch PenTablet Pen stylus: maxX=50800 maxY=31750 maxZ=8191 ...
2(II) XINPUT: Adding extended input device "UGTABLET 10 inch PenTablet Pen stylus" (type: STYLUS, ...)
3(II) XINPUT: Adding extended input device "UGTABLET 10 inch PenTablet Pad pad" (type: PAD, ...)
4...
5(EE) UGTABLET 10 inch PenTablet Pen stylus: Error reading wacom device : No such device
6(II) config/udev: removing device UGTABLET 10 inch PenTablet Pen stylus
7(EE) UGTABLET 10 inch PenTablet Pad pad: Error reading wacom device : No such device
(--) wacom: UGTABLET 10 inch PenTablet Pen stylus: maxX=50800 maxY=31750 maxZ=8191 ...
(II) XINPUT: Adding extended input device "UGTABLET 10 inch PenTablet Pen stylus" (type: STYLUS, ...)
(II) XINPUT: Adding extended input device "UGTABLET 10 inch PenTablet Pad pad" (type: PAD, ...)
...
(EE) UGTABLET 10 inch PenTablet Pen stylus: Error reading wacom device : No such device
(II) config/udev: removing device UGTABLET 10 inch PenTablet Pen stylus
(EE) UGTABLET 10 inch PenTablet Pad pad: Error reading wacom device : No such device
# Prefer ugee official userspace driver for tablet 28bd:0905 only.
# Does not affect other USB keyboards/mice/touchpads.
blacklist hid_uclogic
options usbhid quirks=0x28bd:0x0905:0x4
# Prefer ugee official userspace driver for tablet 28bd:0905 only.
# Does not affect other USB keyboards/mice/touchpads.
blacklist hid_uclogic
options usbhid quirks=0x28bd:0x0905:0x4
1#!/bin/bash
2# Ensure XP-Pen/Ugee 28bd:0905 is not claimed by usbhid; keep /dev/uinput usable. 3# Safe for other input devices. 4 5if[ -e /dev/uinput ];then 6 chmod 0666 /dev/uinput 2>/dev/null ||true 7fi 8 9unbind_iface(){10localname="$1"11if[ -e "/sys/bus/usb/drivers/usbhid/$name"];then12echo -n "$name" > /sys/bus/usb/drivers/usbhid/unbind 2>/dev/null ||true13fi14}1516# If called with a kernel interface name from udev (%k)17if[ -n "${1:-}"];then18 unbind_iface "$1"19exit020fi2122# Boot sweep: find 28bd:0905 interfaces and unbind23for vendor in /sys/bus/usb/devices/*/idVendor;do24[ -f "$vendor"]||continue25dev=$(dirname "$vendor")26v=$(cat "$vendor" 2>/dev/null ||true)27p=$(cat "$dev/idProduct" 2>/dev/null ||true)28if["$v"="28bd"]&&["$p"="0905"];then29for iface in "$dev":*;do30[ -d "$iface"]||continue31 unbind_iface "$(basename "$iface")"32done33fi34done
#!/bin/bash
# Ensure XP-Pen/Ugee 28bd:0905 is not claimed by usbhid; keep /dev/uinput usable.
# Safe for other input devices.
if [ -e /dev/uinput ]; then
chmod 0666 /dev/uinput 2>/dev/null || true
fi
unbind_iface() {
local name="$1"
if [ -e "/sys/bus/usb/drivers/usbhid/$name" ]; then
echo -n "$name" > /sys/bus/usb/drivers/usbhid/unbind 2>/dev/null || true
fi
}
# If called with a kernel interface name from udev (%k)
if [ -n "${1:-}" ]; then
unbind_iface "$1"
exit 0
fi
# Boot sweep: find 28bd:0905 interfaces and unbind
for vendor in /sys/bus/usb/devices/*/idVendor; do
[ -f "$vendor" ] || continue
dev=$(dirname "$vendor")
v=$(cat "$vendor" 2>/dev/null || true)
p=$(cat "$dev/idProduct" 2>/dev/null || true)
if [ "$v" = "28bd" ] && [ "$p" = "0905" ]; then
for iface in "$dev":*; do
[ -d "$iface" ] || continue
unbind_iface "$(basename "$iface")"
done
fi
done
权限:755,属主 root。
/etc/udev/rules.d/99-ugee-official-only.rules
conf
# Hand tablet 28bd:0905 to official ugee userspace driver only.
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_interface", ATTRS{idVendor}=="28bd", ATTRS{idProduct}=="0905", RUN+="/usr/local/sbin/ugee-exclusive-tablet.sh %k"
# Hand tablet 28bd:0905 to official ugee userspace driver only.
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_interface", ATTRS{idVendor}=="28bd", ATTRS{idProduct}=="0905", RUN+="/usr/local/sbin/ugee-exclusive-tablet.sh %k"
1#!/bin/bash
2# Reattach official ugee virtual stylus to X core pointer if it becomes floating. 3exportDISPLAY="${DISPLAY:-:0}" 4# pick a usable XAUTHORITY 5if[ -z "${XAUTHORITY:-}"];then 6for a in "$HOME/.Xauthority" /run/user/$(id -u)/gdm/Xauthority;do 7[ -f "$a"]&&exportXAUTHORITY="$a"&&break 8done 9fi1011command -v xinput >/dev/null ||exit01213reattach_one(){14localname="$1"15# floating devices appear under "∼ name" in xinput list16if xinput list --name-only 2>/dev/null | grep -qx "$name";then17# if floating, reattach; reattach on already-attached is harmless enough to try when floating marker present18if xinput list 2>/dev/null | grep -F "$name"| grep -q '\[floating slave\]';then19 xinput reattach "$name""Virtual core pointer" 2>/dev/null ||true20echo"reattached $name"21fi22fi23}2425# retry a while: driver may create devices after login26for i in $(seq 1 30);do27 reattach_one "HVUG STYLUS stylus"28 reattach_one "HVUG STYLUS eraser"29# optional: disable bogus touch slave from eraser device (reduces interference)30if xinput list --name-only 2>/dev/null | grep -qx "HVUG ERASER touch";then31 xinput disable "HVUG ERASER touch" 2>/dev/null ||true32fi33# stop early once stylus is a slave pointer34if xinput list 2>/dev/null | grep -F "HVUG STYLUS stylus"| grep -q 'slave pointer';then35if ! xinput list 2>/dev/null | grep -F "HVUG STYLUS stylus"| grep -q 'floating';then36exit037fi38fi39 sleep 240done
#!/bin/bash
# Reattach official ugee virtual stylus to X core pointer if it becomes floating.
export DISPLAY="${DISPLAY:-:0}"
# pick a usable XAUTHORITY
if [ -z "${XAUTHORITY:-}" ]; then
for a in "$HOME/.Xauthority" /run/user/$(id -u)/gdm/Xauthority; do
[ -f "$a" ] && export XAUTHORITY="$a" && break
done
fi
command -v xinput >/dev/null || exit 0
reattach_one() {
local name="$1"
# floating devices appear under "∼ name" in xinput list
if xinput list --name-only 2>/dev/null | grep -qx "$name"; then
# if floating, reattach; reattach on already-attached is harmless enough to try when floating marker present
if xinput list 2>/dev/null | grep -F "$name" | grep -q '\[floating slave\]'; then
xinput reattach "$name" "Virtual core pointer" 2>/dev/null || true
echo "reattached $name"
fi
fi
}
# retry a while: driver may create devices after login
for i in $(seq 1 30); do
reattach_one "HVUG STYLUS stylus"
reattach_one "HVUG STYLUS eraser"
# optional: disable bogus touch slave from eraser device (reduces interference)
if xinput list --name-only 2>/dev/null | grep -qx "HVUG ERASER touch"; then
xinput disable "HVUG ERASER touch" 2>/dev/null || true
fi
# stop early once stylus is a slave pointer
if xinput list 2>/dev/null | grep -F "HVUG STYLUS stylus" | grep -q 'slave pointer'; then
if ! xinput list 2>/dev/null | grep -F "HVUG STYLUS stylus" | grep -q 'floating'; then
exit 0
fi
fi
sleep 2
done