我使用 HDMI 端口将外接显示器连接到我的笔记本电脑。有什么方法可以检测外接显示器何时因外部电源断电而关闭?
我想将所有窗口自动移至笔记本电脑显示器上,并在电源恢复时继续运行,并在电源恢复在线后恢复。
请注意,它仍然连接到 HDMI 端口,因此即使显示器关闭,xrandr 的输出也不会改变。
我正在使用 Ubuntu 14.04
谢谢!
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 32767 x 32767
eDP1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 345mm x 194mm
1920x1080 59.9*+
1680x1050 60.0 59.9
1600x1024 60.2
1400x1050 60.0
1280x1024 60.0
1440x900 59.9
1280x960 60.0
1360x768 59.8 60.0
1152x864 60.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 476mm x 267mm
1920x1080 60.0*+ 50.0 59.9
1920x1080i 60.1 50.0 60.0
1280x1024 75.0 60.0
1152x864 75.0
1280x720 60.0 50.0 59.9
1440x576i 50.1
1024x768 75.1 60.0
1440x480i 60.1 60.1
800x600 75.0 60.3
720x576 50.0
720x480 60.0 59.9
640x480 75.0 60.0 59.9
720x400 70.1
VIRTUAL1 disconnected (normal left inverted right x axis y axis)