LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-27-2014, 11:44 AM   #1
Nh3xus
Member
 
Registered: Jan 2013
Location: France
Distribution: Slackware 14.1 32 bits
Posts: 211

Rep: Reputation: 57
[Alsa] Restore configuration when resuming from suspend


Hi guys,

When I'm putting my laptop in suspend, my sound configuration is not restored when i wake my laptop up.

I would like to issue a command right after waking up my machine.

Like this one :

Code:
 alsactl -f /var/lib/alsa/asound.state store
Any tips on that ?
 
Old 09-28-2014, 07:02 AM   #2
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

I guess a script (executable) in /etc/pm/sleep.d should do the trick. Something like this :

Code:
case $1 in 
	resume)  alsactl -f /var/lib/alsa/asound.state restore ;;
	*) exit $NA ;;
esac
--
SeB
 
Old 09-28-2014, 04:05 PM   #3
the3dfxdude
Member
 
Registered: May 2007
Posts: 771

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
I think that you'll want to save the sound state on suspend too, otherwise you'll get back what was saved at last shutdown. I think that you want the configuration preserved unchanged through suspend.
 
Old 10-14-2014, 12:56 PM   #4
Nh3xus
Member
 
Registered: Jan 2013
Location: France
Distribution: Slackware 14.1 32 bits
Posts: 211

Original Poster
Rep: Reputation: 57
Okay, I'm bumping this thread.

The script in /etc/pm/sleep.d did the trick.

Thanks you for that guys

However, after resuming from suspend, my multimedia buttons do not work anymore.

I'm no expert but, perhaps udev is preventing the Dell WMI hotkeys to work after a resume from suspend.

Any guidance on that issue ?

Cheers.

EDIT : For some reason, the Xfce mixer do recognize the multimedia buttons after X is restarted.

It's not very practical though.

Last edited by Nh3xus; 10-14-2014 at 01:25 PM.
 
Old 10-21-2014, 11:19 AM   #5
Nh3xus
Member
 
Registered: Jan 2013
Location: France
Distribution: Slackware 14.1 32 bits
Posts: 211

Original Poster
Rep: Reputation: 57
Final update about this topic :

I've figured out how to fix my last problem.

In order for my multimedia buttons to work after resuming from suspend, I have to restart the xfce4-volumed daemon (as my user of course).

Both my built-in ones from my laptop and the ones of my usb headset works.

Again, thanks you guys for the guidance.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems after resuming from suspend to ram chessonly Linux - General 1 08-10-2012 07:55 AM
[SOLVED] After Resuming from suspend, my network is down and must be restarted bret381 Linux - Networking 3 04-06-2012 07:30 PM
System hangs when resuming from Suspend. theboomboomcars Linux - Laptop and Netbook 4 08-15-2008 08:14 AM
monitor does not turn on after resuming from suspend nappaji Puppy 2 08-24-2006 08:19 PM
Software Suspend - freezes while resuming TazG Linux - Software 2 08-11-2004 10:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration