Pah that's nothing. My wife's old HP laptop had a driver dedicated to controlling the LED on the speaker mute key that used an entire core. Permanently disabling the service fixed the issue with no loss in functionality… except the LED light!
Synaptics drivers are horrendous. In addition to the terrible performance, mine has given me 10+ bluescreens on Win10. I'd love to remove them, but they're needed for some of the basic functionality. And they also seem to randomly make my mouse laggy (when I'm at a desk and plugged in).
Honestly, a generic trackpad driver that suppliers 2-finger scrolling, 2/3 finger mouse button emulation, and _maybe_ pinch-to-zoom would be all I want. If someone put in some plugin interface with an API so everyone could add the additional magic, it would help people with more complex needs. I'd love to kick synaptics to the curb. They've had decades to write a driver for the only thing they're known for, and yet still can't seem to handle it.
> a generic trackpad driver that suppliers 2-finger scrolling, 2/3 finger mouse button emulation, and _maybe_ pinch-to-zoom
On my laptop, a generic “HID-compliant touch pad” driver, made by Microsoft, does all you that including zoom. No third-party software needed, just Windows 10.
Not all touchpads are compatible, but it already works for many Win10 laptops. Mine is Acer BTW, with some Elan touchad.
I'd like that, plus configuration of palm detection and the size of the virtual mouse buttons on the touchpad. Their drivers make things just a little bit of hell. It's one place that I would've expected the Windows drivers to shine in comparison to Linux, but my Linux partition is so much more useable.
Synaptics Windows driver: "You want to hold down control to select some files? OK, now you can't move the mouse. You're welcome."
Do you have some kind of other hotkey software installed?
I had SynTP.sys bluescreens with a Clevo laptop, turns out Clevo hook the driver with their Control Centre software and Windows reports that the touchpad driver is causing the problem, rather than the hotkey filter from Clevo [1].
I've got something that listens to other devices (ACPI buttons, etc), but nothing that touches the touchpad. It's also a driver that's specific to the model (the main driver won't handle 3 button devices), so it's not like it shouldn't have undergone testing on the laptop.
I'd still suspect synaptics, as it's probably not checking its input properly. As no other device has problems with this.
Previously I had a Thinkpad T60p as laptop, when tickless Linux kernels (iirc 2.6.21) and powertop were all new.
I made a ultra-idle setup which generated only 10-20 interrupts per second. That was, until you even dared to touch the synaptics touchpad, then it shot up to ~500 rendering all the other efforts useless.
That's because it's reporting input events at high resolution. The alternative is jerky input. And if you're moving a pointer around the screen then you're going to be keeping the CPU and GPU powered up anyway which means the interrupts from the trackpad really aren't the problem.
On windows, if you have a logitech gaming mouse, you can set the polling rate. The default USB is 125Hz IIRC, on my mouse you can up it up to 1000Hz. For gaming it helps reduce input lag as much as possible since 125Hz is 8ms of input lag. For desktop usage, about 125Hz works fine.
For what it's worth, on my 120Hz screen, I can tell a difference between 125Hz and 250Hz polling rates, from 500Hz upwards I think I can tell but it might be placebo.
Yes there is. Humans are normally not very responsive to the time between when an action is started and when it is carried out on the screen, but this changes for actions like drawing and dragging. This is the reason for the new Pro Motion behavior on the recently released iPad Pro models. For more information, this video [1] is a good place to start.
"not very responsive"? I'm responsive. I mutter things like, "Shit, why does it seem that the amount of lag in my computer's response to my inputs get worse and worse as its physical components get faster and faster."
I think you misunderstood what I meant by non-responsive. 10ms latency from click to action is nowhere near as noticeable as 10ms latency when dragging, because the mouse visibly lags behind.
I think there might be. If your polling is not frequent enough, then if you observed a finger touch disappear from one spot and appear at another spot, you have no way to know whether the finger moved there in the span of one polling period or if the finger was lifted and a second finger placed at the new location during that polling period. So a high polling rate might be essential to disambiguate cases like this, especially for many-finger multi-touch situations.
Can you clarify which part you think could be handled by the touchpad's microcontroller? In order to implement modern gestures and interactions you need full access to all input events, otherwise you'd lose the ability to customize or adequately handle changes to context.
A finger touching and leaving would be a high-priority event for the controller to output, and it should probably internally monitor events at a high resolution.
For position, as reported to the OS: what use would actually need a report every 2 milliseconds? Intuitively, I'd think that motions that matter wouldn't need that many datapoints to reliably differentiate.
Remember that 500 interrupts per second isn't the same as a report every 2 milliseconds - reading status from a device may involve more than one interrupt.
It's often used to compensate for the fact that you want an up-to-date reading at arbitrary points within a frame. If you only update once per frame, and some code reads the position just before that every frame, that's going to give a full extra frame of lag, rather than just an extra 2ms.
Indeed; in fact, that microcontroller could conceivably do the same thing programs like Synergy do with the input events: namely, converting them into a stream of bezier-curve-based gesture-motion events and reporting those to the OS. I can't imagine you'd need to report those at more than 5Hz or so (Synergy manages to have smooth multitouch movement across a LAN just fine with an even-lower update rate.)
You can lift one finger and place another finger quickly enough to fool some older touchpads. I was able to do it fairly consistently with my old Dell laptop.
That's not necessarily because you could do it in a single frame; a lot of the old touch controllers would maintain high levels of hysteresis as a really crude technique to mitigate low SNR. Couple that with a fairly dumb implementation of pointer tracking and you end up easily fooling touchpad into thinking the two pointers are the same. Note also that this is a much rarer and more user-friendly failure scenario than choosing to have the software err in the other direction (erroneously splitting a moving finger into two separate pointers, one of which may look like a tap gesture).
Source: I occasionally work with touchscreens, many of which experienced the same issue in early devices.
It's a cheap/easy way to minimise the input lag. It's otherwise complicated to know exactly when updates should arrive, as different programs might fetch it at different times in each frame, giving you up to a full frame of extra lag if you're only doing it once per frame.
Yes. Suppose you poll at 120Hz. That is a maximum of 8ms between you moving your mouse and the input being registered. Suppose now you poll at 1000Hz. Input lag is now 1ms.
This is absurd and is why people prefer Apple computers, where one company controls the whole software and hardware stack (that includes touchpad drivers) and can ensure that this shit doesn't happen.
Given that Windows owns 90% of the desktop market the "people prefer Apple computers" statement would qualify as a slight exaggeration. Also the reason this lovely %-age exists in the first place is exactly the fact that IBM let others build for their platform.
Most people don't care about computers. Most people spend maybe a couple hours a day in front of a computer and so they will buy the cheapest option they have available. That option will be Windows every time, because they cut corners and end up with shoddy products like this.
For the small minority of the population that spends a large amount of time in front of computers and makes their income from computers (programmers, digital artists) they almost all use Macs.
>>> For the small minority of the population that spends a large amount of time in front of computers and makes their income from computers (programmers, digital artists) they almost all use Macs.
While more of them do use Macs, it's certainly not true that "almost all" use Macs. They are still a minority.
In my, arguably limited, experience, it's web developers that tend to use Macs. I don't see any other type of devs with Macbooks. And web developers are also the group that is most visible on-line and tends to hold disproportionate amount of conferences.
"People who give talks at conferences" have almost zero intersection with "people who program for a living" and "laptop I use to give presentations" isn't the same as "computer I use to do everyday work." It's like trying to figure out what the most popular commuting car is by watching NASCAR racing.
I'm taking issue with "almost always," that's absurd. If you look at actual surveys [1] Windows wins by a large margin.
But hey, stock photos, soooooo.... Yeah!
LAMP wouldn't be a well know acronym and .NET wouldn't be a robust and widely used dev environment if everyone was using Macs. I've been programming professionally for two decades and I've (happily) either used Linux or Windows for the entire time, never touched a Mac in my life. Of course, I am in enterprise software, because it pays the bills, not because it's cool. I'm much too old to try to be cool.
(People giving talks at conferences are trying to impress an audience. Same with stock images. Flashy laptops, of course, are impressive and noticeable and give the image of "professional.")
When you get a chance, check out the page you linked to. It definitely backs up my anecdotal observation with solid numbers. Looks like about 26% of developers (or at least Stack Overflow users) use macOS.
Given a rough estimate of ~18mil software developers in the world[1] this gives use a rough estimate of nearly ~5mil developers using Macs.
So that's why I found it interesting to hear a developer say, "I don't know any programmers that use Macs." There are... a lot of them.
But, as you said, you've sequestered yourself in a fairly narrow niche throughout your career so it's not surprising. I'm sure there are web developers out there who literally don't know anybody that uses Windows because they've stuck to their own niches as well. Although, I work in enterprise software and my whole team is on Macs, so it's not even like you need to look outside your niche.
LAMP wouldn't be a well know acronym and .NET wouldn't be
a robust and widely used dev environment if everyone was
using Macs.
LAMP is a bit of a nightmare on Windows. Been ages since I did it, but the PHP ecosystem made a lot of non-Windows assumptions and things like Imagemagick and file upload handling in general were always kind of a pain. For this reason Macs are popular with the LAMP crowd as well. If I was doing LAMP on Windows I'd use a Linux VM or perhaps the Ubuntu compatability layer that's been added to Win10.
"People who give talks at conferences" have almost zero
intersection with "people who program for a living" and
"laptop I use to give presentations"
Not the conferences I follow. All working engineers giving talks. Not TED-style vague pop-sci motivational stuff. Though I'm sure there are conferences like that. Get out of your niche, hit up a conference, meet other developers maybe? Or just check out some presentations online in your field of interest via ConFreaks etc?
People giving talks at conferences are trying to impress
an audience. Same with stock images. Flashy laptops, of
course, are impressive and noticeable and give the image
of "professional."
I wonder where you are! In Boston, and at mathy CS conferences, 15" MacBooks are routine. Someone always has a Surface, and 10-50% are thinkpads or XPS with Linux.
People who give talks at conferences aren't the same thing as your everyday professional programmer and the computer you use to give presentations isn't necessarily the same as the computer you use to do everyday programming.
Are you working at a hip VC funded startup? I am in enterprise software. Sure, we don't get the press coverage, but we quietly get the multi-million dollar customers and I go home to my family at the end of the day.
Slight exaggeration maybe, but there is a wide gap between "prefers" and "owns". I prefer Lexus vehicles, but I own a Toyota because I can't afford a Lexus. You might then say that I prefer Toyota, but my second car is a Chrysler because Toyota doesn't offer what I needed for my second car.
And the reason IBM PC clones became popular isn't because IBM "let" people clone them, but because the IBM PC was rushed out the door to compete with Apple.
Meanwhile they've some of the shittiest GL and graphics drivers on the planet. So much for vertical software integration. But hey, they've got proprietary replacements for GL and Vulkan, no need to be standards compliant or portable!
I also have a feeling that something else is going on.
Did you also notice that such a wild claim was made in a busy HN discussion, and the response was not a barrage of down votes and the universality of scorn often reserved for gross inaccuracies and blatant bias?
Are we being tolerant of the commenter?
Or are we tolerant of Apple and favouritism?
I should have split the last two carefully but I'll leave it as is, deliberately.
Are we all just vaguely aware of the existence of a delusion in which we have been deprived of accurate evaluation of Apple, equally as anyone? Does only professional exposure to the market information, save us from a delusion?
Important to also ask, is the delusion that Apple is the preferred professional choice a established popular belief?
Edit:
Deleted parenthetical superfluous comments in 1st last paragraphs, only linking continued argument in my profile. I was interested in discussing the possibility of delusions becoming more frequent, even among the least likely to be influenced professions. This intrigues me, and I ponder whether, if you can clearly convince political beliefs, is it possible to engineer a exodus to a Facebook replacement that isn't a tool that can be purposed for political delusion creation? I have become scared to even think about how me could possibly never be able to tell what the truth is around us.
In the article, it does say that Microsoft might shim the driver (add some code to Windows to make the driver's idiocy lower impact), so they have the one-company advantage, too.
Over the past ~5-10 years, multitouch touchpads have been much more painful in Windows than in any other modern OS. Why? These awful Synaptics drivers. There have been free drivers in Linux that have worked painlessly for years, yet in Windows, nothing has changed.
I see this as a poignant example that closed-source drivers are just a bad idea.
this problem has been introduced in a driver update around march. but it has been fixed for me (lenovo x1 yoga) in the latest synaptics touchpad driver update v19.3.4.97 [0]:
[Problem fixes]
- Fixed an issue where Touchpad Driver might cause high cpu usage of
"WmiPrvSE.exe".
I appreciate the author took time to write about this but I am skeptic about this because all Lenovo community knew about this issue. This is when you need a hero to reverse engineering and deploy a better driver if possible.
Am I the only one who's a bit disappointed by MS's response? I get that shimming would fix it but wouldn't it be more productive if they'd put some pressure on Synaptics to fix it? They might take notice if Microsoft comes knocking. There's a bajimillion Windows devices potentially going through life with this bug as Synaptics trackpads are pretty pervasive. Not saying they shouldn't do the shim, but I'd hope they would go further than that.
At Microsoft's scale, probably not. Their inability to successfully pressure third-party software vendors to do the right thing is why they developed the shimming infrastructure in the first place.
If they removed the drivers from the installation image so people had to manually install software for Synaptics devices to work, I think Synaptics would notice rather quickly. They are not some obscure vendor that has gone out of business.
I had no idea what Shimming was until this article.
Shim seems to mean to build:
>a small library that transparently intercepts API calls and changes the arguments passed, handles the operation itself, or redirects the operation elsewhere
A shim is conventionally a carpentry/metalwork/etc. term for a piece of wood, metal, rubber or similar material you stick between two things to get them in the right position relative to one another, to fill some space, basically. This is necessary because the context of installation for many physical building situations are not reliably plumbed. It's also used as a term for things like thin washers used in lens manufacturing to deal with manufacturing tolerance differences when aligning elements in each individual lens.
It is a term adopted here because the "shim" in this case is a small simple thing (driver) sitting between two other components to fix a problem. That's a simpler way of looking at a real life shim: a small simple thing stuck between two other things to solve a problem.
> wouldn't it be more productive if they'd put some pressure on Synaptics to fix it? They might take notice if Microsoft comes knocking.
It's possible that is happening, indeed, I suspect it's likely. The Microsoft developer "Orange" who the blog poster linked to is almost certainly Gov Maharaj (ORANGE),[1] a very prominent member of the Windows application compatibility team who has earned enough influence internally to be able to lean on hardware vendors like Synaptics through the hardware compatibility and partner ecosystem teams.
I used to work at Microsoft and saw Gov in action on internal email lists for people running daily Windows builds. He probably answered about a quarter to half of all the "this program is broken in this build!" emails.
You can see Gov (and perhaps be surprised by his technical chops) on the MSDN "Defrag Show" PC troubleshooting video series. [2]
There is a big gap between the hardware, the drivers, and the operating system and "nobody" to blame or who can take responsibility for the whole system. This happens in Windows mainly, you can buy the last notebook and replace it before this stuff is solved. I had the synaptic issue
and many others with the X220 and Windows and now suffer other new issues with the latest XPS 13.
I also have both an x220 and an XPS 13, both running Arch. x220 has always worked/felt great with synaptics driver, XPS 13 still has issues which I somewhat suspect are due to using libinput. Also might be a hardware issue :/
The analysis suggests that the driver is polling for 'process created' events and then leaking something every time such an event occurs, so the two issues are somewhat related (likely the same bit of code implementing whatever feature this is).
It's not like a notification or callback mechanism would make it any better though? It might even be worse since it wouldn't miss quick startups and shutdowns that polling could miss...
While the memory leak and the polling are in the same code it is likely that they require two different fixes - unless the notification of process creation is totally unnecessary.
AFAIK there's no way to get arbitrary process creation notifications without either registering for ETW (which only allows one real-time consumer, hence crippling the system, and which has a very long delay) or using kernel mode code (which I guess could work here since the already have a driver, but might present obstacles I'm not aware of). Another way is to use AppInit_DLLs which might be appropriate since anything that needs the mouse should probably load user32.dll, but otherwise it would miss something. Polling seems like the most foolproof way to do it purely in user mode.
I don't know, but my random guess would be that it might be to handle quirks with certain events like drag-and-drop or scrolling, which need to be handled reasonably when a process suddenly opens a window under the one you're using. Not sure what such a quirk might be though.
Microsoft has a very elaborate backwards compatibility system. They can do things like like to some processes about what version of Windows they are running on, change the behavior of particular APIs to work around application bugs, and generally inject whatever hacks and adjustments that they need in order to ensure that old or badly written software continues to run on new versions of Windows.
It's glorious (lousy software continues to work while Microsoft is able to continue improving the OS) and terrible (software developers who are updating their software get shims applied and this complicates development, hides bugs, etc.
In context, the Microsoft OS detecting the problematic driver and patching out calls to various functions to make it behave better.
This is more commonly used for bug-for-bug backwards compatibility: if there's a a third-party application that was incorrectly using some Windows API which has been fixed in a newer version, and the fix breaks the application, MS might shim that version of the application with a call to the older version of the function or even a new piece of code that emulates the desired behavior.
(Non-Windows users might recognize this as the same basic technical approach as LD_PRELOAD / DYLD_INSERT_LIBRARIES, or a little more generically, symbol versioning.)
Redefining a thing to do a different thing to achieve the same result. You'll see it a lot in older systems where you have a billion deprecated functions, and instead of changing each instance to use the new version, you trick the system by appropriating the old version to point to custom code that runs the new version and passes back whatever the old version is expected to return.
Windows has loads of stuff that is run conditionally on hardware and software configuration. I would not be surprised if Microsoft added a check to make the functions mentioned have different behavior. If you read the latest Windows Internals you'll learn about tons of things along those lines. There's lots of very specific behavior that gets triggered when you run things in compatibility mode, for example.
Basically, Windows' value proposition is broad hardware and software compatibility, and it will bend over backwards to make that happen, despite a developer's best efforts.
Firefox, just sitting there on a page with zero activity, manages to burn about 5% of a CPU doing garbage-collection related tasks within Gecko. Maybe this will get better with the Rust version.
And Servo uses a GC deeply within its Rust code too (the JS one, in fact). I think the benefits in Servo with respect to GC would mainly be because the code is new/learnt from the mistakes of the old (and avoided historical baggage), rather than because it is in Rust.