JetPack 3.1 kernel source tag problem

As mentioned by @snarky, this is the problem, configuration was incomplete. No CONFIG_LOCALVERSION was set, so modules cannot be found. Modules are searched for in:

/lib/modules/$(uname -r)/

I am going to guess you have:

/lib/modules/4.4.38-tegra/

…and that you do not have:

/lib/modules/4.4.38/

The only thing about config.gz which you must watch out for is that the suffix from CONFIG_LOCALVERSION is not set. So if the original “uname -r” is “4.4.38-tegra”, then CONFIG_LOCALVERSION must be set to “-tegra”, or all modules will be missing (optionally you can install a new module directory).

Yes I only have /lib/modules/4.4.38-tegra.

I will compile the kernel again.

Thanks @linuxdev and @snarky.

Hi, I re-compile the kernel without success.

add the CONFIG_LOCALVERSION

$ cat .config|grep CONFIG_LOCALVERSION
CONFIG_LOCALVERSION="-tegra"
# CONFIG_LOCALVERSION_AUTO is not set

now I have:

$ ls -l  /lib/modules/
drwxrwxr-x 3 root root 4096 Aug 12 22:10 4.4.38-tegra

$ uname -r
4.4.38-tegra

$ sha1sum -c /etc/nv_tegra_release
 
/usr/lib/xorg/modules/extensions/libglx.so: OK
/usr/lib/xorg/modules/drivers/nvidia_drv.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libtegrav4l2.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite_utils.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvparser.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvtx_helper.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvfnetstoredefog.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvos.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcameratools.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvdc.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmedia.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libglx.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvimp.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcamlog.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvll.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvtvmr.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libargus.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvidia-egl-wayland.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvtestresults.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmm_contentpipe.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcam_imageencoder.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmm_parser.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcolorutil.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnveglstream_camconsumer.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvfnet.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvrm.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvddk_2d_v2.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvexif.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite_video.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmm_utils.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvddk_vic.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvfnetstorehdfx.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvodm_imager.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libargus_socketclient.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcamerautils.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvrm_graphics.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvomxilclient.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvtnr.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvavp.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libargus_socketserver.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvrm_gpu.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libscf.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvapputil.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite_image.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvosd.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvomx.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvwinsys.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmm.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnveglstreamproducer.so: OK
/usr/lib/aarch64-linux-gnu/libv4l/plugins/libv4l2_nvvidconv.so: OK
/usr/lib/aarch64-linux-gnu/libv4l/plugins/libv4l2_nvvideocodec.so: OK

but no luck

$ sudo rfkill list
Can't open RFKILL control device: No such file or directory

:/

At this point the modules are correct for location, and I would hope the config you started with is an exact match for the R28.1 kernel (with CONFIG_LOCALVERSION set). However, device special files which rfkill works with may still be missing. What is the output of “ls -l /dev/rfkill”?

do not exist

# ls -l /dev/rfkill
ls: cannot access '/dev/rfkill': No such file or directory

I’m not where I can check right now, but this means you don’t have the driver which produces “/dev/rfkill”, or else a udev rule missed renaming something (the former is most likely).

That shasum command does not verify that the kernel modules are in the correct place.
What does this print?

ls -lR /lib/modules/`uname -r`/

Do you have rfcomm.ko from kernel/net/bluetooth/rfcomm, for example?

yes, I have it

/lib/modules/4.4.38-tegra/kernel/net/bluetooth:
total 12
drwxr-xr-x 2 root root 4096 Aug 12 22:10 bnep
drwxr-xr-x 2 root root 4096 Aug 12 22:10 hidp
drwxr-xr-x 2 root root 4096 Aug 12 22:10 rfcomm

/lib/modules/4.4.38-tegra/kernel/net/bluetooth/bnep:
total 880
-rw-r--r-- 1 root root 900768 Aug 12 22:10 bnep.ko

/lib/modules/4.4.38-tegra/kernel/net/bluetooth/hidp:
total 752
-rw-r--r-- 1 root root 768128 Aug 12 22:10 hidp.ko

/lib/modules/4.4.38-tegra/kernel/net/bluetooth/rfcomm:
total 872
-rw-r--r-- 1 root root 892592 Aug 12 22:10 rfcomm.ko

/lib/modules/4.4.38-tegra/kernel/net/bridge:
total 712
-rw-r--r-- 1 root root 726152 Aug 12 22:10 br_netfilter.ko

Do you actually load the bluetooth module or the wifi module?

I believe that the /dev/rfkill device is exposed by the kernel itself, only when some driver exposing rfkill functionality is loaded.

What does “lsmod” show is loaded?

I thought the wifi was working becase the ui show me the nearest networks
it show this.

# lsmod
Module                  Size  Used by
bnep                   17355  2
bcmdhd               7667931  0

Try “sudo modprobe rfcomm”. Then “ls -l /dev/rfkill”. It could be there was an error in detecting the need to load the module.

nop.

nvidia@tegra-ubuntu:~$ sudo modprobe -v rfcomm
nvidia@tegra-ubuntu:~$ ls -l /dev/rfkill
ls: cannot access '/dev/rfkill': No such file or directory

Does lsmod show rfcomm after modprobe? If not, what is the output of this (path should be correct to rfcomm.ko, but adjust if needed and comment if it differs):

sudo insmod /lib/modules/4.4.38-tegra/kernel/net/bluetooth/rfcomm/rfcomm.ko

NOTE: You may wish to monitor “dmesg --follow” during the insmod.

it shows with lsmod

$ lsmod
Module                  Size  Used by
rfcomm                 60062  0
bnep                   17355  2
bcmdhd               7667931  0

Then the device special file should show up unless there is a udev rule needed and the rule did not trigger. Does anything change when insmod and rmmod of that module and monitor “dmesg --follow”?

this is the demesg --follow
but the /dev/rfkill still missing.

[    7.349186] tegra-pcie 1003000.pcie-controller: link 1 down, retrying
[    7.444748] systemd-journald[225]: Received request to flush runtime journal from PID 1
[    7.658791] xhci-tegra 70090000.xusb: cannot find firmware....retry after 1 second
[    7.763264] tegra-pcie 1003000.pcie-controller: link 1 down, retrying                                                                                                                                                
[    7.773929] random: nonblocking pool is initialized
[    7.778643] tegra-pcie 1003000.pcie-controller: link 1 down, ignoring
[    7.778665] tegra-pcie 1003000.pcie-controller: PCIE: no end points detected
[    7.779697] tegra-pcie 1003000.pcie-controller: PCIE: Disable power rails
[    7.897559] dhd_module_init in
[    7.903521] found wifi platform device bcmdhd_wlan
[    7.922796] Power-up adapter 'DHD generic adapter'
[    7.937006] wifi_platform_set_power = 1
[    8.147251] wifi_platform_bus_enumerate device present 1
[    8.171475] wifi_platform_bus_enumerate device present 0
[    8.182037] F1 signature read @0x18000000=0x17214354
[    8.193260] F1 signature OK, socitype:0x1 chip:0x4354 rev:0x1 pkg:0x2
[    8.202227] DHD: dongle ram size is set to 786432(orig 786432) at 0x180000
[    8.211178] wifi_platform_prealloc: failed to alloc static mem section 7
[    8.219932] wifi_platform_get_mac_addr
[    8.230585] CFG80211-ERROR) wl_setup_wiphy : Registering Vendor80211
[    8.239944] wl_create_event_handler(): thread:wl_event_handler:1f5 started
[    8.239951] CFG80211-ERROR) wl_event_handler : tsk Enter, tsk = 0xffffffc0f2281a70
[    8.258365] dhd_attach(): thread:dhd_watchdog_thread:1f8 started
[    8.258395] dhd_attach(): thread:dhd_dpc:1f9 started
[    8.258425] dhd_attach(): thread:dhd_rxf:1fa started
[    8.258430] dhd_deferred_work_init: work queue initialized 
[    8.258659] Dongle Host Driver, version 1.201.82 (r)
               Compiled in drivers/net/wireless/bcmdhd on Aug 12 2017 at 22:08:49
[    8.259250] tegra_sysfs_register
[    8.259287] Register interface [wlan0]  MAC: 00:04:4b:58:30:2a

[    8.259290] dhd_prot_ioctl : bus is down. we have nothing to do
[    8.259386] sdhci-tegra sdhci-tegra.1: Tuning already done, restoring the best tap value : 77
[    8.260429] wifi_platform_set_power = 0
[    8.666320] xhci-tegra 70090000.xusb: Firmware timestamp: 2016-11-24 02:31:08 UTC, Version: 50.18 release
[    8.668358] xhci-tegra 70090000.xusb: xHCI Host Controller
[    8.668376] xhci-tegra 70090000.xusb: new USB bus registered, assigned bus number 1
[    8.669214] xhci-tegra 70090000.xusb: hcc params 0x0184f525 hci version 0x100 quirks 0x00010810
[    8.669240] xhci-tegra 70090000.xusb: irq 319, io mem 0x70090000
[    8.669358] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    8.669361] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.669364] usb usb1: Product: xHCI Host Controller
[    8.669366] usb usb1: Manufacturer: Linux 4.4.38-tegra xhci-hcd
[    8.669368] usb usb1: SerialNumber: 70090000.xusb
[    8.669910] hub 1-0:1.0: USB hub found
[    8.670052] hub 1-0:1.0: 5 ports detected
[    8.687276] xhci-tegra 70090000.xusb: xHCI Host Controller
[    8.687286] xhci-tegra 70090000.xusb: new USB bus registered, assigned bus number 2
[    8.687422] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    8.687426] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.687428] usb usb2: Product: xHCI Host Controller
[    8.687430] usb usb2: Manufacturer: Linux 4.4.38-tegra xhci-hcd
[    8.687432] usb usb2: SerialNumber: 70090000.xusb
[    8.688785] hub 2-0:1.0: USB hub found
[    8.688950] hub 2-0:1.0: 4 ports detected
[    8.810728] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[    8.810993] 
               Dongle Host Driver, version 1.201.82 (r)
               Compiled in drivers/net/wireless/bcmdhd on Aug 12 2017 at 22:08:49
[    8.810996] wl_android_wifi_on in
[    8.811000] wifi_platform_set_power = 1
[    8.999802] usb 2-1: new SuperSpeed USB device number 2 using xhci-tegra
[    9.025788] usb 2-1: New USB device found, idVendor=0955, idProduct=09ff
[    9.032566] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[    9.039904] usb 2-1: Product: USB 10/100/1000 LAN
[    9.044776] usb 2-1: Manufacturer: Nvidia
[    9.056242] usb 2-1: SerialNumber: 000001000000
[    9.062707] xhci-tegra 70090000.xusb: tegra_xhci_mbox_work mailbox command 6
[    9.072494] xhci-tegra 70090000.xusb: tegra_xhci_mbox_work mailbox command 6
[    9.080031] xhci-tegra 70090000.xusb: tegra_xhci_mbox_work mailbox command 6
[    9.097472] mmc1: queuing unknown CIS tuple 0x80 (5 bytes)
[    9.169541] sdhci-tegra sdhci-tegra.1: Tuning already done, restoring the best tap value : 77
[    9.169898] F1 signature read @0x18000000=0x17214354
[    9.173147] F1 signature OK, socitype:0x1 chip:0x4354 rev:0x1 pkg:0x2
[    9.173596] DHD: dongle ram size is set to 786432(orig 786432) at 0x180000
[    9.200188] usb 2-1: reset SuperSpeed USB device number 2 using xhci-tegra
[    9.220668] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
[    9.262014] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
[    9.263170] wifi_platform_get_mac_addr
[    9.264584] Firmware up: op_mode=0x0005, MAC=00:04:4b:58:30:2a
[    9.269902] dhd_preinit_ioctls pspretend_threshold for HostAPD failed  -23
[    9.274213] Firmware version = wl0: Sep 14 2016 11:38:27 version 7.35.221.18 (r657725) FWID 01-9001dfb5
[    9.276450] dhd_interworking_enable: failed to set WNM info, ret=-23
[    9.276618] tegra_sysfs_on
[    9.331624] r8152 2-1:1.0 eth0: v2.03.3 (2015/01/29)
[    9.331627] r8152 2-1:1.0 eth0: This product is covered by one or more of the following patents:
                        US6,570,884, US6,115,776, and US6,327,625.
               
[    9.399162] tegradc tegradc.1: nominal-pclk:148500000 parent:148500000 div:1.0 pclk:148500000 147015000~161865000
[    9.400067] tegradc tegradc.1: hdmi: pclk:148500K, set prod-setting:prod_c_hdmi_75m_150m
[    9.492158] CFGP2P-ERROR) wl_cfgp2p_add_p2p_disc_if : P2P interface registered
[    9.511109] WLC_E_IF: NO_IF set, event Ignored
[    9.769077] tegradc tegradc.1: nominal-pclk:148500000 parent:148500000 div:1.0 pclk:148500000 147015000~161865000
[    9.771022] tegradc tegradc.1: hdmi: pclk:148500K, set prod-setting:prod_c_hdmi_75m_150m
[    9.891929] cfg80211: World regulatory domain updated:
[    9.897093] cfg80211:  DFS Master region: unset
[    9.901522] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[    9.915467] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[    9.923559] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[    9.923561] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[    9.923564] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[    9.923567] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[    9.923569] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[    9.923571] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[    9.923572] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   10.112319] tegradc tegradc.1: nominal-pclk:148500000 parent:148500000 div:1.0 pclk:148500000 147015000~161865000
[   10.113139] tegradc tegradc.1: hdmi: pclk:148500K, set prod-setting:prod_c_hdmi_75m_150m
[   10.417779] r8152 2-1:1.0 enx00044b58302c: renamed from eth0
[   10.449721] IPv6: ADDRCONF(NETDEV_UP): enx00044b58302c: link is not ready
[   10.535441] IPv6: ADDRCONF(NETDEV_UP): enx00044b58302c: link is not ready
[   12.735715] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   12.753858] Bluetooth: BNEP socket layer initialized
[   13.019343] IPv6: ADDRCONF(NETDEV_CHANGE): enx00044b58302c: link becomes ready
[   13.109793] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
[   13.143144] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
[   13.166799] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
[   13.168558] tegradc tegradc.1: nominal-pclk:148500000 parent:148500000 div:1.0 pclk:148500000 147015000~161865000
[   13.169386] tegradc tegradc.1: hdmi: pclk:148500K, set prod-setting:prod_c_hdmi_75m_150m
[   13.198620] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
[   13.200868] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
[   13.203923] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
[   13.226042] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
[   13.228348] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
[   13.241652] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
[   13.278162] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
[  195.861874] Bluetooth: RFCOMM socket layer initialized
[  195.867370] Bluetooth: RFCOMM ver 1.11

Was the end of that dmesg including the moment you did the insmod or depmod or modprobe which inserted rfkill.ko? Seems it probably was, but do verify that the module shows up after this with “lsmod”.

Run this and see what shows up:

sudo -s
gunzip < /proc/config.gz | egrep '(RFKILL)'
exit

The command should produce this:

CONFIG_RFKILL=y
CONFIG_RFKILL_PM=y
# CONFIG_RFKILL_INPUT is not set
# CONFIG_RFKILL_REGULATOR is not set
# CONFIG_RFKILL_GPIO is not set

yes, it was.

This is my output. (i used zcat /proc/config.gz |egrep ‘(RFKILL)’ , instead)

# CONFIG_RFKILL is not set
# CONFIG_RFKILL_REGULATOR is not set

that means I have to recompile the kernel with those options?

Yes. Apparently your config lost the original default configuration items:

CONFIG_RFKILL=y
CONFIG_RFKILL_PM=y

If the original install had “/proc/config.gz” preserved these would “=y” (“y” implies a direct content of “/boot/Image”, and is not in a module…modules can load but if this is required then the modules will still fail). In this case where you lost the original configuration I would be suspicious of what else might be gone. You could try rebuilding the Image file with those as “y”.

It did work :) thanks for the patience