Yeah, for now I just have two scripts on my desktop that enable/disable this so that it resets to SDR again. Some python-hook in Kodi or something that does this automatically would be nice but I’m too unfamiliar with Kodi.
Edit:
I’ve put the commands into two python files. One to turn it on, one to turn it off.
I remapped the Stop-button on the remote to execute the script to disable the override before actually stopping the video. This way it gets automatically disabled everytime I finish a movie and it returns to SDR in the menu.
<keymap>...<FullScreenVideo><remote>...<stop>RunScript(/home/osmc/.kodi/userdata/keymaps/hdr10override_stopbutton.py)</stop>...
import xbmc
import os
os.system("sudo bash -c 'echo \"0\">/sys/module/am_vecm/parameters/customer_hdmi_display_en'")
xbmc.executebuiltin("XBMC.Action(Stop)")
To enable it I have to press the Stop-button in the movie list. This will run the script to turn on the override before I press OK to start the video. It’s not as automated as disabling it but at least it’s something for now.
<keymap>...<Videos><remote>...<stop>RunScript(/home/osmc/.kodi/userdata/keymaps/hdr10override_on.py)</stop>...
import xbmc
import os
os.system("sudo bash -c 'echo \"1\">/sys/module/am_vecm/parameters/customer_hdmi_display_en'")
os.system("sudo bash -c 'echo \"9,16,8500,39850,6550,2300,35400,14600,15635,16450,4000,1,0,0\">/sys/module/am_vecm/parameters/customer_hdmi_display_param'")
xbmc.executebuiltin("Notification(HDR10-Override, Enabled with 4000cd/m2, 5000)")
If anyone has an idea how to automate the “enabling”-step, that’d be great. The tricky part is it should only do this for HDR videos of course.
Or we could hope for a module_param()-like solution in the new kernel that works like customer_master_display_en but only for actual HDR content. From what I can tell from the v3-kernel’s source code we’re not that far off from a solution. If I was more experienced in the Linux kernel and its compilation I’d gladly write a patch for the new kernel.