Today I moved my CB2 from BTT’s old bullseye image over to the beta bookworm image. I moved my Klipper config over after installing via Kiauh. I followed the instructions in the Klipper docs to enable the Linux service:
I had followed these instructions before without any problems. But now, every time I reboot the machine Klipper fails with message:
Unable to open temperature file '/sys/class/thermal/thermal_zone0/temp'
Once the underlying issue is corrected, use the "RESTART"
command to reload the config and restart the host software.
Printer is halted
When I ssh into the machine and look for that file, it is present. I believe there is some kind of timing issue where Klipper is looking for /sys/class/thermal/thermal_zone0/temp before it is made available?
If I restart Klipper (without rebooting the machine) the problem disappears and I can see the temperature of the CB2 SoC in fluidd.
If you cared, you could refine this approach with something like
#!/bin/bash
file="/sys/class/thermal/thermal_zone0/temp"
dir="$(dirname "$file")"
# Wait for the file to appear for max 15 seconds (returns as soon as the file appears)
while [ ! -f "$file" ]; do
inotifywait -qq -t 15 -e create -e moved_to "$dir"
done
exit 0
Put the content into a script file, e.g., wait_temp_file.sh, make it executable, and call it from the ExecStartPre directive.
This should return as soon as the file becomes available, but at maximum for 15 seconds.
Requires:
sudo apt-get install inotify-tools
Edit: Untested as I have no means of verifying. So, YMMV