The reports of how Saul died in 1 Samuel 31 and 2 Samuel 1 are un-related, that the former is true and the later is fabricated.
The death of Saul in 1 Samuel 31 did have witnesses.
7 When the Israelites along the valley and those across the Jordan saw that the Israelite army had fled and that Saul and his sons had died, they abandoned their towns and fled. And the Philistines came and occupied them.
11 When the people of Jabesh Gilead heard what the Philistines had done to Saul,
12 all their valiant men marched through the night to Beth Shan. They took down the bodies of Saul and his sons from the wall of Beth Shan and went to Jabesh, where they burned them.
Saul as the king of Israel, should have his royal soldiers protected him on escape. Though vv6 told 'and all his men' but this phrase didn't exist in the Septuagint. In vv11, if the people of Jabesh Gilead heard Saul was dead, it had to be from Saul's refugees rather than from the Philistines.
How did David know the Amalekite fabricated the story?
4 Saul said to his armor-bearer, “Draw your sword and run me through, or these uncircumcised fellows will come and run me through and abuse me.” (1 Samuel 31:4 NIV)
David should have known Saul, if Saul would not kill by uncircumcised fellow, how would he asked an Amalekite to kill him?
8 “He (Saul) asked me, ‘Who are you?’, “‘An Amalekite,’ I answered.
9 “Then he said to me, ‘Stand here by me and kill me! I’m in the throes of death, but I’m still alive.’ (2 Samuel 1:8-9 NIV)
David killed the Amalekite not because he did kill Saul, but because he claimed himself killed Saul
16 For David had said to him, “Your blood be on your own head. Your own mouth testified against you when you said, ‘I killed the Lord’s anointed.’” (2 Samuel 1:16 NIV)