libretro / Lakka-LibreELEC

Lakka is a lightweight Linux distribution that transforms a small computer into a full blown game console.
https://www.lakka.tv
1.74k stars 286 forks source link

Asus gamepad not working correclty until lakka restart #589

Closed jmandawg closed 5 years ago

jmandawg commented 5 years ago

Hi guys,

Lakka stable 2.2.1 Raspberry pi 3 b+

Most times when i startup Lakka and then turn on my Asus gamepad bluetooth controller, it will scroll through the menus crazy, like sometimes only allowing the first and last menu item to be selected, sometimes skipping over items. If i'm able to make it to the "restart lakka" menu item and restart lakka service (or from ssh), it work fine. Sometimes it will fix itself, every once in a while (rarely) it will just work.

lakka log during connect:

[INFO] Shader log: Compiled
[INFO] [GLSL]: Linking GLSL program.
[INFO] Resetting shader to defaults ... 
[INFO] [GL]: Using 4 textures.
[INFO] [GL]: Loaded 1 program(s).
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
[WARN] [udev]: Couldn't open any keyboard, mouse or touchpad. Are permissions set correctly for /dev/input/event*?
[INFO] [udev]: Plugged pad: ASUS Gamepad (2821:17664) on port #0.
[INFO] [udev]: Pad #0 (/dev/input/event0) supports 0 force feedback effects.
[INFO] [Joypad]: Found joypad driver: "udev".

dmesg during connect:

[    9.834019] Bluetooth: Core ver 2.22¬
[    9.834111] NET: Registered protocol family 31¬
[    9.834116] Bluetooth: HCI device and connection manager initialized¬
[    9.834143] Bluetooth: HCI socket layer initialized¬
[    9.834157] Bluetooth: L2CAP socket layer initialized¬
[    9.834192] Bluetooth: SCO socket layer initialized¬
[    9.845460] Bluetooth: HCI UART driver ver 2.3¬
[    9.845476] Bluetooth: HCI UART protocol H4 registered¬
[    9.845482] Bluetooth: HCI UART protocol Three-wire (H5) registered¬
[    9.845672] Bluetooth: HCI UART protocol Broadcom registered¬
[   11.211168] random: crng init done¬
[  174.249605] Bluetooth: HIDP (Human Interface Emulation) ver 1.2¬
[  174.249639] Bluetooth: HIDP socket layer initialized¬
[  174.254426] hid-generic 0005:0B05:4500.0001: unknown main item tag 0x0¬
[  174.255157] input: ASUS Gamepad as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:0B05:4500.000
[  174.259819] hid-generic 0005:0B05:4500.0001: input,hidraw0: BLUETOOTH HID v0.40 Gamepad [ASUS Gamepad] on b8:27:eb:cxxxxx

Contents of config file:

Lakka:~ # cat joypads/udev/ASUS\ Gamepad.cfg 
input_a_btn = "1"
input_b_btn = "0"
input_device = "ASUS Gamepad"
input_down_btn = "h0down"
input_driver = "udev"
input_l2_axis = "+5"
input_l3_btn = "7"
input_l_btn = "4"
input_l_x_minus_axis = "-0"
input_l_x_plus_axis = "+0"
input_l_y_minus_axis = "-1"
input_l_y_plus_axis = "+1"
input_left_btn = "h0left"
input_r2_axis = "+4"
input_r3_btn = "8"
input_r_btn = "5"
input_r_x_minus_axis = "-2"
input_r_x_plus_axis = "+2"
input_r_y_minus_axis = "-3"
input_r_y_plus_axis = "+3"
input_right_btn = "h0right"
input_select_btn = "9"
input_start_btn = "10"
input_up_btn = "h0up"
input_x_btn = "3"
input_y_btn = "2"

I also have the following udev rule:

Lakka:~ # cat /etc/udev/rules.d/99-asus-gamepad-controller.rules 
SUBSYSTEM=="input", ATTRS{name}=="ASUS Gamepad", MODE="666", ENV{ID_INPUT_JOYSTICK}="1"
gouchi commented 5 years ago

Hi,

Can you try this operation for the asus gamepad autoconfig file ?

Thank you.

jmandawg commented 5 years ago

Deleting the autoconfig doesn't help.

But it seem work if i let the controller set for around 10 seconds without touching it after turning it on. I think the problem happens if i start pressing button on the controller right when it's done connecting (solid light)

gouchi commented 5 years ago

Hi,

May we get some logs at least Lakka system log, dmesg.

Thank you.

jmandawg commented 5 years ago

So this only seems to happen in the lakka UI (I'm using RGUI), once a game starts the controller is fine. When it is broken, it acts like when you hold up or down for a long time in the RGUI menu and it reaches full acceleration speed, and will only toggle between 2 menu items.

Last few times i tried, it only acts up when it first connects (will jump through the menu and then acts normal after that)

Here is the lakka log.

Lakka:~ # systemctl stop retroarch.service ; retroarch -v
[INFO] [recording] twitch streaming key empty
[INFO] RetroArch 1.7.5 (Git fcf75fd)
[INFO] === Build =======================================
Capabilities: NEON VFPv3 VFPv4 
Built: Dec 25 2018
[INFO] Version: 1.7.5
[INFO] Git: fcf75fd
[INFO] =================================================
[INFO] Environ SET_PIXEL_FORMAT: RGB565.
[INFO] Redirecting save file to "/storage/savefiles/.srm".
[INFO] Redirecting savestate to "/storage/savestates/.state".
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 29970.03 Hz.
[INFO] [Video]: Video @ fullscreen
[INFO] [Video]: Starting threaded video driver ...
[INFO] [EGL] Falling back to eglGetDisplay
[INFO] [EGL]: EGL version: 1.4
[INFO] [EGL]: Current context: 0x1.
[INFO] [GL]: Found GL context: videocore
[INFO] [GL]: Detecting screen resolution 720x480.
[INFO] [EGL]: eglSwapInterval(0)
[INFO] [GL]: Vendor: Broadcom, Renderer: VideoCore IV HW.
[INFO] [GL]: Version: OpenGL ES 2.0.
[INFO] Querying EGL extension: KHR_image => exists
[INFO] [GL]: Using resolution 720x480
[INFO] [GL]: Default shader backend found: glsl.
[INFO] [Shader driver]: Using GLSL shader backend.
[WARN] [GL]: Stock GLSL shaders will be used.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] Shader log: Compiled
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] Shader log: Compiled
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] Shader log: Compiled
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] Shader log: Compiled
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] Shader log: Compiled
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] Shader log: Compiled
[INFO] [GLSL]: Linking GLSL program.
[INFO] Resetting shader to defaults ... 
[INFO] [GL]: Using 4 textures.
[INFO] [GL]: Loaded 1 program(s).
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
[WARN] [udev]: Couldn't open any keyboard, mouse or touchpad. Are permissions set correctly for /dev/input/event*?
[INFO] [udev]: Plugged pad: ASUS Gamepad (2821:17664) on port #0.
[INFO] [udev]: Pad #0 (/dev/input/event0) supports 0 force feedback effects.
[INFO] [Joypad]: Found joypad driver: "udev".
[WARN] [udev]: Full-screen pointer won't be available.
[INFO] [Video]: Found display server: null
[INFO] Found shader "/tmp/shaders/bilinear.glslp"
[INFO] Found shader "/tmp/shaders/nearest.glslp"
[INFO] Found shader "/tmp/shaders/pi_iq_horz_nearest_vert.glsl"
[INFO] Found shader "/tmp/shaders/pi_iq_horz_nearest_vert.glslp"
[INFO] Found shader "/tmp/shaders/retroarch.glslp"
[INFO] Found shader "/tmp/shaders/slang-conversion-template.glsl"
[INFO] Found shader "/tmp/shaders/stock.glsl"
[INFO] ALSA: Using signed 16-bit format.
[INFO] ALSA: Period size: 384 frames
[INFO] ALSA: Buffer size: 1536 frames
[INFO] [LED]: LED driver = 'null' 0x338038
[INFO] [MIDI]: Initializing ...
ALSA lib /home/kivutar/Lakka-LibreELEC/build.Lakka-RPi2.arm/alsa-lib-1.1.4.1/src/seq/seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
[ERROR] [MIDI]: snd_seq_open failed with error -2.
[ERROR] [MIDI]: Initialization failed (list of input devices unavailable).
[INFO] SRAM will not be saved.
[INFO] Loading history file: [/storage/.config/retroarch/content_history.lpl].
[INFO] Loading history file: [/storage/.config/retroarch/content_favorites.lpl].
[INFO] Loading history file: [/storage/.config/retroarch/content_music_history.lpl].
[INFO] Loading history file: [/storage/.config/retroarch/content_video_history.lpl].
[INFO] Loading history file: [/storage/.config/retroarch/content_image_history.lpl].
[INFO] [udev]: Hotplug remove ID_INPUT_KEYBOARD: /dev/input/js0.
[INFO] [udev]: Hotplug remove: /dev/input/js0.
[INFO] [udev]: Hotplug remove ID_INPUT_KEYBOARD: /dev/input/event0.
[INFO] [udev]: Hotplug remove: /dev/input/event0.
[INFO] Autodetect: Device disconnected from port #0 (ASUS Gamepad).
[INFO] [udev]: Hotplug add ID_INPUT_KEYBOARD: /dev/input/js0.
[INFO] [udev]: Hotplug add: /dev/input/js0.
[INFO] [udev]: Hotplug add ID_INPUT_KEYBOARD: /dev/input/event0.
[INFO] [udev]: Hotplug add: /dev/input/event0.
[INFO] [udev]: Plugged pad: ASUS Gamepad (2821:17664) on port #0.
[INFO] [udev]: Pad #0 (/dev/input/event0) supports 0 force feedback effects.

Here is the dmesg:


[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.80 (kivutar@buildserver3) (gcc version 7.3.0 (GCC) ) #1 SMP Tue Oct 23 09:28:30 CEST 2018
[    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt:Machine model: Raspberry Pi 3 Model B Plus Rev 1.3
[    0.000000] cma: Reserved 8 MiB at 0x2f800000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 196608
[    0.000000] free_area_init_node: node 0, pgdat 80c365c0, node_mem_map af136000
[    0.000000]   Normal zone: 1728 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 196608 pages, LIFO batch:31
[    0.000000] percpu: Embedded 14 pages/cpu @af0f0000 s25292 r8192 d23860 u57344
[    0.000000] pcpu-alloc: s25292 r8192 d23860 u57344 alloc=14*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 194880
[    0.000000] Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=720 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 quiet  vt.global_cursor_default=0 loglevel=2 root=/dev/ram0 rdinit=/init BOOT_IMAGE=/kernel.img usbcore.autosuspend=-1
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 758304K/786432K available (6144K kernel code, 222K rwdata, 1384K rodata, 3072K init, 394K bss, 19936K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xb0800000 - 0xff800000   (1264 MB)
[    0.000000]     lowmem  : 0x80000000 - 0xb0000000   ( 768 MB)
[    0.000000]     modules : 0x7f000000 - 0x80000000   (  16 MB)
[    0.000000]       .text : 0x80008000 - 0x80700000   (7136 kB)
[    0.000000]       .init : 0x80900000 - 0x80c00000   (3072 kB)
[    0.000000]       .data : 0x80c00000 - 0x80c37aa0   ( 223 kB)
[    0.000000]        .bss : 0x80c39000 - 0x80c9baac   ( 395 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] arm_arch_timer: Architected cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000005] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000015] Switching to timer-based delay loop, resolution 52ns
[    0.000209] Console: colour dummy device 80x30
[    0.000223] console [tty0] enabled
[    0.000239] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.00 BogoMIPS (lpj=64000)
[    0.000250] pid_max: default: 32768 minimum: 301
[    0.000378] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000386] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001187] Disabling memory control group subsystem
[    0.001222] CPU: Testing write buffer coherency: ok
[    0.001542] CPU0: update cpu_capacity 1024
[    0.001549] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.001574] Setting up static identity map for 0x100000 - 0x100034
[    0.003177] CPU1: update cpu_capacity 1024
[    0.003183] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.003812] CPU2: update cpu_capacity 1024
[    0.003818] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.004395] CPU3: update cpu_capacity 1024
[    0.004402] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.004481] Brought up 4 CPUs
[    0.004489] SMP: Total of 4 processors activated (153.00 BogoMIPS).
[    0.004493] CPU: All CPU(s) started in HYP mode.
[    0.004496] CPU: Virtualization extensions available.
[    0.005051] devtmpfs: initialized
[    0.015030] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[    0.015263] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370867519511994 ns
[    0.015277] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.015745] pinctrl core: initialized pinctrl subsystem
[    0.016582] NET: Registered protocol family 16
[    0.018659] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.033346] cpuidle: using governor ladder
[    0.046712] cpuidle: using governor menu
[    0.047222] Serial: AMBA PL011 UART driver
[    0.048850] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.049304] uart-pl011 3f201000.serial: could not find pctldev for node /soc/gpio@7e200000/uart0_pins, deferring probe
[    0.101100] bcm2835-dma 3f007000.dma: DMA legacy API manager at b080d000, dmachans=0x1
[    0.102684] SCSI subsystem initialized
[    0.102963] usbcore: registered new interface driver usbfs
[    0.103033] usbcore: registered new interface driver hub
[    0.103111] usbcore: registered new device driver usb
[    0.103602] raspberrypi-firmware soc:firmware: Attached to firmware from 2018-04-06 18:05
[    0.104865] clocksource: Switched to clocksource arch_sys_counter
[    0.105142] FS-Cache: Loaded
[    0.115962] NET: Registered protocol family 2
[    0.116632] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.116739] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.116923] TCP: Hash tables configured (established 8192 bind 8192)
[    0.117007] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.117047] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.117248] NET: Registered protocol family 1
[    0.117573] RPC: Registered named UNIX socket transport module.
[    0.117578] RPC: Registered udp transport module.
[    0.117581] RPC: Registered tcp transport module.
[    0.117585] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.254462] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.268469] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.269801] FS-Cache: Netfs 'nfs' registered for caching
[    0.270680] NFS: Registering the id_resolver key type
[    0.270702] Key type id_resolver registered
[    0.270706] Key type id_legacy registered
[    0.270720] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.270961] FS-Cache: Netfs 'cifs' registered for caching
[    0.274146] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.274153] io scheduler noop registered (default)
[    0.274158] io scheduler deadline registered
[    0.274379] io scheduler cfq registered
[    0.279427] BCM2708FB: allocated DMA memory ef900000
[    0.279448] BCM2708FB: allocated DMA channel 0 @ b080d000
[    0.289042] Console: switching to colour frame buffer device 90x30
[    0.295211] bcm2835-rng 3f104000.rng: hwrng registered
[    0.295308] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    0.295773] vc-sm: Videocore shared memory driver
[    0.308876] brd: module loaded
[    0.309032] loop: module loaded
[    0.312468] nbd: registered device at major 43
[    0.323946] usbcore: registered new interface driver rtsx_usb
[    0.323952] Loading iSCSI transport class v2.0-870.
[    0.324336] iscsi: registered transport (tcp)
[    0.324811] libphy: Fixed MDIO Bus: probed
[    0.324891] tun: Universal TUN/TAP device driver, 1.6
[    0.324895] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    0.325167] usbcore: registered new interface driver lan78xx
[    0.325223] usbcore: registered new interface driver dm9601
[    0.325302] usbcore: registered new interface driver smsc95xx
[    0.325333] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    0.553363] Core Release: 2.80a
[    0.553370] Setting default values for core params
[    0.553394] Finished setting default values for core params
[    0.753741] Using Buffer DMA mode
[    0.753746] Periodic Transfer Interrupt Enhancement - disabled
[    0.753750] Multiprocessor Interrupt Enhancement - disabled
[    0.753755] OTG VER PARAM: 0, OTG VER FLAG: 0
[    0.753767] Dedicated Tx FIFOs mode
[    0.754086] WARN::dwc_otg_hcd_init:1032: FIQ DMA bounce buffers: virt = 0xaf914000 dma = 0xef914000 len=9024
[    0.754109] FIQ FSM acceleration enabled for :
[    0.754109] Non-periodic Split Transactions
[    0.754109] Periodic Split Transactions
[    0.754109] High-Speed Isochronous Endpoints
[    0.754109] Interrupt/Control Split Transaction hack enabled
[    0.754115] dwc_otg: Microframe scheduler enabled
[    0.754160] WARN::hcd_init_fiq:459: FIQ on core 1 at 0x8053ad48
[    0.754169] WARN::hcd_init_fiq:460: FIQ ASM at 0x8053b0ac length 36
[    0.754178] WARN::hcd_init_fiq:486: MPHI regs_base at 0xb087c000
[    0.754223] dwc_otg 3f980000.usb: DWC OTG Controller
[    0.754254] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    0.754281] dwc_otg 3f980000.usb: irq 62, io mem 0x00000000
[    0.754326] Init: Port Power? op_state=1
[    0.754329] Init: Power Port (0)
[    0.754500] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.754509] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.754516] usb usb1: Product: DWC OTG Controller
[    0.754523] usb usb1: Manufacturer: Linux 4.9.80 dwc_otg_hcd
[    0.754529] usb usb1: SerialNumber: 3f980000.usb
[    0.755245] hub 1-0:1.0: USB hub found
[    0.755277] hub 1-0:1.0: 1 port detected
[    0.755862] dwc_otg: FIQ enabled
[    0.755866] dwc_otg: NAK holdoff enabled
[    0.755870] dwc_otg: FIQ split-transaction FSM enabled
[    0.755881] Module dwc_common_port init
[    0.756080] usbcore: registered new interface driver usb-storage
[    0.756275] mousedev: PS/2 mouse device common for all mice
[    0.756419] i2c /dev entries driver
[    0.757684] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
[    0.757934] bcm2835-cpufreq: min=600000 max=1400000
[    0.758409] sdhci: Secure Digital Host Controller Interface driver
[    0.758412] sdhci: Copyright(c) Pierre Ossman
[    0.758679] sdhost-bcm2835 3f202000.sdhost: could not get clk, deferring probe
[    0.760781] mmc-bcm2835 3f300000.mmc: could not get clk, deferring probe
[    0.760817] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.761856] ledtrig-cpu: registered to indicate activity on CPUs
[    0.761927] hidraw: raw HID events driver (C) Jiri Kosina
[    0.762769] usbcore: registered new interface driver usbhid
[    0.762770] usbhid: USB HID core driver
[    0.763130] vchiq: vchiq_init_state: slot_zero = 0xaf980000, is_master = 0
[    0.763956] [vc_sm_connected_init]: start
[    0.770512] [vc_sm_connected_init]: end - returning 0
[    0.771074] NET: Registered protocol family 10
[    0.771533] NET: Registered protocol family 17
[    0.771585] Key type dns_resolver registered
[    0.771759] Registering SWP/SWPB emulation handler
[    0.775907] uart-pl011 3f201000.serial: cts_event_workaround enabled
[    0.775946] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[    0.776651] sdhost: log_buf @ af913000 (ef913000)
[    0.831534] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    0.833510] mmc-bcm2835 3f300000.mmc: mmc_debug:0 mmc_debug2:0
[    0.833513] mmc-bcm2835 3f300000.mmc: DMA channel allocated
[    0.884950] console [netcon0] enabled
[    0.884952] netconsole: network logging started
[    0.884953] of_cfs_init
[    0.885016] of_cfs_init: OK
[    0.889370] Freeing unused kernel memory: 3072K
[    0.903744] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    0.905266] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    0.906788] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    0.909506] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    0.924963] mmc0: host does not support reading read-only switch, assuming write-enable
[    0.927436] mmc0: new high speed SDHC card at address 152e
[    0.927835] mmcblk0: mmc0:152e SE04G 3.64 GiB
[    0.929085]  mmcblk0: p1 p2
[    0.954887] random: fast init done
[    0.961597] Indeed it is in host mode hprt0 = 00021501
[    1.027096] mmc1: new high speed SDIO card at address 0001
[    1.134876] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    1.134945] Indeed it is in host mode hprt0 = 00001101
[    1.281794] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    1.282131] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[    1.288640] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.328344] usb 1-1: New USB device found, idVendor=0424, idProduct=2514
[    1.328351] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    1.328702] hub 1-1:1.0: USB hub found
[    1.328740] hub 1-1:1.0: 4 ports detected
[    1.608211] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    1.698386] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2514
[    1.698393] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    1.698772] hub 1-1.1:1.0: USB hub found
[    1.698816] hub 1-1.1:1.0: 3 ports detected
[    1.765740] systemd[1]: System time before build time, advancing clock.
[    1.778839] systemd[1]: systemd 232 running in system mode. (-PAM -AUDIT -SELINUX -IMA -APPARMOR -SMACK -SYSVINIT -UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS -ACL -XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
[    1.779094] systemd[1]: Detected architecture arm.
[    1.779283] systemd[1]: Set hostname to <Lakka>.
[    1.834490] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    1.834640] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[    1.834753] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[    1.895053] systemd[1]: Listening on RPCbind Server Activation Socket.
[    1.895111] systemd[1]: Reached target RPC Port Mapper.
[    1.895153] systemd[1]: Reached target Paths.
[    1.895664] systemd[1]: Created slice System Slice.
[    2.043021] systemd-journald[215]: Received request to flush runtime journal from PID 1
[    2.264889] usb 1-1.1.1: new high-speed USB device number 4 using dwc_otg
[    2.358455] usb 1-1.1.1: New USB device found, idVendor=0424, idProduct=7800
[    2.358462] usb 1-1.1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.626237] libphy: lan78xx-mdiobus: probed
[    2.701475] Console: switching to colour dummy device 80x30
[    2.751331] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[    3.066097] usbcore: registered new interface driver brcmfmac
[    3.351503] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    3.362585] uart-pl011 3f201000.serial: no DMA platform data
[    3.383867] brcmfmac: Firmware version = wl0: Feb 27 2018 03:15:32 version 7.45.154 (r684107 CY) FWID 01-4fbe0b04
[    3.384261] brcmfmac: brcmf_c_preinit_dcmds: CLM version = API: 12.2 Data: 9.10.105 Compiler: 1.29.4 ClmImport: 1.36.3 Creation: 2018-03-09 18:56:28 
[    3.541635] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[    3.541645] brcmfmac: power management disabled
[    4.769160] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[    9.536785] Bluetooth: Core ver 2.22
[    9.536861] NET: Registered protocol family 31
[    9.536866] Bluetooth: HCI device and connection manager initialized
[    9.536883] Bluetooth: HCI socket layer initialized
[    9.536897] Bluetooth: L2CAP socket layer initialized
[    9.536927] Bluetooth: SCO socket layer initialized
[    9.545556] Bluetooth: HCI UART driver ver 2.3
[    9.545571] Bluetooth: HCI UART protocol H4 registered
[    9.545576] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    9.545746] Bluetooth: HCI UART protocol Broadcom registered
[   10.287921] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[   10.287940] Bluetooth: HIDP socket layer initialized
[   10.290230] hid-generic 0005:0B05:4500.0001: unknown main item tag 0x0
[   10.290440] input: ASUS Gamepad as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:0B05:4500.0001/input/input0
[   10.291175] hid-generic 0005:0B05:4500.0001: input,hidraw0: BLUETOOTH HID v0.31 Gamepad [ASUS Gamepad] on b8:27:eb:c2:17:2e
[   10.753485] random: crng init done
[   29.239797] hid-generic 0005:0B05:4500.0002: unknown main item tag 0x0
[   29.240459] input: ASUS Gamepad as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:12/0005:0B05:4500.0002/input/input1
[   29.242023] hid-generic 0005:0B05:4500.0002: input,hidraw0: BLUETOOTH HID v0.31 Gamepad [ASUS Gamepad] on b8:27:eb:c2:17:2e
[   79.495407] hid-generic 0005:0B05:4500.0003: unknown main item tag 0x0
[   79.495905] input: ASUS Gamepad as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:0B05:4500.0003/input/input2
[   79.497467] hid-generic 0005:0B05:4500.0003: input,hidraw0: BLUETOOTH HID v0.31 Gamepad [ASUS Gamepad] on b8:27:eb:c2:17:2e
[  122.252356] hid-generic 0005:0B05:4500.0004: unknown main item tag 0x0
[  122.252893] input: ASUS Gamepad as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:12/0005:0B05:4500.0004/input/input3
[  122.254187] hid-generic 0005:0B05:4500.0004: input,hidraw0: BLUETOOTH HID v0.31 Gamepad [ASUS Gamepad] on b8:27:eb:c2:17:2e
[  263.639538] hid-generic 0005:0B05:4500.0005: unknown main item tag 0x0
[  263.639977] input: ASUS Gamepad as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:0B05:4500.0005/input/input4
[  263.641383] hid-generic 0005:0B05:4500.0005: input,hidraw0: BLUETOOTH HID v0.31 Gamepad [ASUS Gamepad] on b8:27:eb:c2:17:2e
[  304.775699] brcmfmac: brcmf_run_escan: error (-25)
[  304.775709] brcmfmac: brcmf_cfg80211_scan: scan error (-25)
gouchi commented 5 years ago

Thank for the information. It seems the gamepad is recognized as keyboard.

Can you try to provide also those informations ?

We may need to add udev rules.

Thank you.

jmandawg commented 5 years ago

Sorry about the delay, here is the output from the command:

Lakka:~ # cat /proc/bus/input/devices 
I: Bus=0005 Vendor=0b05 Product=4500 Version=0040
N: Name="ASUS Gamepad"
P: Phys=b8:27:eb:c2:17:2e
S: Sysfs=/devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:0B05:4500.0001/input/input0
U: Uniq=38:2c:4a:8b:9b:5f
H: Handlers=kbd leds js0 event0 
B: PROP=0
B: EV=2001b
B: KEY=70db0000 0 0 0 1000 40000000 0 0 0 0
B: ABS=700 30627
B: MSC=10
B: LED=f

Lakka:~ # udevadm info --name=input/event0
P: /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:0B05:4500.0001/input/input0/event0
N: input/event0
E: DEVNAME=/dev/input/event0
E: DEVPATH=/devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:0B05:4500.0001/input/input0/event0
E: ID_BUS=bluetooth
E: ID_FOR_SEAT=input-platform-soc
E: ID_INPUT=1
E: ID_INPUT_JOYSTICK=1
E: ID_INPUT_KEY=1
E: ID_PATH=platform-soc
E: ID_PATH_TAG=platform-soc
E: MAJOR=13
E: MINOR=64
E: SUBSYSTEM=input
E: TAGS=:seat:uaccess:
E: USEC_INITIALIZED=15311928

And here is a udev rule I had setup (maybe it is wrong):

 cat /etc/udev/rules.d/99-asus-gamepad-controller.rules 
#SUBSYSTEM=="input", ATTRS{name}=="ASUS Gamepad", MODE="666", ENV{ID_INPUT_JOYSTICK}="1"
gouchi commented 5 years ago

No problem, thank you for the log.

Please add the file 99-asus-gamepad-controller.rules in /storage/.config/udev.rules.d/ with this content

SUBSYSTEM=="input",ATTRS{name}=="ASUS Gamepad", MODE="666", ENV{ID_INPUT_JOYSTICK}="1" , ENV{ID_INPUT_KEYBOARD}=""

Then You should reboot or restart udev rules with

udevadm control --reload
udevadm trigger

Thank you.

jmandawg commented 5 years ago

Didn't help, but if i disable "Auto Configuration" in the input settings it's doesn't happen as often. With "auto configuration" turned on the problem is pretty persistent.

jmandawg commented 5 years ago

I'm going to close this out, it works better with "auto configuration" disabled.