# Thinkpad External Monitor

## PP133

Hey guys, I'm looking for a way to use an external monitor with my thinkpad.  In windows I would hit fn+f7 and it would switch between the laptop's LCD and the external monitor, that's not working now, of course  :Smile: 

I've looked around but all of the solutions that I've found are for thinkpads with ati video cards, my x60 uses an Intel 945GM/GMS/940GML card.

I would REALLY appreciate some help with this, my neck's starting to ache from sitting hunched over all day  :Smile: 

Thx in advance!

----------

## embobo

 *PP133 wrote:*   

> Hey guys, I'm looking for a way to use an external monitor with my thinkpad.  In windows I would hit fn+f7 and it would switch between the laptop's LCD and the external monitor, that's not working now, of course 
> 
> I've looked around but all of the solutions that I've found are for thinkpads with ati video cards, my x60 uses an Intel 945GM/GMS/940GML card.
> 
> I would REALLY appreciate some help with this, my neck's starting to ache from sitting hunched over all day 
> ...

 

Try booting with the monitor attached.

Also, have a look at app-laptop/configure-thinkpad and http://ibm-acpi.sourceforge.net/. The latter needs to be built into the kernel. Then see http://ibm-acpi.sourceforge.net/README.

```

Video output control -- /proc/acpi/ibm/video

--------------------------------------------

This feature allows control over the devices used for video output -

LCD, CRT or DVI (if available). The following commands are available:

   echo lcd_enable > /proc/acpi/ibm/video

   echo lcd_disable > /proc/acpi/ibm/video

   echo crt_enable > /proc/acpi/ibm/video

   echo crt_disable > /proc/acpi/ibm/video

   echo dvi_enable > /proc/acpi/ibm/video

   echo dvi_disable > /proc/acpi/ibm/video

   echo auto_enable > /proc/acpi/ibm/video

   echo auto_disable > /proc/acpi/ibm/video

   echo expand_toggle > /proc/acpi/ibm/video

   echo video_switch > /proc/acpi/ibm/video

Each video output device can be enabled or disabled individually.

Reading /proc/acpi/ibm/video shows the status of each device.

Automatic video switching can be enabled or disabled.  When automatic

video switching is enabled, certain events (e.g. opening the lid,

docking or undocking) cause the video output device to change

automatically. While this can be useful, it also causes flickering

and, on the X40, video corruption. By disabling automatic switching,

the flickering or video corruption can be avoided.

The video_switch command cycles through the available video outputs

(it simulates the behavior of Fn-F7).

Video expansion can be toggled through this feature. This controls

whether the display is expanded to fill the entire LCD screen when a

mode with less than full resolution is used. Note that the current

video expansion status cannot be determined through this feature.

Note that on many models (particularly those using Radeon graphics

chips) the X driver configures the video card in a way which prevents

Fn-F7 from working. This also disables the video output switching

features of this driver, as it uses the same ACPI methods as

Fn-F7. Video switching on the console should still work.

UPDATE: There's now a patch for the X.org Radeon driver which

addresses this issue. Some people are reporting success with the patch

while others are still having problems. For more information:

https://bugs.freedesktop.org/show_bug.cgi?id=2000

```

```

mark@jane /proc/acpi/ibm $ cat video

status:         supported

lcd:            enabled

crt:            disabled

dvi:            disabled

auto:           enabled

commands:       lcd_enable, lcd_disable

commands:       crt_enable, crt_disable

commands:       dvi_enable, dvi_disable

commands:       auto_enable, auto_disable

commands:       video_switch, expand_toggle

```

I can't remeber if it worked for me but I have a T30.

----------

## PP133

Wow, thanks for the great info!

I read through most of the readme, it was pretty interesting stuff.

After making some changes to the /proc/acpi/ibm/video file, I'm still not able to just hit fn+f7 to switch to the external monitor.  I know you said I should boot with the monitor attached, which I haven't tested yet, but is there no way to switch on the fly once booted up?

----------

## tuexk

Make a script called Fn-F7.sh in /etc/acpi/actions.

#!/bin/bash

echo video_switch > /proc/acpi/ibm/video

Then make a file /etc/acpi/events/Fn-F7 in it put:

event=ibm/hotkey HKEY 00000080 00001007

action=sudo /etc/acpi/actions/Fn-F7.sh

make sure you have sudo set up to run it w/o password, and the first line should be what acpi_listen gives you for the Fn+F7 keypress.

----------

## PP133

 *tuexk wrote:*   

> Make a script called Fn-F7.sh in /etc/acpi/actions.
> 
> #!/bin/bash
> 
> echo video_switch > /proc/acpi/ibm/video
> ...

 

I tried running [code]echo video_switch > /proc/acpi/ibm/video[code] manually and nothing happened.

----------

## tuexk

Did you do it as root?

what does cat /proc/acpi/ibm/video give you?

----------

## PP133

 *tuexk wrote:*   

> Did you do it as root?
> 
> what does cat /proc/acpi/ibm/video give you?

 

yeah, I did it as root.

Here's the output:

```

tungsten ibm # cat /proc/acpi/ibm/video 

status:         supported

lcd:            enabled

crt:            disabled

dvi:            disabled

auto:           disabled

commands:       lcd_enable, lcd_disable

commands:       crt_enable, crt_disable

commands:       dvi_enable, dvi_disable

commands:       auto_enable, auto_disable

commands:       video_switch, expand_toggle

```

----------

## PP133

<shameless bump>

Anyone, anyone?

----------

## toralf

Have a look at radeontool (at least for T41 it is nice tool) and play with the following settings of xorg.conf:

```
Section "Device"

        Option    "MonitorLayout" "CRT,LVDS"

```

----------

## PP133

 *toralf wrote:*   

> Have a look at radeontool (at least for T41 it is nice tool) and play with the following settings of xorg.conf:
> 
> ```
> Section "Device"
> 
> ...

 

Can I use that even though I don't have a radeon card?

----------

## embobo

 *PP133 wrote:*   

> <shameless bump>
> 
> Anyone, anyone?

 

Shameful reply:

I tried doing what I recommended and it didn't work for me either.  :Sad: 

I've always booted with a monitor attached.

----------

## PP133

I've tried resuming (from using hibernate) with an external monitor attached and it didn't work.  But I haven't tried a fresh reboot with the monitor attached.

My neck hurts from looking down all day, lol

----------

## toralf

 *PP133 wrote:*   

>  *toralf wrote:*   Have a look at radeontool (at least for T41 it is nice tool) and play with the following settings of xorg.conf:
> 
> ```
> Section "Device"
> 
> ...

 Oh yes, and you can try "LVDS,CRT" too.

----------

## PP133

 *toralf wrote:*   

> ...Oh yes, and you can try "LVDS,CRT" too.

 

What are LVDS?  Is that supposed to be LCDS?

----------

## PP133

 *toralf wrote:*   

>  *PP133 wrote:*    *toralf wrote:*   Have a look at radeontool (at least for T41 it is nice tool) and play with the following settings of xorg.conf:
> 
> ```
> Section "Device"
> 
> ...

 

Hrmmm, so i tried running radeontool, but it complains that I don't have radeon hardware:

```

tungsten mnt # /usr/sbin/radeontool 

Radeon hardware not found in lspci output.

```

----------

## rejon

Yes, I can't seem to find info on this anywhere? I'll post anything I find here. I'm looking at a combination of the following to possibly get this all working:

http://archlinux.atspace.com/

http://tuxmobil.org/ibm.html

http://wiki.grml.org/doku.php?id=lenovo_x61s

----------

## embobo

Here's something else you might try slogging through:

http://www.google.com/search?q=site%3Amailman%2Elinux-thinkpad%2Eorg+external+monitor

Maybe

http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2005-May/026680.html

will help?

----------

## latch.r

I've got a ThinkPad X60s, and have just recently been trying to get an external monitor to work.  

I have played with /proc/acpi/ibm/video as mentioned earlier in this thread, but had no luck.  Echoing commands to this file seemed to have no effect (cat /proc/acpi/ibm/video showed that the settings had not changed).

Plugging in an external monitor and then closing the ThinkPad lid and opening it again caused my display to shift to the external monitor, in line with the Automatic Video Switching behaviour described in the documentation quoted by embobo.

I've now tweaked my xorg.conf according to the suggestions at http://archlinux.atspace.com/ , and had success getting display on both monitors when I first start the X server.  However, after changing any settings (with Fn+F7, or closing the lid) I cannot get display back on both screens.  The normal cycling behaviour of Fn+F7 seems to work, except the mode where both screens should be used just results in both screens remaining blank.

----------

## PP133

 *latch.r wrote:*   

> I've got a ThinkPad X60s, and have just recently been trying to get an external monitor to work.  
> 
> I have played with /proc/acpi/ibm/video as mentioned earlier in this thread, but had no luck.  Echoing commands to this file seemed to have no effect (cat /proc/acpi/ibm/video showed that the settings had not changed).
> 
> Plugging in an external monitor and then closing the ThinkPad lid and opening it again caused my display to shift to the external monitor, in line with the Automatic Video Switching behaviour described in the documentation quoted by embobo.
> ...

 

Hey latch, thx for the reply.

My x60 doesn't auto-switch to monitor when I close/open the lid.  Can you paste the output of /proc/acpi/ibm/video?  Did you have to do anything else to get it to switch to an external monitor when re-opening the lid?

----------

## latch.r

With my X server started without any external monitor attached, /proc/acpi/ibm/video contains

```

status:         supported

lcd:            enabled

crt:            disabled

dvi:            disabled

auto:           disabled

commands:       lcd_enable, lcd_disable

commands:       crt_enable, crt_disable

commands:       dvi_enable, dvi_disable

commands:       auto_enable, auto_disable

commands:       video_switch, expand_toggle

```

After attaching an external monitor, and then shutting and re-opening the lid of my X60s /proc/acpi/ibm/video contains

```

status:         supported

lcd:            disabled

crt:            enabled

dvi:            disabled

auto:           disabled

commands:       lcd_enable, lcd_disable

commands:       crt_enable, crt_disable

commands:       dvi_enable, dvi_disable

commands:       auto_enable, auto_disable

commands:       video_switch, expand_toggle

```

Leaving the external monitor attached, and shutting and re-opening the lid again gives me no display on either screen, but /proc/acpi/ibm/video contains

```

status:         supported

lcd:            enabled

crt:            enabled

dvi:            disabled

auto:           disabled

commands:       lcd_enable, lcd_disable

commands:       crt_enable, crt_disable

commands:       dvi_enable, dvi_disable

commands:       auto_enable, auto_disable

commands:       video_switch, expand_toggle

```

With the external monitor still attached, repeating the shut-open cycle once again returns the display to my laptop LCD and /proc/acpi/ibm/video has the same content as the first listing above.

This same cycle occurs if I press Fn+F7.

There are two significant mysteries.  Firstly, why are both screens blank when they should both be enabled?  Secondly, why does this "automatic" switching happen even though I've set 

```
auto:    disabled
```

I don't have any need at the moment for showing my display on both the internal LCD and an external screen, but I would love to find out what is happening.

----------

## PP133

 *latch.r wrote:*   

> 
> 
> This same cycle occurs if I press Fn+F7.
> 
> 

 

Hrmm, so there's lots I want to ask/comment about/on regarding your post, but first off, your Fn+F7 works?  When I hit mine, nothing happens.  Did you emerge anything or modify any particular configs to get that working?

----------

## latch.r

Yes, my Fn+F7 works.  

I have not set anything up for this function button, and can't remember emerging anything that was IBM specific (other than thinkfinger for the fingerprint reader).

Have you got the ACPI-IBM option enabled in your kernel?

----------

## PP133

 *latch.r wrote:*   

> Yes, my Fn+F7 works.  
> 
> I have not set anything up for this function button, and can't remember emerging anything that was IBM specific (other than thinkfinger for the fingerprint reader).
> 
> Have you got the ACPI-IBM option enabled in your kernel?

 

Yup, it's enabled in the kernel:

```

 Symbol: ACPI_IBM [=y]

```

Also, some of the function keys DO work, Fn+PgUp turns on the light on the upper-lip of the laptop monitor, Fn+Home/End increases/decreases the brightness of the LCD, Fn+ScrLk enables numlock, etc.  It seems as if the Fn+F keys aren't working maybe?

----------

## latch.r

As I understand it, the Fn+PgUp turns the keyboard light on in a way that is somehow independent from the OS ACPI drivers.  I also suspect that Fn+ScrLk enables numlock in a similar way, which is not relying on the ACPI drivers.  For the record, both of these combinations work for me also.

The Fn+Home / Fn+End buttons do not work properly for me.  Both of them cause the screen to go black.  I can get my display back by cycling through the display options (Fn+F7 or closing/opening lid).  Using commands like 

```
echo up > /proc/acpi/ibm/brightness
```

and

```
echo down > /proc/acpi/ibm/brightness
```

do work to alter the screen brightness, and so I could probably write my own etc/acpi/events and /etc/acpi/actions files to get the function brightness keys to work.

Even then there is some slightly mysterious behaviour.  With my screen on full brightness (such as when the computer is first turned on), the "down" command does not work.  I have to give one "up" command (which has no result) and then "down" commands do work.  I'd love to know what is going on here.

I've had a quick look through my /etc/acpi/events/ files, and can't see anything that would give me my Fn+F7 behaviour - so I don't know why mine seems to work.

----------

