[HOW TO] PROPERLY calibrate your PEN and fix those stupid corners (273 test points) - XDA Forum

[HOW TO] PROPERLY calibrate your PEN and fix those stupid corners (273 test points)

Info 2 [HOW TO] PROPERLY calibrate your PEN and fix those stupid corners (273 test points)

Ok, so after a long time of trying to get my pen calibrated so that it wouldn't go all crazy in the corners and then not be off by a 5mm everywhere else I dug around the vast interwebs and with a little hex editing found the answer.

It has been posted in other places that you can use tabcal to calibrate you touch/pen input with more test points for better accuracy... however since our wonderful device has BOTH touch and pen inputs, the parameters everyone is using to manually calibrate using tabcal directly are wrong and as such many people have had issues with their touch input going all crazy after trying to calibrate their pen in this manner or the calibration simply wouldn't do anything. After messing around with settings all day I noticed if you use the calibration tool via the control panel it asks you what you want to calibrate, 'PEN' or 'TOUCH' before it starts tabcal, meaning there must be some parameter that is being passed to tabcal when you make this selection. So I opened up a cmd prompt and typed tabcal /? and was greated with a big fat nothing. Knowing that tabcal had switches since I had already been using some I decided to open tabcal with a hex editor to get a better look and thats when I found it: "devicekind=" so without further babbling from me......

HOW TO PROPERLY CONFIGURE YOUR PEN:

!First reset all of your current calibration data for both pen and touch! Now double check that your resolution is set to the native 1920 x 1080. Then copy and paste the following either in a run box or a cmd prompt:
Code:
tabcal devicekind=pen lincal novalidate XGridPts=10,60,110,160,260,360,460,560,660,810,960,1110,1260,1360,1460,1560,1660,1760,1810,1860,1910 YGridPts=10,60,110,160,250,400,540,680,830,920,970,1020,1070
Then go through the process selecting the crosshairs holding your pen and tablet the way you would normally/comfortably hold them, it is very important that you do it that way and also that you are physically accurate (disregard the onscreen indicator of the pen location) as this is how Windows determines what a regular press in that sector of your screen is.

Now after you have gone through all 273 input points you will need to edit your registry just a little should you ever want/need to reset the calibration data via the control panel reset thingy. To make this small fix go to the following in your registry:
Code:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\VID_045E&PID_0799&MI_01&Col01\8&11540d24&0&0000\Device Parameters]
The "VID_045E&PID_0799&MI_01&Col01\8&11540d24&0&00 00" part may be different on your device so to find it you can search for "LinearityData" under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\E num" then once you find "LinearityData" rename it to "UserLinearityData" now later on if you want to you can reset the calibration to factory settings should you ever want to do such a thing.

As always, if this helped you please hit the 'Thanks' button