After using the Klipper firmware for some months, I just went back to Marlin. I have started using an LPC1768-based controller and I therefore use Marlin 2.0.
My problem is, if I send an M501 command via octoprint, I get the expected output, but I can't send any more commands. I can't even activate the hot end or start the cooling fan. I only get the control back if I reset octoprint. I can't just reload the page.
I tested it directly on my computer using pronterface, and the system reacts normally and does not freeze. I have also tried to run octoprint in safe mode without luck.
It seems to be a problem with OctoPrint, but I can't see anything out of the ordinary in either serial.log or octoprint.log. I even turned on debug in octoprint.log, but still nothing abnormal.
I use OctoPi version 0.15.1 on a Raspberry Pi 3B and OctoPrint version 1.3.8
After I looked at the output from the M501 again, I realized that Octoprint never gets a correct "ok" as a conclusion. The last line is "echo: ok". Thus, octoprint waits for the command to end and does not allow me to continue.
This is a bug in Marlin 2.0 (Marlin forgets to make a line break before sending an ok) and I will report this on Marlin's github page.