Monday, December 24, 2007

Enable External Display on Thinkpad R60 with Linux (Ubuntu 7.10)

Followings steps got my external CRT Display working on ThinkPad R60 with Linux Ubuntu 7.10 installed:

1) cd /opt
2) sudo wget http://www16.plala.or.jp/mano-a-mano/i810switch/i810switch-0.6.5.tar.gz
3) sudo tar -xzvf i810switch-0.6.5.tar.gz
4) cd i810switch-0.6.5/
5) sudo vi i810switch.c
Insert the lines marked in BOLD below:

//#define I865STR "8086:2572"
#define I915STR "8086:2592"
#define I945STR "8086:27a2" //line 63
#define MEMSTR "Memory at"
...
...

i = (p = strstr(*buff_ptr, I830STR)) != NULL ||
(p = strstr(*buff_ptr, I945STR)) != NULL || //line 266
#if defined (I865STR)
(p = strstr(*buff_ptr, I865STR)) != NULL ||
#endif /*defined (I865STR)*/
(p = strstr(*buff_ptr, I845STR)) != NULL;
if (i)
...
...

6) sudo make
7) sudo make install
8) sudo i810switch crt on (turns on the external display)
9) sudo i810switch crt off (turns off the extrenal display)

To allow any user to perform this switch:

chmod u+s /usr/bin/i810switch

I use a simple script to toggle my external display:

STATUS=`i810switch | grep CRT | awk '{print $2}'`
if [ "$STATUS" = "off" ]
then
i810switch crt on >> /dev/null
elif [ "$STATUS" = "on" ]
then
i810switch crt off >> /dev/null
fi

No comments: