[ltp] Re: RFC: removal of video output switching from thinkpad-acpi

Alex Deucher linux-thinkpad@linux-thinkpad.org
Wed, 20 Feb 2008 10:52:33 -0500


On Feb 20, 2008 10:40 AM, Paul Fox <pgf@foxharp.boston.ma.us> wrote:
> alex wrote:
>  > On Feb 20, 2008 2:11 AM, Elias Oltmanns <eo@nebensachen.de> wrote:
>  > > Henrique de Moraes Holschuh <hmh@hmh.eng.br> wrote:
>  > > > On Tue, 19 Feb 2008, Paul Fox wrote:
>  > > >> henrique de moraes holschuh wrote:
>  > > [...]
>  > > >>  > The question is: does the video output stuff in thinkpad-acpi works well
>  > > >>  > enough in the X41 to justify its continued existence?
>  > > >>
>  > > >> well, it at least lets me switch from one screen to the other
>  > > >> with video_switch.  i know of no other way to enable the CRT.
>  > > >> is there?
>  > >
>  > > As I found out only this weekend, there is (on my X40 at least). If I
>  > > mask this hotkey, so thinkpad-acpi won't handle it, and if I prevent my
>  > > system from loading the video module, then I can switch to and from CRT.
>  > > Mind you, there is no way to enable CRT and LCD at the same time.
>  > >
>  >
>  > This is a hw/bios implementation limitation.  The same crtc can't
>  > drive both VGA and LVDS at the same time.
>
> and X doesn't suffer this limitation?  (forgive my ignorance, please)
>

No. the X driver knows how to fully program the hw.  The bios only has
limited space and it's just there to get an image on the screen when
you boot.  It's not really worth the time and expense to implement
support for multiple crtcs in the bios code just you you can toggle
outputs from the console especially considering most windows users
will never use text mode.

>  >
>  > > >
>  > > > ACPI video, in some thinkpads. But since most ACPI firmwares are
>  > > >completely
>  > > > and utterly broken on that area, upstream removed that function from ACPI
>  > > > video very recently.
>  > > >
>  > > > It looks like I will have to work on thinkpad-acpi video control, and port
>  > > > it to sysfs :(
>  > >
>  > > Well, I for one would greatly appreciate that since I use scripts for
>  > > automated video switching on a regular basis.
>  >
>  > If you are using X, this is not a good idea.  stick to xrandr.
>
> but this doesn't work if you're not running X, right?  i suspect i
> have the same needs that elias does.  sometimes i work at the console,
> sometimes i work using X.  sometimes i work at an external monitor.
> sometimes i don't.  i'd like to be able to attach a script to the
> hotkey that lets me switch between one or the other or both outputs,
> whether i'm using X or not.  i'm perfectly happy to have xrandr do
> the work when X is running, but that's only part of the solution.

that's fine.  use randr in X and a script in the bios.  My point is
just that you don't want to use bios switching routines in X because
the bios will be touching the hardware behind X's back which will
result in a unknown state, which very well could hose your display or
hang your box.

Alex