change fuse setting

hello folks,
i wanted to restore the fuse of an atmega328p to the factory settings : arduino fuses values, so i connected the atmega328p to my arduino uno that i use as a programmer dumped the isp code into it and try to reprogramme the extended fuses using avrdude : avrdude -P /dev/ttyACM0 -b 25 -c avrisp -p m328p -u -U efuse:w:0x05:m
but the fuse value doesn't want to change, i tried many time, here is the error message that avrdude display :

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "0x05"
avrdude: writing efuse (1 bytes):

Writing |                                                    | 0% 0.00s ***failed;  
Writing | ################################################## | 100% 0.07s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0x05:
avrdude: load data efuse data from input file 0x05:
avrdude: input file 0x05 contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0xfd != 0x05
avrdude: verification error; content mismatch

avrdude done.  Thank you.

can please some one help me ?
have a good day.

This is a known problem caused by a change in the way AVRDUDE 6.3.0 handles unused fuse bits. To deal with this issue Arduino made some modifications to their version of AVRDUDE 6.3.0 to provide backwards compatibility with the fuse values that worked with older versions of AVRDUDE. Apparently you're either using Arduino's AVRDUDE 6.3.0 version from before the patch or you're using the official version of AVRDUDE 6.3.0.

You have two options:

  • Update the fuse value
  • Use the version of AVRDUDE included with the latest version of Arduino AVR Boards. This will give a warning about this issue but will not fail the verification.

hello,
thank you man,
i'm currently using ubuntu, so i tried to update and i removed entirely avrdude and re-install it, but the problem persist, so how can i update the fuse value?
i found on the system a file : /etc/avrdude.conf that contain all the atmel microcontroller and their settings but i'm a bit confused i found on the file only ATmega328, no the p one and :

  memory "lfuse"
	size = 1;
	min_write_delay = 4500;
	max_write_delay = 4500;
	read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
	       "x x x x x x x x o o o o o o o o";

	write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
	      	"x x x x x x x x i i i i i i i i";
    ;

    memory "hfuse"
	size = 1;
	min_write_delay = 4500;
	max_write_delay = 4500;
	read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
	       "x x x x x x x x o o o o o o o o";

	write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
	      	"x x x x x x x x i i i i i i i i";
    ;

    memory "efuse"
	size = 1;
	min_write_delay = 4500;
	max_write_delay = 4500;
	read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
	       "x x x x x x x x o o o o o o o o";

	write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
	      	"x x x x x x x x x x x x x i i i";
    ;

when i convert the efuse to hex it show 4 character, but the fuses that i want to set is : 0x05 (two char) ...
thanks for help

Unimplemented fuse bits must be written as 1's. Change the value in your command line from 0x05 to 0xFD.

i found on the file only ATmega328, no the p one

My guess for why that is is because the 328 and the 328P are identical in almost every way. The only difference I know of is that the 328P has a couple extra bits implemented in the MCUCR register that let you disable the brownout circuit before sleeping. This won't affect fuse flashing, so the same setting will work for the 328 and the 328P.