config.g disappears
-
@tinken Yea my brand New Duet 3 mini is doing that. Lucky for me my friend has a exact clone of my Printer. His Duet 3 mini works great, but mine the Duet 3 mini is crazy as my friend said to me. My Duet 3 mini freezes and the Config file is no more. We think it a bad card reader on mine. as we swap my Duet 3 mini with his and his works perfectly on my Printer. My duet 3 mini has the same problem when we try it on his printer. Please note all firmwares and printers were 100% the same and we tried new SD cards. Also no editing config.g via DWC at the time this was happening. Also It looks like more this just the config file is gone, some time other file go with it.
-
@phaedrux Just the config.g missing, nothing else. I was editing the config.g via DWC the night before. I didn't notice the missing file until I turned the machine back on the next day.
-
@Phaedrux
Just wondering when config.g.bak is created/overwritten? The very moment, I click on edit config.g or when the printer is powered up?
I'm puzzled, because I read that an empty config.g would cause an empty config.g.bak after startup?! -
@o_lampe its created on edit
-
@jay_s_uk said in config.g disappears:
@o_lampe its created on edit
That would make sense, but would imply that this action goes wrong and ends up with an empty .bak file.
A simple routine[pseudo code] if filesize.config.g > 0 => write backup file else echo " warning, SD card read failure"
would help...
-
@phaedrux Yes just the config.g file while I was editing it .
-
We're looking into the config.g disappearances, as it has been reported by a number of people. So far I've seen reports of this from:
@tecno RRF 3.3RC2 (2021-05-11 14:55:40) running on Duet 3 Mini5plus WiFi (standalone mode)
@Tinken RRF 3.2.2 running on Duet 3 Mini5plus Ethernet (standalone mode)
@dino1 Duet 3 Mini 5+
@norwestie RRF3.2.2 running on Duet 3 Mini5plus Ethernet (standalone mode)
@idaho-creator RRF 3.2 running on Duet 3 Mini5plus WiFi (standalone mode)
@peter247 RRF 3.2.2 running on Duet 3 Mini5plus WiFi (standalone mode)If there is anyone else, please post in this thread.
Generally, config.g seems to disappear when it's saved after editing. This is what should happen when you edit config.g:
- When you open the file to edit, it is downloaded to the browser. No saving happens until you click 'Save'.
- When you click 'Save', DWC deletes config.g.bak and renames the existing config.g to config.g.bak
- The edited config.g is uploaded to config.g.part and is CRC32-checked (make sure you have 'Use CRC32 checksums for uploads' enabled in DWC > Settings > Machine-Specific > General > Communication)
- If successful (including correct CRC) config.g.part is renamed to config.g
- If unsuccessful, an error message is written informing the user about a CRC mismatch and config.g.part is deleted. At this point there is no config.g (it's been renamed to config.g.bak), but if reset RRF will boot using config.g.bak.
Notes:
- If there is no config.g file, RRF will attempt to run config.g.bak on startup if it exists (this has been a feature since RRF 2.0). It does not copy/rename/overwrite config.g.bak to config.g
- If you don't choose to reboot after editing and saving config.g, the config.g may still not have uploaded properly, but you won't notice until you try to edit it again, or reboot later.
There appears to be a number of reasons for the config.g disappearing:
- Network dropout during save (Ethernet or WiFi) - some of the users above reported config.g disappeared after a network problem when saving.
- SD card corruption - more difficult to pinpoint, but can cause any file to disappear, and because config.g is the most often changed, it's particularly susceptible. To check/test SD card see https://duet3d.dozuki.com/Wiki/SD_Card#Section_Troubleshooting_SD_Card_issues
- SD card socket failure - clearly a problem for a couple of the users above, and have had their Duet 3 Mini 5+ replaced under warranty. To check, see https://duet3d.dozuki.com/Wiki/SD_Card#Section_SD_Card_Socket
- Firmware issue - the save mechanism hasn't changed for a long time, and has generally been robust, so it doesn't seem like there's a bug. However, this issue does seem specific to Duet 3 Mini 5+, so there may be something specific to this board interfering with the save. Need more feedback to understand if this is where the issue lies.
If you had both config.g and config.g.bak disappear, I'd generally suspect an SD card issue (because the renaming of config.g to config.g.bak has failed, as well as writing config.g to the SD card), but may be caused by a faulty SD socket.
EDIT: to try and catch this error, please save config.g as normal, but don’t reboot. Refresh file list, and check config.g and config.g.bak are present, and content is correct. If not please report what is wrong and any errors reported.
Ian
-
@droftarts I think my case was wifi drop out and I've edited config.g many times without any problems , But my board is not in use as of yet .
My SD card is I think 8gb , but only a part of it is used , should I format the other partition or extend the default one ?
Also how do you know how much space or how much is used ? -
@peter247 there should be a FAT32 partition that the Duet reads directly (check the size and free with M39 https://duet3d.dozuki.com/Wiki/Gcode#Section_M39_Report_SD_card_information ) and ab ext3 (or 4 can’t remember) to boot/run on RPi SBC. If you don’t plan to use an SBC you can reformat the card to use the full size.
Ian
-
This post is deleted! -
@phaedrux In my sig, Mini 5+ Ethernet
-
@droftarts I had my config file disappear this morning after an edit. Thankfully I was able to copy and paste from the configbak file. First time on my 3HC although it happened frequently on my diet 2 wifi. RRF 3.4 is running now.
-
@damaged_goods said in config.g disappears:
RRF 3.4 is running now.
It was running 3.4 when it went missing?
-
I have had this happen to me several times. The first time I assumed I did something wrong as I was setting up my printer. This last time I was printing, then turned it off for a month or so, tonight turned it back on and no config.g file. Well I have the file but it is empty. This is most frustrating and I hope it is getting sorted out.
-
@cncmachineguy Happened to me as well. No useful responses beyond a statement that there is a bug, so I now keep an up-to-date backup copy on my computer. See this short thread: https://forum.duet3d.com/topic/31280/config-g-disappeared?_=1679282976730
-
@cncmachineguy said in config.g disappears:
I have had this happen to me several times. The first time I assumed I did something wrong as I was setting up my printer. This last time I was printing, then turned it off for a month or so, tonight turned it back on and no config.g file. Well I have the file but it is empty. This is most frustrating and I hope it is getting sorted out.
What firmware and DWC version were you running when it was lost?
-
@Phaedrux It looks like I am on 3.3RC? and 3.4.0 DWC version
I suppose I need to upgrade to 3.4 - off to find out how -
The easiest way is to upload the full zip file to the system tab in DWC.
https://github.com/Duet3D/RepRapFirmware/releases/download/3.4.5/Duet2and3Firmware-3.4.5.zip
If that still doesn't do it, you can to a more manual process here:
https://docs.duet3d.com/en/User_manual/RepRapFirmware/Updating_firmware