Replace the stock display software with KlipperScreen for a native Klipper interface.
Important
This has been tested on the Q2 but not the QIDI Box. Going back to the stock software is simple - see "Reverting to Stock Software" at the end.
Note
First update your package sources by following the Debian Package Sources guide.
Note
First ensure KIAUH is properly updated and fixed by following the Updating and Fixing KIAUH guide.
-
Unhold X11 packages:
sudo apt-mark unhold xserver-common xserver-xorg-legacy -
Install KlipperScreen via KIAUH:
./kiauh/kiauh.shNavigate through the menu to install KlipperScreen. Use all defaults except for the NetworkManager question.
[!NOTE] The installation may appear frozen and can take up to 30 minutes. This is normal.
Create /etc/X11/xorg.conf.d/10-touchscreen.conf:
Section "InputDevice"
Identifier "GoodixTouch"
Driver "evdev"
Option "Device" "/dev/input/event0"
Option "Calibration" "2 473 6 277"
Option "SwapAxes" "0"
EndSection
Section "ServerLayout"
Identifier "Default Layout"
InputDevice "GoodixTouch" "SendCoreEvents"
EndSection
- Edit
/home/mks/KlipperScreen/scripts/KlipperScreen-start.sh - Find the line with
exec /usr/bin/xinit(second to last line) - Replace it with:
exec /usr/bin/xinit $KS_XCLIENT -- :0 -seat seat1 -allowMouseOpenFail -sharevts -novtswitch -noreset
Edit the KlipperScreen systemd service:
sudo systemctl edit KlipperScreen
Add this section under the first two commented lines:
[Unit]
ConditionPathExists=
-
Stop the stock display software:
sudo systemctl stop makerbase-client -
Start KlipperScreen:
sudo systemctl restart KlipperScreen -
If KlipperScreen appears and works correctly, disable the stock software:
sudo systemctl disable makerbase-client
Add these macros to your printer.cfg to enable load/unload buttons:
[gcode_macro UNLOAD_FILAMENT]
description: filament unload
gcode:
M603
# uncomment if using spoolman
# {action_call_remote_method(
# "spoolman_set_active_spool",
# spool_id=None
# )}
[gcode_macro LOAD_FILAMENT]
gcode:
RESPOND TYPE=command MSG="action:prompt_begin Pick temperature"
RESPOND TYPE=command MSG="action:prompt_button 220|LOAD_FILAMENT_WITH_TEMP S=220|primary"
RESPOND TYPE=command MSG="action:prompt_button 250|LOAD_FILAMENT_WITH_TEMP S=250|primary"
RESPOND TYPE=command MSG="action:prompt_button 270|LOAD_FILAMENT_WITH_TEMP S=270|primary"
RESPOND TYPE=command MSG="action:prompt_button 300|LOAD_FILAMENT_WITH_TEMP S=300|primary"
RESPOND TYPE=command MSG="action:prompt_show"
[gcode_macro LOAD_FILAMENT_WITH_TEMP]
gcode:
{% set mode = params.T|default(0)|int %}
{% set temp = params.S|default(250)|int %}
M604 T{mode} S{temp}
RESPOND TYPE=command MSG="action:prompt_begin Loading successful?"
RESPOND TYPE=command MSG="action:prompt_button Yes|RESPOND MSG='Done loading.'|primary"
RESPOND TYPE=command MSG="action:prompt_button No|LOAD_FILAMENT_WITH_TEMP T=1 S={temp}|error"
RESPOND TYPE=command MSG="action:prompt_show"Important
If using OrcaSlicer, remove UNLOAD_FILAMENT from the print end G-code to prevent filament cutting after each print.
Enable G-code switching between KlipperScreen and stock software:
-
Run
sudo visudoand add:ALL ALL=(ALL) NOPASSWD: /bin/systemctl start KlipperScreen, \ /bin/systemctl stop KlipperScreen, \ /bin/systemctl start makerbase-client, \ /bin/systemctl stop makerbase-client, \ /bin/systemctl is-active KlipperScreen -
Add to your printer.cfg:
[gcode_shell_command swap_screen] command: bash -c "if systemctl is-active --quiet KlipperScreen; then sudo systemctl stop KlipperScreen && sudo systemctl start makerbase-client; else sudo systemctl stop makerbase-client && sudo systemctl start KlipperScreen; fi" timeout: 30. verbose: True [gcode_macro SWAP_SCREEN] gcode: RUN_SHELL_COMMAND CMD=swap_screen
Use SWAP_SCREEN in the console to switch interfaces. Takes ~5s to stock software, ~15s to KlipperScreen. Can be done mid-print.
To permanently switch back to the stock display software:
-
Stop and disable KlipperScreen:
sudo systemctl disable --now KlipperScreen -
Enable and start the stock software:
sudo systemctl enable --now makerbase-client
After a reboot, the stock display software will start automatically.