-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
DISCUSSION: Continued commentary about the touch keyboard service #8697
Comments
Igor, My job here is to make a call. Sometimes those calls are wrong, and I'm willing to accept that. I apologize. I made a bad call.
I can only draw on the knowledge of my peers here. The folks who own ctfmon explained why it's an integral part of the "modern application input stack¹," and they didn't give any leeway. We're still working with them to figure out why applications work without it. Every bit of knowledge we have in the company suggests that they shouldn't. I've filed #8699 as a followup to discuss how we can make the experience better for you. ¹ Even though it's named "touch keyboard and handwriting". The name is no longer fitting: it is designed to handle all input for all XAML/UWP applications. It should be renamed! |
I'm going to keep this issue unlocked. It wouldn't be fair for me to (continue to) shut down discussion. /cc @mdcclxv mdcclxv: we're a small team, and we've historically needed to constrain our work to supported OS configurations. I'm not saying we don't have bandwidth to work on the fix... it's just that somebody with a greater need than us would be better suited to working on the problem. |
Thank you for being frank and owning up to your mistake. I understand that Windows input stack is a complex beast and that what works for me might not work for everyone. I do not mind seeing a warning provided that it can be disabled afterwards so I do not have to dismiss it every time I launch Windows Terminal which is one of the very few modern apps I use. What was really annoying in all this was that it seemed the service warning was an indirect fix for ctfmon.exe not running and it also seems you are still unsure why and how we don't have any issues with the service disabled and ctfmon.exe not running. I even went as far as to delete the service completely (after backing up the registry key of course) to test your claims and my Windows 10 Version 20H2 still processes keyboard input normally in all applications including Windows Terminal, and ctfmon.exe is nowhere to be found in my Task Manager. I am more than willing to collaborate by providing you with any feedback, logs, or by performing any tests necessary on my system for you to figure out how is that possible if that will help you make a better solution for everyone. Let me know if there is anytihng I can contribute. As for the sevice name, it does fit partially because if I am not mistaken it is responsible for bringing up the on-screen keyboard. That is one of the reasons many of us disable it right away. Finally, I don't think it is a good idea for any application to be an "enforcer" for system services, no matter how critical those services might be for some use(r)s. Today it is Touch Keyboard service, tomorrow you will be adding checks and warnings for DNS client service so that ping command can resolve host names. Where does it end? IMO, showing the warning once or even just adding "My keyboard doesn't work" section to FAQ should be more than enough help tor people with no input issue -- you should not try to fix all problems with software and most definitely making sure that ctfmon.exe is running should not be your responsibility because you are not the owner. |
please send result from command prompt of "tasklist | findstr /i ctfmon" Also, please send result of: "reg query hklm\software\microsoft\input" Also, please send result of: "ver" Thanks Eric |
could you provide results of "ver" command as well? |
|
would you mind trying : C:\WINDOWS\system32>tasklist /m inputservice.dll |
@ebadger Sure |
looks like our service is running via a legacy instantiation path. Try terminating the taskhostw.exe instance and see if you can type in terminal / settings. |
Before I proceed, could you please clarify:
Please advise. To clarify, I am asking this because I am curious to learn whether having a fresh OS install will result in a different behavior compared to going say from 1809 through several feature updates to 20H2. |
I killed the Now what? Would EDIT: Nope, killed |
@levicki and @piscisaureus, after some digging I've discovered some interesting information. Terminal is actually win32 hosting, not UWP, so the input integration is slightly different. This enables normal keyboard input without the service running. Also have discovered that in this unsupported configuration, there is a problem with terminal on startup that prevents normal text input. You should be able to reproduce text input not working in terminal by disabling the tablet input service and rebooting. Ideal configuration here would be to re-enable the tablet input service, and allow ctfmon.exe to launch - this will resolve text input issues into both UWP and Terminal. The current technique of disabling the tabletinputservice doesn't actually buy you much anyway due to the fallback initialization of the input service - i.e. it's just hosted in taskhostw.exe instead. Again, would recommend that you enable tablet input service and allow ctfmon.exe to work properly. |
@ebadger We should dig into the Terminal issue. We're just using Xaml Islands, so I suspect the issue is somewhere between your code and mine. I'm a bit confused about this part though:
@levicki seems to be experiencing the fallback behavior (the service is disabled), but Terminal is working until he terminates the taskhost hosting the fallback service. Is there a third state where Terminal works and Settings works without the usual service running? |
I have TabletInputService set to While I have the eyeballs of someone on the input team: I'd be more than okay with enabling TabletInputService if it weren't that it makes keyboard input terribly laggy in certain applications (see #8228 (comment)). Fixing the "root cause" seems better than adding a workaround to support another workaround. |
wrt to your comment on 8228. If you're using hardware keyboard, and not using an IME, there should be ~0 impact on perf during typing for Chrome or VS Code. You mentioned procmon showing ctfmon.exe starting and stopping on each keystroke - this indicates something is wrong - either configuration issue or a bug. ctfmon.exe is a long running service and is not expected to fail. |
@ebadger
Also have discovered that in this unsupported configuration, there is a problem with terminal on startup that prevents normal text input.
I have not observed this, what are your repro steps?
You should be able to reproduce text input not working in terminal by disabling the tablet input service and rebooting.
When I was performing your tests the service was not even installed -- I deleted it using sc delete previously and rebooted. Terminal and everything else still worked.
If you terminate the tashostw.exe that is hosting the input service, you'll be able to type in terminal, but not in start / settings / UWPs.
I can confirm Settings not working after killing taskhostw.exe, but I am able to type into the Terminal both before and after killing taskhostw.exe. Closing and reopening Terminal at any point does not change this fact either.
The current technique of disabling the tabletinputservice doesn't actually buy you much anyway due to the fallback initialization of the input service - i.e. it's just hosted in taskhostw.exe instead.
The reason I am disabling it is because I do not need its functionality on my desktop.
Furthermore, Microsoft says it is OK to do so as part of security hardening:
https://github.com/MicrosoftDocs/windowsserverdocs/blob/master/WindowsServerDocs/security/windows-services/security-guidelines-for-disabling-system-services-in-windows-server.md#touch-keyboard-and-handwriting-panel-service
Again, would recommend that you enable tablet input service and allow ctfmon.exe to work properly.
There was also the time when ctfmon had tons of vulnerabilities discovered by Google Project Zero researcher Tavis Ormandy (hopefully fixed by now):
https://github.com/taviso/ctftool
So no thanks, I would rather keep the services I do not need disabled to reduce the attack surface. Sadly, Microsoft keeps adding useless services thus making my job as system admin ever harder.
I wonder, did it occur to anyone on the input team that keyboard input should not be handled in a service or a process that a user can stop or kill?
Is there any benefit to current compartmentalization compared to say running it under System process (PID 4) or some other unkillable OS process so that it always works for all apps?
|
Found this thread after following the security hardening link and discovering that Terminal doesn't accept keyboard input without the touch service running. Happy to provide any testing I can -- Powershell accepts keyboard input correctly without the touch service. |
Enabling Touch Keyboard to support Windows Terminal service causes the On Screen Keyboard to appear in the login screen. I don't see any use of OSK when you have an actual physical keyboard or biometric login enabled. I understand that the team may be already aware of this issue but I wanted to put it out here since this is the only open issue on the topic. |
Here are what seem to me to be three problems with the warning shown here: Problem 1: the warning does not impart that the terminal needs the service even if one is using a normal keyboard. Problem 2: the warning does not impart that after the service has been enabled the user will need to restart the machine in order for the terminal to receipt keyboard input. Problem 3: the warning does not impart whether setting the service to 'manual' suffices. I will open a new issue for this, should that be desired. |
If additional text were added to the warning itself, then it might become so long that users would entirely skip reading it. A "More info" button could be safer in that respect. Should the info be included in the Terminal package or should the button open a web page? Access to a web page might be blocked by a firewall, and Microsoft would not see that problem via telemetry because the firewall would likely block the telemetry as well. |
I'm unable type in the terminal of my Azure Cloud PC. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Win11 2H23 (although I only updated to this build AFTER this issue started occurring) Long story short, where can I go for more detailed help figuring out why this process constantly crashes? I have attached the output of WinDbg on a mini dump of a recent crash.
|
@BlueArcherX You're not the first person hitting this issue and it started occurring since about 10 days ago. You should file an issue on the Feedback Hub and attach your dump to it. I'm not entirely sure what category ctfmon falls under but I bet it's "Input and Language > Text Input". You can mention that it's most likely Watson bucket |
Alas, that particular failure hash ( Hits started spiking on 11/17, right about the same time as the holidays. I'm guessing there haven't been many folks in to take a look quite yet. I reached out and I'll let you know if I hear anything. @ebadger as an FYI |
Thanks all, this makes me feel a lot better. I thought I was going crazy. For what it's worth, last night I got fed up after so many hours of working on it, and did a Windows recovery reinstall from a MCT bootable USB (keeping apps and data) and it fixed the issue. No amount of online or offline SFC or DISM commands had any success. |
(looping back: that above bug got fixed in os.2020!10329723. It'll probably roll out over the next month) |
Until the bug fix does roll out, a workaround would be to turn off the following toggle in Settings: |
MAINTAINER EDIT: OP here is a rant that disparages my colleague, and frankly, I'm not gonna stand for that.
You can click here to view it if you want, but I'm not gonna let a flame war evolve.
Congratulations, every response you gave so far on the issue of Touch Keyboard and Handwriting service warning just serves to reinforce the widespread opinion that most Microsoft developers are self-righteous assholes who enjoy antagonizing power-users and developers alike.
We seem to have better overall understanding of Windows than you do, not to mention that we were trying our best to be polite instead of condescending like you.
Obviously your trust does not mean you actually understand their explanation or otherwise you would realize that said service is totally unnecessary for all apps on a desktop system and that you are being an ass by condemning a class of PC users (and not just power users and fellow developers mind you) to an otherwise totally avoidable annoyance because you are obviously on a power trip and like "slapping users in the face" with warnings. Good thing your reach does not extend beyond our desktop or you might try slapping us for real given the show of your character here.
I am sure there are many good people among developers in Microsoft -- Raymond Chen, Larry Osterman, and a few others come to mind. You Sir are not one of them and you should be ashamed of yourself.
I hope someone from Microsoft HR department sees this and the other threads here and your outright hostility towards customers gets taken down a notch or two.
The text was updated successfully, but these errors were encountered: