The mineral linarite, PbCuSO$_4$(OH)$_2$, is a spin 1/2 chain with frustrating nearest neighbor ferromagnetic and next-nearest neighbor antiferromagnetic exchange interactions. Our inelastic neutron scattering experiments performed above the saturation field establish that the ratio between these exchanges is such that linarite is extremely close to the quantum critical point between spin-multipolar phases and the ferromagnetic state. However, the measured complex magnetic phase diagram depends strongly on the magnetic field direction. The field-dependent phase sequence is explained by our classical simulations of a nearly critical model with tiny orthorhombic exchange anisotropy. The simulations also capture qualitatively the measured variations of the wave vector as well as the staggered and the uniform magnetizations in an applied field.