forked from OpenELEC/OpenELEC.tv
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Intel: Automatically switch to full range
- Loading branch information
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
13 changes: 13 additions & 0 deletions
13
projects/Generic/filesystem/usr/lib/systemd/system/intel-fullrange-resume.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
14 changes: 14 additions & 0 deletions
14
projects/Generic/filesystem/usr/lib/systemd/system/intel-fullrange.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |