Writing in cursive is IMPOSSIBLE: stylus lag, broken lines

I did my due diligence, and the code seems fine. Nothing sketchy going on, and I trust you enough since you’re reaching out here. It’s my secondary computer, and I’m so boring there’re is nothing you’d gain from hacking me anyways :sweat_smile:

I’ll get to it tomorrow, after work.

2 Likes

I am also experiencing this behavior with stylus input and Framework Control. The issue is much less annoying for me as I am really only using stylus input to help me remove dust and aberrations from photo film scans, although it makes removing long scratches or complex shapes a little more challenging.

I am willing to help debug the issue as well, Framework Control is an incredibly useful tool and I want to help make it better.

I ran your script after looking it over, and performed the tests as instructed. None of the test scripts resulted in any skipping. I’m attaching a .jpg of the “writing” I was doing while performing the tests. The purple lines are each of the tests performed while running the script with FrameworkControlService stopped, The red line is what the behavior looks like when FrameworkControlService is running.

FW12 i5, using the official Framework stylus on Windows 11 25H2

1 Like

This is exactly the kind of debugging I needed! Thank you. I don’t usually have time on weekdays, but if I can, I’ll try to look at this on the weekend and try to come up with a v2 script to test more commands.

It’s good that these commands themselves are not breaking it. What @James3 said also sounds super important. Maybe it’s the number of events we’re sending to the EC. If that’s the case and we can prove it by tweaking the debug script to be more aggressive on the EC and reproduce the skipping issue, I can tweak the app to be more conservative with the EC calls.

@Ben_Bellamacina for the skipping case, do you also get about one time every 5 seconds when the service is running? Watching @Angelo_Lipari’s video I realized it was consistently at each 5 second mark. I’m wondering if the interval here can give us a clue.

2 Likes

Happy to help! Let me know when you have another script to test. :slight_smile:

I wasn’t paying attention to the interval of the skips when I performed the test, but I just went back and filmed myself drawing another line to measure the time between skips, and it does indeed skip every 5 seconds.

Some strange behavior regarding this though: the interval of skipping and the length of time I draw for don’t align, sometimes it will skip 1 second into a line, then skip again after 5 more seconds rather than after I draw a line for 5 seconds.

I also played around with the polling intervals for sensors and fan control within Framework Control, setting them both to 5000ms or 200ms did nothing to alter the frequency the skipping.

All of this seems to indicate that the event that causes skipping happens every 5 seconds, regardless of if the stylus is in use at the time

I also have this issue and it is very annoying. Great debug script :slight_smile:

ACPI interacts with the EC. It is a guess, but if a setting from framwork_control is causing more ACPI events than normal, it could be that causing the pen stalls.
One way to diagnose this would be to capture the ec log. “ectool console” and see what extra output one gets when running framework_control.
See if a message on the ec log corresponds to the pen stalls.

Wait, did you have these skips during the debug script even when the service was disabled?

Confession: I forgot to do that :stuck_out_tongue:

However it turns out that having the Service running seems to be the only thing that was making the pen work at all. With the Service stopped (and without the debug script running!) the pen starts lagging out after a few seconds and locks up the machine until it slowly drags itself to the finish. I can’t even alt-tab when it’s like this.

With the Service running, it lags periodically but then goes right back to working. Here’s a comparison:

(watch it catch up right at the end)

Wait wait wait, I’m even more confused now. This behavior seems to be very random :slight_smile:

Are you saying the pen was lagging with both the service and the script not running? Does that mean you’re now back to not knowing the issue with the pen?

I’m suspecting the pen actions are taking a good amount of CPU power so have you tried setting your power setting in windows to “performance” and plugging in the laptop?

It would be worth trying to see if that makes any difference at all. I’m still suspecting something in the service is still causing weird jumps every 5 seconds but I have other release related changes I need to attend to this weekend. I’m also in the market to buy a car so there’s that…

Either way, going off of @Ben_Bellamacina ‘s test and findings, I’m pretty sure I can try to debug this when I have time

Are you saying the pen was lagging with both the service and the script not running?

Correct

Does that mean you’re now back to not knowing the issue with the pen?

I wouldn’t really say I knew what the issue was in the first place. Was just chiming in with my test results :slight_smile:

I’m pretty sure I can try to debug this when I have time

No rush, and I appreciate you looking into this!

I also need to try my Surface Pen (MPP) to see if it’s the same way.