Tag Info

New answers tagged

1

To make volume levels universal for all devices you will have to edit a /etc/pulse/default.pa file. So, to do it in gedit with root permissions run: sudo gedit /etc/pulse/default.pa This is an excerpt of the file: ### Automatically restore the volume of streams and devices load-module module-device-restore load-module module-stream-restore load-module ...


3

OK, I'm an amateur RF engineer, so I know roughly what's happening. Either your sound card or the headphones themselves are picking up the RF energy from a local AM or shortwave radio station. The wave is being rectified in the headphones and the audio is reproduced. This can be solved by using shielded cables, and by buying RFI eliminating snap on chokes ...


0

Since I couldn't find a way to do this, I wrote my own script. I set it to run from /etc/rc.local (as local user) in the background so it would run when the computer is restarted. The script checks if the headphones are connected or not (run "amixer -c 0 contents" once headphones are connected and once not and find under which numid the headphones are). If ...


0

I spent a long time working with the same problem, based on lots of forum threads, and nothing helped. Then I tried this: $ alsactl restore That did it :)


5

Ok, so based on what I have learned from here, I am trying a new approach, using ACPI. Create a script, for pausing and unpausing VLC: sudo touch /etc/acpi/headphone_jack.sh sudo chmod +x /etc/acpi/headphone_jack.sh and place the following on this file: _pid=`pgrep vlc` _pid="${_pid% *}" DBUS_SESSION_BUS_ADDRESS=`grep -z DBUS_SESSION_BUS_ADDRESS ...


2

The current version of your script now contains a sleep 0.25 command. sleep is timer-based so doesn't use any processing cycles while sleeping… It does use a very tiny bit of CPU to set up the timer, but sleep 1 (sleep 1 second), sleep 60 (sleep for a minute) and sleep 86400 (sleep for a day) all use the same number CPU cycles. Using ACPI however is the ...


5

In most systems if not all, ACPI can handle this event. To test that: Run acpi_listen Unplug & replug headphones, example output: (mic/ears share in same jack on my laptop) jack/headphone HEADPHONE unplug jack/microphone MICROPHONE unplug jack/headphone HEADPHONE plug jack/microphone MICROPHONE plug Put your-script.sh in /etc/acpi/ Add an event ...



Top 50 recent answers are included