Attaching a monitor via vga

Chad Perrin perrin at
Wed Jun 20 03:28:25 UTC 2012

On Tue, Jun 19, 2012 at 08:52:58PM -0400, David Tilbrook wrote:
> I have a thinkpad t61p running freebsd9.0.  The window size is 1680x1050
> -- a reasonable size -- but the screen itself is 38cm. (15") which is
> irritatingly
> small for my old eyes.
> So I want to attach an external monitor via a vga cable, which I have been
> doing with my RedHat thinkpad A31P for years.
> I tried attaching Asus VE228H (1920x1080) but it would display
> only part of the window (the top-left corner). I get a similar behaviour
> with a Samsung SyncMaster.
> When I tried to xinit with the monitor attached, it displays an even smaller
> part of the screen. (On my previous thinkpad with a Samsung, to get a
> reasonable full window I had to unplug the vga, start xinit, and then plug
> in the vga, but I can live with that.)
> My questions:
> 1) What can I do to display the whole window on an external monitor?
> 2) Is there a monitor out there that would better support such use?
> 3) Would a Samsung T220HD 22" which claims to support 1680x1050
>      work, and is there someone in Toronto who sells it and would let
>      me test it? (Craigs list doesn't qualify).

You probably want to look into using the xrandr command to configure
output for connected monitors.  Try this first:

    xrandr --auto

If that does not work, you may have to do something more sophisticated.
For instance, I have a shell script that looks like this for when I
connect my laptop to an external monitor:

    xrandr --auto
    xrandr --output LVDS1 --off
    xrandr --newmode "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync
    xrandr --addmode VGA1 1680x1050_60.00
    xrandr --output VGA1 --mode 1680x1050_60.00
    xli -onroot -border black -center /path/to/enso_16x9.png

You should use this to find out the name of the display you identify in
the --output line:

    xrandr -q

You'll need to get information about your monitor's display parameters
for the --newmode line, and the --addmode and --mode lines uses the same
resolution string as in the --newmode line.  The xli line is there just
to re-apply my background image, because it gets a little out of whack
when I change monitors like that.

When I'm going to disconnect from the external monitor, I run "xrandr
--auto" before disconnecting to get the laptop to recognize my laptop's
built-in display again, then run "xrandr --auto" one more time after
disconnecting the external monitor to get it to forget about the settings
for the external monitor so my laptop display won't act "funny" because
it "thinks" there's a larger external monitor still attached.

I hope that helps.  Let me know if you want any more information about
how this works.

Chad Perrin [ original content licensed OWL: ]

More information about the freebsd-questions mailing list