PSM fixes graphics tablet support in Wine by emulating the Wintab library. Made for use with CLIP STUDIO PAINT, but it will probably work with other apps that use Wintab (like SAI).
If you want, it can also be used in Windows, for example to make Wintab-only apps compatible with OpenTabletDriver devices.
There is a CSP on Wine install guide available here!
Download the latest release.
Use wintab32.dll for x64 apps (most apps, CSP included) and wintab32_x86.dll (you must rename it to wintab32.dll) for x86 apps.
Put your wintab32.dll besides the executable file for your drawing app (for CSP, it should be at C:\Program Files\CELSYS\CLIP STUDIO 1.5\CLIP STUDIO PAINT\wintab32.dll)
In winecfg, add an override for wintab32 with mode Native then Builtin (or Native (Windows) to make sure the app is using PSM)
Download and setup OpenTabletDriver, if you haven't already - Linux | Windows | macOS
Download the latest OTD plugin from psm-otd releases
and put in into ~/.config/OpenTabletDriver/Plugins/PSM/psm-otd.dll (or your platform equivalent)
(create the PSM folder if it doesn't exist).
Launch OTD, enable the client in Filters tab, press Apply and interact with the tablet.
Copy psm.json from the plugin folder (~/.config/OpenTabletDriver/PSM/psm.json)
to drawing app's folder (for CSP, it should be at C:\Program Files\CELSYS\CLIP STUDIO 1.5\CLIP STUDIO PAINT\psm.json)
If you did everything correctly, the tablet should just work in the app!
If you run your app through console, you should see a [*] PSM is loaded! message.
If nothing works, check the Troubleshooting section below.
- Verify that you put the
psm.jsonbesideswintab32.dll. - Try running the app through console to get some debug output. You should see some relevant error messages.
- Try running with
RUST_LOG=debugenv variable.
- [Wine] Verify that you added the library override in
winecfg. - [Wine]
wintab32should be used as the override library name, notwintab32.dll. - [Wine] Try running with
WINEDLLOVERRIDES="wintab32=n"to ensure that PSM's Wintab32 is used. - Verify that you put the library into the correct folder, next to the app's executable file.
- Verify that you used the DLL for the correct architecture.
For CSP, you should use the x64 version (
wintab32.dllin releases).
You have another app that already uses PSM or the port 40302.
If you are using Wine, you can use wineserver -k to kill all Wine apps.
On Linux, you can use sudo lsof -i -P -n | grep 40302 to see what process
is using the port (second column is the PID).
Just try copying the generated psm.json again. Make sure it is
in the same directory as your wintab32.dll.
If it still doesn't work, try copying the config to the directory you are currently in.
The config search order is as follows:
- Working directory
- Application executable directory
- Config directory
(you can swap the GNU/MSVC toolchain for any other you want, if you do, don't forget to swap it in .cargo/config.toml too)
rustup target add x86_64-pc-windows-gnurustup target add i686-pc-windows-gnu- Install the GNU toolchains for Windows
- For x86_64, run
cargo build, the DLL will be intarget/x86_64-pc-windows-gnu/debug/wintab32.dll - For i686, run
cargo build --target i686-pc-windows-gnu, the DLL will be intarget/i686-pc-windows-gnu/debug/wintab32.dll - You can symlink the DLL to your app's folder to make development easier
- Set target in
.cargo/config.tomltox86_64-pc-windows-msvc rustup target add x86_64-pc-windows-msvcrustup target add i686-pc-windows-msvc- Install the MSVC toolchains (if you haven't already)
- For x86_64, run
cargo build, the DLL will be intarget/(x86_64-pc-windows-msvc/)debug/wintab32.dll - For i686, run
cargo build --target i686-pc-windows-msvc, the DLL will be intarget/i686-pc-windows-msvc/debug/wintab32.dll
- Run with
RUST_LOG=debugto get more logging - [Wine] Run with
WINEDLLOVERRIDES="wintab32=n"to make sure that the app uses the emulated wintab32 cargo build --target x86_64-pc-windows-gnu --manifest-path <path to this repo>/Cargo.toml --package wintab32- Official Wintab Docs | Wintab Projects | Wintab Debug Tools
Make a release build with cargo build --profile release-optimized.
I'm planning to make a Libinput (Wayland) client, but for now, only OTD is supported.