diff --git a/src/modules/klipper/filesystem/root/etc/systemd/system/klipper.service b/src/modules/klipper/filesystem/root/etc/systemd/system/klipper.service index 5efb6e36b..7868b4319 100644 --- a/src/modules/klipper/filesystem/root/etc/systemd/system/klipper.service +++ b/src/modules/klipper/filesystem/root/etc/systemd/system/klipper.service @@ -17,3 +17,4 @@ EnvironmentFile=/home/pi/printer_data/systemd/klipper.env ExecStart=/home/pi/klippy-env/bin/python $KLIPPER_ARGS Restart=always RestartSec=10 +CPUAffinity=3 diff --git a/src/modules/piconfig/start_chroot_script b/src/modules/piconfig/start_chroot_script index 8534ebdd2..16d68384e 100644 --- a/src/modules/piconfig/start_chroot_script +++ b/src/modules/piconfig/start_chroot_script @@ -99,4 +99,8 @@ EOF # Step 13: Fix locale echo_green "Generating and setting default locale to en_US.UTF-8..." # Use en_US.UTF-8 as default locale -raspi-config nonint do_change_locale en_US.UTF-8 \ No newline at end of file +raspi-config nonint do_change_locale en_US.UTF-8 + +# Step 14: isolate cpu 3 for klipper +echo_green "Isolating CPU 3 for Klipper..." +sed -i 's/console=tty1/console=tty1 isolcpus=3/' "${PICONFIG_CMDLINE_TXT_FILE}"