black bar at bottom of rpicam-still captured images with HQ camera
Describe the bug
I am noticing what seems to be a bug affecting pictures captured by rpicam-still happening after I upgraded my kernel version from 6.12 (Bookworm) to 6.12.55-v8-16k+. I've tested reverting to stable bookworm release and found the image capture to be normal there so it seems that the cause is the new kernel.
Images captured with rpicam-still now have a rectangular block of pixels along the bottom which are completely black. I've found this line measures 42px tall when capturing images with a Raspberry Pi HQ Camera at 4056x3040 resolution. I have written some reproduction steps below.
Steps to reproduce the behaviour
First, be on a stable release (Tested on Bookworm) and test an rpicam-still picture output from a Raspberry Pi HQ Camera, a full frame image should be 4056x3040 resolution and all pixels should contain image data from the effective area of the sensor.
Example usable command: rpicam-still -o test.jpg -e jpg
Run these commands to install bleeding edge kernel:
sudo apt install rpi-update
sudo rpi-update
sudo reboot
At the time of my testing this is the kernel version I am on as reported by uname -a
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 6.12.55-v8-16k+ #1915 SMP PREEMPT Fri Oct 24 11:53:30 BST 2025 aarch64 GNU/Linux
Run the rpicam-still command again and check the output image. The image has the same size (4056x3040) but the last 42 rows of the bottom of the image are now black.
Device (s)
Raspberry Pi 5
System
https://pastebin.com/BDUx11xV pi@raspberrypi:~ $ cat /etc/rpi-issue Raspberry Pi reference 2025-10-01 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 58b9a6bd1e3af179df52d4085dfe481d1c62e8fc, stage4 pi@raspberrypi:~ $ vcgencmd version 2025/10/17 10:48:37 Copyright (c) 2012 Broadcom version b66568da (release) (embedded) pi@raspberrypi:~ $ uname -a Linux raspberrypi 6.12.55-v8-16k+ #1915 SMP PREEMPT Fri Oct 24 11:53:30 BST 2025 aarch64 GNU/Linux
Logs
No response
Additional context
No response
Here's a sample image with the black bar in it. I realise a similar issue has been reported in #6896
I did try
rpicam-still -t 5s -o test.jpg and that still resulted in a black bar.
So far all testing had been done without any specific camera related parameters defined, I used only camera_auto_detect=1, and capturing an image after booting always resulted in the appearance of the black line.
However, I have noticed that after adding the recently introduced parameters for IMX477 configurable link-frequency I can't seem to reproduce the line on demand.
The parameters I used are dtoverlay=imx477,cam0,link-frequency=750000000
I read this issue and decided to individually check the output of rpicam-still -o test.jpg with sudo rpi-update pulls/6798 and also sudo rpi-update pulls/7107 to see if it affects this black bar issue.
In both cases without any defined overlays for the camera other than camera_auto_detect=1, rpicam-still -o test.jpg still resulted in a black bar at the bottom of the image, and defining dtoverlay=imx477,cam0,link-frequency=750000000 had a side effect of resolving it.
#7106 looks to be unrelated as it's referencing imx219. #7107 happened to be where naushir was at when he was testing. In and of itself it is unrelated.
I'm seeing the black bar with the full res mode on all link frequencies with the latest tree. I'm using rpicam-hello -t 0 --viewfinder-mode 4056:3040:12 as the quickest way to evaluate.
Reverting the patches from #6798 in turn, it appears to be 4301acb3442e "imx477: Precompute frame length values" that introduces the issue. It reduces the minimum for the vertical_blanking control for that mode from 460 to 4. I have a section in the datasheet that lists full frame readout with the frame end being line 3044 (frame start, 3040 image lines, 2 embedded data lines, 1 line of gyro data) which would equate to the 4. That works on all the other modes, but not 4056x3040.
Setting IMX477_VBLANK_MIN to 48 seems to fix the mode whilst not overly compromising the frame rate. I'll create a PR with that change.
#7144.
Once CI has built it (about 30mins), you should be able to use sudo rpi-update pulls/7144 to get the test kernel.
Normal warnings over not using a critical Pi, nor relying on initramfs for an odd filing system.
And thanks for the detailed report.
I tried testing rpicam-hello -t 0 --viewfinder-mode 4056:3040:12 with 750MHz link frequency before updating and confirmed the black bar showed up in the preview, I didn't manage to catch the black bar in the preview previously.
I then pulled #7114 with sudo rpi-update pulls/7114 and from my testing the issue is resolved, thank you for the prompt work!