Skip to content

Camera Module v2 (imx219) missing 206FPS mode #7013

Open

Description

@mbway

Describe the bug

The documentation for the camera modules lists 640×480p 206fps as a supported mode for the camera module v2 but when I use rpicam-vid --list-cameras the 206FPS mode is not available, replaced with 103FPS instead:

pi@pi3:~/camera $ uname -a
Linux pi3 6.12.41-v8+ #1897 SMP PREEMPT Fri Aug  1 12:20:46 BST 2025 aarch64 GNU/Linux
pi@pi3:~/camera $ rpicam-vid --list-cameras
Available cameras
-----------------
0 : imx219 [3280x2464 10-bit RGGB] (/base/soc/i2c0mux/i2c@1/imx219@10)
    Modes: 'SRGGB10_CSI2P' : 640x480 [103.33 fps - (1000, 752)/1280x960 crop]
                             1640x1232 [41.85 fps - (0, 0)/3280x2464 crop]
                             1920x1080 [47.57 fps - (680, 692)/1920x1080 crop]
                             3280x2464 [21.19 fps - (0, 0)/3280x2464 crop]
           'SRGGB8' : 640x480 [103.33 fps - (1000, 752)/1280x960 crop]
                      1640x1232 [41.85 fps - (0, 0)/3280x2464 crop]
                      1920x1080 [47.57 fps - (680, 692)/1920x1080 crop]
                      3280x2464 [21.19 fps - (0, 0)/3280x2464 crop]

I found this bug report #5438 that was resolved around the time of the 6.1 kernel. So I built that version and booted into it. With that kernel version the 206FPS mode was listed:

pi@pi3:~/camera $ uname -a
Linux pi3 6.1.93-v8+ #1 SMP PREEMPT Mon Aug 11 03:31:21 BST 2025 aarch64 GNU/Linux
pi@pi3:~/camera $ rpicam-vid --list-cameras
Available cameras
-----------------
0 : imx219 [3280x2464 10-bit RGGB] (/base/soc/i2c0mux/i2c@1/imx219@10)
    Modes: 'SRGGB10_CSI2P' : 640x480 [206.65 fps - (1000, 752)/1280x960 crop]
                             1640x1232 [41.85 fps - (0, 0)/3280x2464 crop]
                             1920x1080 [47.57 fps - (680, 692)/1920x1080 crop]
                             3280x2464 [21.19 fps - (0, 0)/3280x2464 crop]
           'SRGGB8' : 640x480 [206.65 fps - (1000, 752)/1280x960 crop]
                      1640x1232 [83.70 fps - (0, 0)/3280x2464 crop]
                      1920x1080 [47.57 fps - (680, 692)/1920x1080 crop]
                      3280x2464 [21.19 fps - (0, 0)/3280x2464 crop]

So it looks like there has been a regression since that issue was originally fixed.

Steps to reproduce the behaviour

boot into the latest Raspberry Pi OS with kernel 6.12, plug in a Camera v2 module and run rpicam-vid --list-cameras. Observe that the 206FPS mode is not listed.

Device (s)

Raspberry Pi 3 Mod. B

System

pi@pi3:~/camera $ cat /etc/rpi-issue
Raspberry Pi reference 2025-05-13
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 5dabc7dc940059dfbc46af5d97b60a1e812523dd, stage4

pi@pi3:~/camera $ vcgencmd version
Jul 17 2025 17:32:49 
Copyright (c) 2012 Broadcom
version a668b6e6edce3274de221324b93cb8741e4a7f7c (clean) (release) (start)

pi@pi3:~/camera $ uname -a
Linux pi3 6.1.93-v8+ #1 SMP PREEMPT Mon Aug 11 03:31:21 BST 2025 aarch64 GNU/Linux

Logs

No response

Additional context

No response

Activity

  1. NWalker4483 commented on Aug 24, 2025

    @NWalker4483

    Looking for a solution to this also. On pi 4b bullseye

  2. mbway commented on Sep 4, 2025

    @mbway
    Author

    Some further investigation:

    Support was first added to version 5.15 in #4880 and based on #5439 I think there was a regression between 6.0 and 6.1 that was fixed before the end of 6.1, then 6.7 is the first branch where the fix can no longer be found. So versions 5.15 to 6.6 all have the fix.

    I'm not sure how much of the driver is developed in upstream Linux vs here. The rpi-6.12.y version of imx219.c looks
    fairly different to the upstream 6.12 version. The upstream 6.12 version also does not contain the fix. This commit torvalds/linux@f513997 implements the fix into the upstream driver which is present for for versions 6.15 onwards.

    It looks like this fix could be back-ported to the raspberry pi 6.12 version of the driver. Also the rpi-6.15.y branch contains the fix so I might try building and running that.

  3. mbway commented on Sep 12, 2025

    @mbway
    Author

    I built and ran the rpi-6.15.y branch (b07d612) and that gives a slightly different frame rate:

    $ rpicam-vid --list-cameras
    Available cameras
    -----------------
    0 : imx219 [3280x2464 10-bit RGGB] (/base/soc/i2c0mux/i2c@1/imx219@10)
        Modes: 'SRGGB10_CSI2P' : 640x480 [200.16 fps - (1000, 752)/1280x960 crop]
                                 1640x1232 [81.07 fps - (0, 0)/3280x2464 crop]
                                 1920x1080 [47.57 fps - (680, 692)/1920x1080 crop]
                                 3280x2464 [21.19 fps - (0, 0)/3280x2464 crop]
               'SRGGB8' : 640x480 [200.16 fps - (1000, 752)/1280x960 crop]
                          1640x1232 [81.07 fps - (0, 0)/3280x2464 crop]
                          1920x1080 [47.57 fps - (680, 692)/1920x1080 crop]
                          3280x2464 [21.19 fps - (0, 0)/3280x2464 crop]
    

    (200.16 instead of 206.65) and when actually recording, there seems to be many more frame skips than the driver in 6.1

    rpicam-vid --level 4.2 --denoise cdn_off --framerate 300 --width 640 --height 480 --save-pts d.pts -o d.h264 --shutter 1000 --timeout 10000  -n
    

    then running ptsanalyze from here

    # kernel Linux pi3 6.15.11-v8+
    1829 frame skips (48%)
    average framerate 193fps
    

    compared to

    # kernel Linux pi3 6.1.93-v8+
    96 frame skips (4%)
    average framerate 197fps
    
  4. mbway commented on Sep 12, 2025

    @mbway
    Author

    cc @naushir since it seems you added the handling of the double frame rate in the upstream driver torvalds/linux@f513997

  5. naushir commented on Sep 12, 2025

    @naushir
    Contributor

    #7045 backports the commit in question back to the 6.12 tree. Looks to be working fine with my limited testing.

  6. mbway commented on Sep 12, 2025

    @mbway
    Author

    thanks @naushir for the fast fix :) I tested for myself and it also seems to work.

    There is a difference between the 6.12 behaviour and the 6.15 behaviour because on 6.12 I get the correct FPS and a low number of frame skips:

    pi@pi3:~/camera $ uname -a
    Linux pi3 6.12.45-v8+ #2 SMP PREEMPT Fri Sep 12 20:40:21 BST 2025 aarch64 GNU/Linux
    pi@pi3:~/camera $ rpicam-vid --list-cameras
    Available cameras
    -----------------
    0 : imx219 [3280x2464 10-bit RGGB] (/base/soc/i2c0mux/i2c@1/imx219@10)
        Modes: 'SRGGB10_CSI2P' : 640x480 [206.65 fps - (1000, 752)/1280x960 crop]
                                 1640x1232 [83.70 fps - (0, 0)/3280x2464 crop]
                                 1920x1080 [47.57 fps - (680, 692)/1920x1080 crop]
                                 3280x2464 [21.19 fps - (0, 0)/3280x2464 crop]
               'SRGGB8' : 640x480 [206.65 fps - (1000, 752)/1280x960 crop]
                          1640x1232 [83.70 fps - (0, 0)/3280x2464 crop]
                          1920x1080 [47.57 fps - (680, 692)/1920x1080 crop]
                          3280x2464 [21.19 fps - (0, 0)/3280x2464 crop]
    
    
    122 frame skips (5%)
    average framerate 194fps
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions