[SOLVED] K1C Firmware 1.3.5.22 - Internal Camera Working Again in Mainsail/Fluidd

After spending several hours troubleshooting this together with ChatGPT, I finally found a solution that works on my K1C running firmware 1.3.5.22 with the new camera hardware.

I hope this saves someone else a lot of time.

Symptoms

After updating to 1.3.5.22:

  • Camera still works in Creality Print

  • AI detection still works

  • Camera disappears from Mainsail/Fluidd

  • Camera Settings Control cannot be installed (“not compatible with the new hardware version”)

  • /webcam/?action=stream no longer works

  • No mjpg_streamer service is running

What I found

The firmware no longer streams directly from the UVC device.

Instead, Creality uses:

cam_app

which writes camera frames into shared memory:

/dev/shm/camera_main

The existing input_uvc.so method is no longer usable.

Trying to start MJPG Streamer with input_uvc.so results in:

undefined symbol: parse_resolution_opt

The correct plugin is actually:

input_memfd.so

Why this works:

Based on the behavior observed during troubleshooting, the firmware update appears to have changed the camera pipeline rather than simply blocking MJPEG access.

The camera is now managed by cam_app, which feeds WebRTC and the AI services while exposing the image through a shared memory buffer (/dev/shm/camera_main).

The legacy input_uvc.so plugin no longer works on this firmware (it fails with undefined symbol: parse_resolution_opt), but input_memfd.so is still present and successfully reads the shared-memory frames produced by cam_app.

This patch does not access the camera device directly (/dev/video*) and does not replace Creality’s camera pipeline. It simply starts mjpg_streamer using input_memfd.so, exposing the existing shared-memory stream as MJPEG for Mainsail/Fluidd.

During testing, Creality Print, WebRTC and AI-related processes (cam_app, cx_ai_middleware, webrtc, webrtc_local) all continued running normally.

First test

Before modifying anything, I tested this manually:

/usr/bin/mjpg_streamer \
-i "/usr/lib/mjpg-streamer/input_memfd.so -t 0" \
-o "/usr/lib/mjpg-streamer/output_http.so -p 8080"

Immediately afterwards:

  • port 8080 opened

  • Mainsail camera started working

  • Creality Print continued working

  • AI functions continued working

So the solution was confirmed.

Permanent fix

My firmware did not contain the /etc/init.d/S50usb_camera script mentioned by another user.

Instead, I created a new startup service:

/etc/init.d/S59mjpg_streamer

with this content:

#!/bin/sh

case "$1" in
start)
    i=0
    while [ ! -e /dev/shm/camera_main ] && [ $i -lt 30 ]; do
        sleep 1
        i=$((i+1))
    done

    pidof mjpg_streamer >/dev/null && exit 0

    /usr/bin/mjpg_streamer \
        -b \
        -i "/usr/lib/mjpg-streamer/input_memfd.so -t 0" \
        -o "/usr/lib/mjpg-streamer/output_http.so -p 8080"
    ;;

stop)
    killall -q mjpg_streamer
    ;;

restart)
    $0 stop
    sleep 1
    $0 start
    ;;

*)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
    ;;
esac

exit 0

Then:

chmod +x /etc/init.d/S59mjpg_streamer

Since rcS automatically executes every executable S??* script inside /etc/init.d, the service starts automatically on every boot.

Result

After reboot:

:white_check_mark: Camera works in Mainsail

:white_check_mark: Camera still works in Creality Print

:white_check_mark: AI features still appear to work

:white_check_mark: WebRTC is still running

:white_check_mark: CPU usage increased by only around 2%

No other changes were required.

Backup

Since firmware updates may overwrite /etc/init.d, I also saved a copy:

cp /etc/init.d/S59mjpg_streamer /usr/data/S59mjpg_streamer

Restoring after a firmware update is simply:

cp /usr/data/S59mjpg_streamer /etc/init.d/
chmod +x /etc/init.d/S59mjpg_streamer

Credits

This solution was developed after a long troubleshooting session with ChatGPT. The investigation combined community reports, testing on the printer itself, and analysis of the firmware behavior. The key discovery was that the new camera hardware no longer uses input_uvc.so; instead, it exposes frames through cam_app and input_memfd.so, allowing MJPG Streamer to publish the existing video stream without interfering with Creality Print or the AI pipeline.

6 Likes

Thx for sharing this!

1 Like

Very nice ! Thanks for sharing

1 Like

Thank you.

1 Like

I’ve been searching for a fix for 4 days! Thanks a lot for finding this solution — Gemini helped me simplify the script a little, and now everything works perfectly

#!/bin/sh
case “$1” in
start)
pidof mjpg_streamer >/dev/null && exit 0
/usr/bin/mjpg_streamer
-b
-i “/usr/lib/mjpg-streamer/input_memfd.so -t 0”
-o “/usr/lib/mjpg-streamer/output_http.so -p 8080”
;;
stop)
killall -q mjpg_streamer
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo “Usage: $0 {start|stop|restart}”
exit 1
;;
esac
exit 0

1 Like

I can confirm that this works for both Fluidd and the default Creality web UI.

1 Like

Can confirm this is working for me. Thank you for creating this writeup.

1 Like

Thx, works perfect.

1 Like

спустя 2 дня решил проблему запуска камеры во флюиде! через SSH в ручную через звпус порта срабатывала а вот после перезаска всё с начала ! так вот 2 дня разговоров с AI она мне выдала команду в SSH!

cat << ‘EOF’ > /etc/init.d/S50usb_camera
#!/bin/sh

Фикс автозапуска камеры для K1 Max 1.3.5.22

case “$1” in
start)

Ждем до 30 секунд, пока Creality создаст буфер камеры в памяти

i=0
while [ ! -f /dev/shm/camera_main ] && [ $i -lt 30 ]; do
sleep 1
i=$((i+1))
done

echo "Запуск mjpg_streamer..."
/usr/bin/mjpg_streamer -i "/usr/lib/mjpg-streamer/input_memfd.so -t 0" -o "/usr/lib/mjpg-streamer/output_http.so -p 8080" &
;;

stop)
killall mjpg_streamer
;;
restart)
$0 stop
sleep 1
$0 start
;;
esac

exit 0
EOF

и о чудо всё работает ! после перезагрузки всё тоже работает!

спасибо автору за направление в поиске решения проблемы

2 Likes

Hello,

Thank you for your help ! I had also he same problem since the last firmware on my k1SE. My camera is gone!!

I test your solution with:

/usr/bin/mjpg_streamer \ > -i "/usr/lib/mjpg-streamer/input_memfd.so -t 0" \ > -o "/usr/lib/mjpg-streamer/output_http.so -p 8080" 

The camera reappeared but as you can see, the screen is too dark!!!

Can you help me ?

I know just enough to do what I need to with my K1max and have to rely on the helper script to get moonraker, fluid and mainsail onto the machine. Does anyone know if this fix is being added into the helper script for those illiterate to manually editing firmware code like myself?

I just updated the firmware and reinstalled the helper script and all the upgrades, and i get on to find the camera is down. I see the fix listed above, but idk enough about coding to know what to do with it.

Thank you very much for all your effort. You guys could help us, who don’t know what you guys are talking about here? Where should we insert this script? I would really appreciate it, if somebody could help me out.

Upgraded to the 20T pulleys, installed the latest mainboard(had the original old mainboard initially with the big pulleys), but I have lost the camera.