← paintstorm-distrobox-legacy

Fix input group check and clarify OTD virtual device behavior

8a8385a3f9fc9d86152549e5873238da784ee130 · Claude · Jan 23, 2026 23:48

- Fixed container setup to check if input group exists before usermod
- Added explanation of OpenTabletDriver virtual device mechanism
- Clarified that hidraw devices are read by otd-daemon on host
- Documented that virtual devices created by OTD are what apps actually use
- Added note about otd-daemon detection timing issue

This resolves the "group 'input' does not exist" error during container setup.

+18 −9 · 2 files changed

  • TABLET-PRESSURE-FIX.md +8 −3
  • paintstorm-install-distrobox.sh +10 −6
diff --git a/TABLET-PRESSURE-FIX.md b/TABLET-PRESSURE-FIX.md
index 05f10b4..33cfdec 100644
--- a/TABLET-PRESSURE-FIX.md
+++ b/TABLET-PRESSURE-FIX.md
@@ -163,6 +163,8 @@ ls: cannot access '/dev/hidraw*': No such file or directory
 4. Check if wacom/hid_uclogic drivers are interfering: `lsmod | grep -E "wacom|hid_uclogic"`
 5. Verify modprobe blacklist: `cat /etc/modprobe.d/99-opentabletdriver.conf`
 
+**Note**: If you see hidraw devices for your tablet (e.g., `/dev/hidraw2` showing "HUION Huion Tablet_G930L"), then the tablet is accessible even if `pgrep otd-daemon` doesn't show a running process. Check `xinput list` for "OpenTabletDriver Virtual" devices to confirm OTD is working.
+
 ### Problem: Hidraw devices on host but not in container
 
 **Symptoms:**
@@ -243,10 +245,13 @@ sudo cat /dev/hidraw0 | hexdump -C
 
 OpenTabletDriver bypasses the kernel input subsystem and communicates directly with the tablet hardware via hidraw:
 
-1. **Kernel drivers disabled**: `wacom` and `hid_uclogic` are blacklisted
-2. **OTD handles tablet**: otd-daemon reads raw HID reports from `/dev/hidraw*`
-3. **Virtual input device**: OTD creates a virtual input device with processed data
+1. **Kernel drivers disabled**: `wacom` and `hid_uclogic` are blacklisted via modprobe config
+2. **OTD handles tablet**: otd-daemon (running on **host**) reads raw HID reports from `/dev/hidraw*`
+3. **Virtual input device**: OTD creates virtual devices: "OpenTabletDriver Virtual Artist Tablet" (visible in `xinput list`)
 4. **Pressure/tilt data**: Full pressure (0-8191) and tilt (X/Y angles) from raw HID reports
+5. **Container access**: The virtual devices appear in `/dev/input/` and are automatically available to containers
+
+**Important**: The hidraw devices must be accessible on the **host** where otd-daemon runs. The container then accesses the virtual input devices that OTD creates. Both hidraw devices AND the virtual input devices should be passed to the container for maximum compatibility.
 
 ### Device types explained
 
diff --git a/paintstorm-install-distrobox.sh b/paintstorm-install-distrobox.sh
index f0f0b31..90eb486 100755
--- a/paintstorm-install-distrobox.sh
+++ b/paintstorm-install-distrobox.sh
@@ -292,15 +292,19 @@ else
     echo "  Make sure OpenTabletDriver (otd-daemon) is running on host"
 fi
 
-# Add user to input group for device access
+# Add user to input group for device access (if group exists)
 echo ""
 echo "Configuring device permissions..."
-if ! groups | grep -q input; then
-    sudo usermod -a -G input $USER
-    echo "✓ Added user to 'input' group"
-    echo "  You may need to logout/login for group changes to take effect"
+if getent group input > /dev/null 2>&1; then
+    if ! groups | grep -q input; then
+        sudo usermod -a -G input $USER
+        echo "✓ Added user to 'input' group"
+        echo "  You may need to logout/login for group changes to take effect"
+    else
+        echo "✓ User already in 'input' group"
+    fi
 else
-    echo "✓ User already in 'input' group"
+    echo "ℹ 'input' group not present in container (not needed - devices accessible)"
 fi
 
 echo ""