[v0.1.1.1] Tool and a method for loading Display Calibration on fresh Windows installation

display

#1

The tool:
Display Calibration Backupper v0.1.1.1 (for a lack of a good name)
(Doesn’t actually backup yet, just fixes databases)
Download HERE Proof-of-Concept, NOT FOR PRODUCTION USE!
More information in post #5

Hi all,

As I wanted to install Windows 10 Pro from my own key and to keep the color calibration I had to find a way to restore the calibration on new installation. As I explain below, it’s reasonably easy when you know how CalMAN Client stores calibration data and recognizes the monitor, wasn’t quite as easy when I was figuring it out :stuck_out_tongue: This method is also applicable for when monitor instance ID changes for any other reason.

The METHOD boils down to following: Replace old monitor pnpID in MonitorsDB.2.3.sdf with one from new Windows installation.

Here is a not so newb friendly step by step example execution of the method

Prerequisites:
MonitorsDB.2.3.sdf from the original installation (from “C:\ProgramData\SpectraCal\CalMAN Client 3\data”)

Before you begin, I want to say that don’t be afraid trying out things if you’re not certain of a number or something, as long as you have a copy of the MonitorsDB somewhere safe, the calibration can be restored. And you can always try again.

First we’ll need a new installation and some tools to do database editing. Yes, CalMAN Client stores calibration data in SQL CE 4.0 database, with no password protection, which is awesome for us.

  1. Install Windows (obviously)
  2. Install CalMAN Client https://calman.spectracal.com/calman-client-3-download.html
  3. Install LINQPad 5 http://www.linqpad.net/download.aspx
  4. Install SQL Server Compact 4.0 SP1 Runtime https://www.microsoft.com/en-us/download/details.aspx?id=30709

Next we need to find out the new monitor pnpID

  1. Windows+R --> devmgmt.msc
  2. Monitors --> Generic PnP Monitor --> Properties --> Details
  3. From Property dropdown menu select “Device instance path”
  4. pnpID is the part after “DISPLAY\SHP1494” for example “4&1493a664&0&UID265988”

Now we connect to the database.

  1. Close the CalMAN Client, make sure it’s closed (task manager --> background processes)
  2. Copy the MonitorsDB with calibration data back to “C:\ProgramData\SpectraCal\CalMAN Client 3\data”
  3. Open LINQPAD
  4. Click add connection --> select Build data context automatically, default (LINQ to SQL) --> next
  5. select provider SQL CE 4.0 and attach database file “C:\ProgramData\SpectraCal\CalMAN Client 3\Data\MonitorsDB.2.3.sdf”

Now we connect to the database

  1. In query part of LINQPad set Language as SQL and connection as MonitorsDB

Now we edit the db.

  1. First we list profiles to determine which monitorID is actually calibrated.
  2. In query input “select * from ICCs” and press execute (green play button)
  3. Results windows should open and list profiles.
  4. Find first ICC_DataID with date after 11/28/2017 (most likely 6)
  5. Note the ICC_DataID and run query “select * from Profiles”
  6. From that result find ICC_DataID you noted and note the CreatedMonitorID from same row (most likely 3)
  7. next run query “select * from Monitors”
  8. Here you see the old pnpID on the row with same monitorID as the CreatedMonitorID from last step, we will change the pnpID to new one we found earlier.
  9. Run query “UPDATE Monitors SET pnpid=‘NEW_PNP_ID_HERE’ WHERE MonitorID=CREATED_MONITOR_ID_HERE”
  10. There is no confirmation, check with query “select * from Monitors”, it should have new pnpID on monitorID you entered.
  11. Check if there are other rows with same id.
  12. IF YES, we need to delete those with “Delete from Monitors where MonitorID=1”

And that’s it. Open CALMAN Client and you should be able to change between profiles and see the change.

It would be ideal if the color profile backup and restoration could be built into a “online service” with client program. However, this will take time and effort, so I decided to make the method known to the community in the mean time.

Anyways, if you have any questions, please shoot, I’ll update the “tutorial” when I find time to do so.
Also, I’d like to take a look at few more monitor profiles, so I’d appreciate it if few guys could pm me theirs.


[FAQ] I want to reset the device / re-install the operating system, how can I keep the screen calibration profile?
Goodix fingerprint scanner - not working
SSD not found in windows 10 and uefi / bios but after hw reset or uefi exit V boots up
Yet another V review
Windows 10 April 2018 Update
Yet another V review
String of Windows 10 update errors
#2

Awesome work! I had wondered why the raw restoration didn’t just work and hadn’t spent the time to track down why.

With a tiny bit of fiddling I can say that your method worked to restore the profiles on my HEB V. If we can nail down a few more of the details (by just looking at more monitor databases I expect) it may be plausible to automate this set of steps and build it into the Calibration backup+restore tool that I’ve been slowly working on in the community GitHub.


#3

This would be a good project for the community developers group.


#4

It’s already on there, and up on the community Github. Anyone who wants to contribute is welcome to do so, and always has been (just don’t look too closely… the code I pushed up for that is pretty bad to be honest).


#5

First proof-of-concept release of a calibration transfer/backup tool is ready!

Forewarning though, it’s “pretty badly” written at this time, no exception handling to speak of, misusing the sql connection more than possible, not much thought to interaction design etc. “Don’t quit your day job” level bad :stuck_out_tongue:

But. “Fixing” a database to work on new Windows installation (new Device Instance Path) should work, tested with two calibration databases. If you’re having a problem, please submit the unmodified database.

HERE’s the link, just unpack, run and follow instructions. Recommended way is to copy the MonitorsDB to ProgramData first, then run the “Backupper”. Of course it works from any location, but you have to copy it once by yourself anyway (no real reason for that, just the way the app works in it’s current state)
I have the code in VS Team-Services private repo, should take a look at this community development thing (:smiley: ) and at least set up a repo at GitHub.

Also, the calibrated monitor identification has changed, now it works by comparing LUTs stored in the database, all but one are identical, that is the calibrated one. From LUT_DataID we get CreatedMonitorID of which pnpID to edit. Now, this method present an a problem if you have multiple monitors calibrated and managed with calman client. This can be fixed, but it’s not done yet. Will edit the OP asap.


#6

YOU’RE THE MAN!!! I FREAKIN’ LOVE YOU <3 <3 <3
ALL HAIL INGENJOOR!!!
Is there any way I can buy you a beer?!


#7

:blush: Much appreciated! If you literally want to buy me a beer without me traveling to HK, I can PM you my address :stuck_out_tongue: If you want to “sponsor” my time spent on this, I can’t really deny you from asking my paypal or cryptocoin address via PM.

About that...

Wow, writing that last sentence was quite hard, suffice to say I haven’t done any crowdfunding! And somehow I feel that although the time was (at least somewhat) well spent, it’s still not worth money. Maybe it’s because I’ve enjoyed figuring the things out and the learning actually is a reward enough… Going too deep, better grab a beer…


#8

HEY WHAT ABOUT ME I’VE BEEN VERY HELPFUL (at times) AND I WANT TO DRINK BEER IN HONG KONG TOO

Oh wait I misunderstood that, sorry. Please do make contributions for this man’s work done and ignore the fellow hollering for free beer :grimacing:


#9

Lol i wondered that too, but since the screen is perfectly fine for my purposes even without calibration, i never did anything about it.

I looked at the script you put on github, it doesn’t include the process of rewriting the display ID yet? I’m afraid i’m not much help, i’ve never worked with a .sdf file before and the only experience i have with SQL is pulling data out for analysis. To me, SQL is just a bunch of related tables to be queried lol.

You mentioned that looking at more databases might help, here’s a link to my calibration data and the universal one XinJie linked a while ago.

@hiddenflaw, could you help these guys out by sharing yours as well?

The community github is at https://github.com/eve-community/, you’ll have to PM @Konstantinos to get you access. Also, you can find out more about community development in this post: Eve community developers group, there’s a trello board and a slack channel, although its pretty quiet atm.

@cmmd_mx, got any expert programmer advice?


#10

here’s the link, though i don’t know how much that’d help…
https://drive.google.com/open?id=1tdG1LggmeSAQihXRQaInTwD-6br6Db8z


#11
shut up.

i don’t either, i’m just here to take credit for being helpful.

image


#12

GIVE THAT MAN A COOKIE!

Thank you for your involvement and your dedication Ingenjoor!

This will help a lot of people!


#13

Thank you Ingenjoor. The tool works for me. Download, unzip, and ran the backupper.exe.

used “fix monitor ID”
step 1 and 2 are straight forward.
Was step 3 suppose to give a prompt when done? I didn’t see anything so after about 30 seconds, I proceeded to step 4.
step 4 caused my monitor turn off for 1 second and it came back with the change on my display.
step 5 - i was able to switch between the profiles.

again thank you.


#14

Is this working on Windows 10, version 1803?


#15

It doesn’t work for me even in 1709 but you don’t have to be very it savvy or adventurous to follow his instructions in the first post.

Give it a try if the program doesn’t work for you, it’s actually not terribly difficult to do the process manually.


#16

Worked great for me just now! Great job @Ingenjoor
My V was first batch i7 512gb running 10 pro 1709 after a hard reset, which kept the factory installed CalMAN, my backed up profile didn’t take until I used your tool.


#17

No need to go through all the manual effort, I’ve created a new tool that’ll backup, restore and fix the DB!

https://github.com/Iamscottm8/Eve-V-Calibration-Backup.

Let me know if there’s anything that needs to be added/fixed/updated etc.


#18

haven’t backed up yet because of the maual effort. will try later when in office. thx in advance…


#19

oh just seen that you are very very new here… try to introduce yourself in a separate topic. I need some trust to download programs from unknown people… or not?


#20

Have only provided source code for that reason, no executables for the exact reason you mentioned.