beat one's head against a wall

To struggle uselessly against something that can't be beaten or helped; not succeed after trying very hard.
Trying to make him change his mind is just beating your head against a wall.
Categories: {v. phr.}