After installing Ubuntu and its derivatives on a Dell XPS Studio, the headphone jacks are both unusable. Plugging in earphone to the jack produces no sound, and the system still output the sound on the laptop’s speaker.

This problem is confirmed to affect Ubuntu 10.04 (Lucid Lynx), up to the latest version (currently 12.10, Quantal Quetzal)

The problem is related to alsa. To fix it, follow these steps.