Skip to content

Commit

Permalink
Intel: Automatically switch to full range
Browse files Browse the repository at this point in the history
  • Loading branch information
fritsch committed Sep 19, 2015
1 parent 4fefd53 commit bed6d9e
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
9 changes: 9 additions & 0 deletions projects/Generic/filesystem/usr/bin/intel-fullrange.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
FB_TYPE="$(grep '^0 ' /proc/fb | sed 's/[^[:space:]] //')"

if [ "$FB_TYPE" == "inteldrmfb" ]; then
OUTPUT=`/usr/bin/xrandr -display :0 -q | sed '/ connected/!d;s/ .*//;q'`
for out in $OUTPUT ; do
/usr/bin/xrandr -display :0 --output $out --set "Broadcast RGB" "Full"
done
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Restore full range after suspend
Before=sleep.target
StopWhenUnneeded=yes

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/true
ExecStop=-/bin/sh -c "/usr/bin/intel-fullrange.sh"

[Install]
WantedBy=sleep.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=intel switch to full range
Before=kodi.service
After=graphical.target

[Service]
Type=oneshot
Environment=DISPLAY=:0.0
ExecStart=-/bin/sh -c "/usr/bin/intel-fullrange.sh"
StandardError=null
RemainAfterExit=yes

[Install]
WantedBy=kodi.target

0 comments on commit bed6d9e

Please sign in to comment.