Skip to content

Add Disable Creality Stock Services for K1C 2025 - #17

Open
arlophoenix wants to merge 1 commit into
C0DEbrained:mainfrom
arlophoenix:feat/k1c-2025-disable-creality-stock-services
Open

Add Disable Creality Stock Services for K1C 2025#17
arlophoenix wants to merge 1 commit into
C0DEbrained:mainfrom
arlophoenix:feat/k1c-2025-disable-creality-stock-services

Conversation

@arlophoenix

@arlophoenix arlophoenix commented Jul 27, 2026

Copy link
Copy Markdown

Creality's stock K1C 2025 firmware runs a telemetry agent, alchemistp, whose only job is to upload printer configuration and logs to Creality. This isn't theoretical — a passive capture on a helper-managed unit caught it resolving devdata.cxswyjy.com and completing a TLS handshake to 98.86.129.225:443, on a printer whose stock cloud blocklist was already active. Alongside it, three more daemons become dead weight once the Built-in Camera Fix is installed: onyxp (cloud WebRTC signalling, which also beacons the printer's serial and MAC at every boot and appends to a never-rotated log every ten seconds — 51.8 MB on the reference unit), thirteenthp (an unauthenticated HTTP media server on 0.0.0.0:8000) and solusp (AI failure detection). All three are blind once mjpg_streamer owns /dev/video0.

This adds a Customize-menu option to disable those daemons and a matching restore, in the same shape as the existing Creality Web Interface pair. The rename uses a disabled. prefix rather than a .disabled suffix, because rcK globs CS??* on this model and a suffix would still match — the same prefix convention the Moonraker service and the Klipper configuration lock already use here.

The WebRTC and AI daemons are gated on the Built-in Camera Fix specifically, not on any camera fix. USB Camera Support filters /dev/video0 out of its device list, so a USB-only install leaves the built-in camera free and those daemons still serving it — gating on either fix would silently remove a working feature. Without the built-in fix, only the telemetry agent is touched and the skipped daemons are named on screen. klipper, nexusp, quintusp and vectorp sit in an enforced refuse-list that carries both the S and CS name forms, since the init script names vary by firmware; quintusp in particular owns the power-loss GPIO. mDNS is a separate opt-in, because disabling it breaks .local resolution and Creality Print discovery. Stopping all five moved available memory by 13.2 MiB on a 200 MB machine; the larger win is the removed background IO.

Both directions are written to fail safely. Every rename is guarded, because helper.sh sets set -e process-wide and functions.sh run() invokes the action as a bare $1 — an unguarded mv would kill the whole helper after the daemon had already been stopped. Neither direction overwrites an existing file, so a firmware update that recreates an init script cannot be clobbered by a later restore. The print-state check consults both port 7126 and 7125, treats only explicitly known-idle states as idle, and falls through to a confirmation prompt on anything it cannot parse. The completion message reports how many services actually changed rather than asserting success, and warns if a process is still running.

Worth knowing: /usr/apps/etc/init.d is on p8 and survives a factory reset, so a reset will not undo this — the restore option is the way back. With solusp gone, action:cancel no longer appears in klippy.log; that string comes from Creality's own cancel handler, and the native pause_resume/cancel path triggers the quick stop directly, so its absence is expected rather than a regression.

Test plan

  • Rename mechanism applied by hand on a K1C 2025 (V1.0.0.22.20250711S), printer idle: all five renamed and stopped, CS??* reduced to exactly the four survivors, klippy stayed ready, Fluidd/Moonraker/camera/nexusp still serving, ports 5353 and 8000 closed.
  • Reboot-verified on that unit: all five stayed down across a real boot, and ports 5353 and 8000 did not return.
  • Touchscreen Stop confirmed working with solusp disabled — cancel arrives as pause_resume/cancel from quintusp; print returned to standby, klippy stayed ready.
  • Disable/restore logic exercised against a simulated init.d (not hardware): USB-only install leaves the WebRTC tier running, built-in fix unlocks it, a failed rename reports and does not kill the helper, restore preserves a firmware-recreated script, the print guard returns idle/printing/undetermined correctly including a decoy "state" key, and the refuse-list blocks both S and CS forms.
  • The helper menu flow itself (disable → restore → disable via the new Customize entries) exercised on-printer.

Not addressed

Removing the Built-in Camera Fix while these services are disabled leaves the printer with no camera server at all, and usb_camera.sh has no awareness of this option to warn about it. Fixing that means touching the camera feature's own removal paths, so it is left for a follow-up rather than widened into this PR.

No firmware allowlist, unlike Restore Input Shapers: every rename is existence-guarded, so a firmware with a different daemon set is a no-op rather than a breakage. With solusp disabled, quintusp still requests AI detection at print start and waits out a ~10 s timeout before giving up — harmless, but it delays print start by a few seconds. Setting ai_detect.enable: 0 in system_config.json removes it; that isn't automated here because "enable" appears in four blocks of that file and a careless edit would also flip powerloss_continue.

Creality's stock 2025 firmware runs a telemetry agent, alchemistp, that
uploads printer configuration and logs to Creality, plus WebRTC and AI
daemons that go inert once the Built-in Camera Fix takes /dev/video0.

Adds a Customize-menu option to disable them and a matching restore, in
the shape of the existing Creality Web Interface pair. The rename uses a
"disabled." prefix rather than a ".disabled" suffix: rcK iterates over
CS??* on this model, which still matches a suffixed name, so a suffix
would be a silent no-op.

onyxp, thirteenthp and solusp are gated on the Built-in Camera Fix
specifically, not on any camera fix - USB Camera Support filters out
/dev/video0, so a USB-only install leaves those daemons serving a
working built-in camera. klipper, nexusp, quintusp and vectorp are in an
enforced refuse-list carrying both the S and CS name forms.

Renames are guarded so a failure cannot abort the helper mid-sequence,
neither direction overwrites an existing file, the print-state check
fails safe to a confirmation prompt on anything it cannot parse, and the
completion message reports what actually changed.
@arlophoenix
arlophoenix force-pushed the feat/k1c-2025-disable-creality-stock-services branch from 449baf1 to 30c5935 Compare July 27, 2026 20:24
@arlophoenix
arlophoenix marked this pull request as draft July 27, 2026 20:34
@arlophoenix
arlophoenix marked this pull request as ready for review July 27, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant