-
Notifications
You must be signed in to change notification settings - Fork 391
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
Surface Pro 3, 4 (N-Trig hardware): pressure sensitivity stops working after moving pen away from screen #484
Comments
Not a clue, sorry. I don't use this hardware, and I don't run Windows 10. Please can you paste in the versions of MyPaint you have tried, and the version of your "N-trig DuoSense device Stylus" driver. You will find both under "Add or remove programs" on Windows 7. If you are using the very latest MyPaint beta, could you screencap the Devices tab of the Prefrences window after using all styluses, stylus ends, and all input devices on your system to draw something? Thanks. Does it work in the GIMP (and if so, which versions?) Please search your C: drive for "wintab". Do you have a |
I have a Surface Pro 3 with Windows 10, too and the pressure sensitivity works but the drawing in MyPaint is extreme slow. @crydalch |
@supertobi lag issue discussion goes in #390, thanks! There is an experimental build I'm trying to get everyone to try as a fix for that bug, and feedback would be really useful. |
This looks like one of those vague upstream issues that plague us constantly. And well, I don't have hardware available to test this myself. Let's see if we can uncover more about this popular hardware combination. @zsgalusz I don't know if that's relevant to this issue - it might be a newer bit of hardware. Can you look in your devices list and pull out some information about the device in question, like hardware IDs or what Windows calls it? @crydalch Are you able to retest against the most recent release (or a recent git revision)? v1.2.0 stable is available now. It contains some removal of proximity-in and proximity-out event handling since 2dd4812, and notably the transition you spotted is one that would be expressed as a proximity-out event. Sadly v1.2.0 had to be released with an earlier GTK due to the lag issue, so you may find it just doesn't work at all with your device. You'll find that commit in MyPaint v1.2.0-beta.4 as well, which is built with the newer GTK. |
In addition to my last comment, in issue #420, you mention you are matching on: As you can see in my Thinkpad Helix screenshot above, that is matched and recognized as an "eraser". But, in the SP4 screenshot above (and in my Surface 3), the eraser is proper-cased "Eraser". Maybe there's a regex ignore-case missing? Because on my Surface before and after the format, the eraser never worked. I have to fight it to have it force an Eraser mode. |
@eduncan911 The Type column is what GDK tells us. In this case, it is telling us that the device presents as a pen on Windows on the SP4 (:see_no_evil: Aha! "Surface Pro 4", not "Service Pack 4"... :stuck_out_tongue_closed_eyes:) That's why (Anyway, this eraser discussion is a bit offtopic) |
Regarding pressure sensitivity dropouts on Surface Pro 3 and 4: this seems to affect GTK 3.14 (=MyPaint v1.2.0 stable for windows) thru 3.18-something-i-think (=MyPaint v1.2.0-beta.3 developer build for windows). MyPaint is utterly reliant on the upstream GTK library's "GDK" module actually reporting pressure. The best people for reporting and chasing are you guys, since you actually own the hardware in question! Please could somebody affected by this check the upstream tracker about this, and maybe report an issue there if they don't know about it yet? The hardware details above will doubtless be very useful to them. The initial search to get you started: https://bugzilla.gnome.org/buglist.cgi?quicksearch=surface+pro+pressure, but please try others. There's a bug in there which appears to have been fixed (bug 745697), somebody with one of these tablets should comment on it, since one of the screencaps above shows a detected device as |
I would like somebody to test whether 2dd4812 fixes this issue with recent GTK. Only v1.2.0-beta.4 contains both, or you could try building it yourself. @zsgalusz The stable v1.2.0 contains the commit too, but its GTK is older (3.14.15). |
@achadwick Is that commit If so, that's what I am running (My Paint x64 1.2.0+git.f62444e.dirty) and it didn't work. |
@eduncan911 Newer GTK includes tablet fixes. I suspect the fixes they included don't work perfectly, i.e. it seems pressure works until you take the stylus away from its pad (the "proximity thing"). But perhaps that only happens to MyPaint before 2dd4812? That's what I want someone to test. All Surface Pro 3 and 4 users: [EDIT for clarity] |
@achadwick I just tested both 64 and 32 bit builds of 1.2.0-beta4, and both still exhibit the proximity issue. (Regarding the somewhat offtopic eraser issue: it does work as a different brush, it's just not noticed as an eraser.) |
I wanted to join the conversation and offer my help in debugging, testing, experimenting, etc. in order to resolve this. I'm a long time user of MyPaint and have a SP4 on which I'd love to use it. Please let me know any way I can help keep this moving forward! |
@envision3d (and anyone else willing to get a bit technical) – here's how to start: Be sure you're seeing the same bug! 👓 ✔️Basically, double-check your own experiences. Be sure you're as sure as you can be that it's happening, and that you know when it happens. Make sure you can reproduce it when you need to; we're about to step into active-doing territory. Make really sure you have the most recent drivers for your tablet. This is so important. I cannot stress it enough. MyPaint has an input tester! Help → Debug → Test Input Devices will tell you all about current pressure and tilt, and show you a stream of information about events as they come in on the main canvas. It's a bit basic, but it's a good toe-wetter for the next bit. That stream of bumpf that passes by is a stream of the events we're talking about... minus the proximity ones. If pressure cuts out in this after you take the stylus away from the screen, and you see the dreaded "Pressure: (no pressure)" when you try again, that's this bug! As I understand it. Ready to get technical? Down the rabbit hole... 🐰
You should now be in a position to get a really good handle on when these problems occur, and see how the code responds to it. Python's a really easy scripting language to learn. Just a few more pointers for debugging:
You can go deeper, and you probably will have to if my suspicions are correct. MyPaint 1.2.0+ is built on the GNOME project's GTK and GDK, version 3+.
Hold on, isn't this an upstream bug? 🔌We need to determine if MyPaint can be improved to help here, and how. However I still strongly suspect that it's really is an upstream bug (DO try and prove me wrong though). If this is an upstream bug, it needs to be reported in their bug tracker by someone who owns the hardware in question: They'll need the same details about your system as we do: make, model, version numbers of things, the tablet hardware you're using... and what GTK/GDK version you tried. Any strange results from the testing above would help them. Please link any upstream bug reports here so that people can find them. If it's reported upstream, I can chime in too and help you explain. I'm occasionally active on their IRC channel (#gtk+ on GIMPNet), and that can be a good way to chase through backend-specific input bugs. |
Similarly affected Surface Pro 4 user. Started a bounty for this issue: https://www.bountysource.com/issues/28004023-surface-pro-3-4-n-trig-hardware-pressure-sensitivity-stops-working-after-moving-pen-away-from-screen |
For the record - I installed 1.2.1-beta.1 on my SP4 and now I'm simply not getting pressure sensitivity at all, and my stylus is not recognized as such (only "System Aggregated Pointer" shows up under devices). I tried both the 32 and 64 bit builds, as well as reinstalling the wintab drivers. |
Bountysource is a good option, thanks @scooter-dangle!
|
One important question to ask ourselves, from that planned docs work: Q: can the input error be replicated with gtk3-demo (by running its Event Axes tester)? If it happens for that too, it's definitely GTK/GDK that's at fault (or its interface with proprietary wintab.dll code). If not, it's the MyPaint code (or its interface with GTK/GDK). |
Where can I download the gtk3-demo.exe? I was only able to find a version with gtk 3.6. |
@supertobi The most productive way by far is to install the native packages of GTK on an MSYS2 deployment. The package names:
It's productive because there's also a corresponding debug PKGBUILD of the current git version available in MINGW-packages. They conflict, but in a nice way that lets you can swap in and swap out debug builds very easily with a bit of |
Possible related sibling-project bug? → https://bugzilla.gnome.org/show_bug.cgi?id=758500 |
Updated version, needs testing@supertobi @crydalch @zsgalusz @scooter-dangle @envision3d , everyone! MyPaint v1.2.1 is now out, and the Windows build contains several fixes for tablet recognition (it's bundled with GTK 3.22.7). It also contains a bundled GTK3-Demo program, configured to open on the tablet tester page. Please can you:
Gtk3-demo looks like this: |
It's got even worse than before. Not only does the pressure sensitivity get lost after the first stroke, the pointer location also gets completely garbled now. To test, I tried to draw 3 circles on the left half of the visible canvas. The first circle appeared ok, but it was shifted significantly from where I was drawing. The second and third circles turned out not circles at all, but a jagged mess. (They appeared really slowly, too, about 2-3 seconds after I actually finished drawing them.) Here is a screenshot: As an aside the pointer behavior is so bugged right now, that even the menus are inoperable by pen as they are affected by the same incorrectly perceived position of the pointer. The Gtk3-demo reproduces the issue quite closely. When first using the pen, the pressure shows up, but the location is off to the side. After lifting the pen, the pressure goes away, too, and the location flickers slightly. Interestingly, after accidentally resizing the window the location seemed corrected (but the pressure was still gone) until lifting the pen again. The device name appeared to rapidly alternate between the system aggregate pointer and the Microsoft device stylus while I was holding down the pen. For the record, I tested both 32 and 64 bit versions and there is no difference in their behavior. |
Upstream bug (GDK)Please report to the upstream bug trackerThis is now confirmed as a bug in the GDK library: it affects GTK3-Demo too. We don't maintain the GDK library here ourselves. Somebody with the affected hardware needs to report this in the GNOME bugtracker, against the “gtk+” component so that the GDK developers know about it. Somebody with the affected hardware needs to take responsibility for getting this fixed with the upstream developers.
The GNOME Bugzilla is quite technical, but don't be discouraged. We can help you get it right here, and we have a few guides for reporting good bugs in our own wiki. See our wiki's Contributing section for details. Give the upstream developers good details
|
@zsgalusz One upstream bug I did find: https://bugzilla.gnome.org/show_bug.cgi?id=745697 Somebody needs to mention the completely broken tracking, though. It's clear to me that they're related. |
There is nothing we can do about this by changing the MyPaint code. This is a confirmed upstream fault with a plausible looking upstream bug report. Therefore I am closing the ticket. This is not fixed. It merely cannot be fixed here. Reward available for anyone fixing this!There is a reward available on BountySource for anyone willing to approach the GTK developers and get the fault fixed (thanks, @scooter-dangle!). Here is the link: Would it be possible to update the bounty to make it clear that these awful n-trig bugs are GTK issues, not MyPaint issues? A fix over in the GTK code would benefit more people (and we can't fix this in MyPaint). |
Thanks for the update, @achadwick. I'll ping Bountysource support to ask whether the bounty can be transferred explicitly. |
Created a bug report on GNOME Bugzilla: I hope it's not too bad, with my limited knowledge and all... |
@Windmaedchen Possible fix, please test!We have a patched test-build ofr GTK in the upstream bug report, https://bugzilla.gnome.org/show_bug.cgi?id=778328#c18, and it looks promising so far. Could anyone affected by this issue who's comfortable with a command line and our MSYS2 development environment please test out the build? You'll find instructions behind the links. It's worth knowing that MyPaint 1.2.1 itself is available in MSYS2 repos now, so you can test in that too, provided you run it from a MINGW64 or MINGW32 shell 😄 Using MSYS2 means you can slot different |
@achadwick I will give the new Gtk fixes a try this week, I'll have a bit of time to give it a go! Cheers! |
Great news @achadwick, that patched build of Gtk3 seems to have fixed the problem! 🎉 The UI is quite small, but I'm guessing that's coming from/through msys/mingw, maybe they have a hard time with the hidpi resolution on a Surface? One question, is multi-touch navigation supposed to work? Or is that down-the-road? Thanks/congrats to everyone to helped get this resolved! |
@crydalch The UI should be double-sized on a Surface screen unless you have You can experiment with different scales in MSYS2 by running mypaint as:
and so on. This won't affect the Windows environment settings. Note that there are two patched debug builds of GTK floating around in the upstream tracker now. The other one fixes mis-positionings at 2x and greater. If you make your own build of GTK 's MyPaint's No multi-touch support in GTK yet for Windows. For X11 and Wayland it's a different story and I need to get support for gestures into MyPaint somehow. But that is a different feature to add. |
I've not tried to build anything on Windows. Any estimate on timeframe for releasing a build with the Gtk fixes? |
We're in the process of changing how we build and distribute. So it's going to take a bit. However once we are done, we'll definably have much more frequent builds thanks to automating a bunch of it through Travis and Appveyor. We're making headway, but we still have a bit to go. |
I fixed the pressure of my Surface Pro 4 with the myPaint program, the problem was not the program, it was about the "wintab" controllers. I uninstall the wintab and then install the most recent version (it was actually the most recent version I had installed) but this time I installed wintab in repair mode and restart mu surface pro, when turning on and installing the wintab once more using in install mode default. Finally, I installed the myPaint program because before this process I had uninstalled the myPaint program, although I don't know if that matters at all |
I fixed the pressure of my Surface Pro 4 with the myPaint program, the problem was not the program, it was about the "wintab" controllers. I uninstall the wintab and then install the most recent version (it was actually the most recent version I had installed) but this time I installed wintab in repair mode and restart mu surface pro, when turning on and installing the wintab once more using in install mode default. Finally, I installed the myPaint program because before this process I had uninstalled the myPaint program, although I don't know if that matters at all |
The latest changes have resolved some strange problems, thanks everyone!
Now, it seems the last major hurdle is getting pressure sensitivity to work. I realize this very well could be related to Gtk/Gdk upstream, but figured I'd open it up here:
If my stylus isn't near the screen, when I launch MyPaint, pressure sensitivity works! But once I move the pen away from the screen, I loose pressure sensitivity.
Any ideas where this might be coming from? I see two devices in the preferences: System Aggregated Pointer and N-trig DuoSense device Stylus. This is under Windows 10, btw.
Thanks!
The text was updated successfully, but these errors were encountered: