Power off the toslink port

Hi everyone,

I have a SAMMIX R95S (S905X 1GB/16GB) box running on Android 6.0.1. The CoreELEC version is 9.2.6. I am using the DTB gxl_p212_1g.

My issue is : powering off the box via the ir remote power button sometimes does not turn off the toslink port (the red light from the port stays on). Same issue from the kodi shutdown menu.

Powering off the box In android shutdowns perfectly (red light from port is off).

Any ideas what is causing this issue?

Is there a script to first turn off the toslink port before powering down?

thanks!

Hi Puff & Welcome

Sounds to me like your IR remote power button is switching to standby not full power off. I suggest looking at the Kodi Keymap Editor addon. There is a keymap in the Repository for a Sammix R95S and the power code is 0x140 KEY_POWER (NEC).

Instructions for the Keymap Repository are HERE

Hi Stuart,

It’s a good guess yet my current config is map is almost identical to the one in the repo.
My toml file looks like :
# table sammix, type: NEC

0x100 KEY_PLAYPAUSE
0x140 KEY_POWER

It seem like shutdown sequence sometimes doesn’t power off the toslink port in time. I was wondering if there was a command you can send to the toslink port to turn it off before powering down?

Thank you for the help!

There is a bit of a workaround that’s possible by going into the box on putty, identifying the device with amixer scontrols then issuing amixer sset ‘’ mute and once you know that works adding that line into /storage/.config/shutdown.sh but you may also have to add the command with unmute into autostart.sh to bring the device back up. If you search on here for shutdown.sh it brings up a lot of code examples.

Hi Stuart264,
Thank you ! Works like a charm! I also needed to modify the dtb. I used this shutdown.sh script:

#!/bin/sh

#/storage/.config/shutdown.sh

case “$1” in

#halt)

# your commands here

;;

poweroff|halt)

amixer sset 'Audio spdif mute' mute 

;;

reboot)

# your commands here

;;

*)

# your commands here

;;

esac

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.