I can confirm it in U12.04.
I have solved it this way:
------------------------------------------------------------------ /etc/pm/sleep.d/90_usbaudio :
#! /bin/sh
case $1 in suspend|suspend_hybrid|hibernate) true ;; resume|thaw) sleep 1; sudo -u inet /home/inet/prog/usbaudio.sh ;; esac --------------------------------------------------------------------- /home/inet/prog/usbaudio.sh :
#!/bin/bash
# After resume from SUSPEND is USB sound card muted and not default ->
pacmd set-default-sink alsa_output.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-stereo pacmd set-default-source alsa_input.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-mono pacmd set-sink-mute alsa_output.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-stereo 0 pacmd set-source-mute alsa_input.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-mono 0
---------------------------------------------------------------------
It works for me. You must modify sink/source names of course. Do not use indexes - use names!
Note: user "inet" is the only one possible
Hope it helps you :-)
--kapetr
P.S. I had to do hack with my USB mouse too to wakeup (Exactly - it is ps/2 mouse on <ps/2 to usb> adapter
I can confirm it in U12.04.
I have solved it this way:
------- ------- ------- ------- ------- ------- ------- ------- ------- --- sleep.d/ 90_usbaudio :
/etc/pm/
#! /bin/sh
case $1 in suspend_ hybrid| hibernate) prog/usbaudio. sh ------- ------- ------- ------- ------- ------- ------- ------- ------ inet/prog/ usbaudio. sh :
suspend|
true
;;
resume|thaw)
sleep 1; sudo -u inet /home/inet/
;;
esac
-------
/home/
#!/bin/bash
# After resume from SUSPEND is USB sound card muted and not default ->
pacmd set-default-sink alsa_output. usb-0d8c_ C-Media_ USB_Headphone_ Set-00- Set.analog- stereo usb-0d8c_ C-Media_ USB_Headphone_ Set-00- Set.analog- mono usb-0d8c_ C-Media_ USB_Headphone_ Set-00- Set.analog- stereo 0 usb-0d8c_ C-Media_ USB_Headphone_ Set-00- Set.analog- mono 0
pacmd set-default-source alsa_input.
pacmd set-sink-mute alsa_output.
pacmd set-source-mute alsa_input.
------- ------- ------- ------- ------- ------- ------- ------- ------- ------
It works for me. You must modify sink/source names of course. Do not use indexes - use names!
Note: user "inet" is the only one possible
Hope it helps you :-)
--kapetr
P.S. I had to do hack with my USB mouse too to wakeup (Exactly - it is ps/2 mouse on <ps/2 to usb> adapter