Config for enabling Minix A2 poweroff stops working after reboot

I tried getting my power button working for my Minix A2 Lite for a couple of days now. Yesterday i got power-on working and today i’ve had some succes with power-off, but somehow my changes disappear after reboot. Here is what i did, using How to configure IR remote control as a reference:

ir-keytable -p NEC,RC-5,RC-6,JVC,SONY -t
Protocols changed to rc-5 jvc sony nec rc-6
Testing events. Please, press CTRL-C to abort.
862.965033: event type EV_MSC(0x04): scancode = 0x118
862.965033: event type EV_SYN(0x00).

cat /storage/.config/rc_map.cfg
    meson-ir * minix_neo_pwr_only

cat /usr/lib/udev/rc_keymaps/minix_neo_pwr_only
    # table minix_neo_pwr_only, type: NEC
    0x118 KEY_POWER

So, unless i’m mistaken, CoreElec should have already be listening to the correct IR command, but it was not working. So i made a copy of this file and placed it in the “custom keymaps directory”:

cp /usr/lib/udev/rc_keymaps/minix_neo_pwr_only /storage/.config/rc_keymaps/minix_a2

Also changed the rc_map.cfg file:

cat /storage/.config/rc_map.cfg
meson-ir * minix_a2

Now, when i run the following command:

ir-keytable -a /storage/.config/rc_map.cfg

I can finally power off the system, but after a new boot, this ability is gone untill i rerun the ir-keytable command again.

How can i make this persist between reboots?

Kinds regards,

Eek NL

1 Like

This is the output for ir-keytable just after a reboot:

Found /sys/class/rc/rc0/ (/dev/input/event3) with:
        Driver: meson-ir, table: rc-empty
        lirc device: /dev/lirc0
        Supported protocols: unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp cec irmp
        Enabled protocols: lirc nec rc-6
        Name: meson-ir
        bus: 25, vendor/product: 0000:0000, version: 0x0000
        Repeat delay = 500 ms, repeat period = 125 ms

Then when i run “ir-keytable -a /storage/.config/rc_map.cfg” again:

Old keytable cleared
Wrote 1 keycode(s) to driver
Protocols changed to nec

ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event3) with:
        Driver: meson-ir, table: rc-empty
        lirc device: /dev/lirc0
        Supported protocols: unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp cec irmp
        Enabled protocols: lirc nec
        Name: meson-ir
        bus: 25, vendor/product: 0000:0000, version: 0x0000
        Repeat delay = 500 ms, repeat period = 125 ms

And the button now works. (untill a reboot)

The only thing i see changed is that rc-6 isn’t enabled anymore. Is this relevant to the problem?

Regards,

Eek NL

I solved it by putting the command in autostart.sh

If there is a better way, i’d still like to know though. Also, im curious why the default “minix_neo_pwr_only” wasn’t working.

Regards,

Eek NL

your problem is this, its rc_maps.cfg not rc_map.cfg

I tried the same thing a while ago but could never get mine to turn on.

I noticed a remote setting in the coreelec settings, had an option for minix but that didn’t help. It actually won’t even turn off right now with the remote.

I need to take the time to go through the guide again. Might have wiped my device since the last time I did it.