Difference between revisions of "Colour profile"

From ThinkWiki
Jump to: navigation, search
(Supported ThinkPads)
(cabextract on newer ThinkPads)
Line 16: Line 16:
 
The last one is by far the easiest, and will extract the files to your current directory.
 
The last one is by far the easiest, and will extract the files to your current directory.
 
==== cabextract on newer ThinkPads ====
 
==== cabextract on newer ThinkPads ====
{{NOTE|cabextract is typically not installed by default, but should be available from your distribution vendor. In the case of Fedora, just do a
+
{{NOTE|With the latest archive (79oi20ww.exe), Lenovo switched to a different format that neither cabextract nor unzip is able to unpack. As such your now forced to resort to Wine or a (virtual) windows machine.}}
{{cmd|yum install cabextract|}}}}
 
The files will be saved in the current working directory. No directories will be created.
 
 
 
$ cabextract 79oi18ww.exe
 
79oi18ww.exe: library not compiled to support large files.
 
79oi18ww.exe: library not compiled to support large files.
 
Extracting cabinet: 79oi18ww.exe
 
  extracting TPFLX.ICM
 
  extracting TPLCD.CAT
 
  extracting TPLCD.ICM
 
  extracting TPLCD.INF
 
  extracting TPLCD60.ICM
 
  extracting TPMB60.ICM
 
  extracting TPMB72.ICM
 
  
 
==== cabextract on older ThinkPads====
 
==== cabextract on older ThinkPads====

Revision as of 09:14, 11 March 2010

Linux distributions are starting to get support for Colour profiles with gnome-color-manager which is planned to be part of Fedora 13 [1].

IBM and Lenovo have been providing colour profile packages for years, unfortunately they are stuck away in Windows .exe files, with no easy to read mapping of ThinkPad model to ICM file. These instructions will tell you how to unpack the archive and locate the correct ICM file for your ThinkPad.

TODO
simplify the procedure for finding the right colour profile to load

Unpacking the EXE

Download the Windows EXE file for your model. There are three methods of unpacking it.

  1. Use a windows machine
  2. Use wine
  3. Use cabextract

The last one is by far the easiest, and will extract the files to your current directory.

cabextract on newer ThinkPads

NOTE!
With the latest archive (79oi20ww.exe), Lenovo switched to a different format that neither cabextract nor unzip is able to unpack. As such your now forced to resort to Wine or a (virtual) windows machine.

cabextract on older ThinkPads

Files and directories will be created in the current working directory. You can use the files in any of the directories created, they are all the same.

$ cabextract 1yoi04ww.exe 
Extracting cabinet: 1yoi04ww.exe
  extracting WIN98/IBMTPFLX.ICM
  extracting WIN98/IBMTPLCD.CAT
  extracting WIN98/IBMTPLCD.ICM
  extracting WIN98/IBMTPLCD.INF
  extracting WIN2000/IBMTPFLX.ICM
  extracting WIN2000/IBMTPLCD.CAT
  extracting WIN2000/IBMTPLCD.ICM
  extracting WIN2000/IBMTPLCD.INF
  extracting WINME/IBMTPFLX.ICM
  extracting WINME/IBMTPLCD.CAT
  extracting WINME/IBMTPLCD.ICM
  extracting WINME/IBMTPLCD.INF
  extracting WINXP/IBMTPFLX.ICM
  extracting WINXP/IBMTPLCD.CAT
  extracting WINXP/IBMTPLCD.ICM
  extracting WINXP/IBMTPLCD.INF

Using wine

If you use wine instead to unpack the "ThinkPad Monitor INF File" .exe file. The profiles for newer ThinkPads will be located in ~/.wine/drive_c/DRIVERS/WIN/MONITOR/.

For older ThinkPads a bunch of OS directories will be created in ~/.wine/drive_c/DRIVERS/WIN/MONITOR. It does not matter which OS directory you use, the ICM files are all the same.

Finding your colour profile

NOTE!
These instructions assume you have a newer model ThinkPad. If you have an older model ThinkPad you need to use IBMTPLCD.INF instead.

After unpacking the windows EXE you should find a bunch of ICM files and a INF file with a mapping of the LCD vendor to colour profile.

But first you need to know which LCD you have. Unfortunately xrandr does not provide the EISA vendor information, but monitor-edid from the monitor-edid RPM (on Fedora) does. On ubuntu, you can install read-edid ("sudo aptitude install read-edid") and then run "sudo get-edid | parse-edid".

$ monitor-edid
EISA ID: LEN4022
Screen size: 28.6 cm x 21.4 cm (14.06 inches, aspect ratio 4/3 = 1.34)
Gamma: 2.2
Digital signal

	# Monitor preferred modeline (60.0 Hz vsync, 64.0 kHz hsync, ratio 4/3, 124 dpi)
	ModeLine "1400x1050" 108 1400 1448 1560 1688 1050 1051 1054 1066 -hsync -vsync

	# Monitor preferred modeline (50.0 Hz vsync, 53.3 kHz hsync, ratio 4/3, 124 dpi)
	ModeLine "1400x1050" 89.97 1400 1448 1560 1688 1050 1051 1054 1066 -hsync -vsync

As you can see from the above, I have a LEN4022. If I then look at the INF file

$ grep -i LEN4022 TPLCD.INF
%TPSXGAP%   = TPLCDSXGAP.Install,    Monitor\LEN4022   ; 14"   SXGA+     TFT               1400x1050
%TPSXGAP%   = TPLCDSXGAP.Install.NTx86,    Monitor\LEN4022   ; 14"   SXGA+     TFT               1400x1050
%TPSXGAP%   = TPLCDSXGAP.Install,    Monitor\LEN4022   ; 14"   SXGA+     TFT               1400x1050

You will see this maps to TPLCDSXGAP

We now need to find what colour profile that maps to.

$ grep -A 2 \\[TPLCDSXGAP.Install] TPLCD.INF
[TPLCDSXGAP.Install]                   ; SXGA+ 1400x1050
DelReg=DEL_CURRENT_REG
AddReg=1400, DPMS, ICM

As you can see on the last line, it refers to a ICM colour profile. Now to finally find out which file we need to use

$ grep  -A 1 \\[ICM] TPLCD.INF
[ICM]
HKR,,ICMProfile,0,"TPLCD.icm"

As you can see above the ICM colour profile, maps to the TPLCD.icm file (the actual filename will be all upper-case), so that is the file I need to load in gnome-color-manager for my ThinkPad LCD.

NOTE!
Even though I need to use TPLCD.ICM for my ThinkPad does not mean the outcome will be the same for your ThinkPad. Please run through the steps to determine what file you need to use

Recent ThinkPads

Download "ThinkPad Monitor INF File"

Supported ThinkPads

Older ThinkPads

Download "ThinkPad Monitor File"

Supported ThinkPads