Hello Lucas Zinato Carraro,

Am Dienstag, den 06.10.2009, 00:30 -0300 schrieb Lucas Zinato Carraro: 
>    How  to detect when a External Monitor or HDMI cable is connected ?
> ( ps: Using NVIDIA Card )  
> I try to find events like a  a hal or a dbus messages ...... 

The DDC from your Display is connected and communicates only with the
Graphic-Processor (using a kind of i2c channel).
If you want to detect if a display was (newly) hotpluged to your nvidia
gp, you have to detect it with the 'nvidia-settings' tool every time you
plug new hardware. There is (imho!) no hal or dbus watching if new
displays are connected nor the nvidia kernel module provides that
information somewhere without initiating a detection process by hand (I
did not find any)

>      My laptop is VGN-Z540 and using "nvidia-settings", and disper  i
> can switch between
> VGA, Intenal LCD and HDMI.  I would like to automatize tasks when a
> external display
> is connected.

      * Twin-View (two dsiplays on one big virtual display) can simply
        be activated with nvidia-settings. 
      * Using two x-servers, for each display one (with or withou
        Xinerama), requires a restart of the x-server after you saved
        the settings to the xorg.conf:

restarting the xserver (gdm):

        On Karmic (using upstart):
                sudo restart gdm
        On other Systems (not yet using upstart):
                sudo /etc/init.d./gdm restart

Or you could write your own application; download the nvidia-settings
source-code from here:
Open the source in an ide (like Geany) and search for
"PROBE_DISPLAYS" (in whole project), there you can find the functions
and used libs/headers which could inspire you in writing your own daemon
which could provide the hooks you want.

By the way: What do you want to automatize? How the X-Server should
handle the different displays is explained in the README file from the


specially in the Apendix C "Display Device Names":


you can read how to handle such cases.

After an X-Server (re)start, the connected Displays are detected.

Just my 2 cents


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Mailing list: https://launchpad.net/~sony-vaio-z-series
Post to     : sony-vaio-z-series@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sony-vaio-z-series
More help   : https://help.launchpad.net/ListHelp

Reply via email to