Dynamically switch ServerLayout - is it possible ?

Alan Hourihane alanh at fairlite.demon.co.uk
Tue Oct 25 09:47:58 PDT 2005


On Tue, 2005-10-25 at 18:31 +0200, Joe Ammann wrote:
> On Tuesday 25 October 2005 17:40, Alan Hourihane wrote:
> [...]
> > > > > The problem that remains is that I would like to be able to switch
> > > > > between these different layouts without restarting the X server. Now,
> > > > > I do it by passing the -layout option when starting. Is there a way
> > > > > to switch without restarting X ? That would allow me to
> > > > > suspend/hibernate/dock/undock without having to restart X?
> > > >
> > > > Unforunately, this is not possible at the moment.
> > >
> > > So what would be required to make this possible?
> > >
> > > I assume:
> > > * The driver would need to support switching layout dynamically. Will
> > > this require a new driver hook, or can an existing one be reused for
> > > that?
> > >
> > > * The X server must expose an API that can be used to tell the driver to
> > > switch... Should this API expose the driver specific options, or should
> > > it offer an abstract API that is the same for all drivers (e.g. as an
> > > extension to XRandR)?
> >
> > I think it can be handled by RandR anyway. We just need to detect a new
> > monitor and send a resolution change through RandR.
> >
> > Detection of a new monitor is the missing piece currently.
> 
> Hm, I'm not so sure. In my case, the internal laptop LCD would have to be 
> turned off also, because it can not display the full size mode of the 
> external display. So even if the new monitor would be detected correctly on 
> the fly, the driver would have to reconfigure its pipes.
> 
> I'm not sure if RandR is enough to manage it (assuming the display could be 
> detected)

There still needs to be policy decisions, but the resolution change is
all manageable by RandR. That's my point.

For example, 

In a single LCD situation running at 1024x768. You then plug the laptop
into an external CRT which can do 1600x1200. The driver shouldn't change
anything at this point, apart from maybe cloning the display to the CRT
(but this is policy again). Now, new modes would be exported by RandR
that could manage 1600x1200. So, if you requested a resolution change
via RandR and it was 1280x1024 or 1600x1200 the driver would
automatically turn off the LCD or revert to panning the display. 

Alan.



More information about the xorg mailing list