Hi,
Please find the answer to your questions:
1. The code is part of Marlin, except point five that I removed from cura because not working anymore since I changed the bed holder structure
2. Because my machine has been customized, not sure that reseting to factory settings will totally fix the problem
--> Hictop with some upgrades: E3d hothend with custom holder, proximity sensor, better quality bedholder (aluminium structure), reworked brackets
3. I upload the firmware with the arduino app, not from cura or octoprint. By reset the firmware, do you mean clear the memory from the lcd screen menu may be ?
4. About your last question, yes I did :-)
--> The head is about 35 mm behind the center and 15 mm on the right.
Please find a link to my config file (Marlin): here
Here, my start code in cura as well
G28
G90 ; absolute positioning
G21 ; units to mm
G29 ; auto level bed (G29 assumes position is home XYZ = 0, auto levels, moves to XYZ = 0)
G1 X100 Y100 Z10
M300
M0
G1 Z4.0 ; Glass bed thicknes
G92 Z0
G1 X3 Y6 F3000 ;move to front left corner
M104 S{material_print_temperature} ;Start heating extruder
M140 S{material_bed_temperature} ;Start heating bed
M109 S{material_print_temperature} ;Wait for extruder to reach temp before proceeding
M190 S{material_bed_temperature} ;Wait for bed to reach temp before proceeding
M83 ; extruder relative mode
G1 Z.4 F200 ; raise Z .4mm @ 5mm/s **Change this to to your nozzle size**
G1 X15 E2.0 F75 ; extrude a thick line of 2 mm of filament **This should be good for .35 to .50 nozzles**
M82 ; extruder to absolute mode
G92 E0 ; reset E to 0 **Print G-code takes over from here**
Hope that it will help a little bit.