Experiment with Gnome Volume Control on Ubuntu 9.10

OSS specific Linux discussion (x86/amd64)

Moderators: cesium, dev, kodachi, hannu

Re: Experiment with Gnome Volume Control on Ubuntu 9.10

Postby Temüjin » Mon Nov 09, 2009 11:27 am

I'm still having issues getting the volume keys (using the gnome volume control) working, even after I rebuild gnome-media, gnome-applet, and gnome-settings-daemon packages with the appropriate flags. :roll:
Temüjin
Member
 
Posts: 84
Joined: Tue Jul 24, 2007 7:55 pm
Location: Pennsylvania, USA

Re: Experiment with Gnome Volume Control on Ubuntu 9.10

Postby Temüjin » Mon Nov 09, 2009 4:33 pm

igor: I'm a bit confused. Did you ever actually get the media keys to work without using extra bindings? Did you get the on-screen display to work? There is an interesting test program in the gnome-settings-daemon source:
Code: Select all
gnome-settings-daemon-2.28.1/plugins/media-keys/test-media-window

Using key bindings is easy, but it would still be nice to make the GNOME volume control work and distribute .deb's for Ubuntu users who don't want to run PulseAudio (be they OSS4 or ALSA users).

Even after recompiling, GNOME still logs errors in .xsession-errors when I try and use a media key. It appears that it's still looking for pulseaudio:
Code: Select all
** (gnome-settings-daemon:1520): WARNING **: Connection failed, reconnecting...

** (gnome-volume-control-applet:1619): WARNING **: Connection failed, reconnecting...


I've also tested GNOME 2.28 on Arch Linux and everything works well there.
Temüjin
Member
 
Posts: 84
Joined: Tue Jul 24, 2007 7:55 pm
Location: Pennsylvania, USA

Re: Experiment with Gnome Volume Control on Ubuntu 9.10

Postby igorzwx » Mon Nov 09, 2009 5:08 pm

Temüjin wrote:igor: I'm a bit confused. Did you ever actually get the media keys to work without using extra bindings? Did you get the on-screen display to work?


Hi Temüjin!

I am also confused. I do not really understand your questions and I cannot understand what works for you and what does not work.
Let us make it clear step by step.

2. "Did you get the on-screen display to work?" - What do you mean by this?

1. "Did you ever actually get the media keys to work without using extra bindings?" - Not.

This does not work on my old IBM Notebook with Ubuntu 9.04 + OSS4
This does not work on my ancient box with Ubuntu 9.04 and 9.10 + OSS4.
The ancient box does not have "the media keys".

On both computers, the problem was solved by "Custom Shortcuts"

Custom Shortcuts

Volume up Alt+Up
Volume down Alt+Down
Volume mute Alt+Right

on Terminal:

gnome-keybinding-properties

add the proper commands, e.g.

ossmix vol +2

ossmix -- vol -2

ossmix vol toggle

( the commands may depend on your particular ossmix )

POP-UP Notifications work on Ubuntu 9.04, but they do not work on Ubuntu 9.10
System sound are not fixed yet on Ubuntu 9.10

EVERYTHING ELSE WORKS !

All mixers (ossxmix, Gnome Volume Control) work well with "Custom Shortcuts".
When I press the keys, all sliders move properly in all mixers.

I will make those tests and report.

------------------------------------------------------------------------------------
If I understood you correctly, everything else works for you too. Right?
------------------------------------------------------------------------------------

This info might be useful:

removing pulseaudio breaks sound control
https://bugs.launchpad.net/ubuntu/+sour ... bug/440465

QUOTE:
Psy[H[] wrote on 2009-10-28: #15
and what about keyboard shortcuts? adding custom commands is not a very clean workaround.

Sebastien Bacher wrote on 2009-10-28: #16
you are on your own about this one, the gnome-settings-daemon codebase is totally different and both can't be built there

Psy[H[] wrote on 2009-10-29: #18
Which component now handles XF86Audio*Volume buttons by default? is in possible to manually change associated commands there instead of creating custom actions in gnome-keybindings-properties?

Sebastien Bacher wrote on 2009-10-29: #19
gnome-settings-daemon handle those keys and it's not easy to change it since it's not a command run but a service running and handling lot of settings in GNOME, efforts would be better spent making sure pulseaudio works correctly for everybody since that's where the linux world is aligning anyway nowadays

Sebastien Bacher wrote on 2009-10-31: #22
Could you stop spamming this closed bug now
igorzwx
Known Member
 
Posts: 1001
Joined: Sun Jun 28, 2009 9:31 pm

Re: Experiment with Gnome Volume Control on Ubuntu 9.10

Postby Temüjin » Mon Nov 09, 2009 5:46 pm

igor, thanks for the link and your help.

POP-UP Notifications work on Ubuntu 9.04, but they do not work on Ubuntu 9.10
System sound are not fixed yet on Ubuntu 9.10 EVERYTHING ELSE WORKS !
All mixers (ossxmix, Gnome Volume Control) work well with "Custom Shortcuts".
When I press the keys, all sliders move properly in all mixers.
If I understood you correctly, everything else works for you too. Right?

Correct.
Temüjin
Member
 
Posts: 84
Joined: Tue Jul 24, 2007 7:55 pm
Location: Pennsylvania, USA

Re: Experiment with Gnome Volume Control on Ubuntu 9.10

Postby igorzwx » Mon Nov 09, 2009 6:53 pm

Temüjin wrote:Even after recompiling, GNOME still logs errors in .xsession-errors when I try and use a media key. It appears that it's still looking for pulseaudio:
Code: Select all
** (gnome-settings-daemon:1520): WARNING **: Connection failed, reconnecting...

** (gnome-volume-control-applet:1619): WARNING **: Connection failed, reconnecting...



Have you disabled "gnome-volume-control-applet" in "Startup Applications"?

Have you already removed "gnome-volume-control-applet"?

You can remove it manually

sudo mv /usr/bin/gnome-volume-control-applet ~/

sudo mv /etc/xdg/autostart/gnome-volume-control-applet.desktop ~/

-----------------------------------------------------------------------------------

" Connection failed, reconnecting..." - Which application is trying to connect? Is it Xorg? Or "notify-osd"? Or what?
igorzwx
Known Member
 
Posts: 1001
Joined: Sun Jun 28, 2009 9:31 pm

Re: Experiment with Gnome Volume Control on Ubuntu 9.10

Postby Temüjin » Mon Nov 09, 2009 7:18 pm

igor, I know how to disable the volume control and work around it, but I am trying to enable it (without Pulse) and get back all of the functions I had in Jaunty (and in Arch Linux).
Temüjin
Member
 
Posts: 84
Joined: Tue Jul 24, 2007 7:55 pm
Location: Pennsylvania, USA

Re: Experiment with Gnome Volume Control on Ubuntu 9.10

Postby igorzwx » Mon Nov 09, 2009 8:12 pm

Temüjin wrote:igor, I know how to disable the volume control and work around it, but I am trying to enable it (without Pulse) and get back all of the functions I had in Jaunty (and in Arch Linux).


But this is a PulseAudio thing:
** (gnome-volume-control-applet:1619): WARNING **: Connection failed, reconnecting...

Which app is trying to connect?
-------------------------------------------------------
EDIT:

I understood!

You did not remove the evil gnome-volume-control-applet and it is still active.
Remove it manually.
It will never work without PulseAudio.
Then you can "get back all of the functions I had in Jaunty" with the old gstreamer applet and gst-mix
igorzwx
Known Member
 
Posts: 1001
Joined: Sun Jun 28, 2009 9:31 pm

Re: Experiment with Gnome Volume Control on Ubuntu 9.10

Postby Temüjin » Mon Nov 09, 2009 9:31 pm

Oh, I forgot to remove the pulse volume-control (thank you for reminding me) but even after I remove it, gnome-settings-daemon still complains. I looked at the times on the files and made sure the gnome-settings-daemon was the one I built (configured for no pulse). I'm out of ideas for now.
Temüjin
Member
 
Posts: 84
Joined: Tue Jul 24, 2007 7:55 pm
Location: Pennsylvania, USA

Re: Experiment with Gnome Volume Control on Ubuntu 9.10

Postby igorzwx » Mon Nov 09, 2009 9:44 pm

Temüjin wrote:Oh, I forgot to remove the pulse volume-control (thank you for reminding me) but even after I remove it, gnome-settings-daemon still complains. I looked at the times on the files and made sure the gnome-settings-daemon was the one I built (configured for no pulse). I'm out of ideas for now.


My daemon also complains:

(gnome-settings-daemon:1504): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed

It was recompiled with --disable-pulse

---------------------------------------------
EDIT:
My "gnome-settings-daemon" complains, because I removed Empathy and Telepathy

(gnome-settings-daemon:1504): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed

https://bugs.launchpad.net/ubuntu/+sour ... bug/442224
http://www.google.com/search?q=%28gnome ... 8&oe=UTF-8
Last edited by igorzwx on Wed Nov 11, 2009 9:05 pm, edited 1 time in total.
igorzwx
Known Member
 
Posts: 1001
Joined: Sun Jun 28, 2009 9:31 pm

Re: Experiment with Gnome Volume Control on Ubuntu 9.10

Postby igorzwx » Tue Nov 10, 2009 3:13 am

Temüjin wrote:Oh, I forgot to remove the pulse volume-control (thank you for reminding me) but even after I remove it, gnome-settings-daemon still complains. I looked at the times on the files and made sure the gnome-settings-daemon was the one I built (configured for no pulse). I'm out of ideas for now.


That was a wrong daemon. That is why a typical PulseAudio complain:

** (gnome-settings-daemon:1520): WARNING **: Connection failed, reconnecting...
igorzwx
Known Member
 
Posts: 1001
Joined: Sun Jun 28, 2009 9:31 pm

Re: Experiment with Gnome Volume Control on Ubuntu 9.10

Postby igorzwx » Wed Nov 11, 2009 9:16 pm

Hi Temüjin!

The Russians have already successfully reproduced my experiment with recompilation of "gnome-settings-daemon".
They wanted to get rid of ~/.pulse and ~/.pulse-cookie (perhaps, for security reasons).

Have you already managed to fix it?

Best,
Igor
igorzwx
Known Member
 
Posts: 1001
Joined: Sun Jun 28, 2009 9:31 pm

Re: Experiment with Gnome Volume Control on Ubuntu 9.10

Postby igorzwx » Thu Nov 19, 2009 6:55 pm

Temüjin wrote: Did you get the on-screen display to work?


Yes. It is already working.

A Russian hacker, PetrovSE, created a small program, named "mixosd".
It works with ALSA and OSS4.
I have already tested it with OSS4. It does produce "pop-up notification".

The program is not yet perfect, it should be improved, and, perhaps, daemonized.

Most important: it works, and it seems to be a very useful tool.
You can control "vol", "pcm", "mic", or else.
Such tools might be shipped together with OSS4.

gnome-keybinding-properties

ALSA:
mixosd master 5+
mixosd master 5-
mixosd master toggle

OSS4:
mixosd -s oss vol 5+
mixosd -s oss vol 5-
mixosd -s oss vol 100-

mixosd -s oss -l

$ mixosd -s oss -l
Mixer : 'OSS Mixer'
Device : '/dev/mixer'
Control: ''
Add level 0, toggle [ ]

Mixer prepare...
'Vol'
'Pcm'
'Spkr'
'Line'
'Mic'
'CD'
'IGain'
'Line1'
'PhoneIn'
'PhoneOut'
'Video'

Original message:
http://forum.ubuntu.ru/index.php?topic= ... #msg565852
PetrovSE 18 Ноября 2009, 22:26:27
Приветствую всех.

Прочитал всё тему и сделал как учат гуру: удалил пульса, перекомпилил пакеты и т.д.
Стало значительно лучше, но угнетало одно - отсутствие OSD нотификатора. Принял решение немного попрограммировать.

Получилась программулька (см. в архиве). Можно скомпилить самостоятельно или, кому лень, в bin лежит уже скомпилённая.

Для недоверяющих чужим бинарникам: нужны пакеты build-essential, libgtk2.0-dev, libasound2-dev, libnotify-dev (они могут ещё что подтянуть).
Далее make и в bin появляется бинарник (я надеюсь).

Теперь, как этим пользоваться.
Очень просто:
делаем громче: mixosd master 5+
делаем тише: mixosd master 5-
делаем совсем тихо: mixosd master toggle

Можно через OSS: mixosd -s oss vol 5+

Тестил дома на alsa и oss (карта terratec space) - всё работает
Тестил на работе (audigy 2) - alsa работает, oss как-то странно работает (скорее не работает)

Вот как-то так. Буду рад, если кому поможет.
amixosd.tar.gz (10.48 Кб - загружено 6 раз.)
http://forum.ubuntu.ru/index.php?action ... tach=15879
igorzwx
Known Member
 
Posts: 1001
Joined: Sun Jun 28, 2009 9:31 pm

Re: Experiment with Gnome Volume Control on Ubuntu 9.10

Postby Temüjin » Sat Nov 21, 2009 9:03 pm

Igor, I never got the GNOME volume control working, but I haven't spent time on it lately. Perhaps now that I understand the .deb packaging a bit better, I will try using methods similar to what you describe.

I finally did get libcanberra reconfigured to use gstreamer only and packaged into my ppa: https://launchpad.net/~dtl131/+archive/ppa
I tested it on my Karmic install, and it appears to work. I would like more confirmation (from you or someone else) that it works properly before linking to it in the Ubuntu guide and/or OSS wiki.

EDIT: I need to update my PPA, I left a dependency on libcanberra-pulse. :\
Temüjin
Member
 
Posts: 84
Joined: Tue Jul 24, 2007 7:55 pm
Location: Pennsylvania, USA

Re: Experiment with Gnome Volume Control on Ubuntu 9.10

Postby igorzwx » Sat Nov 21, 2009 10:20 pm

Temüjin wrote:Igor, I never got the GNOME volume control working, but I haven't spent time on it lately. Perhaps now that I understand the .deb packaging a bit better, I will try using methods similar to what you describe.

I finally did get libcanberra reconfigured to use gstreamer only and packaged into my ppa: https://launchpad.net/~dtl131/+archive/ppa
I tested it on my Karmic install, and it appears to work. I would like more confirmation (from you or someone else) that it works properly before linking to it in the Ubuntu guide and/or OSS wiki.

EDIT: I need to update my PPA, I left a dependency on libcanberra-pulse. :\


Hi Temüjin!

Many thanks for "libcanberra". I would like to try it.

It was not difficult for me to get "gnome-volume-control" to work.
The problem was the applet.
I was busy several days, perhaps, a week with it.

The only method that worked was recompilation of both packages ("gnome-media" and "gnome-applets") with devscripts and those "advanced technologies". It is not my method. I was simply lucky to find it here:
http://linuxinnovations.blogspot.com/20 ... -with.html
What was made by me is some modifications, some small hacks.

The method was already successfully applied by many Russian users.
Believe me or not, the users, who had never compiled anything before, downloaded my instructions from the OSS4 forum,
recompiled "gnome-media", "gnome-applets", and "gnome-settings-daemon", and installed them without problems.
There was not any question, no troubleshooting. The users just reported a successful installation.
If I am not mistaken, the motivation for all these activities was very simple. The Russians wanted to learn the method.

In a word, "mixosd" is already daemonized.
Today, PetrovSE published the second version of the daemon.
I have already tested it.
It works much better. It is not yet perfect, but it works normally.
You have "pop-up notifications" with volume control.
I am now writing a detail instruction for Petrov's daemon.

Tell us when "libcanberra" is ready for testing and I we will test it.
It would be nice to have a kind of instruction for it.

Best regards,
Igor

P.S. To save your valuable time, you may better follow my instruction for "gnome-media" and "gnome-applets"
viewtopic.php?f=3&t=3375&start=15#p13651

Now, I think that renaming of the packages is not an optimal solution.
The best way, is, perhaps, to increase the version number, as it was made for "gnome-settings-daemon"
viewtopic.php?f=3&t=3375&start=15#p13781
igorzwx
Known Member
 
Posts: 1001
Joined: Sun Jun 28, 2009 9:31 pm

Re: Experiment with Gnome Volume Control on Ubuntu 9.10

Postby igorzwx » Sun Nov 22, 2009 1:32 am

How to compile and install Petrov's daemon

Part 1: Removal of the old version of Petrov's daemon (if you installed it)

1.1. Uninstall the old package:

mixclient stop

sudo killall mixosd

sudo dpkg --purge petrovs-daemon-mixosd


1.2. Check if "mixosd" running

ps -A | grep mixosd


1.3. Check if everything is removed

The daemon was installed in this way:

mixosd -> /usr/bin/
mixclient -> /usr/bin/

mixosd.config -> /etc/
80mixosd-launch -> /etc/X11/Xsession.d/

----------------------------------------------------------------

Part 2: Compilation of Petrov's daemon


2.1. Install the tools and dependencies:

sudo apt-get install checkinstall build-essential libgtk2.0-dev libasound2-dev libnotify-dev


2.2. Download the second version of Petrov's daemon here:
http://forum.ubuntu.ru/index.php?topic= ... #msg568523
mixosd_0.2.tar.gz (17.43 Кб)
http://forum.ubuntu.ru/index.php?action ... tach=15925


2.3. Unpack mixosd_0.2.tar.gz

2.4. Open terminal in the folder "mixosd_0.2"

2.5. Edit "mixosd.config", if you are going to use it with OSS4

gedit ./bin/mixosd.config

# Select sound driver (alsa or oss, default: alsa)
driver = alsa
#driver = oss

Change to oss:

# Select sound driver (alsa or oss, default: alsa)
# driver = alsa
driver = oss


2.6. Compilation: execute the "make" script

make


2.7. Create a Debian package (without installation):

sudo checkinstall -D --install=no --pkgname=petrovs-daemon-mixosd2 --maintainer="petrov.se"


description: Petrov's daemon v.0.2. Purpose: on-screen display (pop-up notification, notify-osd) for volume control


*****************************************
**** Debian package creation selected ***
*****************************************

This package will be built according to these values:

0 - Maintainer: [ petrov.se ]
1 - Summary: [ Petrov's daemon v.0.2. Purpose: on-screen display (pop-up notification, notify-osd) for volume control ]
2 - Name: [ petrovs-daemon-mixosd2 ]
3 - Version: [ 20091121 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ i386 ]
8 - Source location: [ mixosd_0.2 ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ petrovs-daemon-mixosd2 ]

Enter a number to change any of them or press ENTER to continue:

Installing with make...Installing with install...

========================= Installation results ===========================
cp bin/mixosd /usr/bin/
cp bin/mixclient /usr/bin/
cp bin/mixosd.config /etc/
cp bin/80mixosd-launch /etc/X11/Xsession.d/
sh /etc/X11/Xsession.d/80mixosd-launch
Master process -> Ok
Parent process (2087) -> exit

======================== Installation successful ==========================

**********************************************************************

Done. The new package has been saved to

~/compile3/mixosd_0.2/petrovs-daemon-mixosd2_20091121-1_i386.deb
You can install it in your system anytime using:

dpkg -i petrovs-daemon-mixosd2_20091121-1_i386.deb

**********************************************************************


--------------------------------------------------------

Part 3: Installation of Petrov's daemon

sudo dpkg -i petrovs-daemon-mixosd2_20091121-1_i386.deb


To make it working, you have to reboot the system

sudo reboot

--------------------------------------------------------

TESTING


Let us check the results of installation.
The things should be installed as follows:

mixosd -> /usr/bin/
mixclient -> /usr/bin/

mixosd.config -> /etc/
80mixosd-launch -> /etc/X11/Xsession.d/


$ whereis mixosd
mixosd: /usr/bin/mixosd /etc/mixosd.config

$ whereis mixclient
mixclient: /usr/bin/mixclient


9. Check if it is already running

ps -A | grep mixosd

$ ps -A | grep mixosd
2174 ? 00:00:00 mixosd


10. Test the commands (OSS4)

mixclient vol 5+

mixclient vol 5-

mixclient vol toggle


10.a. If you have ALSA, you may try these commands:

mixclient master 5+

mixclient master 5-

mixclient master toggle


11. To configure keys, run

gnome-keybinding-properties


__________________________________________________

How to reconfigure Petrov's daemon from ALSA to OSS4, or other way round.

gksu gedit /etc/mixosd.config

# Select sound driver (alsa or oss, default: alsa)
driver = alsa
#driver = oss


Reload the daemon

mixclient stop

sudo killall mixosd

misosd -m


If it does not help, reboot the system

sudo reboot
igorzwx
Known Member
 
Posts: 1001
Joined: Sun Jun 28, 2009 9:31 pm

PreviousNext

Return to Linux

Who is online

Users browsing this forum: Google [Bot] and 1 guest