-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xppen_{3,4}: init at {3.4.9-240131,4.0.4-240815}; nixos/xppen: init #351647
base: master
Are you sure you want to change the base?
Conversation
Hi @gepbird, Here is a general summary: Working
Issues
"/var/lib/pentablet/conf/xppen/config.xml"
"PenTableLists"
"1.5"
"PenTableLists"
"1.5" Here is the exported settings that I created with the app then tried to reimport after setting everything back to default: PenTablet_Config_2024-10-27.pcfg.pcfg.zip
I can also see the following messages when interacting with the monitor options in this section: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
QPixmap::scaled: Pixmap is a null pixmap So I guess this might be a Wayland issue?
Notes
|
Just rebuilt with the |
Hey! I wrote a commend encouraging you to pick my work up in my PR but got distracted and didn't send it :D So, thanks for picking it up! Glad my work was at least somewhat valuable, really hope you can get it through! :) |
Thanks for your detailed testing @damiankorcz! I'm happy most of the features work for you.
Sad that the app disables default window decorations for their custom design. On a window manager like dwm there are no default decorations and I'm used to using keyboard shortcuts to move a window. However on the first "plug in your tablet" screen I can move the window without the keyboard, by starting to drag it on the top (eg. next to the close button). I think that should work on Plasma, can you check that? Otherwise I'm pretty sure it's an upstream bug.
I'll try to do some research on the data you sent, but I think an strace output would also help. To minimize the output of strace, please attach it right before you click on the export/import button, and detach it with Ctrl+C after you observe the issue. sudo strace -p $(pidof PenTablet | cut -f2) -ff 2> xppen-strace I'll help with addressing the other issues later, I'm just short on time. |
Hi @gepbird, I've clicked on the Settings cog -> Export config -> Navigated to my desktop and saved the file. Then I again clicked on the Settings cog -> Import config -> Selected the file I just exported. |
@damiankorcz Sorry for the late response, I've been busy this week and hopefully have more time next week. From the strace (system call trace) you sent, I see a lot of access to ~/.config/PenTabletrc file, it seems like the currently loaded configuration. Can you also send that? I'm curious whether it has the same format as the exported .pcfg file. If it does, then we can find out whether the issue is with the exporting or the importing part of a .pcfg file checking how much it differs to the PenTabletrc file.
If it saves the config between app restarts, then it must save the modified config in your home folder and not in the priviliged /var/lib/pentablet directory. From the strace, when you import the config, it reads the config then tries to delete /var/lib/pentablet/conf/xppen/config.xml which fails due to permission denied: @damiankorcz can you test again if after restarting the app/machine, does the modified config get loaded, or it reverts back to the default? If it works, then I assume they messed up the import config code and only that tries to modify the installed config, in that case try running it as a superuser and check if importing works. |
Seems like a Wayland issue. I'm not familiar with that, but my guess it xppen is running inside an Xwayland session, so the application doesn't see all your monitors but only the area it takes up on the screen.
Weird issue, I have no clue how something like that happens.
Looks like another Wayland issue.
Interesting, I'll look into this later. If anyone has some suggestions about these (presumably) Wayland issues, please comment it. And reproduction attempts of these issues on X11 could also help. |
Hi @gepbird, Here's the PenTabletrc file: It seems that the file keeps a reference to the last imported (or exported?) file here so just to be sure it wasn't somehow loading from it I deleted them and when I restarted the app and system, the app seems to keep the settings saved correctly regardless. As far as I can tell, it is successfully saving and loading the config file to
When trying to run the app as sudo from the terminal I get the following and the app doesn't start: [damian@nixos-desktop:~]$ sudo PenTablet
[sudo] password for damian:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QtLockedFile::lock(): file is not opened
QtLockedFile::lock(): file is not opened Looks like the app is actually running under Wayland not Xwayland. I did a simple test with When I have a chance I'll try getting X11 on my system and see how much of this can be replicated so we know if Wayland is to blame. |
7b5930a
to
1bcff45
Compare
You're right, your config differs from the default. At first I thought only root can edit this file then I checked its permissions: ~ ❯ stat /var/lib/pentablet/conf/xppen/config.xml
File: /var/lib/pentablet/conf/xppen/config.xml
Size: 191313 Blocks: 376 IO Block: 4096 regular file
Device: 0,30 Inode: 350807306 Links: 1
Access: (0666/-rw-rw-rw-) Uid: ( 0/ root) Gid: ( 0/ root)
...
~ ❯ stat /var/lib/pentablet/conf/xppen
File: /var/lib/pentablet/conf/xppen
Size: 74 Blocks: 0 IO Block: 4096 directory
Device: 0,30 Inode: 350807305 Links: 1
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
... From this, other people can write to the file (that's why the app modifying this config works), but can't delete it (that's why importing doesn't work, it tries to delete the old config and put there the new one): ~ ❯ echo foo >> /var/lib/pentablet/conf/xppen/config.xml
~ ❯ rm /var/lib/pentablet/conf/xppen/config.xml
rm: cannot remove '/var/lib/pentablet/conf/xppen/config.xml': Permission denied I've updated the PR to set the permissions correctly. I know 777 looks insecure, but our other options are putting these files in the user's home (this should be done in home-manager, not in nixpkgs) or creating a user for xppen which seems like unnecessary complexity. @damiankorcz Please either
Then try importing a config and see if it works. |
Hi @gepbird, |
@damiankorcz I checked some documentation related to OpenGL and Wayland in nixpkgs and added some dependencies. Can you check if it fixes any of the previous issues, for example the "screen identifier" or the "rotation labels" issue? If it does, would you mind narrowing it down to the specific dependency(ies) that fixed it? |
Hi @gepbird, I've checked and at least on Wayland it didn't seem to make a difference to any of those issues. I've also just switched to X11 to test and it looks like:
Everything else seems to work fine like it does on Wayland. |
Worth pointing out that the issues on Wayland are mostly visual in the app but the options still work correctly. Just slightly inconvenient when selecting which monitor you want the tablet to map to. But the dropdown lists all monitors correctly and it works. Same with the rotation indicators. You can just click off the app and see which one you want and select it. For both cases (for me with 4 screens) I just have to trial and error 4 options. You will likely do this once and be set. Perfectly serviceable if we can't find a solution. |
a982cff
to
1bcff45
Compare
Thanks a lot for testing, so apart from a few minor visual issues, the v3 driver seems to work well. I don't think we have people who have time to test the v4 driver, a previous iteration of it was tested and worked with a few issues that the NixOS module solves.
|
This comment was marked as off-topic.
This comment was marked as off-topic.
Hi @gepbird, |
This comment was marked as off-topic.
This comment was marked as off-topic.
Hi @gepbird, Now, I've tried what you suggested to get the XP Pen stuff working but now I'm getting Thanks for helping me with this again. Much appreciated! |
This comment was marked as off-topic.
This comment was marked as off-topic.
@gepbird That did it thank you! I tried something along those lines and couldn't quite figure out the syntax 😅 Also, I had to add Now to hope this gets merged soon 🙏 |
cc @h7x4, @MinerSebas, @eclairevoyant and @fsnkty for reviewing #285660 |
3d5f652
to
5419706
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/4872 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing obviously wrong to me but personally unable to test
Are there any bluetooth tablets support in driver? Or xppen doesn't support bt for linux, cuz my deco pro lw (gen 2) works only in wired mode. |
Looking at the XP Pen website for your tablet there are both the Version 3 and Version 4 available so you could try with the other version from what you tried. My standard Deco LW works fine wireless and wired with the provided dongle. Possibly you have to re-pair the tablet with the dongle. Though mine worked fine and last I had it paired in Windows 11. |
@D3st0ny are you using NixOS with Bluetooth enabled and do other other softwares work with Bluetooth? If so, try this PR again, I added some related dependencies (not sure if they are being picked up at all or if I did it correctly, I don't know much about it).
@damiankorcz does Bluetooth work for you with this PR on NixOS? |
39e1c50
to
5652742
Compare
Actually tried both versions
Tablet itself connects and actually works via bluetooth without driver, but i cant remap any pen buttons cuz driver doesn't detect it that way (can via inputremapper, but with pain in ass), will try soon |
@gepbird I just updated and it's still working fine on my end. I think if I recall correctly, the dongle uses Bluetooth but doesn't show up as an ordinary Bluetooth device in the system. On the Windows side, I used a separate tool that XP Pen provided to do the pairing. I think that can be done within the app now but I haven't had to re-pair since so I'm not sure. |
@damiankorcz Thanks, so this package's bluetooth features worked for you without additional bluetooth dependencies. Then I don't have high hopes the bluetooth dependencies will help you @D3st0ny, I will remove them after you try it out. Edit: I removed it earlier |
5652742
to
5419706
Compare
Co-authored-by: yakrobat <[email protected]>
Co-authored-by: yakrobat <[email protected]>
5419706
to
93e171b
Compare
Fixed a merge conflict with the release notes. |
Summary
Add the official XP Pen tablet drivers:
xppen_3
,xppen_4
packages andxppen
NixOS module.Prior work
This PR is based on #285660, thanks for @nasrally's, the reviewers' and the testers' work!
Closes #285660, closes #347984.
Related: #213263, #277176
For reviewers
cc @h7x4, @MinerSebas, @eclairevoyant and @fsnkty for reviewing #285660
Differences to the aforementioned PR for the package:
xppen
toxppen_3
libGL
dependency as it seems to be unusedqt5.full
toqt5.qtbase
installPhase
, merge withpostInstall
with lib;
meta.platforms
from linux to x86_64-linuxmeta.sourceProvenance
Differences for the NixOS module:
/var/lib/pentablet/conf/xppen
directory 777 permissionNew changes:
xppen_4
The derivations forThis is resolved with the help of https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/README.md#recommendation-for-new-packages-with-multiple-versions.xppen_3
andxppen_4
are almost identical, but I'm not sure how to unify them inby-name
, can I get some assistance?For testers
I belive this was sufficiently tested by @damiankorcz, many thanks!
I don't have any XP Pen tablets, the most I can do is check whether the GUI opens. If you own a tablet, please test whether this works for you, feel free to ask for help if you're unsure how to do it.
cc @damiankorcz and @misumisumi for testing the version 3 driver
cc @HangedFool for testing the version 4 driver
To test it, you can build your system with this PR and with this extra config and you should see the
xppentablet
desktop entry orPenTablet
binary:Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.