mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Intel: Implement Passthrough-Range
This commit is contained in:
parent
f808232fbd
commit
ce0e76e1f5
16
projects/Generic/filesystem/usr/bin/intel-fullrange.sh
Normal file
16
projects/Generic/filesystem/usr/bin/intel-fullrange.sh
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!/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
|
||||||
|
# Hack - something is not yet fully right
|
||||||
|
/usr/bin/xrandr -display :0 --output $out --set "Broadcast RGB" "Full"
|
||||||
|
/usr/bin/xrandr -display :0 --output $out --set "Broadcast RGB" "Video 16:235 pass-through"
|
||||||
|
# Seems there is a little race somewhere on some outputs
|
||||||
|
# Turn the display shortly off and on again
|
||||||
|
if [ -e "/storage/.config/forcedisplay" ]; then
|
||||||
|
/usr/bin/xrandr -display :0 --output $out --off ; /usr/bin/xrandr -display :0 --output $out --auto
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
@ -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 "/usr/bin/intel-fullrange.sh"
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sleep.target
|
@ -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 "/usr/bin/intel-fullrange.sh"
|
||||||
|
StandardError=null
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=kodi.target
|
Loading…
x
Reference in New Issue
Block a user