Linux How to automatically set xrandr Broadcast RGB upon starting and exiting KODI?
#1
Hi,

anyone here who could explain how to automatically execute:

Code:
xrandr --output $OUTPUT --set "Broadcast RGB" "Full"

upon starting Kodi and automatically executing:

Code:
xrandr --output $OUTPUT --set "Broadcast RGB" "Limited 16:235"

upon exiting Kodi?

So that the the GPU outputs at full range when Kodi starts and switches back to limited range when Kodi exits.

Regards
Reply
#2
mafancyscripts.sh:

Code:
#!/bin/sh
xrandr -display :0 --output $OUTPUT --set "Broadcast RGB" "Full"
kodi
xrandr -display :0 --output $OUTPUT --set "Broadcast RGB" "Limited 16:235"

Edit: Obviously you need to define $OUTPUT which might be HDMI1 or HDMI2 or something similar.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
Couldn't this be added as an option to KODI, so that it could be adjusted from inside KODI?
Reply
#4
(2016-10-08, 20:32)qp9013625 Wrote: Couldn't this be added as an option to KODI, so that it could be adjusted from inside KODI?

Anyone?

Couldn't this be controlled directly from within KODI by adding an option for it? Or would this technically be impossible?
Reply
#5
Quite easy: write a very simple python script and add it to kodi. Or use autostart.py

See: http://kodi.wiki/view/HOW-TO:HelloWorld_addon you can use the hooks to do something on quit and something after start and so on
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#6
No, I mean an official option placed in the video output settings of KODI.
Reply
#7
There is no place in kodi for that. As it's obsolete and is only relevant for certain users, which can easily workaround that. It is Linux only, it is intel only, but also intel only when xf86-video-intel is in place, which is replaced by all major distributions with modesetting anways - just two days ago Fedora made the switch. And - as you know - it only works on X11. An application run on a desktop should not really reconfigure the xserver.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#8
(2017-01-14, 15:22)fritsch Wrote: but also intel only when xf86-video-intel is in place, which is replaced by all major distributions with modesetting anways - just two days ago Fedora made the switch.

You are obviously wrong... I am running xf86-video-modesetting and still can adjust "Broadcast RGB" via xrandr.

Of course it's also relevant for xf86-video-modesetting. The xf86-video-* drivers are just the DDX drivers.

Of course xf86-video-modesetting still uses the Intel kernel driver, so "xrandr --output OUTPUT --set "Broadcast RGB" "Full/Limited 16:235/Automatic" still works.

"Broadcast RGB" has nothing to do with the DDX.
Reply
#9
Jep - you are right.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#10
Yeah, and what you said regarding "Intel only" also might not be correct at all in the future, because an option to adjust the RGB range / color space is also being worked on for amdgpu / radeon, see:

https://bugs.freedesktop.org/show_bug.cgi?id=83226
Reply
#11
A lot of things that is true right now might not be correct in the future :-)
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#12
Since you have commented in that thread yourself already, you should know that some of it already has landed upstream and there are also patches available already Wink.
Reply
#13
I know. I hessitate a bit adding stuff, that can be easily done via command line without any trouble. Distributions like LibreELEC have a systemd-service plus a kodi default settings policy in place that does these things automatically.

For a desktop: http://forum.kodi.tv/showthread.php?tid=...pid2354154 - and perhaps in half a year X11 is dropped from kodi completely? :-) and we go MIR route only? one does not know.

To make things short: I won't implement it as I see no need. But as this is free software, come up with a PR and it can be discussed obviously.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#14
(2017-01-14, 16:45)fritsch Wrote: I hessitate a bit adding stuff, that can be easily done via command line without any trouble.

Coming from the Weston discussion, it seems like there might actually be some kind of API that allows to adjust these "connector properties", so maybe KODI could simply make use of this API:

https://bugs.freedesktop.org/show_bug.cgi?id=99406
https://01.org/linuxgraphics/gfx-docs/dr...rties.html

?
Reply

Logout Mark Read Team Forum Stats Members Help
How to automatically set xrandr Broadcast RGB upon starting and exiting KODI?0