duetcontrolserver 100% CPU
-
@chrishamm No third party plugins are installed at present. I was using the CNC specific web UI before it got merged into the main code. Not sure if anything would be left from that after the upgrade to 3.4.
-
@chrishamm Oh and Ill check the voltage next time it happens.
-
@chrishamm I wiped and reinstalled the Pi to see if maybe it was something left behind. It did it again:
DuetControlServer is currently spiking up to 100% of a CPU core according to htop. This is a full install of DuetPi (ie not the Lite version). I have closed the web interface so nothing is running on the desktop.
pi@duet3:~ $ sudo vcgencmd get_throttled throttled=0x0
That is the output of the command you asked about.
EDIT:
I checked the journalctl output for the duetcontrolservice and this is what it is showing:Jun 27 20:37:14 duet3 systemd[1]: Starting Duet Control Server...
Jun 27 20:37:15 duet3 DuetControlServer[10809]: Duet Control Server v3.4.1
Jun 27 20:37:15 duet3 DuetControlServer[10809]: Written by Christian Hammacher for Duet3D
Jun 27 20:37:15 duet3 DuetControlServer[10809]: Licensed under the terms of the GNU Public License Version 3
Jun 27 20:37:15 duet3 DuetControlServer[10809]: [info] Settings loaded
Jun 27 20:37:16 duet3 DuetControlServer[10809]: [info] Environment initialized
Jun 27 20:37:16 duet3 DuetControlServer[10809]: [fatal] Could not connect to Duet: Timeout while waiting for transfer ready pin
Jun 27 20:37:16 duet3 systemd[1]: duetcontrolserver.service: Main process exited, code=exited, status=69/UNAVAILABLE
Jun 27 20:37:16 duet3 systemd[1]: duetcontrolserver.service: Failed with result 'exit-code'.
Jun 27 20:37:16 duet3 systemd[1]: Failed to start Duet Control Server.
Jun 27 20:37:16 duet3 systemd[1]: duetcontrolserver.service: Service RestartSec=100ms expired, scheduling restart.
Jun 27 20:37:16 duet3 systemd[1]: duetcontrolserver.service: Scheduled restart job, restart counter is at 4217.
Jun 27 20:37:16 duet3 systemd[1]: Stopped Duet Control Server.
Jun 27 20:37:16 duet3 systemd[1]: Starting Duet Control Server...
Jun 27 20:37:17 duet3 DuetControlServer[10842]: Duet Control Server v3.4.1
Jun 27 20:37:17 duet3 DuetControlServer[10842]: Written by Christian Hammacher for Duet3D
Jun 27 20:37:17 duet3 DuetControlServer[10842]: Licensed under the terms of the GNU Public License Version 3
Jun 27 20:37:17 duet3 DuetControlServer[10842]: [info] Settings loaded
Jun 27 20:37:18 duet3 DuetControlServer[10842]: [info] Environment initialized
Jun 27 20:37:18 duet3 DuetControlServer[10842]: [fatal] Could not connect to Duet: Timeout while waiting for transfer ready pin
Jun 27 20:37:18 duet3 systemd[1]: duetcontrolserver.service: Main process exited, code=exited, status=69/UNAVAILABLE
Jun 27 20:37:18 duet3 systemd[1]: duetcontrolserver.service: Failed with result 'exit-code'.
Jun 27 20:37:18 duet3 systemd[1]: Failed to start Duet Control Server.
Jun 27 20:37:18 duet3 systemd[1]: duetcontrolserver.service: Service RestartSec=100ms expired, scheduling restart.
Jun 27 20:37:18 duet3 systemd[1]: duetcontrolserver.service: Scheduled restart job, restart counter is at 4218.
Jun 27 20:37:18 duet3 systemd[1]: Stopped Duet Control Server.Looks like it is constantly restarting which is why it is taking up so much processing power.
-
@cthulhulabs Yes, that seems to be it. Does the status LED of your MB6HC flash in regular intervals? Can you confirm that it is running RRF 3.4.1 as well? And do you have no microSD card in your Duet?
-
@chrishamm There is no SD card in the MB6HC. My MB6HC does not have any LEDs on because I have the 24V power supply turned off and I am not powering the 5V from the SBC.
-
@cthulhulabs With the 6HC off, the Pi will try multiple times to connect to the Duet.
-
@stephen6309 Right but if I power the Pi on with the MB6HC off the DuetControlServer process will do this 100% spiking thing. If I then turn the MB6HC on the DuetControlServer process will start up properly and only consume 3% of the CPU. I can then turn off the MB6HC and the DuetControlServer process will continue to run just fine using 3% of the CPU. If I turn the MB6HC back on it will connect just fine.
-
@cthulhulabs You should deliver 5V to the Duet as well if you turn off the input power but leave the SBC on. If you don't do that, the DSF service will keep trying to connect but obviously that fails every time. You could also edit the DCS service file (
sudo systemctl edit duetcontrolserver
) and increaseStartLimitIntervalSec
to the desired delay between the start attempts. -
@chrishamm Ok. I already ordered this 5V supply to power both the Duet and the SBC from:
https://www.amazon.com/LRS-50-5-Switching-Supply-Single-Output/dp/B019GYOCMM/
Should be here today. Is this the correct way to do that?
@cthulhulabs said in duetcontrolserver 100% CPU:
To do this I am assuming I would remove the jumper from the Internal 5V En pins and move it to the 5V -> SBC pins. Then attach the 5V supply to the EXT 5V header.
-
@cthulhulabs Remove the internal 5V EN jumper and then you have two options:
- Connect your new 5V supply to the EXT 5V header
- Bridge "5V -> SBC" + "SBC -> 5V" and use the existing 5V supply from your SBC to power the Duet as well. It is recommended to do this only if your existing 5V supply has enough spare capacity and if it isn't set to more than 5.2V
-
@chrishamm I would like to power both the SBC and the MB6HC from the same 5V supply and get rid of the power supply on the SBC. The new 5V supply is 10A and has a fine adjust for the voltage so I can set it to 5.2V.
-
@cthulhulabs said in duetcontrolserver 100% CPU:
@chrishamm I would like to power both the SBC and the MB6HC from the same 5V supply and get rid of the power supply on the SBC. The new 5V supply is 10A and has a fine adjust for the voltage so I can set it to 5.2V.
OK, then just remove INT 5V EN and bridge the other two jumpers as advised. There is no need to tweak the output voltage further if your Pi doesn't report an undervoltage event; just make sure it never exceeds 5.2V or you risk damage to certain parts on the MB6HC.
-
@chrishamm So attach the supply to the EXT 5V header, remove INT 5V EN jumper, and jumper both SBC -> 5V and 5V -> SBC? Just want to be 100% certain I am doing this right. Hate to fry something.
-
@cthulhulabs You won't need the EXT 5V header if you use the other two jumpers; the ribbon cable to the SBC can supply 5V already.
So before you start get a multimeter and check your existing 5V supply and ensure it isn't set to anything higher than 5.2V. If it's plain 5V, even better. Then power everything down, remove "INT 5V EN", and bridge "5V -> SBC" and "SBC -> 5V". Then you won't need to use EXT 5V at all.
-
@chrishamm Umm.... where do I plug the powersupply into then? I was planning on powering the SBC from the MB6HC as the SBC's 5V pins are covered by the ribbon cable and the power supply doesnt have a USB-C output to plug into the Pi 4's power port.
-
@cthulhulabs I use these on my 5vdc power supply: https://www.amazon.com/gp/product/B081JGZK14 and a usb cable to the PI.
-
@cthulhulabs I am confused. Didn't you say the original problem only started showing up when you turned off the Duet but left the SBC running? If that is the case, how did you power the SBC in the first place? I assumed you had a USB cable connected to the SBC which was in charge of the 5V supply already.
Nevertheless, if you want to provide 5V to the Duet and power ONLY the SBC from there, do the following:
- Check if your 5V PSU is set to 5V (no more than 5.2V)
- Connect 5V from your PSU to the EXT 5V header
- Remove the INT 5V jumper
- Bridge "5V -> SBC" and "SBC -> 5V"
If you want to connect extra devices to the SBC, it is highly recommended to power the SBC separately using a USB-C cable (e.g. this). The reason is that both 5V supply lines of the ribbon cable should not exceed 2A total and with a Pi 4 + extra peripherals you would probably exceed that.