Back Camera Stops working if Librem5 has been on for "a while"
I have had an issue where the back camera stops working for a picture if I have left the phone on for a while (call it >24 hrs, but I don't know how long it needs to be on for this issue to occur). When it happens, I open Millipixels and try to take a picture, but afterwards, the preview screen freezes and I never get a picture. This occurs with the Millipixels
0.20.0-1pureos1
.
Toggling the HKS (or leaving it on/off) seems to have no affect as to if this will happen and will not fix the issue. Resetting the phone reliably fixes the issue.
I see this in dmesg
when it happens:
[ 7665.149601] ------------[ cut here ]------------
[ 7665.149622] WARNING: CPU: 1 PID: 8294 at drivers/media/v4l2-core/v4l2-mc.c:475 pipeline_pm_power_one+0x104/0x160 [videodev]
[ 7665.149728] Modules linked in: hi846 s5k3l6xx imx8mq_mipi_csi2(C) imx7_media_csi(C) aes_ce_ccm rfcomm bnep redpine_sdio redpine_91x bluetooth mac80211 cfg80211 usb_f_acm u_serial usb_f_ecm u_ether st_lsm6dsx_i2c st_lsm6dsx_spi st_lsm6dsx caam_jr caamhash_desc caamalg_desc crypto_engine option qmi_wwan cdc_wdm usb_wwan usbnet mii usbserial snd_soc_simple_card snd_soc_simple_card_utils hantro_vpu v4l2_vp9 snd_soc_gtm601 v4l2_h264 mousedev v4l2_mem2mem dw9714 snd_soc_wm8962 vcnl4000 leds_lm3560 industrialio_triggered_buffer videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 kfifo_buf v4l2_flash_led_class v4l2_fwnode videobuf2_common v4l2_async gnss_mtk videodev caam gnss_serial mc snd_soc_fsl_sai gnss snd_soc_fsl_utils imx_pcm_dma error snd_soc_core snd_pcm_dmaengine snd_pcm snd_timer snd rfkill_hks imx2_wdt watchdog soundcore rfkill libcomposite ledtrig_timer ledtrig_pattern fuse zram ip_tables x_tables ipv6 uas usb_storage mtdblock mtd_blkdevs overlay ofpart xhci_plat_hcd spi_nor
[ 7665.149944] xhci_hcd usbcore mtd aes_ce_blk crct10dif_ce dwc3 cdns_mhdp_imx ghash_ce ulpi cdns_mhdp_drmcore udc_core sha2_ce drm_display_helper pwm_vibra sha1_ce imx_dcss phy_fsl_imx8mq_usb usb_common bq25890_charger tps6598x edt_ft5x06 typec roles clk_bd718x7 snvs_pwrkey imx_sdma virt_dma [last unloaded: hi846]
[ 7665.150020] CPU: 1 PID: 8294 Comm: postprocess.sh Tainted: G WC 6.1.0-1-librem5 #1
[ 7665.150029] Hardware name: Purism Librem 5r4 (DT)
[ 7665.150033] pstate: a0000005 (NzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 7665.150040] pc : pipeline_pm_power_one+0x104/0x160 [videodev]
[ 7665.150102] lr : pipeline_pm_power.part.0+0x5c/0x100 [videodev]
[ 7665.150164] sp : ffff80000c343a80
[ 7665.150167] x29: ffff80000c343a80 x28: 0000000000000001 x27: 0000ffffb465fb20
[ 7665.150177] x26: ffffffffffffffe0 x25: 0000000000000009 x24: ffff000014611280
[ 7665.150188] x23: ffff00002c646800 x22: 00000000ffffffff x21: 00000000ffffffff
[ 7665.150199] x20: ffff00000cc610d0 x19: 00000000ffffffff x18: ffff80000c343b28
[ 7665.150209] x17: 0000000000000000 x16: ffff800008d94030 x15: ffff000026d85f0c
[ 7665.150220] x14: 0000000000000000 x13: 000000001007ffff x12: 0000000000000000
[ 7665.150230] x11: 0000000000000001 x10: 0000000000000a00 x9 : ffff80000115e6dc
[ 7665.150240] x8 : ffff00006fb98c08 x7 : 0000000000000000 x6 : 0000000000000000
[ 7665.150250] x5 : 000000000000001e x4 : ffff00000cc610d0 x3 : 0000000000000004
[ 7665.150260] x2 : 0000000000000002 x1 : 0000000000000002 x0 : ffff00000cc610d0
[ 7665.150271] Call trace:
[ 7665.150276] pipeline_pm_power_one+0x104/0x160 [videodev]
[ 7665.150339] pipeline_pm_power.part.0+0x5c/0x100 [videodev]
[ 7665.150400] v4l2_pipeline_pm_use+0x5c/0xa0 [videodev]
[ 7665.150462] v4l2_pipeline_pm_put+0x1c/0x40 [videodev]
[ 7665.150524] imx7_csi_video_release+0x4c/0x90 [imx7_media_csi]
[ 7665.150540] v4l2_release+0xc4/0xfc [videodev]
[ 7665.150601] __fput+0x78/0x260
[ 7665.150614] ____fput+0x18/0x24
[ 7665.150622] task_work_run+0x88/0xe0
[ 7665.150631] do_exit+0x2fc/0x9c0
[ 7665.150641] do_group_exit+0x3c/0xa0
[ 7665.150649] get_signal+0x8b4/0x920
[ 7665.150656] do_notify_resume+0x17c/0xdbc
[ 7665.150666] el0_svc+0x74/0x84
[ 7665.150676] el0t_64_sync_handler+0xb8/0xc0
[ 7665.150684] el0t_64_sync+0x18c/0x190
[ 7665.150691] ---[ end trace 0000000000000000 ]---
[ 8082.080807] edt_ft5x06 2-0038: Unable to fetch data, error: -6
[ 8215.558884] cma: cma_alloc: reserved: alloc failed, req-size: 3206 pages, ret: -12
[ 8215.566532] csi: consider increasing the CMA area
[ 8215.566550] imx7-csi 30b80000.csi: pipeline start failed with -12
[ 8258.319441] cma: cma_alloc: reserved: alloc failed, req-size: 3206 pages, ret: -12
[ 8258.327146] csi: consider increasing the CMA area
[ 8258.327174] imx7-csi 30b80000.csi: pipeline start failed with -12
[ 8261.558206] cma: cma_alloc: reserved: alloc failed, req-size: 3206 pages, ret: -12
[ 8261.565834] csi: consider increasing the CMA area
[ 8261.565852] imx7-csi 30b80000.csi: pipeline start failed with -12