Insmod successfully but no related dmesg when camera is not plugged in

Hi,
I was testing the loadable kernel module (nv_imx219.ko). There is no sensor moulde plugged in.
Below are my test steps:
1.dtb file is in “/boot/tegra234-p3767-camera-p3768-imx219-dual.dtb”
2. /boot/extlinux/extlinux.conf context => add “OVERLAYS /boot/tegra234-p3767-camera-p3768-imx219-dual.dtb”
3. reboot
4. sudo insmod nv_imx219.ko
5. lsmod: nv_imx219 is existed.
However, when checking with demsg, no nv_imx219 related message. May I know is this reasonable ? Or did I miss any operation steps ?

Thank you.

Hi,

For the camera basic functionality first needs to check the device and driver configuration.
You can reference to below program guide for the detailed information of device tree and driver implementation.
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/SD/CameraDevelopment/SensorSoftwareDriverProgramming.html?highlight=programing#sensor-software-driver-programming

Please refer to Applications Using V4L2 IOCTL Directly by using V4L2 IOCTL to verify basic camera functionality.
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/SD/CameraDevelopment/SensorSoftwareDriverProgramming.html?highlight=programing#to-run-a-v4l2-ctl-test

Once confirm the configure and still failed below link help to get log and some information and some tips for debug.
https://elinux.org/Jetson/l4t/Camera_BringUp#Steps_to_enable_more_debug_messages

Thanks!

Suppose it could be device tree issue.
You may need to dump device tree to confirm it.

Thanks

To avoid it’s caused by my device tree issue, I tired to find a sample to check it. Therefore I test with imx274 which is default in AGX Orin’s device tree

  1. Device tree: .
    device-tree.txt (586.8 KB)
  2. Modify extlinux.conf to configure the dtb overlay:
  3. reboot system
  4. insmod nv_imx274.ko
  5. lsmod and see nv_imx274 existed
  6. sudo dmesg | grep imx → still cannot see the imx274 message

As a beginner in this field, could you provide any debugging advice? Thank you in advance.

Use jetson-io to enable the imx274 to confirm and compare the device tree.

Thanks

I did not mention it clearly. My step2 is already generated by Jetson-IO.

Could you try below.

sudo rmmod nv_imx477
sudo modprobe nv_imx477
sudo dmesg | grep -i imx477

Hi @ShaneCCC ,
I tried to do the above steps, and it says:
modprobe: FATAL: Module nv_imx274.ko not found in directory /lib/modules/5.15.148-tegra.
So I moved nv_imx274.ko to the above directory.
Then I try the commands you mentioned:

sudo rmmod nv_imx274
sudo modprobe nv_imx274
sudo dmesg | grep -i imx274

but still see nothing. Below is the full dmesg log. May I have your help to give me more suggetion? Thank you.
my_dmesg.txt (70.2 KB)

The file should be here.
Do you work on JP6.1?

nvidia@tegra-ubuntu:/lib/modules$ find -name nv_imx274.ko
./5.15.148-tegra/updates/drivers/media/i2c/nv_imx274.ko

Yes. I use JetPack 6.1 and kernel version is 36.4.

I also see imx274 is already in device tree & when I type lsmod nv_imx274 is existed, but still no probe log.


Do you change the kernel Image?

uname -a

it’s 5.15.148-tegra
Screenshot from 2025-01-07 15-39-26
I also try other sensor on jetson-io, for example, imx390/imx185, but all get the same result.

Could you check the log from the UART.

I am sorry I don’t have a UART cable on hand & I also don’t know how to check it currently. Is there other way to check it ? By the way, what is the differnce between checking from terminal and UART ?

Looks like the message redirection to UART.
I didn’t see the new message by dmesg after booted.

May I know is there a way to see new message ? Originally I modified arch/arm64/configs/defconfig to add the following configs:
CONFIG_VIDEO_IMX219=y
CONFIG_VIDEO_V4L2=y
and follow the steps in Kernel Customization — NVIDIA Jetson Linux Developer Guide 1 documentation

  1. Build kernel & install
  2. Build nvidia oot modules & install
  3. Build dtbs & install
  4. flash with SDK manager

After system boot, it appears as what you said , no new dmesg.

Now I rollback the Image file in <install-path>/Linux_for_Tegra/kernel/Image, and flash the device again again. Then I do the above step:
sudo modprobe nv_imx274
However, this time It shows error as this link : Error when loading camera sensor module.
But actually I have built nvidia oot modules earlier, so I am not sure why this happens ?
May I have your suggestions to fix these problem ?

  1. cant’ see normal dmesg after rebuilding kernel
  2. fail to insmod with original image in SDK

[update] BTW, i checked dmesg of the original image, i think it is the same with the dmesg built by me. The only differnce is the original image is failed to insmod, so the error occurs. Maybe its not because no new dmesg update ?
original_image_dmesg.txt (67.4 KB)
new_image_dmesg.txt (70.2 KB)
[update2]
When I plug in/out usb flash, I can see dmesg print new message. It ssems the dmesg is not redirected to other device

What does that mean "i checked dmesg of the original image, i think it is the same with the dmesg built by me. " ?

Your log of “new image” only indicates that your kernel image does not get updated. We are already in 2025 and your “new image log” is using a kernel built from 9/12/2024.

I am sorry ,yesterday i attach wrong file. Could you help me clarify with these information ?

My steps are :

  • rebuild kernel, modules and dtbs (Kernel Customization — NVIDIA Jetson Linux Developer Guide 1 documentation)

  • flash with sdk manager

  • After flashing, on Jetson AGX Orin:
    Open Jetson-io.py → “Configure Jetson AGX CSI Connector” → “Configure for compatible hardware” → “Jetson Camera Dual-IMX274 (I also tried imx185, imx390) → “Save pin changes” → “Save and reboot to reconfigure pins” → press any key
    "tree | /proc/device-trees shows IMX274 is on the device tree.
    device-tree.txt (603.0 KB)

  • Reboot system, insmod or modprobe nv_imx274 → No kernel message occurs.

I also tried to modify nv_imx274. Change to use init function. When insmod, I can see kernel print init function, but there is no probing action.
nv_imx274.c.txt (33.9 KB)
dmesg_0108.txt (67.1 KB)
I also attach my platform, there is no image sensor connected.

I think I have found the cause, the DTSI is not for my agx orin. There is no tca9546 on my agx orin platform.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.