  We study the Dirichlet problem for p-harmonic functions on metric spaces with
respect to arbitrary compactifications. A particular focus is on the Perron
method, and as a new approach to the invariance problem we introduce
Sobolev-Perron solutions. We obtain various resolutivity and invariance
results, and also show that most functions that have earlier been proved to be
resolutive are in fact Sobolev-resolutive. We also introduce (Sobolev)-Wiener
solutions and harmonizability in this nonlinear context, and study their
connections to (Sobolev)-Perron solutions, partly using Q-compactifications.
