diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2013-10-21 20:33:30 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2013-10-21 20:33:30 +0200 |
commit | ec866644c03ed1f6fd7c9c4745e2aabc2951d13a (patch) | |
tree | e8dd1bc1a1b96961486fa81b83538c73dd1cec6e /recipes-core | |
parent | 8bdfeb54376a31d4032cab50d16e40be10487a57 (diff) |
hdmi: add udev rule to start an X output on hotplug
Diffstat (limited to 'recipes-core')
-rw-r--r-- | recipes-core/hdmi-hotplug/files/hdmi.rules | 10 | ||||
-rw-r--r-- | recipes-core/hdmi-hotplug/hdmi-hotplug.bb | 20 |
2 files changed, 30 insertions, 0 deletions
diff --git a/recipes-core/hdmi-hotplug/files/hdmi.rules b/recipes-core/hdmi-hotplug/files/hdmi.rules new file mode 100644 index 0000000..fe6a1a1 --- /dev/null +++ b/recipes-core/hdmi-hotplug/files/hdmi.rules @@ -0,0 +1,10 @@ +#UDEV [504.185864] change /devices/virtual/switch/hdmi (switch) +#ACTION=change +#DEVPATH=/devices/virtual/switch/hdmi +#SEQNUM=1794 +#SUBSYSTEM=switch +#SWITCH_NAME=hdmi +#SWITCH_STATE=0 +#USEC_INITIALIZED=4180704 + +SUBSYSTEM=="switch", DEVPATH=="/devices/virtual/switch/hdmi", ATTR{state}=="1", RUN+="/bin/sh -c 'DISPLAY=:0.0 xrandr --output HDMI-1 --auto'" diff --git a/recipes-core/hdmi-hotplug/hdmi-hotplug.bb b/recipes-core/hdmi-hotplug/hdmi-hotplug.bb new file mode 100644 index 0000000..ee89956 --- /dev/null +++ b/recipes-core/hdmi-hotplug/hdmi-hotplug.bb @@ -0,0 +1,20 @@ +SECTION = "core" +DESCRIPTION = "Use xrandr after a HDMI hotplug event has been detected to switch the display on" +RDEPENDS_${PN} = "" +# The license is meant for this recipe and the files it installs. +# RNDIS is part of the kernel, udhcpd is part of busybox +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" + +PR = "r1" + +PACKAGE_ARCH = "all" + +SRC_URI = " \ + file://hdmi.rules \ +" + +do_install() { + install -d ${D}/${sysconfdir}/udev/rules.d + install -m 0644 ${WORKDIR}/hdmi.rules ${D}/${sysconfdir}/udev/rules.d/ +} |