My problem is very simple : with my previous laptop I was able to play music even if the laptop was closed. Now I changed and everytime I'm closing it, the music turn off few seconds after. It is possible to fix it ? I tried to go to "Brightness and Lock" but nothing I tried work. Many thanks in advance !
The comment to your question has a link recommending using systemd's
#HandleLidSwitch=suspend feature. However on my system (Ubuntu 16.04) this feature was disabled by the
# at the beginning of the line. Ubuntu was handling Lid Close operations directly and circumventing systemd.
When you went into "Settings" you went to the "Brightness & Lock" screen but if you go to the "Power" screen instead you will see this:
As in the screen above, set
When the lid is closed to
Do Nothing and that is exactly what Ubuntu does when you close the lid, ie your music continues playing as desired.
You can achieve it by installing gnome-tweak-tool. Once installed just go to power and turn off suspend when laptop lid is closed.