Uploading to ATmega328 from Raspberry Pi

I did initially suspected resonator, but then I realised that there is no problem when I upload sketches from PC.

I assume you essentially suggest that I go with a crystal and two 22pF capacitors?