Public bug reported:

Binary package hint: gnome-power-manager

Suspend only works for usernames shorter than 9 characters:

sleep.d/01PulseAudio tries to get a list of users for whom to suspend
pulse by calling:

get_pulse_users() {
    echo $(ps aux | awk '/\/usr\/bin\/pulseaudio --start/ {print $1}')
}

However, "ps aux" will retunr the UID instead of username for usernames longer 
than 8 characters.
This leads to an error when the script tries to sudo to each respective user 
later on:

for i in $(get_pulse_users); doit
        sudo -H -u $i pactl suspend-sink 1 &> /dev/null
        sudo -H -u $i pactl suspend-source 1 &> /dev/null
done

The bug is triggered when any user tries to suspend the system, you can
tell if you're affected by thi bug by searching the logfile

/var/log/pm-suspend.log

for the line:

/usr/lib/pm-utils/sleep.d/01PulseAudio suspend suspend: Returned exit
code 1.

** Affects: gnome-power-manager (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: audio management power pulse suspend

** Description changed:

  Binary package hint: gnome-power-manager
  
- Suspend only works for usernames shortern than 9 characters:
+ Suspend only works for usernames shorter than 9 characters:
  
  sleep.d/01PulseAudio tries to get a list of users for whom to suspend
  pulse by calling:
  
  get_pulse_users() {
      echo $(ps aux | awk '/\/usr\/bin\/pulseaudio --start/ {print $1}')
  }
  
  However, "ps aux" will retunr the UID instead of username for usernames 
longer than 8 characters.
  This leads to an error when the script tries to sudo to each respective user 
later on:
  
  for i in $(get_pulse_users); doit
          sudo -H -u $i pactl suspend-sink 1 &> /dev/null
          sudo -H -u $i pactl suspend-source 1 &> /dev/null
  done
  
  The bug is triggered when any user tries to suspend the system, you can
  tell if you're affected by thi bug by searching the logfile
  
  /var/log/pm-suspend.log
  
  for the line:
  
  /usr/lib/pm-utils/sleep.d/01PulseAudio suspend suspend: Returned exit
  code 1.

-- 
jaunty: Suspend not working due to bug in 01PulseAudio script
https://bugs.launchpad.net/bugs/400928
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to