On Tue, Oct 05, 2010 at 08:53:12AM -0700, Adam Williamson wrote: > On Tue, 2010-10-05 at 09:35 +0100, Richard Hughes wrote: > > On 5 October 2010 05:30, Orion Poplawski <orion@xxxxxxxxxxxxx> wrote: > > > Are we really stuck with gdm/kdm/lxdm/...dm > > > implementing it? > > > > No, I think what we need to do is to teach GPM how to turn off the > > internal panel when docked and with the lid closed. The only missing > > piece is for the kernel to export some kind of sysfs boolean saying > > "in-dock". From talks with mjg59, detecting a dock is pretty hard. > > Maybe just 'lid closed and external monitor connected' would be close > enough? Is there a use case where you'd want to have an external monitor > connected and the internal system's lid closed, but still have the > internal system's display turned on? > Yep, that's enough info. $ cat /proc/acpi/button/lid/LID/state state: open $ cat /proc/acpi/button/lid/LID/state state: closed That lid info combined with info about external monitors connected or not: $ ls /sys/class/drm/card0 card0-DVI-D-1 card0-LVDS-1 dev power uevent card0-HDMI Type A-1 card0-VGA-1 device subsystem $ cat /sys/class/drm/card0/card0-LVDS-1/status connected $ cat /sys/class/drm/card0/card0-LVDS-1/enabled enabled Same info is available for external VGA/DVI/HDMI outputs. -- Pasi -- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel