sony-vaio-z-series team mailing list archive
-
sony-vaio-z-series team
-
Mailing list archive
-
Message #00590
Re: NVIDIA: Detect when a External monitor or HDMI is plugged ...
Hi Raphael,
Thanks
I m using Disper ( http://willem.engen.nl/projects/disper/ )
I would like automatize switch to external display when connected.
Using disper with infinite loop :-)
=========================================
*
*
*#!/bin/bash*
*while true ; do*
* if [ "$(disper -l | grep DFP-2 | wc -l)" = "1" ]; then*
* disper -d DFP-2 -s*
* else*
* disper -d DFP-0 -s*
* fi*
*
*
* sleep 5*
*done*
=======================================
Regards
Lucas Zinato Carraro
On Tue, Oct 6, 2009 at 2:22 PM, Raphael Gradenwitz <
raphael@xxxxxxxxxxxxxxxxx> wrote:
> 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:
> https://launchpad.net/ubuntu/karmic/+source/nvidia-settings/180.25-0ubuntu1
> 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
> driver
>
>
> http://de.download.nvidia.com/XFree86/Linux-x86_64/185.18.36/README/index.html
>
> specially in the Apendix C "Display Device Names":
>
>
> http://de.download.nvidia.com/XFree86/Linux-x86_64/185.18.36/README/appendix-c.html
>
> you can read how to handle such cases.
>
> After an X-Server (re)start, the connected Displays are detected.
>
> Just my 2 cents
>
> Regards,
> Raphael
>
> _______________________________________________
> Mailing list: https://launchpad.net/~sony-vaio-z-series
> Post to : sony-vaio-z-series@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~sony-vaio-z-series
> More help : https://help.launchpad.net/ListHelp
>
>
References