New Chat
  • Slides
  • Websites
  • Docs
  • Deep Research
  • Sheets
  • Agent Swarm
Kimi Code
Kimi Claw
Chat History
  • Get App
  • About Us
    • Visit Moonshot AI
    • Kimi Platform
    • Features
    • Terms of Service
    • Privacy Policy
  • Language
  • User Feedback

Imx708 on Pi4 Bookworm

They're trying to use a cam and a touchscreen; what steps are necessary for this setup to work properly?
The user is trying to use both a camera (IMX708) and a touchscreen simultaneously on a Raspberry Pi 4 with Bookworm. This is a common configuration that can cause conflicts, especially with display/graphics resources. Let me search for information about this specific setup.
Search
Raspberry Pi 4 touchscreen camera simultaneous use bookworm rpicam-still touchscreen display conflict libcamera X11 EGL preview touchscreen Raspberry Pi camera touchscreen display dtoverlay conflict
20 results
This is a crucial piece of information! The user is trying to use both a camera (IMX708) AND a touchscreen simultaneously on Raspberry Pi 4 with Bookworm. This is a known configuration that can cause conflicts.
Based on the search results, here are the key issues and solutions:

The Core Problem

When using both a camera and a touchscreen on Raspberry Pi 4, there are several potential conflicts:

1. I2C Bus Conflicts (Most Common)

The IMX708 camera uses I2C0 (GPIOs 0&1) for control. Many touchscreens also use I2C, which can create conflicts .
  • The camera connects via I2C0 through an internal multiplexer (i2c0mux)
  • GPIO-based touchscreens (like HyperPixel, some SPI displays) may use the same I2C pins or interfere with the multiplexer

2. Display/Graphics Conflicts

  • rpicam-apps use EGL/X11 for preview by default, which requires the vc4-kms-v3d overlay
  • Some touchscreens (especially SPI-based ones like common 3.5" TFTs) disable vc4-kms-v3d because they don't support hardware acceleration, causing the camera preview to fail

3. Resource Competition

Both devices compete for:
  • I2C buses
  • GPU/display resources
  • Memory bandwidth

Solutions to Make Both Work

Solution 1: Use the Official Raspberry Pi Touch Display (DSI)

The official Raspberry Pi 7" Touch Display uses the DSI connector and works well with cameras because:
  • It doesn't conflict with I2C0 used by the camera
  • It's fully supported by vc4-kms-v3d
  • No GPIO conflicts

Solution 2: For SPI/GPIO Touchscreens - Use --qt-preview

If using an SPI-based touchscreen (3.5" TFT, etc.) that requires disabling vc4-kms-v3d, force rpicam-apps to use Qt preview instead of EGL:
bash
Copy
rpicam-still --qt-preview -o test.jpg
This has a CPU performance hit but avoids the graphics conflict .

Solution 3: Proper I2C Configuration

If the touchscreen uses I2C, you may need to:
  1. Disable auto-detection and explicitly configure both devices in /boot/firmware/config.txt:
ini
Copy
# Disable auto-detection
camera_auto_detect=0
display_auto_detect=0

# Explicit camera overlay
dtoverlay=imx708

# For official DSI touchscreen
dtoverlay=vc4-kms-v3d
dtoverlay=vc4-kms-dsi-7inch
  1. For GPIO touchscreens that conflict with I2C0, you may need to:
    • Move the touchscreen to a different I2C bus (I2C5 on GPIOs 12&13 for Pi 4)
    • Or move the camera to use I2C0 on different pins (GPIOs 44&45 for Pi 4)

Solution 4: Disable Camera Preview (Headless Operation)

If you don't need to see the preview on the touchscreen, use:
bash
Copy
rpicam-still -n -o test.jpg  # -n = no preview
This avoids display conflicts entirely.

What to Check

  1. What type of touchscreen are you using?
    • Official DSI display: Should work with proper config
    • SPI/GPIO display: Likely needs --qt-preview or -n
    • HDMI+USB touch: Should work fine
  2. Check current config.txt:
    bash
    Copy
    cat /boot/firmware/config.txt | grep -E "(dtoverlay|camera|display)"
  3. Check for I2C conflicts:
    bash
    Copy
    i2cdetect -y 0  # Should show camera at 0x1a
    i2cdetect -y 1  # Check other I2C devices
  4. Check kernel messages:
    bash
    Copy
    dmesg | grep -i "imx708\|i2c\|unicam"

Most Likely Fix for Your Setup

Based on your error (buffer queue failure with working detection), try:
  1. Run without preview to isolate the issue:
    bash
    Copy
    rpicam-still -n -o test.jpg
  2. If that works, the issue is display/preview related. Either:
    • Use --qt-preview if you need preview
    • Keep using -n for headless operation
  3. Check if vc4-kms-v3d is enabled (required for EGL preview):
    bash
    Copy
    grep vc4-kms /boot/firmware/config.txt
  4. If using a GPIO/SPI touchscreen, it likely disabled vc4-kms-v3d - you may need to re-enable it and use --qt-preview instead.
What type of touchscreen are you using? This will help determine the exact configuration needed.