Disable screen blanking on VT switch

Dave Airlie airlied at gmail.com
Sun Jan 18 12:55:46 PST 2009


On Sun, Jan 18, 2009 at 8:40 AM, Connor Behan <connor.behan at gmail.com> wrote:
> Dave Airlie wrote:
>>
>> On Sat, Jan 17, 2009 at 3:19 PM, Connor Behan<connor.behan at gmail.com>
>>  wrote:
>>
>>>
>>> I have two video cards each hooked up to a different monitor. The AGP
>>> card driving my laptop screen is the boot display device which shows the
>>> console and I've configred xorg to use the PCI card driving my external
>>> monitor when I start it. I can use Ctrl+Alt+Fn to switch between X on
>>> the big screen and a ttyn on the small screen but whenever I do so, the
>>> inactive screen is not surprisingly blank. I'd like to be able to see X
>>> persist on my external monitor when a text console is in the foreground
>>> and eventually to see the output of a background tty on my laptop screen
>>> when tty7 is in the foreground.
>>>
>>> I know the second direction sounds harder... people have been asking
>>> questions about it since 2002 and the only solutions I've seen have been
>>> unstable kernel patches that are now dead. But I am naive enough to
>>> think that X could be configured to not blank the screen even when its
>>> own console is switched away from. After all, it's still running. Do you
>>> know of a way to do this? I've tried all combinations of tty and vt
>>> related arguments to X but haven't got it to work yet.
>>>
>>> One thing that I think might work, is initializing a framebuffer for
>>> both cards and then using con2fb to move a particular console to the
>>> other framebuffer before starting X. I can't try this however because
>>> all framebuffer drivers I've tried only create a framebuffer device for
>>> the primary AGP card. So do you know how to disable screen blanking when
>>> switching VTs or how to use multiple monitors with a framebuffer driver?
>>> Thanks alot.
>>>
>>
>> X at least with normal drivers can't do this, there is only one VT and
>> when X is switched
>> all the screens it controls go away, you can't do text mode and X at
>> the same time on multiiple cards
>> with the current system AFAIK.
>>
>> fbdev might be an option but again I'm not sure, you'd need to avoid
>> the VT switch in X, using
>> (sharevts or novtswitch type options).
>>
>> Dave.
>>
>
> Do you know what function makes all the screens go away when X is switched?
> I've tried to find out but this is probably way beyond my skill level. Is it
> in hw/xfree86/os-support/linux/lnx_init.c? Is one of the "restored
> permissions" in restoreVTPerms the fact that background consoles do not have
> permission to control screens? Or do the TRUE and FALSE return values in
> VTsw_noop.c and VTsw_usl.c somehow indicate that X should or shouldn't keep
> displaying on its screens? I can get VT-X1550PCI256 to display on my laptop
> screen while X is running. That's just the name of my card and when I switch
> Vts then switch back it goes away. But if X knows how to display that
> perhaps it could be made to display something else? Also a comment in
> lnx_init.c says "Detach from the controlling tty to avoid char loss"... by
> char loss does that mean loss of the characters that the textmode tty showed
> before X was started. And avoiding char loss means preventing that tty from
> going invisible?
>
> I've also treid getting X to start in GNU screen so as to use screen
> keycodes to switch between multiplexed terminals instead of Ctrl+Alt+Fn to
> switch between ttys. Do you think this method is hopeless too?

Pretty much.

There is no quick fix, you are hitting the limits of the Linux VT
subsystem and also the way X's PCI layer works.

You need to make X run without hitting a VT switch at all,
(-novtswitch -sharevts) and without doing a lot of
stuff to the console, you still end up with the problem of where to
send keyboard/mouse input, the console? X?

My best guess would be a week of solid X+kernel hacking to just make
it work in a really hacked up fashion.

Dave.
>



More information about the xorg mailing list