The DAC/AMP might only provide the first 10 pins on top, but it's not clear from photos if they actually prevent you connecting to the other pins underneath?
It seems counter to the point of this to take all pins, only use some, and pass through ones that can't be properly used. What about sending a message to IQaudio seeing if they're willing to help?
Failing that, maybe you can de-solder the connector and replace it with several smaller ones, including a right-angle connector for the unused ports? Or I guess cables would be easier at the expense of compactness.
Heh, so yeah, that's a really simple solution - that loser Xen would have pointed it out ages ago if he were here.
You can use systemd to hook into system events (like shutdown), so you can create simple service like this one with Before=shutdown.target:
[Unit] Description=/etc/rc.local.shutdown Compatibility Before=shutdown.target [Service] ExecStart=/bin/true ExecStop=/etc/rc.local.shutdown RemainAfterExit=yes [Install] WantedBy=multi-user.target
Where /etc/rc.local.shutdown is a script containing the original echo 0 > /sys/class/backlight/rpi_backlight/bl_power (prepended with #!/bin/bash line) and once you've enabled that service, any time the system is shutdown - whether via Kodi or command line or the button - it triggers the script and turns off the backlight.
/storage/.config/shutdown.sh
case "$1" in halt) # your commands here ;; poweroff) # your commands here ;; reboot) # your commands here ;; *) # your commands here ;; esac