Sleep/Resume Scripts - GPU settings

  • I'm trying to set my GPU to limited mode but the setting is lost on sleep/resume. I can manually run the following command it works.

    xrandr --output HDMI3 --set "Broadcast RGB" "Limited 16:235"

    I then added a script to /storage/.config/sleep.d called 02-gpu.power (I already have another called 01-restart.power which restarts kodi on resume as I've a problem with the dvblink plugin at the moment). The 01- script runs fine each time but the 02- script doesn't seem to be called. If I run 'sh pathtoscript post' it works.

    Can anyone point out what I'm missing?

    01-restart.power
    #!/bin/sh
    case "$1" in
    pre)
    systemctl stop kodi
    ;;
    post)
    sleep 1
    systemctl start kodi
    ;;
    esac

    02-gpu.power
    #!/bin/sh
    case "$1" in
    post)
    xrandr --output HDMI3 --set "Broadcast RGB" "Limited 16:235"
    ;;
    esac