pwr-Solaar / Solaar

Linux device manager for Logitech devices
https://pwr-solaar.github.io/Solaar
GNU General Public License v2.0
5.55k stars 411 forks source link

A logi bolt doesn't get detected on Nvidia Orin Nano with JetPack 6 #2215

Closed alllexx88 closed 10 months ago

alllexx88 commented 10 months ago

Information

``` dln0@orin-nano0:~$ .local/bin/solaar show solaar: error: Traceback (most recent call last): File "/home/dln0/.local/lib/python3.10/site-packages/solaar/cli/__init__.py", line 206, in run raise Exception( Exception: No supported device found. Use "lsusb" and "bluetoothctl devices Connected" to list connected devices. dln0@orin-nano0:~$ lsusb Bus 002 Device 002: ID 2109:0822 VIA Labs, Inc. USB3.1 Hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 13d3:3549 IMC Networks Bluetooth Radio Bus 001 Device 008: ID 046d:c548 Logitech, Inc. USB Receiver Bus 001 Device 002: ID 2109:2822 VIA Labs, Inc. USB2.0 Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub ```
``` dln0@orin-nano0:~$ cat ~/.config/solaar/config.yaml cat: /home/dln0/.config/solaar/config.yaml: No such file or directory dln0@orin-nano0:~$ cat ~/.config/solaar/config.json cat: /home/dln0/.config/solaar/config.json: No such file or directory ```

Describe the bug Solaar doesn't detect the logi bolt, and devices connected to it. I suspect this can be a driver issue, since on my Archlinux laptop Solaar works perfectly with the same devices. According to the installation page, Solaar needs a reasonably new kernel with kernel modules hid-logitech-dj and hid-logitech-hidpp loaded, these modules weren't available in JetPack 6.0, I built and loaded them manually:

``` dln0@orin-nano0:~$ lsmod Module Size Used by uinput 28672 0 hid_logitech_hidpp 49152 0 hid_logitech_dj 32768 0 nvidia_modeset 1253376 4 lzo_rle 16384 36 lzo_compress 16384 1 lzo_rle zram 32768 12 zsmalloc 32768 1 zram snd_soc_tegra186_asrc_oot 36864 1 snd_soc_tegra186_arad_oot 24576 2 snd_soc_tegra186_asrc_oot snd_soc_tegra210_mixer_oot 45056 1 snd_soc_tegra210_admaif_oot 118784 1 snd_soc_tegra210_afc_oot 20480 6 snd_soc_tegra210_mvc_oot 20480 2 snd_soc_tegra210_ope_oot 32768 1 snd_soc_tegra_pcm 16384 1 snd_soc_tegra210_admaif_oot snd_soc_tegra210_amx_oot 32768 4 snd_soc_tegra210_dmic_oot 20480 4 snd_soc_tegra210_adx_oot 28672 4 snd_soc_tegra186_dspk_oot 20480 2 snd_soc_tegra210_sfc_oot 57344 4 snd_soc_tegra210_i2s_oot 24576 6 snd_soc_tegra210_ahub_oot 1257472 3 snd_soc_tegra210_sfc_oot,snd_soc_tegra210_ope_oot r8168 495616 0 tegra210_adma 24576 0 spidev 28672 0 nvvrs_pseq_rtc 16384 0 rtk_btusb 73728 0 btusb 49152 0 btrtl 24576 1 btusb btintel 40960 1 btusb btbcm 28672 1 btusb bluetooth 434176 22 btrtl,btintel,btbcm,btusb,rtk_btusb hid_multitouch 28672 0 ecdh_generic 16384 2 bluetooth ecc 32768 1 ecdh_generic snd_soc_tegra_machine_driver_oot 16384 0 crct10dif_ce 20480 1 snd_soc_tegra_utils_oot 28672 2 snd_soc_tegra_machine_driver_oot,snd_soc_tegra210_admaif_oot snd_soc_simple_card_utils 28672 1 snd_soc_tegra_utils_oot tegra234_oc_event 16384 0 nvpmodel_clk_cap 16384 0 fusb301 24576 0 mttcan 65536 0 thermal_trip_event 16384 0 nvpps 28672 1 mttcan can_dev 36864 1 mttcan tegra_cactmon_mc_all 16384 0 tegra194_gte 28672 1 nvpps tegra_aconnect 16384 0 pwm_tegra_tachometer 16384 0 snd_hda_codec_hdmi 61440 1 snd_hda_tegra 20480 0 snd_hda_codec 126976 2 snd_hda_codec_hdmi,snd_hda_tegra rtl8822ce 3022848 0 snd_hda_core 94208 3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_tegra at24 24576 0 bridge 241664 0 cfg80211 729088 1 rtl8822ce rfkill 36864 8 bluetooth,cfg80211 stp 20480 1 bridge llc 20480 2 bridge,stp usb_f_ncm 28672 2 spi_tegra114 28672 0 mc_hwpm 16384 0 usb_f_mass_storage 45056 2 pwm_tegra 20480 1 host1x_fence 24576 0 nvidia 1454080 9 nvidia_modeset nvhost_vi5 20480 0 nvhost_isp5 16384 0 nvhost_nvcsi_t194 16384 0 nvidia_vrs_pseq 16384 0 tegra_bpmp_thermal 16384 0 tegra_dce 98304 2 nvidia tsecriscv 28672 1 nvidia usb_f_acm 16384 2 u_serial 20480 3 usb_f_acm usb_f_rndis 28672 2 u_ether 28672 2 usb_f_rndis,usb_f_ncm libcomposite 61440 16 usb_f_rndis,usb_f_mass_storage,usb_f_acm,usb_f_ncm tegra_camera 217088 3 nvhost_isp5,nvhost_nvcsi_t194,nvhost_vi5 v4l2_dv_timings 36864 1 tegra_camera nvhost_nvcsi 24576 1 tegra_camera tegra_camera_platform 24576 4 nvhost_isp5,nvhost_nvcsi_t194,tegra_camera,nvhost_vi5 capture_ivc 28672 1 tegra_camera tegra_camera_rtcpu 176128 2 capture_ivc,tegra_camera ivc_bus 24576 2 capture_ivc,tegra_camera_rtcpu hsp_mailbox_client 20480 2 ivc_bus,tegra_camera_rtcpu ivc_ext 20480 2 ivc_bus,capture_ivc v4l2_fwnode 20480 1 tegra_camera v4l2_async 20480 2 v4l2_fwnode,tegra_camera videobuf2_dma_contig 24576 1 tegra_camera videobuf2_memops 20480 1 videobuf2_dma_contig videobuf2_v4l2 28672 1 tegra_camera videobuf2_common 61440 4 videobuf2_dma_contig,videobuf2_v4l2,tegra_camera,videobuf2_memops governor_userspace 16384 0 tegra_drm_next 344064 10 tegra_wmark 16384 0 videodev 249856 4 v4l2_async,videobuf2_v4l2,tegra_camera,videobuf2_common nvhost_capture 24576 2 nvhost_isp5,nvhost_vi5 nvhwpm 106496 2 tegra_drm_next,mc_hwpm mc 57344 4 videodev,videobuf2_v4l2,tegra_camera,videobuf2_common host1x_nvhost 40960 8 nvhost_isp5,nvhost_nvcsi_t194,nvidia,tegra_camera,nvhost_capture,nvhost_nvcsi,nvhost_vi5,nvidia_modeset cec 53248 1 tegra_drm_next drm_kms_helper 278528 1 tegra_drm_next ina3221 24576 0 pwm_fan 24576 0 nvgpu 2654208 46 governor_pod_scaling 36864 0 mc_utils 16384 3 nvidia,nvgpu,tegra_camera_platform host1x_next 180224 5 tegra_drm_next,host1x_nvhost,host1x_fence,nvgpu,nvidia_modeset nvmap 204800 266 nvgpu nvsciipc 24576 1 nvmap fuse 126976 5 drm 602112 14 tegra_drm_next,drm_kms_helper,nvidia ip_tables 32768 0 x_tables 45056 1 ip_tables ipv6 471040 125 bridge tegra_xudc 45056 0 ucsi_ccg 28672 0 typec_ucsi 32768 1 ucsi_ccg typec 53248 1 typec_ucsi nvme 45056 1 nvme_core 90112 2 nvme phy_tegra194_p2u 16384 9 pcie_tegra194 40960 0 ```

To Reproduce Steps to reproduce the behavior:

  1. Install Solaar on JetPack 6
  2. Launch with a logi bolt connected

Additional context System log when connecting the HID devices:

dln0@orin-nano0:~$ sudo dmesg|tail
[  348.509744] input: Logitech USB Receiver as /devices/platform/bus@0/3610000.usb/usb1/1-2/1-2.4/1-2.4:1.0/0003:046D:C548.0011/input/input30
[  348.566307] hid-generic 0003:046D:C548.0011: input: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-3610000.usb-2.4/input0
[  348.569786] input: Logitech USB Receiver Mouse as /devices/platform/bus@0/3610000.usb/usb1/1-2/1-2.4/1-2.4:1.1/0003:046D:C548.0012/input/input31
[  348.570807] input: Logitech USB Receiver Consumer Control as /devices/platform/bus@0/3610000.usb/usb1/1-2/1-2.4/1-2.4:1.1/0003:046D:C548.0012/input/input32
[  348.630059] input: Logitech USB Receiver System Control as /devices/platform/bus@0/3610000.usb/usb1/1-2/1-2.4/1-2.4:1.1/0003:046D:C548.0012/input/input33
[  348.630197] input: Logitech USB Receiver as /devices/platform/bus@0/3610000.usb/usb1/1-2/1-2.4/1-2.4:1.1/0003:046D:C548.0012/input/input34
[  348.630275] hid-generic 0003:046D:C548.0012: input: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-3610000.usb-2.4/input1
[  348.633181] hid-generic 0003:046D:C548.0013: device has no listeners, quitting
[  348.640586] input: Logitech USB Receiver as /devices/platform/bus@0/3610000.usb/usb1/1-2/1-2.4/1-2.4:1.3/0003:046D:C548.0014/input/input35
[  348.640728] hid-multitouch 0003:046D:C548.0014: input: USB HID v1.11 Device [Logitech USB Receiver] on usb-3610000.usb-2.4/input3
pfps commented 10 months ago

Solaar version 1.1.10 does support the Bolt receiver.

Run solaar -ddd show when the Bolt receiver is attached to your system. Also run solaar -ddd under the same circumstances. Post the output of both commands.

alllexx88 commented 10 months ago

@pfps thank you for your reply!

I know that Bolt receiver is supported by Solaar 1.1.10, since it works properly on my laptop. I just can't get it to work on the nvidia orin nano microcomputer with jetpack 6.0.

pfps commented 10 months ago

So the problem is likely that hid enumeration isn't working. It looks as if the udev library is present but doesn't find anything. If so, that's a problem with JetPack and nothing that can be fixed inside Solaar. But Solaar runs fine on Ubuntu so I guess JetPack has stripped out parts of Ubuntu.

You could try running solaar -ddd and unplugging and replugging the Bolt receiver. If Solaar does not detect the receiver then your next step is to try to put debug messages in lib/hidapi/udev.py but you will be on your own.

alllexx88 commented 10 months ago

@pfps Thanks again. I did some debugging and find out that the 5.15.122-tegra JetPack 6 kernel is built with # CONFIG_HIDRAW is not set config (yes, there're no /dev/hidraw* devices in the system), _Context().list_devices(subsystem='hidraw') in hidapi/udev.py is always empty because of this.

I'll try to build a kernel from the sources (at least to see if it would get the issue fixed), but then when Nvidia rolls out a kernel upgrade, I'll have to repeat the process, unless they switch HIDRAW support on (I wouldn't count on it) :disappointed:

pfps commented 10 months ago

That certainly looks like the problem. But removing /dev/hidraw* would cause other parts of Linux to not work, such as high-resolution scrolling for select Logitech devices, as far as I can tell. I wonder why this choice was made.

alllexx88 commented 10 months ago

So I built a kernel from the GPL sources with hidraw and hid-logitech-dj, and hid-logitech-hidpp, and uinput (logiops needed it as I found out, so I decided to have it in the kernel too) and now Solaar works perfectly!

It's hard to tell what Nvidia is thinking, maybe it's just that the Jetson devices aren't intended to be used as desktop devices, so they don't really care for advanced HID functionality and such. Who knows :confused:

Thanks again for your help @pfps, I think we can close the issue now :smiley: