pinn icon indicating copy to clipboard operation
pinn copied to clipboard

PiKVM v2 (Pi 4) emulated mouse runs away

Open chriskewl opened this issue 1 month ago • 5 comments


name: PiKVM v2 (Pi 4) emulated mouse runs away about: When using the emulated mouse on the PiKVM v2 it fails to properly work but works fine with a normal Raspberry Pi install


Describe the bug When using the emulated mouse on the PiKVM v2 it fails to properly work but works fine with a normal Raspberry Pi Desktop install

To reproduce Use a PiKVM v2 and try to use a mouse with PINN

Expected behaviour Mouse should work like a normal Raspberry Pi Desktop

Actual behaviour Mouse randomly moves around

System Add answers to the following questions:

  • Which model of Raspberry Pi? e.g. Pi4 with PiKVM v2
  • Which version of PINN? Newest

chriskewl avatar Nov 21 '25 21:11 chriskewl

I don't have a PiKVM to test this.

procount avatar Nov 21 '25 22:11 procount

Would you like me to send the parts for you to test with? I can as long as you send them back when done. Thanks!

chriskewl avatar Nov 22 '25 12:11 chriskewl

That's a very kind offer, but maybe we can do some investigation beforehand.

What is the output of the following commands with and without the PiKVM attached?

ls -R /dev/input

lsusb

lsmod

procount avatar Nov 23 '25 21:11 procount

With PiKVM v2 attached:

pi@raspberrypi:~ $ ls -R /dev/input
/dev/input:
by-id  by-path  event0  event1  event10  event11  event12  event2  event3  event4  event5  event6  event7  event8  event9  js0  mice  mouse0  mouse1

/dev/input/by-id:
usb-KTMicro_KT_USB_Audio_2021-06-07-0000-0000-0000--event-if02  usb-PiKVM_PiKVM_Composite_Device_CAFEBABE-if01-event-mouse  usb-Telink_Wireless_Receiver-event-if00   usb-Telink_Wireless_Receiver-if01-event-kbd
usb-PiKVM_PiKVM_Composite_Device_CAFEBABE-event-kbd             usb-PiKVM_PiKVM_Composite_Device_CAFEBABE-if01-mouse        usb-Telink_Wireless_Receiver-event-mouse  usb-Telink_Wireless_Receiver-mouse

/dev/input/by-path:
platform-107c701400.hdmi-event         platform-xhci-hcd.0-usb-0:2:1.0-event        platform-xhci-hcd.0-usbv2-0:1:1.2-event        platform-xhci-hcd.0-usbv2-0:2:1.1-event-kbd  platform-xhci-hcd.1-usbv2-0:2:1.0-event-kbd
platform-107c706400.hdmi-event         platform-xhci-hcd.0-usb-0:2:1.0-event-mouse  platform-xhci-hcd.0-usbv2-0:2:1.0-event        platform-xhci-hcd.1-usb-0:2:1.0-event-kbd    platform-xhci-hcd.1-usbv2-0:2:1.1-event-mouse
platform-pwr_button-event              platform-xhci-hcd.0-usb-0:2:1.0-mouse        platform-xhci-hcd.0-usbv2-0:2:1.0-event-mouse  platform-xhci-hcd.1-usb-0:2:1.1-event-mouse  platform-xhci-hcd.1-usbv2-0:2:1.1-mouse
platform-xhci-hcd.0-usb-0:1:1.2-event  platform-xhci-hcd.0-usb-0:2:1.1-event-kbd    platform-xhci-hcd.0-usbv2-0:2:1.0-mouse        platform-xhci-hcd.1-usb-0:2:1.1-mouse
pi@raspberrypi:~ $ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 12d1:0010 Huawei Technologies Co., Ltd. KT USB Audio
Bus 001 Device 003: ID 248a:8367 Maxxter Telink Wireless Receiver
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 1d6b:0104 Linux Foundation Multifunction Composite Gadget
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
pi@raspberrypi:~ $ lsmod
Module                  Size  Used by
rfcomm                 81920  2
algif_hash             49152  1
algif_skcipher         49152  1
af_alg                 49152  6 algif_hash,algif_skcipher
bnep                   49152  2
binfmt_misc            49152  1
snd_usb_audio         393216  0
sr_mod                 49152  0
snd_hwdep              49152  1 snd_usb_audio
cdrom                  65536  1 sr_mod
snd_usbmidi_lib        65536  1 snd_usb_audio
aes_ce_blk             49152  4
brcmfmac_wcc           49152  0
sg                     65536  0
spidev                 49152  0
joydev                 49152  0
snd_rawmidi            65536  1 snd_usbmidi_lib
hci_uart               65536  0
btbcm                  49152  1 hci_uart
brcmfmac              376832  1 brcmfmac_wcc
vc4                   425984  4
snd_seq_device         49152  1 snd_rawmidi
bluetooth             671744  27 hci_uart,btbcm,bnep,rfcomm
brcmutil               49152  1 brcmfmac
snd_soc_hdmi_codec     49152  2
aes_ce_cipher          49152  1 aes_ce_blk
ghash_ce               49152  0
drm_display_helper     49152  1 vc4
cfg80211             1064960  1 brcmfmac
cec                    65536  1 vc4
gf128mul               49152  1 ghash_ce
drm_dma_helper         49152  2 vc4
sha2_ce                49152  0
snd_soc_core          327680  2 vc4,snd_soc_hdmi_codec
sha256_arm64           49152  1 sha2_ce
rpi_hevc_dec           65536  0
pisp_be                49152  0
snd_compress           49152  1 snd_soc_core
sha1_ce                49152  0
ecdh_generic           49152  2 bluetooth
v4l2_mem2mem           65536  1 rpi_hevc_dec
snd_pcm_dmaengine      49152  1 snd_soc_core
ecc                    65536  1 ecdh_generic
snd_pcm               163840  5 snd_usb_audio,snd_soc_hdmi_codec,snd_compress,snd_soc_core,snd_pcm_dmaengine
rfkill                 49152  6 bluetooth,cfg80211
videobuf2_dma_contig    49152  2 pisp_be,rpi_hevc_dec
libaes                 49152  4 aes_ce_cipher,bluetooth,ghash_ce,aes_ce_blk
videobuf2_memops       49152  1 videobuf2_dma_contig
snd_timer              65536  1 snd_pcm
videobuf2_v4l2         49152  3 pisp_be,rpi_hevc_dec,v4l2_mem2mem
sha1_generic           49152  1 sha1_ce
videodev              344064  4 pisp_be,rpi_hevc_dec,videobuf2_v4l2,v4l2_mem2mem
snd                   147456  10 snd_seq_device,snd_hwdep,snd_usb_audio,snd_usbmidi_lib,snd_soc_hdmi_codec,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi
raspberrypi_hwmon      49152  0
v3d                   212992  0
videobuf2_common       98304  6 pisp_be,rpi_hevc_dec,videobuf2_dma_contig,videobuf2_v4l2,v4l2_mem2mem,videobuf2_memops
i2c_brcmstb            49152  0
gpu_sched              98304  1 v3d
mc                     81920  7 videodev,snd_usb_audio,pisp_be,rpi_hevc_dec,videobuf2_v4l2,videobuf2_common,v4l2_mem2mem
spi_bcm2835            49152  0
gpio_keys              49152  0
drm_shmem_helper       49152  1 v3d
drm_kms_helper        245760  3 drm_dma_helper,vc4,drm_shmem_helper
pwm_fan                49152  0
rp1_pio                65536  0
rp1_fw                 49152  1 rp1_pio
rp1_mailbox            49152  1
raspberrypi_gpiomem    49152  0
rp1_adc                49152  0
nvmem_rmem             49152  0
sch_fq_codel           49152  3
zram                   65536  1
lz4_compress           49152  1 zram
fuse                  196608  1
drm                   704512  8 gpu_sched,drm_kms_helper,drm_dma_helper,v3d,vc4,drm_shmem_helper,drm_display_helper
drm_panel_orientation_quirks    65536  1 drm
backlight              49152  2 drm_kms_helper,drm
nfnetlink              49152  1
ip_tables              65536  0
x_tables               81920  1 ip_tables
ipv6                  622592  40
uio_pdrv_genirq        49152  0
uio                    49152  1 uio_pdrv_genirq
pi@raspberrypi:~ $

Without:

pi@raspberrypi:~ $ ls -R /dev/input
/dev/input:
by-id  by-path  event0  event1  event10  event2  event3  event4  event5  event6  event7  event8  event9  mice  mouse0

/dev/input/by-id:
usb-KTMicro_KT_USB_Audio_2021-06-07-0000-0000-0000--event-if02  usb-Telink_Wireless_Receiver-event-if00  usb-Telink_Wireless_Receiver-event-mouse  usb-Telink_Wireless_Receiver-if01-event-kbd  usb-Telink_Wireless_Receiver-mouse

/dev/input/by-path:
platform-107c701400.hdmi-event  platform-xhci-hcd.0-usb-0:1:1.2-event        platform-xhci-hcd.0-usb-0:2:1.0-mouse      platform-xhci-hcd.0-usbv2-0:2:1.0-event        platform-xhci-hcd.0-usbv2-0:2:1.1-event-kbd
platform-107c706400.hdmi-event  platform-xhci-hcd.0-usb-0:2:1.0-event        platform-xhci-hcd.0-usb-0:2:1.1-event-kbd  platform-xhci-hcd.0-usbv2-0:2:1.0-event-mouse
platform-pwr_button-event       platform-xhci-hcd.0-usb-0:2:1.0-event-mouse  platform-xhci-hcd.0-usbv2-0:1:1.2-event    platform-xhci-hcd.0-usbv2-0:2:1.0-mouse
pi@raspberrypi:~ $ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 12d1:0010 Huawei Technologies Co., Ltd. KT USB Audio
Bus 001 Device 003: ID 248a:8367 Maxxter Telink Wireless Receiver
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
pi@raspberrypi:~ $ lsmod
Module                  Size  Used by
rfcomm                 81920  2
algif_hash             49152  1
algif_skcipher         49152  1
af_alg                 49152  6 algif_hash,algif_skcipher
bnep                   49152  2
binfmt_misc            49152  1
vc4                   425984  4
snd_soc_hdmi_codec     49152  2
drm_display_helper     49152  1 vc4
cec                    65536  1 vc4
brcmfmac_wcc           49152  0
joydev                 49152  0
brcmfmac              376832  1 brcmfmac_wcc
snd_usb_audio         393216  0
drm_dma_helper         49152  2 vc4
hci_uart               65536  0
spidev                 49152  0
btbcm                  49152  1 hci_uart
snd_soc_core          327680  2 vc4,snd_soc_hdmi_codec
snd_hwdep              49152  1 snd_usb_audio
snd_usbmidi_lib        65536  1 snd_usb_audio
brcmutil               49152  1 brcmfmac
bluetooth             671744  27 hci_uart,btbcm,bnep,rfcomm
snd_rawmidi            65536  1 snd_usbmidi_lib
snd_seq_device         49152  1 snd_rawmidi
aes_ce_blk             49152  4
cfg80211             1064960  1 brcmfmac
aes_ce_cipher          49152  1 aes_ce_blk
ghash_ce               49152  0
gf128mul               49152  1 ghash_ce
snd_compress           49152  1 snd_soc_core
rpi_hevc_dec           65536  0
pisp_be                49152  0
ecdh_generic           49152  2 bluetooth
sha2_ce                49152  0
ecc                    65536  1 ecdh_generic
snd_pcm_dmaengine      49152  1 snd_soc_core
sha256_arm64           49152  1 sha2_ce
snd_pcm               163840  5 snd_usb_audio,snd_soc_hdmi_codec,snd_compress,snd_soc_core,snd_pcm_dmaengine
v4l2_mem2mem           65536  1 rpi_hevc_dec
rfkill                 49152  6 bluetooth,cfg80211
sha1_ce                49152  0
videobuf2_dma_contig    49152  2 pisp_be,rpi_hevc_dec
libaes                 49152  4 aes_ce_cipher,bluetooth,ghash_ce,aes_ce_blk
snd_timer              65536  1 snd_pcm
v3d                   212992  0
videobuf2_memops       49152  1 videobuf2_dma_contig
snd                   147456  10 snd_seq_device,snd_hwdep,snd_usb_audio,snd_usbmidi_lib,snd_soc_hdmi_codec,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi
videobuf2_v4l2         49152  3 pisp_be,rpi_hevc_dec,v4l2_mem2mem
sha1_generic           49152  1 sha1_ce
videodev              344064  4 pisp_be,rpi_hevc_dec,videobuf2_v4l2,v4l2_mem2mem
gpu_sched              98304  1 v3d
videobuf2_common       98304  6 pisp_be,rpi_hevc_dec,videobuf2_dma_contig,videobuf2_v4l2,v4l2_mem2mem,videobuf2_memops
drm_shmem_helper       49152  1 v3d
raspberrypi_hwmon      49152  0
spi_bcm2835            49152  0
i2c_brcmstb            49152  0
drm_kms_helper        245760  3 drm_dma_helper,vc4,drm_shmem_helper
mc                     81920  7 videodev,snd_usb_audio,pisp_be,rpi_hevc_dec,videobuf2_v4l2,videobuf2_common,v4l2_mem2mem
gpio_keys              49152  0
rp1_pio                65536  0
pwm_fan                49152  0
rp1_fw                 49152  1 rp1_pio
raspberrypi_gpiomem    49152  0
rp1_adc                49152  0
rp1_mailbox            49152  1
nvmem_rmem             49152  0
sch_fq_codel           49152  3
zram                   65536  1
lz4_compress           49152  1 zram
fuse                  196608  1
drm                   704512  8 gpu_sched,drm_kms_helper,drm_dma_helper,v3d,vc4,drm_shmem_helper,drm_display_helper
drm_panel_orientation_quirks    65536  1 drm
backlight              49152  2 drm_kms_helper,drm
nfnetlink              49152  1
ip_tables              65536  0
x_tables               81920  1 ip_tables
ipv6                  622592  40
uio_pdrv_genirq        49152  0
uio                    49152  1 uio_pdrv_genirq
pi@raspberrypi:~ $

I do have a USB keyboard attached so I can write via HDMI as well. This still happens without the USB keyboard plugged in.

chriskewl avatar Nov 24 '25 01:11 chriskewl

Am I right in thinking that the PiKVM mouse does follow your movements correctly, but there is an additional drift or random component added to that? Because it looks like the PiKVM is presenting an additional joystick input (js0) which is probably the cause.

procount avatar Nov 24 '25 08:11 procount