How to retrieve graphic card driver display mode in dual/multi-monitor setup?

Rémi Cardona remi at
Sun Feb 14 15:25:03 PST 2010

Le 14/02/2010 22:36, Ping Cheng a écrit :
> So, my questions are:
> 1.  What is the proper way to retrieve TwinView's display mode and
> metamodes inside an (input) device driver?

Short of parsing Xorg.0.log and/or xorg.conf to get to the nvidia stuff,
I don't think that's doable with TwinView (since X is totally unaware of
what the nvidia driver does, that's the whole idea behind TwinView...)

> 2.  What is the proper way to retrieve RandR display mode (extended,
> clone, rotate...) and screen resolutions inside a device driver?  Is
> there any difference in retrieving those info between RandR 1.2 and
> 1.3?

IMHO, that shouldn't be done in the driver, but in an external tool.
That tool would query the server with XRandR to see which physical
displays are available and then set the tablet's properties through XI2
properties or what not.

Peter will probably tell you something much clever, but I can't think of
a compelling reason to do that at the driver level, when it can be done
higher up in the stack, with better potential integration with input and
display management tools in current desktop environments.



More information about the xorg-devel mailing list