Green’s Dictionary of Slang

not all there adj.

also elsewhere
[the root phr. of many synons., all commenting adversely on the subject’s intelligence, e.g. all those at ...short of... adj.; elevator doesn’t go to the top floor under elevator n.; row with one oar in the water under row v.2 ]

1. [mid-19C+] eccentric, insane, crazy.

2. [1930s] drunk.