[ltp] Re: Any ACPI event for plugging in monitors?

Jiang Qian linux-thinkpad@linux-thinkpad.org
Mon, 28 Aug 2006 16:12:02 -0400


On Mon, Aug 28, 2006 at 04:04:33PM -0400, David Abrahams wrote:
> Stefan Schmidt <stefan@sostec.de> writes:
> 
> > Hello.
> >
> >> I'd like to take some action whenever an external monitor is
> >> plugged/unplugged from my T60p.
> 
> My driver already supports monitor hotplug; it disables monitors when
> they're unplugged at least, and xrandr is used to ensure the desktop
> fits on what remains.  I just don't know how to initiate some action
> when a hotplug/hotunplug happens.
Just my 2 cents. You can get by
aticonfig --query-monitor
and then you can probably use watch to continuously monitor its output 
every seconds and/or write a shell script to give yourself an event.
Jiang