sidux.com
Menu

News

Give back
Last 3 Contributions
30-11-2008 20.00
25-11-2008 100.00
25-11-2008 20.00

Donate


Sponsor
hetzner.de

Languages
Preferred language:



Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
hubi
Post subject: kpowersave: Programmstart/-stopp bei suspend2ram?  PostPosted: Apr 19, 2008 - 12:19 AM



Joined: Nov 30, 2006
Posts: 3466
Location: Budapest
Status: Offline
Spiele mich gerade rum, dass ich kpowersave ohne powersaved laufe (bringt ein paar Vorteile, da nicht mehr reingefunkt wird).

Eine Nuss kann ich aber nicht knacken: wie kann ich kmix und amarok automatisch stoppen und starten, wenn ich den Suspend-Knopf drücke? Nirgendwo habe ich bis jetzt ein Musterskript gefunden, und kpowersaverc wie kpowersave.events geben mir keine Anhaltspunkte.

Oder alternativ könnte auch ein Aus- und Einbinden der USB-Soundkarte den gewünschten Effekt erzielen.

Vielleicht hat hier jemand eine Idee ... wäre zu schön Wink

hubi

_________________
Bonitas stultitiaque sodales sunt.
 
 View user's profile Send private message  
Reply with quote Back to top
jonix
Post subject: RE: kpowersave: Programmstart/-stopp bei suspend2ram?  PostPosted: May 02, 2008 - 06:09 PM



Joined: Apr 21, 2008
Posts: 2

Status: Offline
Hi Hubi,
ich habe momentan teilweise das gleiche Problem (nach Suspend to RAM gingen Netzwerk und Sound nicht) - einen Teil meines Problems konnte ich lösen: kpowersave ohne powersaved benutzt HAL, unter http://people.freedesktop.org/~hughsien ... anced.html fand ich eine Anleitung wie HAL dazu gebracht wird Module vor dem Suspend zu entfernen.
Man muss die Datei
Code:
/etc/pm/config.d/unload_modules
anlegen mit dem Inhalt
Code:
SUSPEND_MODULES="leerzeichengetrennte liste der module"
und sie anschließend noch mit
Code:
chmod +x /etc/pm/config.d/unload_modules
ausführbar machen.

Alsa würde auch funktionieren wenn ich vor dem Suspend automatisch "alsa suspend" und danach "alsa resume" ausführen könnte... naja vielleicht hat ja noch jemand ne Idee Wink

Gruß jonix
 
 View user's profile Send private message  
Reply with quote Back to top
hubi
Post subject: RE: kpowersave: Programmstart/-stopp bei suspend2ram?  PostPosted: May 02, 2008 - 06:28 PM



Joined: Nov 30, 2006
Posts: 3466
Location: Budapest
Status: Offline
jonix,

Danke für die Antwort, da kann ich mich wieder mit dem alten Thema beschäftigen. Bei mir müssten es dann sein:

- snd_usb_audio

Und dann noch wpa_action. Das wäre es. Ich muss bei meinen wpa-roaming Einstellungen nach dem Resume nicht network neu starten, nur die wpa_action neu laden.

Sachen zum Spielen, Danke.

hubi

_________________
Bonitas stultitiaque sodales sunt.
 
 View user's profile Send private message  
Reply with quote Back to top
jonix
Post subject: RE: kpowersave: Programmstart/-stopp bei suspend2ram?  PostPosted: May 03, 2008 - 03:45 PM



Joined: Apr 21, 2008
Posts: 2

Status: Offline
OK nun bin ich nochmal etwas schlauer daraus geworden - Kpowersave nutzt HAL, der wiederum verwendet pm-utils für Suspend. Für beliebige Befehle beim Suspend/Resume gibt es eine Anleitung: http://de.opensuse.org/Pm-utils#Erstell ... enen_hooks

Ich musste erst noch als Root
Code:
touch /var/log/pm-suspend.log
ausführen, danach konnte ich mit
Code:
pm-suspend
testen und schauen ob mein neuer hook mit ausgeführt wurde. Es funktioniert, leider ohne die erhoffte Wirkung Sad
Mein hook: /etc/pm/sleep.d/99commands
Code:
#!/bin/bash
case $1 in
    hibernate)
         alsa suspend
        ;;
    suspend)
         alsa suspend
        ;;
    thaw)
         alsa resume && alsactl restore
        ;;
    resume)
         alsa resume && alsactl restore
        ;;
    *)
        echo "somebody is calling me totally wrong."
        ;;
esac

Ich hatte es auch schon erfolglos mit /etc/init.d/alsa-utils stop/restart probiert - die alsa resume methode hatte mal funktioniert als ich sie manuell versuchte. Bevor ich meinen Hook anlegte konnte ich sie auch noch durch einen X Neustart reaktivieren, das geht nun auch nicht mehr. Das Problemkind ist eine Terratec Aureon Space 7.1, umgeflasht auf Audiotrak Prodigy 7.1. Nach einem Reboot gibt sie dann wieder problemlos alles per dmix über spdif aus. Muss wohl noch etwas rumprobieren Rolling Eyes

Naja, kmix und amarok solltest Du mit so einem Hook stoppen und starten können, wird dann allerdings als Root ausgeführt, also besser ggf.
Code:
su username -c befehl
benutzen.

Gruß jonix
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
 
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2006-2008 by sidux e.V., 10407 Berlin, Kniprodestr. 104. sidux e.V. is a Berlin, Germany based non-profit foundation. Consult Impressum and Legal Terms for details. sidux™ is Free Software released under the GNU/GPL license and other compatible licenses.
powered by Zikula & Zafenio