[DEV][ROM][UNOFFICIAL] LineageOS 19 (Android 12L) for Raspberry Pi 4 B

Search This thread

KonstaT

Senior Member
Jan 20, 2016
668
422
KonstaKANG.com
It looks like it was being caused by having the resolution set to "Preferred" when plugged into a 4K TV. Setting it to 1080 60 has seemed to of fixed the issue.
Ah, ok. You can expect all kinds of performance issues if you use higher resolutions. That's why 1080p is forced by default to provide consistent user experience.

Hi @KonstaT, I'm trying to use an IR receiver with this build. The feature is enabled from settings (as in FAQs), ir-keytable finds the device and ir-keytable -t detects the key pressures on the remote. When I make a keymap for any remote and place it as /boot/rc_keymap.txt and try ir-keytable -w I'm getting "invalid parameter on line 1", but if I rename it to rc_keympap.toml it loads succesfully as I can see with r-keytable -r and whith ir-keytable -t during key pressures. The thing is that the remote has no effect outside the terminal. The only relative issue I found is in your thread at forums.raspberrypi.com.
Any enlightenment would be appreciated!!!
Thanks in advance...
rc_keymap.txt needs to have UNIX line endings so use a proper text editor (Windows notepad won't do) or look into tools like dos2unix.

Otherwise the RC is just exposed as regular Linux input device and it works like any keyboard. You should also see the input events with 'getevent' tool if you have it working properly.
 
Ah, ok. You can expect all kinds of performance issues if you use higher resolutions. That's why 1080p is forced by default to provide consistent user experience.


rc_keymap.txt needs to have UNIX line endings so use a proper text editor (Windows notepad won't do) or look into tools like dos2unix.

Otherwise the RC is just exposed as regular Linux input device and it works like any keyboard. You should also see the input events with 'getevent' tool if you have it working properly.
I had in mind UNIX line endings (because of your comment in the other forum), so I created the keymap file using nano. "getevent" gives normal inputs e.g. "/dev/input/event0: 0004 0004 00000118".
Is there any known working RC with your builds? I'm using irplus app, so I could test all of them.
 

KonstaT

Senior Member
Jan 20, 2016
668
422
KonstaKANG.com
I had in mind UNIX line endings (because of your comment in the other forum), so I created the keymap file using nano. "getevent" gives normal inputs e.g. "/dev/input/event0: 0004 0004 00000118".
Is there any known working RC with your builds? I'm using irplus app, so I could test all of them.
What does the rc_keymap.txt exactly look like? And longer output of 'getevent' that shows the actual keycodes?
 
What does the rc_keymap.txt exactly look like? And longer output of 'getevent' that shows the actual keycodes?
Here is my rc_keymap.txt
Code:
[[protocols]]
name = "MINIX_Neo_X5"
protocol = "nec"
[protocols.scancodes]
0x118 = "KEY_POWER"
0x104 = "KEY_MENU"
0x10d = "KEY_HOME"
0x146 = "KEY_UP"
0x114 = "KEY_VOLUMEUP"
0x147 = "KEY_LEFT"
0x155 = "KEY_OK"
0x115 = "KEY_RIGHT"
0x140 = "KEY_BACK"
0x116 = "KEY_DOWN"
0x110 = "KEY_VOLUMEDOWN"

And here are the outputs of 'ir-keytable' and 'getevent'. See the difference of the output of 'ir-keytable -w' between rc_keymap.txt and rc_keymap.toml, is the same file renamed.
Code:
:/ $ su -
:/ # ir-keytable -w /boot/rc_keymap.txt
Invalid parameter on line 1 of /boot/rc_keymap.txt
Failed to read table file /boot/rc_keymap.txt
Found /sys/class/rc/rc0/ with:
        Name: gpio_ir_recv
        Driver: gpio_ir_recv
        Default keymap: rc-rc6-mce
        Input device: /dev/input/event0
        LIRC device: /dev/lirc0
        Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon rc-mm
        Enabled kernel protocols: lirc rc6
        bus: 25, vendor/product: 0001:0001, version: 0x0100
        Repeat delay = 500 ms, repeat period = 125 ms
:/ # ir-keytable -w /boot/rc_keymap.toml
Read MINIX_Neo_X5 table
Wrote 11 keycode(s) to driver
Protocols changed to nec
:/ # ir-keytable -r
scancode 0x0104 = KEY_MENU (0x8b)
scancode 0x010d = KEY_HOME (0x66)
scancode 0x0110 = KEY_VOLUMEDOWN (0x72)
scancode 0x0114 = KEY_VOLUMEUP (0x73)
scancode 0x0115 = KEY_RIGHT (0x6a)
scancode 0x0116 = KEY_DOWN (0x6c)
scancode 0x0118 = KEY_POWER (0x74)
scancode 0x0140 = KEY_BACK (0x9e)
scancode 0x0146 = KEY_UP (0x67)
scancode 0x0147 = KEY_LEFT (0x69)
scancode 0x0155 = KEY_OK (0x160)
Enabled kernel protocols: lirc nec
:/ # ir-keytable -t
Testing events. Please, press CTRL-C to abort.
2038.168077: lirc protocol(nec): scancode = 0x118
2038.168094: event type EV_MSC(0x04): scancode = 0x118
2038.168094: event type EV_KEY(0x01) key_down: KEY_POWER(0x0074)
2038.168094: event type EV_SYN(0x00).
2038.300032: event type EV_KEY(0x01) key_up: KEY_POWER(0x0074)
2038.300032: event type EV_SYN(0x00).
2039.556067: lirc protocol(nec): scancode = 0x104
2039.556088: event type EV_MSC(0x04): scancode = 0x104
2039.556088: event type EV_KEY(0x01) key_down: KEY_MENU(0x008b)
2039.556088: event type EV_SYN(0x00).
2039.688035: event type EV_KEY(0x01) key_up: KEY_MENU(0x008b)
2039.688035: event type EV_SYN(0x00).
2040.728091: lirc protocol(nec): scancode = 0x10d
2040.728116: event type EV_MSC(0x04): scancode = 0x10d
2040.728116: event type EV_KEY(0x01) key_down: KEY_HOME(0x0066)
2040.728116: event type EV_SYN(0x00).
2040.860044: event type EV_KEY(0x01) key_up: KEY_HOME(0x0066)
2040.860044: event type EV_SYN(0x00).
2041.848080: lirc protocol(nec): scancode = 0x146
2041.848097: event type EV_MSC(0x04): scancode = 0x146
2041.848097: event type EV_KEY(0x01) key_down: KEY_UP(0x0067)
2041.848097: event type EV_SYN(0x00).
2041.980033: event type EV_KEY(0x01) key_up: KEY_UP(0x0067)
2041.980033: event type EV_SYN(0x00).
2043.188080: lirc protocol(nec): scancode = 0x114
2043.188096: event type EV_MSC(0x04): scancode = 0x114
2043.188096: event type EV_KEY(0x01) key_down: KEY_VOLUMEUP(0x0073)
2043.188096: event type EV_SYN(0x00).
2043.320032: event type EV_KEY(0x01) key_up: KEY_VOLUMEUP(0x0073)
2043.320032: event type EV_SYN(0x00).
2044.248079: lirc protocol(nec): scancode = 0x147
2044.248096: event type EV_MSC(0x04): scancode = 0x147
2044.248096: event type EV_KEY(0x01) key_down: KEY_LEFT(0x0069)
2044.248096: event type EV_SYN(0x00).
2044.380032: event type EV_KEY(0x01) key_up: KEY_LEFT(0x0069)
2044.380032: event type EV_SYN(0x00).
2045.136079: lirc protocol(nec): scancode = 0x155
2045.136096: event type EV_MSC(0x04): scancode = 0x155
2045.136096: event type EV_KEY(0x01) key_down: KEY_OK(0x0160)
2045.136096: event type EV_SYN(0x00).
2045.268032: event type EV_KEY(0x01) key_up: KEY_OK(0x0160)
2045.268032: event type EV_SYN(0x00).
2046.408056: lirc protocol(nec): scancode = 0x115
2046.408082: event type EV_MSC(0x04): scancode = 0x115
2046.408082: event type EV_KEY(0x01) key_down: KEY_RIGHT(0x006a)
2046.408082: event type EV_SYN(0x00).
2046.540031: event type EV_KEY(0x01) key_up: KEY_RIGHT(0x006a)
2046.540031: event type EV_SYN(0x00).
2047.588054: lirc protocol(nec): scancode = 0x140
2047.588076: event type EV_MSC(0x04): scancode = 0x140
2047.588076: event type EV_KEY(0x01) key_down: KEY_BACK(0x009e)
2047.588076: event type EV_SYN(0x00).
2047.720030: event type EV_KEY(0x01) key_up: KEY_BACK(0x009e)
2047.720030: event type EV_SYN(0x00).
2048.496066: lirc protocol(nec): scancode = 0x116
2048.496090: event type EV_MSC(0x04): scancode = 0x116
2048.496090: event type EV_KEY(0x01) key_down: KEY_DOWN(0x006c)
2048.496090: event type EV_SYN(0x00).
2048.628031: event type EV_KEY(0x01) key_up: KEY_DOWN(0x006c)
2048.628031: event type EV_SYN(0x00).
2049.908091: lirc protocol(nec): scancode = 0x110
2049.908119: event type EV_MSC(0x04): scancode = 0x110
2049.908119: event type EV_KEY(0x01) key_down: KEY_VOLUMEDOWN(0x0072)
2049.908119: event type EV_SYN(0x00).
2050.040035: event type EV_KEY(0x01) key_up: KEY_VOLUMEDOWN(0x0072)
2050.040035: event type EV_SYN(0x00).
^C
130|:/ # getevent
add device 1: /dev/input/event6
  name:     "[email protected]"
could not get driver version for /dev/input/mice, Inappropriate ioctl for device
add device 2: /dev/input/event0
  name:     "gpio_ir_recv"
could not get driver version for /dev/input/mouse0, Inappropriate ioctl for device
add device 3: /dev/input/event5
  name:     "MOSART Semi. 2.4G RF Keyboard & Mouse"
add device 4: /dev/input/event4
  name:     "MOSART Semi. 2.4G RF Keyboard & Mouse System Control"
add device 5: /dev/input/event3
  name:     "MOSART Semi. 2.4G RF Keyboard & Mouse Consumer Control"
add device 6: /dev/input/event1
  name:     "MOSART Semi. 2.4G RF Keyboard & Mouse"
add device 7: /dev/input/event2
  name:     "MOSART Semi. 2.4G RF Keyboard & Mouse"
/dev/input/event1: 0004 0004 00070028
/dev/input/event1: 0001 001c 00000000
/dev/input/event1: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000118
/dev/input/event0: 0001 0074 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 0074 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000104
/dev/input/event0: 0001 008b 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 008b 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 0000010d
/dev/input/event0: 0001 0066 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 0066 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000146
/dev/input/event0: 0001 0067 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 0067 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000114
/dev/input/event0: 0001 0073 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 0073 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000147
/dev/input/event0: 0001 0069 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 0069 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000155
/dev/input/event0: 0001 0160 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 0160 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000115
/dev/input/event0: 0001 006a 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 006a 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000140
/dev/input/event0: 0001 009e 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 009e 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000116
/dev/input/event0: 0001 006c 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 006c 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000110
/dev/input/event0: 0001 0072 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 0072 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event1: 0004 0004 000700e0
/dev/input/event1: 0001 001d 00000001
/dev/input/event1: 0000 0000 00000000
/dev/input/event1: 0004 0004 00070006
/dev/input/event1: 0001 002e 00000001
/dev/input/event1: 0000 0000 00000000
^C
130|:/ #
 

KonstaT

Senior Member
Jan 20, 2016
668
422
KonstaKANG.com
Here is my rc_keymap.txt
Code:
[[protocols]]
name = "MINIX_Neo_X5"
protocol = "nec"
[protocols.scancodes]
0x118 = "KEY_POWER"
0x104 = "KEY_MENU"
0x10d = "KEY_HOME"
0x146 = "KEY_UP"
0x114 = "KEY_VOLUMEUP"
0x147 = "KEY_LEFT"
0x155 = "KEY_OK"
0x115 = "KEY_RIGHT"
0x140 = "KEY_BACK"
0x116 = "KEY_DOWN"
0x110 = "KEY_VOLUMEDOWN"

And here are the outputs of 'ir-keytable' and 'getevent'. See the difference of the output of 'ir-keytable -w' between rc_keymap.txt and rc_keymap.toml, is the same file renamed.
Code:
:/ $ su -
:/ # ir-keytable -w /boot/rc_keymap.txt
Invalid parameter on line 1 of /boot/rc_keymap.txt
Failed to read table file /boot/rc_keymap.txt
Found /sys/class/rc/rc0/ with:
        Name: gpio_ir_recv
        Driver: gpio_ir_recv
        Default keymap: rc-rc6-mce
        Input device: /dev/input/event0
        LIRC device: /dev/lirc0
        Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon rc-mm
        Enabled kernel protocols: lirc rc6
        bus: 25, vendor/product: 0001:0001, version: 0x0100
        Repeat delay = 500 ms, repeat period = 125 ms
:/ # ir-keytable -w /boot/rc_keymap.toml
Read MINIX_Neo_X5 table
Wrote 11 keycode(s) to driver
Protocols changed to nec
:/ # ir-keytable -r
scancode 0x0104 = KEY_MENU (0x8b)
scancode 0x010d = KEY_HOME (0x66)
scancode 0x0110 = KEY_VOLUMEDOWN (0x72)
scancode 0x0114 = KEY_VOLUMEUP (0x73)
scancode 0x0115 = KEY_RIGHT (0x6a)
scancode 0x0116 = KEY_DOWN (0x6c)
scancode 0x0118 = KEY_POWER (0x74)
scancode 0x0140 = KEY_BACK (0x9e)
scancode 0x0146 = KEY_UP (0x67)
scancode 0x0147 = KEY_LEFT (0x69)
scancode 0x0155 = KEY_OK (0x160)
Enabled kernel protocols: lirc nec
:/ # ir-keytable -t
Testing events. Please, press CTRL-C to abort.
2038.168077: lirc protocol(nec): scancode = 0x118
2038.168094: event type EV_MSC(0x04): scancode = 0x118
2038.168094: event type EV_KEY(0x01) key_down: KEY_POWER(0x0074)
2038.168094: event type EV_SYN(0x00).
2038.300032: event type EV_KEY(0x01) key_up: KEY_POWER(0x0074)
2038.300032: event type EV_SYN(0x00).
2039.556067: lirc protocol(nec): scancode = 0x104
2039.556088: event type EV_MSC(0x04): scancode = 0x104
2039.556088: event type EV_KEY(0x01) key_down: KEY_MENU(0x008b)
2039.556088: event type EV_SYN(0x00).
2039.688035: event type EV_KEY(0x01) key_up: KEY_MENU(0x008b)
2039.688035: event type EV_SYN(0x00).
2040.728091: lirc protocol(nec): scancode = 0x10d
2040.728116: event type EV_MSC(0x04): scancode = 0x10d
2040.728116: event type EV_KEY(0x01) key_down: KEY_HOME(0x0066)
2040.728116: event type EV_SYN(0x00).
2040.860044: event type EV_KEY(0x01) key_up: KEY_HOME(0x0066)
2040.860044: event type EV_SYN(0x00).
2041.848080: lirc protocol(nec): scancode = 0x146
2041.848097: event type EV_MSC(0x04): scancode = 0x146
2041.848097: event type EV_KEY(0x01) key_down: KEY_UP(0x0067)
2041.848097: event type EV_SYN(0x00).
2041.980033: event type EV_KEY(0x01) key_up: KEY_UP(0x0067)
2041.980033: event type EV_SYN(0x00).
2043.188080: lirc protocol(nec): scancode = 0x114
2043.188096: event type EV_MSC(0x04): scancode = 0x114
2043.188096: event type EV_KEY(0x01) key_down: KEY_VOLUMEUP(0x0073)
2043.188096: event type EV_SYN(0x00).
2043.320032: event type EV_KEY(0x01) key_up: KEY_VOLUMEUP(0x0073)
2043.320032: event type EV_SYN(0x00).
2044.248079: lirc protocol(nec): scancode = 0x147
2044.248096: event type EV_MSC(0x04): scancode = 0x147
2044.248096: event type EV_KEY(0x01) key_down: KEY_LEFT(0x0069)
2044.248096: event type EV_SYN(0x00).
2044.380032: event type EV_KEY(0x01) key_up: KEY_LEFT(0x0069)
2044.380032: event type EV_SYN(0x00).
2045.136079: lirc protocol(nec): scancode = 0x155
2045.136096: event type EV_MSC(0x04): scancode = 0x155
2045.136096: event type EV_KEY(0x01) key_down: KEY_OK(0x0160)
2045.136096: event type EV_SYN(0x00).
2045.268032: event type EV_KEY(0x01) key_up: KEY_OK(0x0160)
2045.268032: event type EV_SYN(0x00).
2046.408056: lirc protocol(nec): scancode = 0x115
2046.408082: event type EV_MSC(0x04): scancode = 0x115
2046.408082: event type EV_KEY(0x01) key_down: KEY_RIGHT(0x006a)
2046.408082: event type EV_SYN(0x00).
2046.540031: event type EV_KEY(0x01) key_up: KEY_RIGHT(0x006a)
2046.540031: event type EV_SYN(0x00).
2047.588054: lirc protocol(nec): scancode = 0x140
2047.588076: event type EV_MSC(0x04): scancode = 0x140
2047.588076: event type EV_KEY(0x01) key_down: KEY_BACK(0x009e)
2047.588076: event type EV_SYN(0x00).
2047.720030: event type EV_KEY(0x01) key_up: KEY_BACK(0x009e)
2047.720030: event type EV_SYN(0x00).
2048.496066: lirc protocol(nec): scancode = 0x116
2048.496090: event type EV_MSC(0x04): scancode = 0x116
2048.496090: event type EV_KEY(0x01) key_down: KEY_DOWN(0x006c)
2048.496090: event type EV_SYN(0x00).
2048.628031: event type EV_KEY(0x01) key_up: KEY_DOWN(0x006c)
2048.628031: event type EV_SYN(0x00).
2049.908091: lirc protocol(nec): scancode = 0x110
2049.908119: event type EV_MSC(0x04): scancode = 0x110
2049.908119: event type EV_KEY(0x01) key_down: KEY_VOLUMEDOWN(0x0072)
2049.908119: event type EV_SYN(0x00).
2050.040035: event type EV_KEY(0x01) key_up: KEY_VOLUMEDOWN(0x0072)
2050.040035: event type EV_SYN(0x00).
^C
130|:/ # getevent
add device 1: /dev/input/event6
  name:     "[email protected]"
could not get driver version for /dev/input/mice, Inappropriate ioctl for device
add device 2: /dev/input/event0
  name:     "gpio_ir_recv"
could not get driver version for /dev/input/mouse0, Inappropriate ioctl for device
add device 3: /dev/input/event5
  name:     "MOSART Semi. 2.4G RF Keyboard & Mouse"
add device 4: /dev/input/event4
  name:     "MOSART Semi. 2.4G RF Keyboard & Mouse System Control"
add device 5: /dev/input/event3
  name:     "MOSART Semi. 2.4G RF Keyboard & Mouse Consumer Control"
add device 6: /dev/input/event1
  name:     "MOSART Semi. 2.4G RF Keyboard & Mouse"
add device 7: /dev/input/event2
  name:     "MOSART Semi. 2.4G RF Keyboard & Mouse"
/dev/input/event1: 0004 0004 00070028
/dev/input/event1: 0001 001c 00000000
/dev/input/event1: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000118
/dev/input/event0: 0001 0074 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 0074 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000104
/dev/input/event0: 0001 008b 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 008b 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 0000010d
/dev/input/event0: 0001 0066 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 0066 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000146
/dev/input/event0: 0001 0067 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 0067 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000114
/dev/input/event0: 0001 0073 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 0073 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000147
/dev/input/event0: 0001 0069 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 0069 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000155
/dev/input/event0: 0001 0160 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 0160 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000115
/dev/input/event0: 0001 006a 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 006a 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000140
/dev/input/event0: 0001 009e 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 009e 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000116
/dev/input/event0: 0001 006c 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 006c 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 00000110
/dev/input/event0: 0001 0072 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 0072 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event1: 0004 0004 000700e0
/dev/input/event1: 0001 001d 00000001
/dev/input/event1: 0000 0000 00000000
/dev/input/event1: 0004 0004 00070006
/dev/input/event1: 0001 002e 00000001
/dev/input/event1: 0000 0000 00000000
^C
130|:/ #
There's also the old keymap format you can use (see https://github.com/lineage-rpi/android_external_ir-keytable/tree/lineage-18.1/rc_keymaps for reference). Last I tested both formats worked.

According to 'getevent' that should work just as expected.
 
There's also the old keymap format you can use (see https://github.com/lineage-rpi/android_external_ir-keytable/tree/lineage-18.1/rc_keymaps for reference). Last I tested both formats worked.

According to 'getevent' that should work just as expected.
With the old format 'ir-keytable" -w gives "Invalid parameter on line 1 of /boot/rc_keymap.txt" and "/boot/rc_keymap.toml: missing [protocols] section" for *.txt and *.toml respectively.
Are there any other actions I should do, apart from just placing the keymap file in /boot ? I think I'm missing something...
 

KonstaT

Senior Member
Jan 20, 2016
668
422
KonstaKANG.com
With the old format 'ir-keytable" -w gives "Invalid parameter on line 1 of /boot/rc_keymap.txt" and "/boot/rc_keymap.toml: missing [protocols] section" for *.txt and *.toml respectively.
Are there any other actions I should do, apart from just placing the keymap file in /boot ? I think I'm missing something...
Well, something invalid on the first line (table name, protocol, line ending)?

According to the 'getevent' you posted it already works as expected. How are you testing it in Android? Are you on a screen where the arrow keys actually do something?

Edit. Tested this again myself. I fixed the FAQ to point to the old rc_keymap format. .toml doesn't work with .txt file extension (I'll add support for separate /boot/rc_keymap.toml if/when there's another release). 'getevent' shows some events from the IR even if you don't have a right keymap. IR remote works fine, so you just need to figure out the rc_keymap.txt for the remote you're using.
 
Last edited:
  • Like
Reactions: azakosath
Well, something invalid on the first line (table name, protocol, line ending)?

According to the 'getevent' you posted it already works as expected. How are you testing it in Android? Are you on a screen where the arrow keys actually do something?

Edit. Tested this again myself. I fixed the FAQ to point to the old rc_keymap format. .toml doesn't work with .txt file extension (I'll add support for separate /boot/rc_keymap.toml if/when there's another release). 'getevent' shows some events from the IR even if you don't have a right keymap. IR remote works fine, so you just need to figure out the rc_keymap.txt for the remote you're using.
I decided to start from scratch (before I read your edited post). So, after new installation the RC was working fine after loading the keymap file from storage as .toml
Code:
su -c ir-keytable /storage/emulated/0/.../rc_keymap.toml
Problems start as soon as the file is moved to /boot. After reboot the RC works only in terminal with 'ir-keytable -t'. It seems like mounting /boot messes things up, because even if the file is removed problem persists.
My solution so far, after clean installation 'ir-keytable -r' gives the default scancode to keycode mapping, which looks like this lirc.conf file, after converting to .toml using a .py script found here. So, using IrScrutinizer, I made an RC with these scancodes to use with irplus app.
I'll try again with the new insurrections and I'll report back.

Edit: I placed a .txt file with the old format as /boot/rc_keymap.txt and it works! And this time mounting /boot didn't brake the Matrix...
 
Last edited:
  • Like
Reactions: KonstaT

KonstaT

Senior Member
Jan 20, 2016
668
422
KonstaKANG.com
I decided to start from scratch (before I read your edited post). So, after new installation the RC was working fine after loading the keymap file from storage as .toml
Code:
su -c ir-keytable /storage/emulated/0/.../rc_keymap.toml
Problems start as soon as the file is moved to /boot. After reboot the RC works only in terminal with 'ir-keytable -t'. It seems like mounting /boot messes things up, because even if the file is removed problem persists.
My solution so far, after clean installation 'ir-keytable -r' gives the default scancode to keycode mapping, which looks like this lirc.conf file, after converting to .toml using a .py script found here. So, using IrScrutinizer, I made an RC with these scancodes to use with irplus app.
I'll try again with the new insurrections and I'll report back.

Edit: I placed a .txt file with the old format as /boot/rc_keymap.txt and it works! And this time mounting /boot didn't brake the Matrix...
Linux kernel uses rc6-mce keymap (https://github.com/lineage-rpi/andr...ge-19.1/drivers/media/rc/keymaps/rc-rc6-mce.c) by default. You could also configure RC keymaps kernel side (without using 'ir-keytable') if your remote was one supported by Linux (https://github.com/lineage-rpi/android_kernel_brcm_rpi/tree/lineage-19.1/drivers/media/rc/keymaps) but that's usually not the case.

My builds have a script at /vendor/etc/init.d/02remote that is executed on boot that clears the default RC keymap (rc6-mce) and writes one from /boot/rc_keymap.txt if such file exist. You can also easily edit that script if you want to use the .toml format instead of the legacy format.
 
  • Like
Reactions: azakosath

adscombecorner

New member
May 24, 2022
2
0
Hello,
I installed the latest Konsakang Lineage OS 19.0 (LineageOS 19 - KonstaKANG (Android 12L) on RPi 4B 8GB - all I have had is audio buffering all the time ... I installed on different micro SD cards. various settings, but still the same audio buffering or no audio at all.

I have now reverted back to the latest 18.1 version (LineageOS 18.1 - KonstaKANG (Android 11) which works perfectly and even more zippy than the previous 18.1 version.

I'm not sure why I am getting audio buffering with 19.0 - could it to do with component tolerance?? but I have tested 19.0 on two Raspberry Pi 4B 8GB with same audio buffering - there is surely something not tweaked in the software? It is unusable for me, but 18.1 is fine with no issues at all.

My Raspberry Pi 4B 8GB comes out of China, but I guess most of them do these days?

Please update us when there is a fix for this issue.
 

KonstaT

Senior Member
Jan 20, 2016
668
422
KonstaKANG.com
Hello,
I installed the latest Konsakang Lineage OS 19.0 (LineageOS 19 - KonstaKANG (Android 12L) on RPi 4B 8GB - all I have had is audio buffering all the time ... I installed on different micro SD cards. various settings, but still the same audio buffering or no audio at all.

I have now reverted back to the latest 18.1 version (LineageOS 18.1 - KonstaKANG (Android 11) which works perfectly and even more zippy than the previous 18.1 version.

I'm not sure why I am getting audio buffering with 19.0 - could it to do with component tolerance?? but I have tested 19.0 on two Raspberry Pi 4B 8GB with same audio buffering - there is surely something not tweaked in the software? It is unusable for me, but 18.1 is fine with no issues at all.

My Raspberry Pi 4B 8GB comes out of China, but I guess most of them do these days?

Please update us when there is a fix for this issue.
Please stick with one forum as there's no point in posting the same thing across various places.

HDMI audio is a bit of know issue on builds with 5.10 kernel (http://disq.us/p/2os3vri, http://disq.us/p/2lgvcmt).
 

kchatzig

New member
May 26, 2022
2
0
Thank you for the ROM, KonstaKang! Is there any news for Opengapps for ATV 12? (or any gapps that we can install)
 
Last edited:

adscombecorner

New member
May 24, 2022
2
0
Please stick with one forum as there's no point in posting the same thing across various places.

HDMI audio is a bit of know issue on builds with 5.10 kernel (http://disq.us/p/2os3vri, http://disq.us/p/2lgvcmt).
Thanks Konsta,
I click one of the links which leads me you the build site and it says HDMI is working .. So why is it not working?? I do not see any notice on that site saying that HDMI is not working or may not work properly???
 

KonstaT

Senior Member
Jan 20, 2016
668
422
KonstaKANG.com
Thank you for the ROM, KonstaKang! Is there any news for Opengapps for ATV 12? (or any gapps that we can install)
I don't have anything to do with any gapps release so I wouldn't know. I'm not aware of any at least.

You would need to ask where you usually get your gapps or try building a package yourself.

Thanks Konsta,
I click one of the links which leads me you the build site and it says HDMI is working .. So why is it not working?? I do not see any notice on that site saying that HDMI is not working or may not work properly???
Well, I can't reproduce such issue. As for why this can be an issue or what has changed from before, read the comments I linked for background information. These are links to Disqus comments which might take some time to load sometime so have some patience.
 
  • Like
Reactions: kchatzig

heist82

New member
Jun 4, 2022
2
0
Hey KonstaT,

I'm having real issues with trying to get my android to shut down. I'm trying to use it in a car environment, so want my android to shutdown cleanly before I turn power off via relay.

Things I've tried:
1. In config.txt, I've used the gpio-shutdown on a number of pins, each one does the same thing, momentary press turns off the display, long press brings up the power menu.
2. Tried to add your script you wrote for previous lineages versions, I understand they are in a different place now and saw the twrp way to install doesn't work any more. I created the file in the correct spot /vendor/etc/init.d and put in exactly what you had in there with the correct permissions, didn't appear to work.

Each time I've tried it, it just brings up the power menu, instead of shutting down. Is there something different in 12l that has changed? Or can I even do what I want to do?

Cheers for your work on this, it's awesome, I have everything else working well, including a BigTreeTech 5inch screen working perfectly!
 

KonstaT

Senior Member
Jan 20, 2016
668
422
KonstaKANG.com
Hey KonstaT,

I'm having real issues with trying to get my android to shut down. I'm trying to use it in a car environment, so want my android to shutdown cleanly before I turn power off via relay.

Things I've tried:
1. In config.txt, I've used the gpio-shutdown on a number of pins, each one does the same thing, momentary press turns off the display, long press brings up the power menu.
2. Tried to add your script you wrote for previous lineages versions, I understand they are in a different place now and saw the twrp way to install doesn't work any more. I created the file in the correct spot /vendor/etc/init.d and put in exactly what you had in there with the correct permissions, didn't appear to work.

Each time I've tried it, it just brings up the power menu, instead of shutting down. Is there something different in 12l that has changed? Or can I even do what I want to do?

Cheers for your work on this, it's awesome, I have everything else working well, including a BigTreeTech 5inch screen working perfectly!
The script I've posted at https://forum.xda-developers.com/t/...raspberry-pi-4-b.4139059/page-6#post-83822011 works just fine. On Android 12 you need to copy it to /vendor/etc/init.d/ and change the permissions to make it executable (755). Please note that it uses different GPIO pin than the DIY power button.
 

SaturaniumYT

New member
Jun 8, 2022
4
2
Hello, I have a Raspberry Pi 4B and when I downloaded 1 GApps file each of 2 attempts to fix the following problem, both times it said that I was offline even while I was connected to both WiFi and ethernet (separately). The same raspberry pi was running on Android 12L both attempts. Help?
 

SaturaniumYT

New member
Jun 8, 2022
4
2
Hello, I have a Raspberry Pi 4B and when I downloaded 1 GApps file each of 2 attempts to fix the following problem, both times it said that I was offline even while I was connected to both WiFi and ethernet (separately). The same raspberry pi was running on Android 12L both attempts. Help?
The same problem seems to be coming from the OS itself. Not sure what to do to try to fix it because every single solution that would normally work on other android devices does not work on the Raspberry Pi. (No offense intended)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Nvm those last 2 messages, I found out how to turn on wifi access to google play. For some odd reason, you need to enable wifi access by going to Settings > Apps > Google Play Store > Mobile data & WiFi and click on allow network access. Weird…
  • 18
    Here’s my build of LineageOS 19 for Raspberry Pi 4 Model B, Pi 400, and Compute Module 4. It is unofficial and unsupported by the LineageOS team. It’s for advanced users only. Pi 4 model with at least 2GB of RAM is required to run this build.

    Important! This image includes parts that are licensed under non-commercial license (Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International). You may use this build freely in personal/educational/etc use. Commercial use is not allowed with this build! You can contact me by email to discuss creating customized Android builds for commercial purposes.

    Screenshot_20220313-200456_Settings.png


    There is also Android TV version available.

    Screenshot_20220114-084413_Settings.png


    Working:
    • Audio (HDMI, 3.5mm jack, USB microphones, bluetooth speakers/headphones, etc)
    • Audio DAC (using GPIO DACs e.g. Hifiberry DAC+)
    • Bluetooth (and bluetooth tethering)
    • Camera (using official Pi camera modules & UVC USB webcams)
    • GPIO
    • GPS (using external USB modules e.g. U-Blox 7)
    • Ethernet
    • Hardware accelerated graphics (V3D, OpenGL & Vulkan)
    • HDMI display (and HDMI-CEC)
    • I2C
    • IR remotes (using external GPIO IR modules e.g. TSOP4838)
    • RTC (using external GPIO I2C modules e.g. DS3231)
    • Sensors (using external GPIO I2C modules e.g. MPU6050, LSM6DS3, LSM303DLHC, BME280/BMP280, and APDS9930 accelerometer, gyroscope, magnetometer, temperature, pressure, humidity, ambient light, and proximity)
    • Serial console (using external GPIO serial console adapters e.g. PL2303)
    • SPI
    • Touchscreen/multi-touch (official 7" touchscreen, USB touchscreens, Waveshare SPI touchscreens)
    • USB (mouse, keyboard, storage, etc)
    • USB-C (ADB, MTP, PTP, USB tethering)
    • Wifi (and wifi tethering)

    Not working:
    • Hardware video decoding & encoding (software decoding & encoding works, option to test highly experimental H.264 hardware video decoding)

    Issues:
    • Camcorder & some third party camera apps don't work with official Pi camera modules
    • SELinux is in permissive mode
    • and more…

    Sources:

    Thanks:
    • Peter Yoon and android-rpi project
    • Roman Stratiienko and GloDroid project
    • AOSP reference board developers (dragonboard, hikey, yukawa)
    • E. Anholt for V3D graphics driver
    • Maxime Ripard for Pi 4 KMS driver
    • Android-x86 project
    • LineageOS team and everyone who has contributed to LineageOS 19
    4
    New build.


    -switch to Linux 5.10 kernel by default
    -fix VC4 HDMI audio with 5.10 kernel (3.5mm jack is now used by default so select the right HDMI device from the settings)
    -add support for the official 7" touchscreen display with hw accelerated graphics (enable configurations for the touchscreen from the settings)
    -minor brightness fixes for the official 7" display
    -add support for Pi camera modules using libcamera, preview & photos work - camcorder doesn't (thanks to Roman Stratiienko)
    -fix UVC USB webcams that use external camera HAL (camera needs to support MJPG format - preview, photos & camcorder works)
    -add option to enable currently very WIP H.264 hardware video decoding using v4l2_codec2 (enable experimental feature from the settings)
    -fix reboots related to Hotspot 2.0 networks/ANQP requests (see issue #6)
    -Vulkan 1.1 (thanks to people at Igalia for Vulkan 1.1 conformance and Roman Stratiienko for latest Mesa fixes)
    -update to Mesa 21.3.1
    -update to Linux 5.10.83 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    -Android security patch level: 5 December 2021 (merged)
    3
    New build. Added optional Linux 5.10 kernel add-on to test a lot of WIP stuff.


    -add option to show virtual volume down, volume up, and power keys on navigation bar (requires reboot)
    -add option for old TCP-based ADB over network
    -show IP address and port for ADB/SSH/VNC options
    -update to TWRP 3.6.0_11-0-KonstaKANG
    -update to Mesa 21.3.0
    -update to Linux 5.4.161 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    -Android security patch level: 5 November 2021 (merged)

    Linux 5.10 kernel: (optional add-on)
    -various KMS driver improvements (DSI panel support, etc)
    -support for Pi camera modules using libcamera, preview & photos work - camcorder doesn’t (thanks to Roman Stratiienko)
    -option to test currently very WIP H.264 hardware video decoding using v4l2_codec2 (Settings -> System -> Advanced settings -> Hardware video decoding)
    -HDMI audio is not supported! (see issue #4651 & issue #4654)
    -new Raspberry Pi Android kernel bring-up based on AOSP android12-5.10-lts
    -update to Linux 5.10.81 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    3
    Wow I didn't expect latest Android being supported on the Pie, thanks for the great work!
    I have two small questions though :
    • Do you know how is support for microG? It doesn't cause any problem? (was wondering about casting videos for example)
    MicroG requires a patch for signature spoofing that is not included in LineageOS for security reasons. I think this is also something that can be achieved using Magisk (which is now supported) but haven't looked into it.
    • I know it has been asked few times already, but now that Android 12 has been released are you confident it will be possible to have support for hardware acceleration soon? Would make a big difference to have a steady 1080p/60fps
    I'm pretty confident it will work eventually. Soon(™) is also a relative term.

    Short term goal is to get some proof of concept that stateful H.264 V4L2 dec/enc can work on Android on Pi 4. Just made some minor progress with v4l2_codec2 couple of days ago and got the dec/enc codec2 component to even do something in the first place. Not sure if the current issues I'm having are due to memory allocation or the codec component negotiating with the kernel driver. There's also still some hardcoded buffer sizes, etc that depend on the video resolution you're trying to dec/enc. Only real hardware that I'm aware that just recently has this working at least to some extent is dragonboard and John Stultz has tweeted some updates on the matter so check those out if you're interested.

    Sorry if this wasn't the news you were looking for but things like this take time.
    3
    Short term goal is to get some proof of concept that stateful H.264 V4L2 dec/enc can work on Android on Pi 4.
    And that didn't even take too long. \o/ But yes, H.264 V4L2 hardware decoding can work on Android on the Pi 4!

    Something still getting messed up somewhere in the pipeline so the colors are not correct and there's a green tint on the bottom half of the playback.
    https://www.dropbox.com/s/hlvcv23ejfpinn5/VID_20211108_194739.mp4?dl=0