Camera (Dev Preview) app crashing

Everything works on my Librem 5 except the camera app. The camera app closes out without an error when I open it. All kill switches are flipped to on. Is anyone else having this issue? Is it possible something on the hardware level didn’t get connected?

Run millipixels from console and post the output. You can also post dmesg if something shows up there after trying to launch the app.

1 Like

It comes back as:

Found config file at /usr/share/millipixels/config/purism, librem5r4.ini
Adding camera big from config
matched GRBG8 to GRBG8 3
matched GRBG8 to GRBG8 3
Adding camera selfie from config
matched GBRG16 to GBRG16 14
matched GBRG16 to GBRG16 14
Found postprocessor script at /usr/share/millipixels/postprocess.sh
thread ‘’ panicked at ‘attempt to subtract with overflow’, …/src/focus.rs:51:20
note: run with ‘RUST_BACKTRACE=1’ environment variable to display a backtrace fatal runtime error: failed to initiate panic, error 2617523520
Aborted

Dmesg comes up with many of the same thing over and over:
[ 1291.275518] redpine_91x: Packet Dropped as Key ID not matched with both current and previous Key ID

These messages are irrelevant to any concerns about the camera or camera app. They are from the WiFi. (Everybody gets these messages. Just ignore them at this stage. Certainly ignore them in this topic.)

I’m starting to wonder if it was never connected internally. It sounds like it is working for everyone else…

Does this persist after you reboot?

BTW, you’re going to get better response time if you post crashes on the issue tracker: https://source.puri.sm/Librem5/millipixels/-/issues

Yes, it persists after a reboot. It has never worked out of box

This should eliminate the crash: https://source.puri.sm/Librem5/millipixels/-/merge_requests/81

Now, this won’t remove the root cause. What’s the output of this command?

media-ctl -d platform:30b80000.csi -e dw9714 3-000c

I get the following:

Entity ‘dw9714’ not found.

The app also still crashes

Do you mean that it crashes after executing that command?

Also, I got the command wrong. Please send output of this:

media-ctl -d platform:30b80000.csi -e 'dw9714 3-000c'

Failed to enumerate platform: 30b8000.csi (-2)

sudo dmesg | grep dw9714?

On top of that, please send lsmod and rfkill
then flip all the switches
then send lsmod and rfkill again.

When I get a chance I will do that. Thanks for the responses

sudo dmesg | grep dw9714 returns nothing at all

*rfkill-switcheson:

ID TYPE       DEVICE          SOFT      HARD
0 microphone mic-hks    unblocked unblocked
1 camera     camera-hks unblocked unblocked
2 wlan       wlan-hks   unblocked unblocked
3 wwan       wwan-hks   unblocked unblocked
4 bluetooth  hci0       unblocked unblocked
5 wlan       phy0       unblocked unblocked

*rfkill-switches-off:

ID TYPE       DEVICE          SOFT    HARD
0 microphone mic-hks    unblocked blocked
1 camera     camera-hks unblocked blocked
2 wlan       wlan-hks   unblocked blocked
3 wwan       wwan-hks   unblocked blocked

*lsmod-switches-on:

Module                  Size  Used by
qmi_wwan               36864  0
cdc_wdm                28672  2 qmi_wwan
usbnet                 53248  1 qmi_wwan
mii                    20480  1 usbnet
option                 61440  1
usb_wwan               28672  1 option
usbserial              57344  4 usb_wwan,option
hi846                  53248  1
s5k3l6xx               32768  1
imx8mq_mipi_csi2       24576  2
imx7_media_csi         32768  0
aes_ce_ccm             16384  8
rfcomm                 90112  4
bnep                   28672  2
st_lsm6dsx_i2c         20480  0
usb_f_acm              20480  2
mousedev               20480  0
st_lsm6dsx_spi         20480  0
u_serial               32768  3 usb_f_acm
st_lsm6dsx             45056  2 st_lsm6dsx_i2c,st_lsm6dsx_spi
usb_f_ecm              24576  2
u_ether                28672  1 usb_f_ecm
caam_jr               167936  0
caamhash_desc          16384  1 caam_jr
caamalg_desc           36864  1 caam_jr
crypto_engine          20480  1 caam_jr
redpine_sdio           32768  0
aes_ce_blk             32768  4
redpine_91x           126976  1 redpine_sdio
crct10dif_ce           16384  1
bluetooth             811008  24 bnep,redpine_91x,rfcomm
ghash_ce               20480  0
mac80211             1011712  2 redpine_sdio,redpine_91x
sha2_ce                16384  0
sha1_ce                16384  0
snd_soc_simple_card    24576  6
cfg80211              950272  2 mac80211,redpine_91x
pwm_vibra              16384  0
snd_soc_gtm601         16384  1
snd_soc_simple_card_utils    36864  1 snd_soc_simple_card
hantro_vpu            139264  0
v4l2_vp9               24576  1 hantro_vpu
v4l2_h264              20480  1 hantro_vpu
edt_ft5x06             32768  0
dw9714                 16384  1
v4l2_mem2mem           40960  1 hantro_vpu
snd_soc_wm8962         98304  2 snd_soc_simple_card_utils
vcnl4000               24576  0
leds_lm3560            16384  0
industrialio_triggered_buffer    16384  1 vcnl4000
v4l2_fwnode            28672  3 hi846,imx8mq_mipi_csi2,s5k3l6xx
v4l2_flash_led_class    16384  1 leds_lm3560
videobuf2_dma_contig    24576  2 hantro_vpu,imx7_media_csi
videobuf2_memops       20480  1 videobuf2_dma_contig
kfifo_buf              16384  2 industrialio_triggered_buffer,st_lsm6dsx
snd_soc_fsl_sai        32768  4
snd_soc_fsl_utils      16384  1 snd_soc_fsl_sai
videobuf2_v4l2         32768  3 hantro_vpu,imx7_media_csi,v4l2_mem2mem
v4l2_async             28672  7 v4l2_fwnode,v4l2_flash_led_class,dw9714,hi846,imx8mq_mipi_csi2,imx7_media_csi,s5k3l6xx
videobuf2_common       69632  6 videobuf2_dma_contig,videobuf2_v4l2,hantro_vpu,imx7_media_csi,v4l2_mem2mem,videobuf2_memops
gnss_mtk               16384  0
gnss_serial            16384  1 gnss_mtk
videodev              278528  11 v4l2_async,v4l2_flash_led_class,videobuf2_v4l2,dw9714,hi846,hantro_vpu,videobuf2_common,imx8mq_mipi_csi2,imx7_media_csi,v4l2_mem2mem,s5k3l6xx
imx2_wdt               16384  0
imx_pcm_dma            16384  1 snd_soc_fsl_sai
gnss                   16384  1 gnss_serial
mc                     77824  12 v4l2_async,videodev,v4l2_flash_led_class,videobuf2_v4l2,dw9714,hi846,hantro_vpu,videobuf2_common,imx8mq_mipi_csi2,imx7_media_csi,v4l2_mem2mem,s5k3l6xx
snd_soc_core          278528  6 imx_pcm_dma,snd_soc_simple_card_utils,snd_soc_gtm601,snd_soc_simple_card,snd_soc_wm8962,snd_soc_fsl_sai
watchdog               32768  1 imx2_wdt
snd_pcm_dmaengine      20480  1 snd_soc_core
snd_pcm               135168  5 snd_soc_simple_card_utils,snd_soc_core,snd_soc_wm8962,snd_soc_fsl_sai,snd_pcm_dmaengine
snd_timer              40960  1 snd_pcm
caam                   20480  1 caam_jr
snd                   102400  15 snd_timer,snd_soc_core,snd_pcm
rfkill_hks             20480  0
error                  24576  4 caamalg_desc,caamhash_desc,caam,caam_jr
soundcore              16384  1 snd
rfkill                 32768  10 rfkill_hks,bluetooth,redpine_91x,cfg80211
libcomposite           77824  12 usb_f_ecm,usb_f_acm
ledtrig_timer          16384  0
ledtrig_pattern        16384  0
fuse                  147456  5
zram                   40960  2
ip_tables              32768  0
x_tables               53248  1 ip_tables
ipv6                  536576  98
uas                    28672  0
usb_storage            86016  1 uas
mtdblock               20480  1
mtd_blkdevs            20480  2 mtdblock
overlay               143360  1
ofpart                 20480  0
xhci_plat_hcd          16384  0
spi_nor               106496  1
xhci_hcd              286720  1 xhci_plat_hcd
mtd                    90112  7 spi_nor,ofpart,mtdblock,mtd_blkdevs
usbcore               319488  11 usbserial,xhci_hcd,usbnet,usb_storage,cdc_wdm,usb_wwan,qmi_wwan,uas,xhci_plat_hcd,option
imx_dcss               45056  3
cdns_mhdp_imx          28672  0
cdns_mhdp_drmcore      53248  1 cdns_mhdp_imx
drm_display_helper    196608  1 cdns_mhdp_drmcore
dwc3                  155648  1
bq25890_charger        32768  0
ulpi                   20480  1 dwc3
udc_core               73728  6 u_ether,u_serial,usb_f_ecm,libcomposite,usb_f_acm,dwc3
tps6598x               77824  0
phy_fsl_imx8mq_usb     20480  6
usb_common             20480  6 xhci_hcd,usbcore,libcomposite,xhci_plat_hcd,dwc3,udc_core
typec                  90112  1 tps6598x
roles                  20480  2 tps6598x,dwc3
clk_bd718x7            20480  0
snvs_pwrkey            16384  0
imx_sdma               32768  6
virt_dma               20480  1 imx_sdma

*lsmod-switches-off:

Module                  Size  Used by
qmi_wwan               36864  0
cdc_wdm                28672  1 qmi_wwan
usbnet                 53248  1 qmi_wwan
mii                    20480  1 usbnet
option                 61440  0
usb_wwan               28672  1 option
usbserial              57344  2 usb_wwan,option
aes_ce_ccm             16384  8
rfcomm                 90112  0
bnep                   28672  2
usb_f_acm              20480  2
mousedev               20480  0
u_serial               32768  3 usb_f_acm
usb_f_ecm              24576  2
u_ether                28672  1 usb_f_ecm
caam_jr               167936  0
caamhash_desc          16384  1 caam_jr
caamalg_desc           36864  1 caam_jr
crypto_engine          20480  1 caam_jr
redpine_sdio           32768  0
aes_ce_blk             32768  4
redpine_91x           126976  1 redpine_sdio
crct10dif_ce           16384  1
bluetooth             811008  11 bnep,redpine_91x,rfcomm
ghash_ce               20480  0
mac80211             1011712  2 redpine_sdio,redpine_91x
sha2_ce                16384  0
sha1_ce                16384  0
snd_soc_simple_card    24576  6
cfg80211              950272  2 mac80211,redpine_91x
pwm_vibra              16384  0
snd_soc_gtm601         16384  1
snd_soc_simple_card_utils    36864  1 snd_soc_simple_card
hantro_vpu            139264  0
v4l2_vp9               24576  1 hantro_vpu
v4l2_h264              20480  1 hantro_vpu
edt_ft5x06             32768  0
dw9714                 16384  0
v4l2_mem2mem           40960  1 hantro_vpu
snd_soc_wm8962         98304  2 snd_soc_simple_card_utils
vcnl4000               24576  0
leds_lm3560            16384  0
industrialio_triggered_buffer    16384  1 vcnl4000
v4l2_fwnode            28672  0
v4l2_flash_led_class    16384  1 leds_lm3560
videobuf2_dma_contig    24576  1 hantro_vpu
videobuf2_memops       20480  1 videobuf2_dma_contig
kfifo_buf              16384  1 industrialio_triggered_buffer
snd_soc_fsl_sai        32768  4
snd_soc_fsl_utils      16384  1 snd_soc_fsl_sai
videobuf2_v4l2         32768  2 hantro_vpu,v4l2_mem2mem
v4l2_async             28672  3 v4l2_fwnode,v4l2_flash_led_class,dw9714
videobuf2_common       69632  5 videobuf2_dma_contig,videobuf2_v4l2,hantro_vpu,v4l2_mem2mem,videobuf2_memops
gnss_mtk               16384  0
gnss_serial            16384  1 gnss_mtk
videodev              278528  7 v4l2_async,v4l2_flash_led_class,videobuf2_v4l2,dw9714,hantro_vpu,videobuf2_common,v4l2_mem2mem
imx2_wdt               16384  0
imx_pcm_dma            16384  1 snd_soc_fsl_sai
gnss                   16384  1 gnss_serial
mc                     77824  8 v4l2_async,videodev,v4l2_flash_led_class,videobuf2_v4l2,dw9714,hantro_vpu,videobuf2_common,v4l2_mem2mem
snd_soc_core          278528  6 imx_pcm_dma,snd_soc_simple_card_utils,snd_soc_gtm601,snd_soc_simple_card,snd_soc_wm8962,snd_soc_fsl_sai
watchdog               32768  1 imx2_wdt
snd_pcm_dmaengine      20480  1 snd_soc_core
snd_pcm               135168  5 snd_soc_simple_card_utils,snd_soc_core,snd_soc_wm8962,snd_soc_fsl_sai,snd_pcm_dmaengine
snd_timer              40960  1 snd_pcm
caam                   20480  1 caam_jr
snd                   102400  15 snd_timer,snd_soc_core,snd_pcm
rfkill_hks             20480  0
error                  24576  4 caamalg_desc,caamhash_desc,caam,caam_jr
soundcore              16384  1 snd
rfkill                 32768  9 rfkill_hks,bluetooth,redpine_91x,cfg80211
libcomposite           77824  12 usb_f_ecm,usb_f_acm
ledtrig_timer          16384  0
ledtrig_pattern        16384  0
fuse                  147456  5
zram                   40960  2
ip_tables              32768  0
x_tables               53248  1 ip_tables
ipv6                  536576  88
uas                    28672  0
usb_storage            86016  1 uas
mtdblock               20480  1
mtd_blkdevs            20480  2 mtdblock
overlay               143360  1
ofpart                 20480  0
xhci_plat_hcd          16384  0
spi_nor               106496  1
xhci_hcd              286720  1 xhci_plat_hcd
mtd                    90112  7 spi_nor,ofpart,mtdblock,mtd_blkdevs
usbcore               319488  10 usbserial,xhci_hcd,usbnet,usb_storage,cdc_wdm,usb_wwan,qmi_wwan,uas,xhci_plat_hcd,option
imx_dcss               45056  3
cdns_mhdp_imx          28672  0
cdns_mhdp_drmcore      53248  1 cdns_mhdp_imx
drm_display_helper    196608  1 cdns_mhdp_drmcore
dwc3                  155648  1
bq25890_charger        32768  0
ulpi                   20480  1 dwc3
udc_core               73728  6 u_ether,u_serial,usb_f_ecm,libcomposite,usb_f_acm,dwc3
tps6598x               77824  0
phy_fsl_imx8mq_usb     20480  6
usb_common             20480  6 xhci_hcd,usbcore,libcomposite,xhci_plat_hcd,dwc3,udc_core
typec                  90112  1 tps6598x
roles                  20480  2 tps6598x,dwc3
clk_bd718x7            20480  0
snvs_pwrkey            16384  0
imx_sdma               32768  6
virt_dma               20480  1 imx_sdma

Please check https://source.puri.sm/Librem5/millipixels/-/merge_requests/82

which kernel are you using? uname -r.

I’m at:

uname -r
6.1.0-1-librem5

When or with which kernel this merge will come down to us?