Media is not paused when suspending

General paper cuts with gnome desktop and music / media playback on a Laptop.

Scenario:

  • Connect Bluetooth headset
  • Turn on some music
  • Disconnect headset (walk away from the laptop, headset battery dies)

Expected:

  • Music playback pauses

Current behavior:

  • Music playback switches over to built in speakers

Scenario 2:

  • Turn on some Music
  • Suspend the system (close the lid, walk somewhere)
  • Wake up the system

Expected:

  • Music playback are paused

Current behavior:

  • Music keeps playing on built in speakers

Scenario 3 (music player does not implement inhibit stuff):

  • Play Music
  • System is idle so screen turns off
  • System is idle so lock screen is locking the session

Expected:

  • Music keeps playing with the session locked

Current behavior:

  • System suspends
  • Waking up the system causes it to continue playing through built in speakers

Scenario 4 (media player implements inhibit stuff):

  • Play music
  • Leave the system idle otherwise

Expected:

  • Screen turns of
  • Lock screen locks the session
  • Music is still playing

Current behavior:

  • screen remains on and drawing unnecessary power