[{"id":38137,"web_url":"https://patchwork.libcamera.org/comment/38137/","msgid":"<20260209000824.GB1987960@killaraus.ideasonboard.com>","date":"2026-02-09T00:08:24","subject":"Re: [PATCH] utils: Introduce libcamera-bug-report","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Sat, Feb 07, 2026 at 11:30:04AM +0000, Kieran Bingham wrote:\n> Introduce a script which can be installed into the system to aide reporting\n> potential camera and media related issues.\n> \n> The script shall capture system information and store it in a temporary\n> file - but it remains the users responsibilty to choose to share this\n> data, and no automatic bug submissions are anticipated.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n> There are many occasions where people would like to report issues with\n> their camera, and there are always a common set of commands that we\n> would like to run to identify potential issues.\n> \n> Provide a helper that will ease reporting of camera related issues\n> especially for bringup of new cameras or when cameras do not show.\n> \n> An example bug report from my system follows, which itself shows a\n> specific bug!\n> \n> $ ./utils/libcamera-bug-report \n> \n> ==================================================\n> Report metadata\n> ==================================================\n> Date: 2026-02-07T11:18:58+00:00\n> Host: Monstersaurus\n> User: uid=1000(kbingham) gid=1000(kbingham) groups=1000(kbingham),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),30(dip),44(video),46(plugdev),108(kvm),121(lpadmin),132(lxd),133(sambashare),135(docker),998(nix-users)\n> \n> ==================================================\n> Kernel & OS\n> ==================================================\n> \n> $ uname -a\n> Linux Monstersaurus 6.8.0-90-generic #91-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 18 14:14:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux\n> \n> $ cat /etc/os-release\n> PRETTY_NAME=\"Ubuntu 24.04.3 LTS\"\n> NAME=\"Ubuntu\"\n> VERSION_ID=\"24.04\"\n> VERSION=\"24.04.3 LTS (Noble Numbat)\"\n> VERSION_CODENAME=noble\n> ID=ubuntu\n> ID_LIKE=debian\n> HOME_URL=\"https://www.ubuntu.com/\"\n> SUPPORT_URL=\"https://help.ubuntu.com/\"\n> BUG_REPORT_URL=\"https://bugs.launchpad.net/ubuntu/\"\n> PRIVACY_POLICY_URL=\"https://www.ubuntu.com/legal/terms-and-policies/privacy-policy\"\n> UBUNTU_CODENAME=noble\n> LOGO=ubuntu-logo\n> \n> $ lsb_release -a\n> Distributor ID:\tUbuntu\n> Description:\tUbuntu 24.04.3 LTS\n> Release:\t24.04\n> Codename:\tnoble\n> \n> ==================================================\n> Media / V4L2 tools\n> ==================================================\n> \n> $ media-ctl --version\n> media-ctl 1.26.1\n> \n> $ v4l2-ctl --version\n> v4l2-ctl 1.26.1\n> \n> $ v4l2-ctl --list-devices\n> vim2m (platform:vim2m):\n> \t/dev/video9\n> \t/dev/media3\n> \n> vimc (platform:vimc):\n> \t/dev/video2\n> \t/dev/video3\n> \t/dev/video4\n> \t/dev/media1\n> \n> vivid (platform:vivid-000):\n> \t/dev/video5\n> \t/dev/video6\n> \t/dev/video7\n> \t/dev/video8\n> \t/dev/radio0\n> \t/dev/radio1\n> \t/dev/vbi0\n> \t/dev/vbi1\n> \t/dev/swradio0\n> \t/dev/v4l-touch0\n> \t/dev/media2\n> \n> Logitech BRIO (usb-0000:0d:00.3-3.4):\n> \t/dev/video0\n> \t/dev/video1\n> \t/dev/media0\n> \n> ==================================================\n> Device nodes\n> ==================================================\n> \n> $ ls -l /dev/video0 /dev/video1 /dev/video2 /dev/video3 /dev/video4 /dev/video5 /dev/video6 /dev/video7 /dev/video8 /dev/video9 /dev/v4l-subdev0 /dev/v4l-subdev1 /dev/v4l-subdev2 /dev/v4l-subdev3 /dev/v4l-subdev4 /dev/v4l-subdev5 /dev/v4l-subdev6 /dev/v4l-subdev7 /dev/v4l-touch0 /dev/media0 /dev/media1 /dev/media2 /dev/media3\n> crw-rw----+ 1 root video 234,  0 Jan 14 23:56 /dev/media0\n> crw-rw----+ 1 root video 234,  1 Jan 14 23:56 /dev/media1\n> crw-rw----+ 1 root video 234,  2 Jan 14 23:56 /dev/media2\n> crw-rw----+ 1 root video 234,  3 Jan 14 23:56 /dev/media3\n> crw-rw----+ 1 root video  81,  5 Jan 14 23:56 /dev/v4l-subdev0\n> crw-rw----+ 1 root video  81,  6 Jan 14 23:56 /dev/v4l-subdev1\n> crw-rw----+ 1 root video  81,  7 Jan 14 23:56 /dev/v4l-subdev2\n> crw-rw----+ 1 root video  81,  8 Jan 14 23:56 /dev/v4l-subdev3\n> crw-rw----+ 1 root video  81,  9 Jan 14 23:56 /dev/v4l-subdev4\n> crw-rw----+ 1 root video  81, 10 Jan 14 23:56 /dev/v4l-subdev5\n> crw-rw----+ 1 root video  81, 11 Jan 14 23:56 /dev/v4l-subdev6\n> crw-rw----+ 1 root video  81, 12 Jan 14 23:56 /dev/v4l-subdev7\n> crw-rw----+ 1 root video  81, 22 Jan 14 23:56 /dev/v4l-touch0\n> crw-rw----+ 1 root video  81,  0 Jan 14 23:56 /dev/video0\n> crw-rw----+ 1 root video  81,  1 Jan 14 23:56 /dev/video1\n> crw-rw----+ 1 root video  81,  2 Jan 14 23:56 /dev/video2\n> crw-rw----+ 1 root video  81,  3 Jan 14 23:56 /dev/video3\n> crw-rw----+ 1 root video  81,  4 Jan 14 23:56 /dev/video4\n> crw-rw----+ 1 root video  81, 13 Jan 14 23:56 /dev/video5\n> crw-rw----+ 1 root video  81, 14 Jan 14 23:56 /dev/video6\n> crw-rw----+ 1 root video  81, 20 Jan 14 23:56 /dev/video7\n> crw-rw----+ 1 root video  81, 21 Jan 14 23:56 /dev/video8\n> crw-rw----+ 1 root video  81, 23 Jan 14 23:56 /dev/video9\n> \n> $ grep . /sys/class/video4linux/radio0/name /sys/class/video4linux/radio1/name /sys/class/video4linux/swradio0/name /sys/class/video4linux/v4l-subdev0/name /sys/class/video4linux/v4l-subdev1/name /sys/class/video4linux/v4l-subdev2/name /sys/class/video4linux/v4l-subdev3/name /sys/class/video4linux/v4l-subdev4/name /sys/class/video4linux/v4l-subdev5/name /sys/class/video4linux/v4l-subdev6/name /sys/class/video4linux/v4l-subdev7/name /sys/class/video4linux/v4l-touch0/name /sys/class/video4linux/vbi0/name /sys/class/video4linux/vbi1/name /sys/class/video4linux/video0/name /sys/class/video4linux/video1/name /sys/class/video4linux/video2/name /sys/class/video4linux/video3/name /sys/class/video4linux/video4/name /sys/class/video4linux/video5/name /sys/class/video4linux/video6/name /sys/class/video4linux/video7/name /sys/class/video4linux/video8/name /sys/class/video4linux/video9/name\n> /sys/class/video4linux/radio0/name:vivid-000-rad-rx\n> /sys/class/video4linux/radio1/name:vivid-000-rad-tx\n> /sys/class/video4linux/swradio0/name:vivid-000-sdr-cap\n> /sys/class/video4linux/v4l-subdev0/name:Sensor A\n> /sys/class/video4linux/v4l-subdev1/name:Sensor B\n> /sys/class/video4linux/v4l-subdev2/name:Debayer A\n> /sys/class/video4linux/v4l-subdev3/name:Debayer B\n> /sys/class/video4linux/v4l-subdev4/name:RGB/YUV Input\n> /sys/class/video4linux/v4l-subdev5/name:Scaler\n> /sys/class/video4linux/v4l-subdev6/name:Lens A\n> /sys/class/video4linux/v4l-subdev7/name:Lens B\n> /sys/class/video4linux/v4l-touch0/name:vivid-000-touch-cap\n> /sys/class/video4linux/vbi0/name:vivid-000-vbi-cap\n> /sys/class/video4linux/vbi1/name:vivid-000-vbi-out\n> /sys/class/video4linux/video0/name:Logitech BRIO\n> /sys/class/video4linux/video1/name:Logitech BRIO\n> /sys/class/video4linux/video2/name:Raw Capture 0\n> /sys/class/video4linux/video3/name:Raw Capture 1\n> /sys/class/video4linux/video4/name:RGB/YUV Capture\n> /sys/class/video4linux/video5/name:vivid-000-vid-cap\n> /sys/class/video4linux/video6/name:vivid-000-vid-out\n> /sys/class/video4linux/video7/name:vivid-000-meta-cap\n> /sys/class/video4linux/video8/name:vivid-000-meta-out\n> /sys/class/video4linux/video9/name:vim2m\n> \n> ==================================================\n> Deferred devices\n> ==================================================\n> \n> $ cat /sys/kernel/debug/devices_deferred\n> cat: /sys/kernel/debug/devices_deferred: Permission denied\n> [WARN] Command failed: cat /sys/kernel/debug/devices_deferred\n> \n> ==================================================\n> V4L2 async pending subdevices\n> ==================================================\n> \n> $ cat /sys/kernel/debug/v4l2-async/pending_async_subdevices\n> cat: /sys/kernel/debug/v4l2-async/pending_async_subdevices: Permission denied\n> [WARN] Command failed: cat /sys/kernel/debug/v4l2-async/pending_async_subdevices\n> \n> ==================================================\n> Media graph topology\n> ==================================================\n> \n> Parsing /dev/media0\n> \n> $ media-ctl -p /dev/media0\n> Media controller API version 6.8.12\n> \n> Media device information\n> ------------------------\n> driver          uvcvideo\n> model           Logitech BRIO\n> serial          61306147\n> bus info        usb-0000:0d:00.3-3.4\n> hw revision     0x17\n> driver version  6.8.12\n> \n> Device topology\n> - entity 1: Logitech BRIO (1 pad, 1 link)\n>             type Node subtype V4L flags 1\n>             device node name /dev/video0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \n> - entity 4: Logitech BRIO (0 pad, 0 link)\n>             type Node subtype V4L flags 0\n>             device node name /dev/video1\n> \n> - entity 8: Processing 3 (2 pads, 8 links, 0 routes)\n>             type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Camera 1\":0 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \t\t-> \"Logitech BRIO\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 14\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 6\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 8\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 9\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 10\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 11\":0 [ENABLED,IMMUTABLE]\n> \n> - entity 11: Extension 14 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 14: Extension 6 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 17: Extension 8 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 20: Extension 9 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 23: Extension 10 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 26: Extension 11 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 29: Camera 1 (1 pad, 1 link, 0 routes)\n>              type V4L2 subdev subtype Sensor flags 0\n> \tpad0: Source\n> \t\t-> \"Processing 3\":0 [ENABLED,IMMUTABLE]\n> \n> Parsing /dev/media1\n> \n> $ media-ctl -p /dev/media1\n> Media controller API version 6.8.12\n> \n> Media device information\n> ------------------------\n> driver          uvcvideo\n> model           Logitech BRIO\n> serial          61306147\n> bus info        usb-0000:0d:00.3-3.4\n> hw revision     0x17\n> driver version  6.8.12\n> \n> Device topology\n> - entity 1: Logitech BRIO (1 pad, 1 link)\n>             type Node subtype V4L flags 1\n>             device node name /dev/video0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \n> - entity 4: Logitech BRIO (0 pad, 0 link)\n>             type Node subtype V4L flags 0\n>             device node name /dev/video1\n> \n> - entity 8: Processing 3 (2 pads, 8 links, 0 routes)\n>             type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Camera 1\":0 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \t\t-> \"Logitech BRIO\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 14\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 6\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 8\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 9\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 10\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 11\":0 [ENABLED,IMMUTABLE]\n> \n> - entity 11: Extension 14 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 14: Extension 6 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 17: Extension 8 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 20: Extension 9 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 23: Extension 10 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 26: Extension 11 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 29: Camera 1 (1 pad, 1 link, 0 routes)\n>              type V4L2 subdev subtype Sensor flags 0\n> \tpad0: Source\n> \t\t-> \"Processing 3\":0 [ENABLED,IMMUTABLE]\n> \n> Parsing /dev/media2\n> \n> $ media-ctl -p /dev/media2\n> Media controller API version 6.8.12\n> \n> Media device information\n> ------------------------\n> driver          uvcvideo\n> model           Logitech BRIO\n> serial          61306147\n> bus info        usb-0000:0d:00.3-3.4\n> hw revision     0x17\n> driver version  6.8.12\n> \n> Device topology\n> - entity 1: Logitech BRIO (1 pad, 1 link)\n>             type Node subtype V4L flags 1\n>             device node name /dev/video0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \n> - entity 4: Logitech BRIO (0 pad, 0 link)\n>             type Node subtype V4L flags 0\n>             device node name /dev/video1\n> \n> - entity 8: Processing 3 (2 pads, 8 links, 0 routes)\n>             type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Camera 1\":0 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \t\t-> \"Logitech BRIO\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 14\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 6\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 8\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 9\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 10\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 11\":0 [ENABLED,IMMUTABLE]\n> \n> - entity 11: Extension 14 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 14: Extension 6 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 17: Extension 8 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 20: Extension 9 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 23: Extension 10 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 26: Extension 11 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 29: Camera 1 (1 pad, 1 link, 0 routes)\n>              type V4L2 subdev subtype Sensor flags 0\n> \tpad0: Source\n> \t\t-> \"Processing 3\":0 [ENABLED,IMMUTABLE]\n> \n> Parsing /dev/media3\n> \n> $ media-ctl -p /dev/media3\n> Media controller API version 6.8.12\n> \n> Media device information\n> ------------------------\n> driver          uvcvideo\n> model           Logitech BRIO\n> serial          61306147\n> bus info        usb-0000:0d:00.3-3.4\n> hw revision     0x17\n> driver version  6.8.12\n> \n> Device topology\n> - entity 1: Logitech BRIO (1 pad, 1 link)\n>             type Node subtype V4L flags 1\n>             device node name /dev/video0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \n> - entity 4: Logitech BRIO (0 pad, 0 link)\n>             type Node subtype V4L flags 0\n>             device node name /dev/video1\n> \n> - entity 8: Processing 3 (2 pads, 8 links, 0 routes)\n>             type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Camera 1\":0 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \t\t-> \"Logitech BRIO\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 14\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 6\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 8\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 9\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 10\":0 [ENABLED,IMMUTABLE]\n> \t\t-> \"Extension 11\":0 [ENABLED,IMMUTABLE]\n> \n> - entity 11: Extension 14 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 14: Extension 6 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 17: Extension 8 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 20: Extension 9 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 23: Extension 10 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 26: Extension 11 (2 pads, 1 link, 0 routes)\n>              type V4L2 subdev subtype Unknown flags 0\n> \tpad0: Sink\n> \t\t<- \"Processing 3\":1 [ENABLED,IMMUTABLE]\n> \tpad1: Source\n> \n> - entity 29: Camera 1 (1 pad, 1 link, 0 routes)\n>              type V4L2 subdev subtype Sensor flags 0\n> \tpad0: Source\n> \t\t-> \"Processing 3\":0 [ENABLED,IMMUTABLE]\n> \n> ==================================================\n> libcamera & userspace\n> ==================================================\n> \n> $ which cam\n> /usr/bin/cam\n> \n> $ ldd /usr/bin/cam\n> \tlinux-vdso.so.1 (0x00007fffea592000)\n> \tlibcamera.so.0.6 => /lib/x86_64-linux-gnu/libcamera.so.0.6 (0x0000799515800000)\n> \tlibcamera-base.so.0.6 => /lib/x86_64-linux-gnu/libcamera-base.so.0.6 (0x0000799516122000)\n> \tlibdrm.so.2 => /lib/x86_64-linux-gnu/libdrm.so.2 (0x000079951610b000)\n> \tlibevent_pthreads-2.1.so.7 => /lib/x86_64-linux-gnu/libevent_pthreads-2.1.so.7 (0x0000799516106000)\n> \tlibevent-2.1.so.7 => /lib/x86_64-linux-gnu/libevent-2.1.so.7 (0x00007995160b4000)\n> \tlibjpeg.so.8 => /lib/x86_64-linux-gnu/libjpeg.so.8 (0x000079951602f000)\n> \tlibSDL2-2.0.so.0 => /lib/x86_64-linux-gnu/libSDL2-2.0.so.0 (0x0000799515624000)\n> \tlibtiff.so.5 => not found\n> \tlibyaml-0.so.2 => /lib/x86_64-linux-gnu/libyaml-0.so.2 (0x000079951600e000)\n> \tlibstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x0000799515200000)\n> \tlibgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007995155f6000)\n> \tlibc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000799514e00000)\n> \tlibyuv.so.0 => /lib/x86_64-linux-gnu/libyuv.so.0 (0x000079951555e000)\n> \tlibgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x0000799514c06000)\n> \tliblttng-ust.so.1 => /lib/x86_64-linux-gnu/liblttng-ust.so.1 (0x00007995154db000)\n> \tlibudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007995154a8000)\n> \tlibm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x0000799515117000)\n> \tlibdw.so.1 => /lib/x86_64-linux-gnu/libdw.so.1 (0x0000799515063000)\n> \tlibunwind.so.8 => /lib/x86_64-linux-gnu/libunwind.so.8 (0x0000799515fef000)\n> \t/lib64/ld-linux-x86-64.so.2 (0x0000799516311000)\n> \tlibevent_core-2.1.so.7 => /lib/x86_64-linux-gnu/libevent_core-2.1.so.7 (0x000079951502e000)\n> \tlibasound.so.2 => /lib/x86_64-linux-gnu/libasound.so.2 (0x0000799514afc000)\n> \tlibpulse.so.0 => /lib/x86_64-linux-gnu/libpulse.so.0 (0x0000799514aab000)\n> \tlibsamplerate.so.0 => /lib/x86_64-linux-gnu/libsamplerate.so.0 (0x000079951493c000)\n> \tlibX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007995147ff000)\n> \tlibXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x0000799515494000)\n> \tlibXcursor.so.1 => /lib/x86_64-linux-gnu/libXcursor.so.1 (0x0000799515fe1000)\n> \tlibXi.so.6 => /lib/x86_64-linux-gnu/libXi.so.6 (0x0000799515481000)\n> \tlibXfixes.so.3 => /lib/x86_64-linux-gnu/libXfixes.so.3 (0x0000799515026000)\n> \tlibXrandr.so.2 => /lib/x86_64-linux-gnu/libXrandr.so.2 (0x0000799515019000)\n> \tlibXss.so.1 => /lib/x86_64-linux-gnu/libXss.so.1 (0x0000799515014000)\n> \tlibgbm.so.1 => /lib/x86_64-linux-gnu/libgbm.so.1 (0x00007995147f8000)\n> \tlibwayland-egl.so.1 => /lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007995147f3000)\n> \tlibwayland-client.so.0 => /lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007995147e3000)\n> \tlibwayland-cursor.so.0 => /lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007995147d9000)\n> \tlibxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x0000799514790000)\n> \tlibdecor-0.so.0 => /lib/x86_64-linux-gnu/libdecor-0.so.0 (0x0000799514785000)\n> \tlibp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007995145e1000)\n> \tlibidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007995145bf000)\n> \tlibunistring.so.5 => /lib/x86_64-linux-gnu/libunistring.so.5 (0x0000799514412000)\n> \tlibtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007995143fa000)\n> \tlibnettle.so.8 => /lib/x86_64-linux-gnu/libnettle.so.8 (0x00007995143a5000)\n> \tlibhogweed.so.6 => /lib/x86_64-linux-gnu/libhogweed.so.6 (0x000079951435d000)\n> \tlibgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007995142d9000)\n> \tlibnuma.so.1 => /lib/x86_64-linux-gnu/libnuma.so.1 (0x00007995142cb000)\n> \tliblttng-ust-common.so.1 => /lib/x86_64-linux-gnu/liblttng-ust-common.so.1 (0x00007995142bc000)\n> \tliblttng-ust-tracepoint.so.1 => /lib/x86_64-linux-gnu/liblttng-ust-tracepoint.so.1 (0x000079951429f000)\n> \tlibcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x0000799514292000)\n> \tlibelf.so.1 => /lib/x86_64-linux-gnu/libelf.so.1 (0x0000799514273000)\n> \tlibz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x0000799514257000)\n> \tlibzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x000079951419b000)\n> \tliblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x0000799514169000)\n> \tlibbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x0000799514155000)\n> \tlibpulsecommon-16.1.so => /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-16.1.so (0x00007995140d7000)\n> \tlibdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x0000799514088000)\n> \tlibxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x000079951405d000)\n> \tlibXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x0000799514051000)\n> \tlibexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x0000799514025000)\n> \tlibffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x0000799514019000)\n> \tlibsndfile.so.1 => /lib/x86_64-linux-gnu/libsndfile.so.1 (0x0000799513f8f000)\n> \tlibX11-xcb.so.1 => /lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x0000799513f8a000)\n> \tlibsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x0000799513eaa000)\n> \tlibasyncns.so.0 => /lib/x86_64-linux-gnu/libasyncns.so.0 (0x0000799513ea2000)\n> \tlibapparmor.so.1 => /lib/x86_64-linux-gnu/libapparmor.so.1 (0x0000799513e8e000)\n> \tlibXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x0000799513e86000)\n> \tlibXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x0000799513e7e000)\n> \tlibFLAC.so.12 => /lib/x86_64-linux-gnu/libFLAC.so.12 (0x0000799513e1a000)\n> \tlibvorbis.so.0 => /lib/x86_64-linux-gnu/libvorbis.so.0 (0x0000799513dec000)\n> \tlibvorbisenc.so.2 => /lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x0000799513d41000)\n> \tlibopus.so.0 => /lib/x86_64-linux-gnu/libopus.so.0 (0x0000799513ce0000)\n> \tlibogg.so.0 => /lib/x86_64-linux-gnu/libogg.so.0 (0x0000799513cd6000)\n> \tlibmpg123.so.0 => /lib/x86_64-linux-gnu/libmpg123.so.0 (0x0000799513c7a000)\n> \tlibmp3lame.so.0 => /lib/x86_64-linux-gnu/libmp3lame.so.0 (0x0000799513c04000)\n> \tlibgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x0000799513abc000)\n> \tliblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x0000799513a98000)\n> \tlibbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x0000799513a82000)\n> \tlibgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x0000799513a5d000)\n> \tlibmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x0000799513a4e000)\n> \n> ==================================================\n> libcamera probe (cam -l)\n> ==================================================\n> [INFO] /dev/kmsg not writable, skipping kernel marker: BEGIN cam -l\n> \n> $ cam -l\n> cam: error while loading shared libraries: libtiff.so.5: cannot open shared object file: No such file or directory\n> [WARN] Command failed: cam -l\n> [INFO] /dev/kmsg not writable, skipping kernel marker: END cam -l\n> \n> ==================================================\n> Kernel log (post cam -l)\n> ==================================================\n> \n> $ dmesg\n> dmesg: read kernel buffer failed: Operation not permitted\n> [WARN] Command failed: dmesg\n\nThis is quite common. I wonder if we shouldn't skip writing the report\nto stdout, and only print warnings, to ensure they get noticed.\n\nAs for how to fix this problem, I'm not entirely sure. I don't want to\nhide a sudo within the script, at least not one that is run by default.\nI also don't want to tell people to run this as root. One option could\nbe to add a parameter to the script to run \"sudo dmesg\" instead of\n\"dmesg\", and mention the option in the warning message.\n\n> \n> ==================================================\n> Permissions & capabilities\n> ==================================================\n> \n> $ id\n> uid=1000(kbingham) gid=1000(kbingham) groups=1000(kbingham),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),30(dip),44(video),46(plugdev),108(kvm),121(lpadmin),132(lxd),133(sambashare),135(docker),998(nix-users)\n> \n> $ groups\n> kbingham adm dialout cdrom sudo audio dip video plugdev kvm lpadmin lxd sambashare docker nix-users\n> \n> $ getcap /usr/bin/cam\n> \n> ==================================================\n> End of report\n> ==================================================\n> Report saved to libcamera-report-Monstersaurus-20260207-111858.txt\n\nI would be way more vocal here about the need to inspect the report and\nensure there's no sensitive information before sending it.\n\n> ---\n>  utils/libcamera-bug-report | 79 ++++++++++++++++++++++++++++++++++++++++++++++\n>  utils/meson.build          |  7 ++++\n>  2 files changed, 86 insertions(+)\n> \n> diff --git a/utils/libcamera-bug-report b/utils/libcamera-bug-report\n> new file mode 100755\n> index 000000000000..72b89b646007\n> --- /dev/null\n> +++ b/utils/libcamera-bug-report\n> @@ -0,0 +1,79 @@\n> +#!/usr/bin/env bash\n\nI don't think we can reasonably expect bash to be present. It's common\nin embedded environment to use other shells. Is there anything specific\nyou need from bash, or could we use /bin/sh ?\n\n> +# SPDX-License-Identifier: LGPL-2.1-or-later\n> +\n> +REPORT=\"libcamera-report-$(hostname)-$(date +%Y%m%d-%H%M%S).txt\"\n> +\n> +exec > >(tee \"$REPORT\") 2>&1\n> +\n> +section() {\n> +    echo\n> +    echo \"==================================================\"\n> +    echo \"$1\"\n> +    echo \"==================================================\"\n> +}\n> +\n> +run() {\n> +    echo\n> +    echo \"\\$ $*\"\n> +    \"$@\" || echo \"[WARN] Command failed: $*\"\n> +}\n> +\n> +mark_kmsg() {\n> +    if [ -w /dev/kmsg ]; then\n> +        echo \"libcamera-debug-report[$$]: $1\" > /dev/kmsg\n> +    else\n> +        echo \"[INFO] /dev/kmsg not writable, skipping kernel marker: $1\"\n> +    fi\n> +}\n> +\n> +section \"Report metadata\"\n> +echo \"Date: $(date -Is)\"\n> +echo \"Host: $(hostname)\"\n> +echo \"User: $(id)\"\n> +\n> +section \"Kernel & OS\"\n> +run uname -a\n> +run cat /etc/os-release\n> +command -v lsb_release >/dev/null && run lsb_release -a\n> +\n> +section \"Media / V4L2 tools\"\n> +command -v media-ctl >/dev/null && run media-ctl --version\n> +command -v v4l2-ctl >/dev/null && run v4l2-ctl --version\n> +command -v v4l2-ctl >/dev/null && run v4l2-ctl --list-devices\n> +\n> +section \"Device nodes\"\n> +run ls -l /dev/video* /dev/v4l-* /dev/media* 2>/dev/null\n> +run grep . /sys/class/video4linux/*/name\n> +\n> +section \"Deferred devices\"\n> +run cat /sys/kernel/debug/devices_deferred\n> +\n> +section \"V4L2 async pending subdevices\"\n> +run cat /sys/kernel/debug/v4l2-async/pending_async_subdevices\n> +\n> +section \"Media graph topology\"\n> +for m in /dev/media*; do\n> +    echo\n> +    echo \"Parsing $m\"\n> +    command -v media-ctl >/dev/null && run media-ctl -p \"$m\"\n\nI'm tempted to make media-ctl a hard dependency and print a warning.\n\nWe could avoid v4l2-ctl as a dependency, but as it should come from the\nsame package as media-ctl, I suppose it's fine.\n\n> +done\n> +\n> +section \"libcamera & userspace\"\n> +run which cam\n> +command -v cam >/dev/null && run ldd `which cam`\n> +\n> +section \"libcamera probe (cam -l)\"\n> +mark_kmsg \"BEGIN cam -l\"\n> +LIBCAMERA_LOG_LEVELS=*:0 run cam -l\n> +mark_kmsg \"END cam -l\"\n> +\n> +section \"Kernel log (post cam -l)\"\n> +run dmesg\n> +\n> +section \"Permissions & capabilities\"\n> +run id\n> +run groups\n> +command -v getcap >/dev/null && run getcap \"$(which cam)\"\n> +\n> +section \"End of report\"\n> +echo \"Report saved to $REPORT\"\n> diff --git a/utils/meson.build b/utils/meson.build\n> index 3deed8ad4d7e..1a9203f81763 100644\n> --- a/utils/meson.build\n> +++ b/utils/meson.build\n> @@ -7,3 +7,10 @@ gen_shader_headers = files('gen-shader-headers.sh')\n>  \n>  ## Module signing\n>  gen_ipa_priv_key = files('gen-ipa-priv-key.sh')\n> +\n> +## Bug reporting utility\n> +install_data(\n> +    'libcamera-debug-report',\n\nThe file is called \"libcamera-bug-report\", not \"libcamera-debug-report\".\nHave you tested installation ? :-)\n\n> +    install_dir: get_option('bindir'),\n> +    install_mode: 'rwxr-xr-x',\n\nThis shouldn't be needed as the file is already executable.\n\n> +)\n> \n> ---\n> base-commit: c6c5a8bc5b90e476cba806cfcccc704ef115d2aa\n> change-id: 20260207-kbingham-bug-reporter-60285cd034af","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id DA358C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  9 Feb 2026 00:08:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 02BF4620AE;\n\tMon,  9 Feb 2026 01:08:27 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B8F7A615B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Feb 2026 01:08:25 +0100 (CET)","from killaraus.ideasonboard.com\n\t(2001-14ba-703d-e500--2a1.rev.dnainternet.fi\n\t[IPv6:2001:14ba:703d:e500::2a1])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 188B2C6C;\n\tMon,  9 Feb 2026 01:07:40 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"LRFfLmg9\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1770595660;\n\tbh=8Ihrg4jJX7k/Zc1NyfyoMlljxOVdqpHnAHDq81WLUCc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=LRFfLmg9yV7XqIiXAX4Werzosq0SqVovDndGpVK8VlyFpwxGR3RK2OdWkdC85PznT\n\tESp0XsyCbZ6l65tFUdjLhhoGYDyl/fLZsIbihj0KzRR2FJRqgc7Goha0QVf9B/h8kp\n\t09FqIu+BElNR//O0KyVkRN0BTzBB8bY0CYqn1WFM=","Date":"Mon, 9 Feb 2026 02:08:24 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH] utils: Introduce libcamera-bug-report","Message-ID":"<20260209000824.GB1987960@killaraus.ideasonboard.com>","References":"<20260207-kbingham-bug-reporter-v1-1-42f81e4ce5dc@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20260207-kbingham-bug-reporter-v1-1-42f81e4ce5dc@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38141,"web_url":"https://patchwork.libcamera.org/comment/38141/","msgid":"<177062857413.1808100.17618002780010975498@ping.linuxembedded.co.uk>","date":"2026-02-09T09:16:14","subject":"Re: [PATCH] utils: Introduce libcamera-bug-report","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2026-02-09 00:08:24)\n> On Sat, Feb 07, 2026 at 11:30:04AM +0000, Kieran Bingham wrote:\n> > Introduce a script which can be installed into the system to aide reporting\n> > potential camera and media related issues.\n> > \n> > The script shall capture system information and store it in a temporary\n> > file - but it remains the users responsibilty to choose to share this\n> > data, and no automatic bug submissions are anticipated.\n> > \n> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > ---\n> > There are many occasions where people would like to report issues with\n> > their camera, and there are always a common set of commands that we\n> > would like to run to identify potential issues.\n> > \n> > Provide a helper that will ease reporting of camera related issues\n> > especially for bringup of new cameras or when cameras do not show.\n> > \n> > An example bug report from my system follows, which itself shows a\n> > specific bug!\n> > \n> > $ ./utils/libcamera-bug-report \n> > \n\n...\n\n> > cam: error while loading shared libraries: libtiff.so.5: cannot open shared object file: No such file or directory\n> > [WARN] Command failed: cam -l\n> > [INFO] /dev/kmsg not writable, skipping kernel marker: END cam -l\n> > \n> > ==================================================\n> > Kernel log (post cam -l)\n> > ==================================================\n> > \n> > $ dmesg\n> > dmesg: read kernel buffer failed: Operation not permitted\n> > [WARN] Command failed: dmesg\n> \n> This is quite common. I wonder if we shouldn't skip writing the report\n> to stdout, and only print warnings, to ensure they get noticed.\n> \n> As for how to fix this problem, I'm not entirely sure. I don't want to\n> hide a sudo within the script, at least not one that is run by default.\n> I also don't want to tell people to run this as root. One option could\n> be to add a parameter to the script to run \"sudo dmesg\" instead of\n> \"dmesg\", and mention the option in the warning message.\n\nIndeed, I intentionally didn't want any sudo in the script. I assume we\ncan let the user choose to run as sudo after having run once ?\n\n\n\n\n> > \n> > ==================================================\n> > Permissions & capabilities\n> > ==================================================\n> > \n> > $ id\n> > uid=1000(kbingham) gid=1000(kbingham) groups=1000(kbingham),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),30(dip),44(video),46(plugdev),108(kvm),121(lpadmin),132(lxd),133(sambashare),135(docker),998(nix-users)\n> > \n> > $ groups\n> > kbingham adm dialout cdrom sudo audio dip video plugdev kvm lpadmin lxd sambashare docker nix-users\n> > \n> > $ getcap /usr/bin/cam\n> > \n> > ==================================================\n> > End of report\n> > ==================================================\n> > Report saved to libcamera-report-Monstersaurus-20260207-111858.txt\n> \n> I would be way more vocal here about the need to inspect the report and\n> ensure there's no sensitive information before sending it.\n\nAck\n\n\n\n> \n> > ---\n> >  utils/libcamera-bug-report | 79 ++++++++++++++++++++++++++++++++++++++++++++++\n> >  utils/meson.build          |  7 ++++\n> >  2 files changed, 86 insertions(+)\n> > \n> > diff --git a/utils/libcamera-bug-report b/utils/libcamera-bug-report\n> > new file mode 100755\n> > index 000000000000..72b89b646007\n> > --- /dev/null\n> > +++ b/utils/libcamera-bug-report\n> > @@ -0,0 +1,79 @@\n> > +#!/usr/bin/env bash\n> \n> I don't think we can reasonably expect bash to be present. It's common\n> in embedded environment to use other shells. Is there anything specific\n> you need from bash, or could we use /bin/sh ?\n\nJust that I usually use bash. I'll see if I can posixify.\n\n\n> > +# SPDX-License-Identifier: LGPL-2.1-or-later\n> > +\n> > +REPORT=\"libcamera-report-$(hostname)-$(date +%Y%m%d-%H%M%S).txt\"\n> > +\n> > +exec > >(tee \"$REPORT\") 2>&1\n> > +\n> > +section() {\n> > +    echo\n> > +    echo \"==================================================\"\n> > +    echo \"$1\"\n> > +    echo \"==================================================\"\n> > +}\n> > +\n> > +run() {\n> > +    echo\n> > +    echo \"\\$ $*\"\n> > +    \"$@\" || echo \"[WARN] Command failed: $*\"\n> > +}\n> > +\n> > +mark_kmsg() {\n> > +    if [ -w /dev/kmsg ]; then\n> > +        echo \"libcamera-debug-report[$$]: $1\" > /dev/kmsg\n> > +    else\n> > +        echo \"[INFO] /dev/kmsg not writable, skipping kernel marker: $1\"\n> > +    fi\n> > +}\n> > +\n> > +section \"Report metadata\"\n> > +echo \"Date: $(date -Is)\"\n> > +echo \"Host: $(hostname)\"\n> > +echo \"User: $(id)\"\n> > +\n> > +section \"Kernel & OS\"\n> > +run uname -a\n> > +run cat /etc/os-release\n> > +command -v lsb_release >/dev/null && run lsb_release -a\n> > +\n> > +section \"Media / V4L2 tools\"\n> > +command -v media-ctl >/dev/null && run media-ctl --version\n> > +command -v v4l2-ctl >/dev/null && run v4l2-ctl --version\n> > +command -v v4l2-ctl >/dev/null && run v4l2-ctl --list-devices\n> > +\n> > +section \"Device nodes\"\n> > +run ls -l /dev/video* /dev/v4l-* /dev/media* 2>/dev/null\n> > +run grep . /sys/class/video4linux/*/name\n> > +\n> > +section \"Deferred devices\"\n> > +run cat /sys/kernel/debug/devices_deferred\n> > +\n> > +section \"V4L2 async pending subdevices\"\n> > +run cat /sys/kernel/debug/v4l2-async/pending_async_subdevices\n> > +\n> > +section \"Media graph topology\"\n> > +for m in /dev/media*; do\n> > +    echo\n> > +    echo \"Parsing $m\"\n> > +    command -v media-ctl >/dev/null && run media-ctl -p \"$m\"\n> \n> I'm tempted to make media-ctl a hard dependency and print a warning.\n\nThat's probably a good idea to save a couple of round trips of getting\nsomeone to redo the report!\n\n\n> We could avoid v4l2-ctl as a dependency, but as it should come from the\n> same package as media-ctl, I suppose it's fine.\n> \n> > +done\n> > +\n> > +section \"libcamera & userspace\"\n> > +run which cam\n> > +command -v cam >/dev/null && run ldd `which cam`\n> > +\n> > +section \"libcamera probe (cam -l)\"\n> > +mark_kmsg \"BEGIN cam -l\"\n> > +LIBCAMERA_LOG_LEVELS=*:0 run cam -l\n> > +mark_kmsg \"END cam -l\"\n> > +\n> > +section \"Kernel log (post cam -l)\"\n> > +run dmesg\n> > +\n> > +section \"Permissions & capabilities\"\n> > +run id\n> > +run groups\n> > +command -v getcap >/dev/null && run getcap \"$(which cam)\"\n> > +\n> > +section \"End of report\"\n> > +echo \"Report saved to $REPORT\"\n> > diff --git a/utils/meson.build b/utils/meson.build\n> > index 3deed8ad4d7e..1a9203f81763 100644\n> > --- a/utils/meson.build\n> > +++ b/utils/meson.build\n> > @@ -7,3 +7,10 @@ gen_shader_headers = files('gen-shader-headers.sh')\n> >  \n> >  ## Module signing\n> >  gen_ipa_priv_key = files('gen-ipa-priv-key.sh')\n> > +\n> > +## Bug reporting utility\n> > +install_data(\n> > +    'libcamera-debug-report',\n> \n> The file is called \"libcamera-bug-report\", not \"libcamera-debug-report\".\n> Have you tested installation ? :-)\n\nI did ... but that was before I renamed it ;-)\n\n> > +    install_dir: get_option('bindir'),\n> > +    install_mode: 'rwxr-xr-x',\n> \n> This shouldn't be needed as the file is already executable.\n\nack.\n\n> \n> > +)\n> > \n> > ---\n> > base-commit: c6c5a8bc5b90e476cba806cfcccc704ef115d2aa\n> > change-id: 20260207-kbingham-bug-reporter-60285cd034af\n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 14A14C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  9 Feb 2026 09:16:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 03EA6620B6;\n\tMon,  9 Feb 2026 10:16:19 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C32F1615B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Feb 2026 10:16:16 +0100 (CET)","from monstersaurus.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EE61063F;\n\tMon,  9 Feb 2026 10:15:30 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"maHghDf5\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1770628531;\n\tbh=5qQixnxyEsfEaaanybYlz1IV1GihvMqz6gul06zHTQ0=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=maHghDf5K66true1XIzW6ZQjDYn7cK724JJdM4f6oQfBAsu15kwUSY8qI6KJHLtGd\n\tpK2hNUkl5WVJKqjPmbNo9C2sL9w7h5HLyrTNNV6hNdAQ0jvmnCURjaTt9MhFXLkH2b\n\tJtqurycD9EX34psIiNx7NHJ0kpD2b4F/u3dm10Lw=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260209000824.GB1987960@killaraus.ideasonboard.com>","References":"<20260207-kbingham-bug-reporter-v1-1-42f81e4ce5dc@ideasonboard.com>\n\t<20260209000824.GB1987960@killaraus.ideasonboard.com>","Subject":"Re: [PATCH] utils: Introduce libcamera-bug-report","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Date":"Mon, 09 Feb 2026 09:16:14 +0000","Message-ID":"<177062857413.1808100.17618002780010975498@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38142,"web_url":"https://patchwork.libcamera.org/comment/38142/","msgid":"<20260209093408.GB2302514@killaraus.ideasonboard.com>","date":"2026-02-09T09:34:08","subject":"Re: [PATCH] utils: Introduce libcamera-bug-report","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Feb 09, 2026 at 09:16:14AM +0000, Kieran Bingham wrote:\n> Quoting Laurent Pinchart (2026-02-09 00:08:24)\n> > On Sat, Feb 07, 2026 at 11:30:04AM +0000, Kieran Bingham wrote:\n> > > Introduce a script which can be installed into the system to aide reporting\n> > > potential camera and media related issues.\n> > > \n> > > The script shall capture system information and store it in a temporary\n> > > file - but it remains the users responsibilty to choose to share this\n> > > data, and no automatic bug submissions are anticipated.\n> > > \n> > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > > ---\n> > > There are many occasions where people would like to report issues with\n> > > their camera, and there are always a common set of commands that we\n> > > would like to run to identify potential issues.\n> > > \n> > > Provide a helper that will ease reporting of camera related issues\n> > > especially for bringup of new cameras or when cameras do not show.\n> > > \n> > > An example bug report from my system follows, which itself shows a\n> > > specific bug!\n> > > \n> > > $ ./utils/libcamera-bug-report \n> > > \n> \n> ...\n> \n> > > cam: error while loading shared libraries: libtiff.so.5: cannot open shared object file: No such file or directory\n> > > [WARN] Command failed: cam -l\n> > > [INFO] /dev/kmsg not writable, skipping kernel marker: END cam -l\n> > > \n> > > ==================================================\n> > > Kernel log (post cam -l)\n> > > ==================================================\n> > > \n> > > $ dmesg\n> > > dmesg: read kernel buffer failed: Operation not permitted\n> > > [WARN] Command failed: dmesg\n> > \n> > This is quite common. I wonder if we shouldn't skip writing the report\n> > to stdout, and only print warnings, to ensure they get noticed.\n> > \n> > As for how to fix this problem, I'm not entirely sure. I don't want to\n> > hide a sudo within the script, at least not one that is run by default.\n> > I also don't want to tell people to run this as root. One option could\n> > be to add a parameter to the script to run \"sudo dmesg\" instead of\n> > \"dmesg\", and mention the option in the warning message.\n> \n> Indeed, I intentionally didn't want any sudo in the script. I assume we\n> can let the user choose to run as sudo after having run once ?\n\nThat would essentially tell them they have to review the whole script,\nwhile gating internal usage of sudo with a command line argument (off by\ndefault) may make their life easier as they would only have to grep for\nsudo usage. I don't know what the best practice is.\n\n> > > \n> > > ==================================================\n> > > Permissions & capabilities\n> > > ==================================================\n> > > \n> > > $ id\n> > > uid=1000(kbingham) gid=1000(kbingham) groups=1000(kbingham),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),30(dip),44(video),46(plugdev),108(kvm),121(lpadmin),132(lxd),133(sambashare),135(docker),998(nix-users)\n> > > \n> > > $ groups\n> > > kbingham adm dialout cdrom sudo audio dip video plugdev kvm lpadmin lxd sambashare docker nix-users\n> > > \n> > > $ getcap /usr/bin/cam\n> > > \n> > > ==================================================\n> > > End of report\n> > > ==================================================\n> > > Report saved to libcamera-report-Monstersaurus-20260207-111858.txt\n> > \n> > I would be way more vocal here about the need to inspect the report and\n> > ensure there's no sensitive information before sending it.\n> \n> Ack\n> \n> > > ---\n> > >  utils/libcamera-bug-report | 79 ++++++++++++++++++++++++++++++++++++++++++++++\n> > >  utils/meson.build          |  7 ++++\n> > >  2 files changed, 86 insertions(+)\n> > > \n> > > diff --git a/utils/libcamera-bug-report b/utils/libcamera-bug-report\n> > > new file mode 100755\n> > > index 000000000000..72b89b646007\n> > > --- /dev/null\n> > > +++ b/utils/libcamera-bug-report\n> > > @@ -0,0 +1,79 @@\n> > > +#!/usr/bin/env bash\n> > \n> > I don't think we can reasonably expect bash to be present. It's common\n> > in embedded environment to use other shells. Is there anything specific\n> > you need from bash, or could we use /bin/sh ?\n> \n> Just that I usually use bash. I'll see if I can posixify.\n> \n> > > +# SPDX-License-Identifier: LGPL-2.1-or-later\n> > > +\n> > > +REPORT=\"libcamera-report-$(hostname)-$(date +%Y%m%d-%H%M%S).txt\"\n> > > +\n> > > +exec > >(tee \"$REPORT\") 2>&1\n> > > +\n> > > +section() {\n> > > +    echo\n> > > +    echo \"==================================================\"\n> > > +    echo \"$1\"\n> > > +    echo \"==================================================\"\n> > > +}\n> > > +\n> > > +run() {\n> > > +    echo\n> > > +    echo \"\\$ $*\"\n> > > +    \"$@\" || echo \"[WARN] Command failed: $*\"\n> > > +}\n> > > +\n> > > +mark_kmsg() {\n> > > +    if [ -w /dev/kmsg ]; then\n> > > +        echo \"libcamera-debug-report[$$]: $1\" > /dev/kmsg\n> > > +    else\n> > > +        echo \"[INFO] /dev/kmsg not writable, skipping kernel marker: $1\"\n> > > +    fi\n> > > +}\n> > > +\n> > > +section \"Report metadata\"\n> > > +echo \"Date: $(date -Is)\"\n> > > +echo \"Host: $(hostname)\"\n> > > +echo \"User: $(id)\"\n> > > +\n> > > +section \"Kernel & OS\"\n> > > +run uname -a\n> > > +run cat /etc/os-release\n> > > +command -v lsb_release >/dev/null && run lsb_release -a\n> > > +\n> > > +section \"Media / V4L2 tools\"\n> > > +command -v media-ctl >/dev/null && run media-ctl --version\n> > > +command -v v4l2-ctl >/dev/null && run v4l2-ctl --version\n> > > +command -v v4l2-ctl >/dev/null && run v4l2-ctl --list-devices\n> > > +\n> > > +section \"Device nodes\"\n> > > +run ls -l /dev/video* /dev/v4l-* /dev/media* 2>/dev/null\n> > > +run grep . /sys/class/video4linux/*/name\n> > > +\n> > > +section \"Deferred devices\"\n> > > +run cat /sys/kernel/debug/devices_deferred\n> > > +\n> > > +section \"V4L2 async pending subdevices\"\n> > > +run cat /sys/kernel/debug/v4l2-async/pending_async_subdevices\n> > > +\n> > > +section \"Media graph topology\"\n> > > +for m in /dev/media*; do\n> > > +    echo\n> > > +    echo \"Parsing $m\"\n> > > +    command -v media-ctl >/dev/null && run media-ctl -p \"$m\"\n> > \n> > I'm tempted to make media-ctl a hard dependency and print a warning.\n> \n> That's probably a good idea to save a couple of round trips of getting\n> someone to redo the report!\n> \n> > We could avoid v4l2-ctl as a dependency, but as it should come from the\n> > same package as media-ctl, I suppose it's fine.\n> > \n> > > +done\n> > > +\n> > > +section \"libcamera & userspace\"\n> > > +run which cam\n> > > +command -v cam >/dev/null && run ldd `which cam`\n> > > +\n> > > +section \"libcamera probe (cam -l)\"\n> > > +mark_kmsg \"BEGIN cam -l\"\n> > > +LIBCAMERA_LOG_LEVELS=*:0 run cam -l\n> > > +mark_kmsg \"END cam -l\"\n> > > +\n> > > +section \"Kernel log (post cam -l)\"\n> > > +run dmesg\n> > > +\n> > > +section \"Permissions & capabilities\"\n> > > +run id\n> > > +run groups\n> > > +command -v getcap >/dev/null && run getcap \"$(which cam)\"\n> > > +\n> > > +section \"End of report\"\n> > > +echo \"Report saved to $REPORT\"\n> > > diff --git a/utils/meson.build b/utils/meson.build\n> > > index 3deed8ad4d7e..1a9203f81763 100644\n> > > --- a/utils/meson.build\n> > > +++ b/utils/meson.build\n> > > @@ -7,3 +7,10 @@ gen_shader_headers = files('gen-shader-headers.sh')\n> > >  \n> > >  ## Module signing\n> > >  gen_ipa_priv_key = files('gen-ipa-priv-key.sh')\n> > > +\n> > > +## Bug reporting utility\n> > > +install_data(\n> > > +    'libcamera-debug-report',\n> > \n> > The file is called \"libcamera-bug-report\", not \"libcamera-debug-report\".\n> > Have you tested installation ? :-)\n> \n> I did ... but that was before I renamed it ;-)\n> \n> > > +    install_dir: get_option('bindir'),\n> > > +    install_mode: 'rwxr-xr-x',\n> > \n> > This shouldn't be needed as the file is already executable.\n> \n> ack.\n> \n> > \n> > > +)\n> > > \n> > > ---\n> > > base-commit: c6c5a8bc5b90e476cba806cfcccc704ef115d2aa\n> > > change-id: 20260207-kbingham-bug-reporter-60285cd034af","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 18C08BD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  9 Feb 2026 09:34:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 103B8620BC;\n\tMon,  9 Feb 2026 10:34:12 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1A57C615B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Feb 2026 10:34:10 +0100 (CET)","from killaraus.ideasonboard.com\n\t(2001-14ba-703d-e500--2a1.rev.dnainternet.fi\n\t[IPv6:2001:14ba:703d:e500::2a1])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 4552EB3;\n\tMon,  9 Feb 2026 10:33:24 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"nJfzODrQ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1770629604;\n\tbh=QyRFLgn7nVC00OV/qsNUIzrghb9kjY17q5W4aJvq68I=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=nJfzODrQsPLf1mFq/VIBdx1Uuz0f7qvlL3IWP3y4YcLbZilg6Q7JDk9reyaMJUjE9\n\tkQsj/GLf8B3QDZnTRk8e/loiM/drg/zBzGN/Cl+WYwygYDWDHdXBK0EB5Hs/Vvebbo\n\tBXSydIjfhs13qCkMCvNVWHyhFEGVEe1T9QR6mohU=","Date":"Mon, 9 Feb 2026 11:34:08 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH] utils: Introduce libcamera-bug-report","Message-ID":"<20260209093408.GB2302514@killaraus.ideasonboard.com>","References":"<20260207-kbingham-bug-reporter-v1-1-42f81e4ce5dc@ideasonboard.com>\n\t<20260209000824.GB1987960@killaraus.ideasonboard.com>\n\t<177062857413.1808100.17618002780010975498@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<177062857413.1808100.17618002780010975498@ping.linuxembedded.co.uk>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]