GNOME Bugzilla – Bug 316922
The sound volume applet's slider tends to go down after push it up
Last modified: 2005-10-18 00:08:15 UTC
This bug has been opened here: http://bugzilla.ubuntu.com/show_bug.cgi?id=14560 "In breezy, when I try to push the volume up using the sound volume applet's slider, it keeps pulling down by itself. To be more precise, it seems that for each step up, it does one step down on its own... You can easily see it by trying to push the volume up using the mouse scroll button: you'll notice that it is very difficult to reach the top of the slider because it keeps goind down each time you move it up. If you don't understand what I mean, maybe I can create a video using Istanbul video recorder ? ... I've been having this problem, too. If, instead of using the mouse wheel, you simply click the + button on top and hold down the button, you'll see that the slider does not move up, it's just stuck there. Scrolling the mouse wheel upward slowly one step at a time also causes the same behavior. Turning the volume down by any method seems to work perfectly."
A short video would be nice.
Created attachment 52511 [details] A video of me trying to change the volume At first, I use the [+] [-] buttons, then I use the mouse wheel. Sorry for the bad quality of the video. I must be doing something wrong...
PS: this is an OGG/Theora video.
*** Bug 317326 has been marked as a duplicate of this bug. ***
Apparently really happens, confirming... I don't know why yet.
that happens on my laptop, let me know if you need any debug on the topic ...
Created attachment 52886 [details] [review] fix It's a rounding error in the new code that was added to support multiple tracks. Attached patch should fix it.
Look fine to me, Ronald. We'll put it into 2.12.1, so commit ASAP.
The patch works fine, you rock Ronald :)
Committed to HEAD. Davyd, is there a 2.12 branch for this?
Not yet. We're going to branch after 2.12.1. The idea is that at least one stable release wouldn't get (too) neglected.
This change broke mixer applet for me. I'm not able to change volume (scrolling or moving slider immediately mutes volume). reverting Ronald's patch makes applet to behave properly. my setup: gtk+ 2.8.6 + gnome 2.12.1 + gstreamer 0.8.11 with alsasink. it's confirmed by two persons using same setup.
Aaaaahhh... Can you add a printf() in applet.c in the initialization function, at line 440: gconf_client_notify_add (applet->client, key, cb_gconf, applet, NULL, NULL); g_free (key); ------> here <-------- } gtk_widget_show (GTK_WIDGET (applet)); Can you make the following change: GList *item; for (item = applet->active_tracks; item; item = item->next) { GstMixerTrack *track = item->data; printf ("Track %s, vol %d - %d\n", track->label, track->min_volume, track->max_volume); } Thanks.
some compilations troubles: applet.c: In function `gnome_volume_applet_setup': applet.c:443: error: structure has no member named `active_tracks' shouldn't be applet->tracks ?
Yes.
unfortunetly it prints nothing.
Can you also printf (%p\n", applet->active_tracks);?
Ping?
Pong! adding printf ("%p\n", applet->active_tracks); makes no difference: applet.c: In function `gnome_volume_applet_setup': applet.c:442: error: structure has no member named `active_tracks' changing s/active_tracks/tracks/ allow me to compile it, but it still prints nothing. could you give me some more detailed infromations how to debug it?
Sorry, I wanted you to put it below the } in line 440, rather than within the curly brackets. It should always print.
putting code from #13 below (line 443) bracket changed not much (structure has no member named `active_tracks' blah, blah). What about patch to close this bug bit faster? ;)
So it has to be printf ("%p\n", applet->tracks);, you could've figured that out yourself. I'm trying to debug your problem, because I cannot reproduce it, and have no clue what is wrong. I'm not making you add those printf()s just for fun.
Ronald, don't get me wrong, I really appreciate your help. I want to help solving this problem too, but given code (printf ("%p\n", applet->tracks); below } @440) prints nothing (almost) running mixer_applet2 from terminal (then adding to panel) gives: (mixer_applet2:5348): Gtk-CRITICAL **: gtk_bin_remove: assertion `bin->child == child' failed 0x81ea998 Moving slider, pressing '+' or '-' mutes volume (x appears on speaker icon). Above message is only output from terminal.
OK, so this (the 0x81ea998 string) tells me it found tracks, but initialization was aborted nonetheless. Given the code, I don't see how that could theoretically happen, since it's initialized to NULL and only set in a path that always returns TRUE in select_element_and_track() in applet.c. In short, I don't think this can happen, so something else may be screwed up. Add up to that that my patch fixed issues for other people (notably Sebastien), I'd suggest you double check your CVS checkout for weird stuff, like changes to the HEAD tree, compile dependency errors, etc. I know this is not nice to ask, since you're a packager also and have some knowledge of how all this works, but I seriously don't see how this can possibly happen in the code. It just can't. The codepath described by your output does not exist. Besides that, I don't see how my patch could possibly trigger it...
I use an official tarball from GNOME ftp for building. I've already checked for some compilation related things, but all appears to be ok. Previous release (2.12.0) was working like a charm, removing your patch from 2.12.1 fixes any problems, so it looks very cryptic for me. I'm very curious how it works with other distros.
works great for me on Ubuntu and for other people/people who had the issue fixed by the patch
I guess this is not a very useful comment, but it works very well for me too, on Ubuntu Breezy, even if the movement of the slider isn't as fluid as it used to be a long time ago. But, at least, it doesn't prevent me from using the scroll wheel.
The fluidity (and changed sensitivity) compared to 2.10 will be fixed, I am aware of those and know what causes them. I need some time to figure them out.
I am having the exact same problem as #12. http://bugs.gnome.org/show_bug.cgi?id=316922#c12 Is there anything I can do to help get this resolved? I downgraded gnome-applets to 2.10.1 in the meantime.
to #29: could you give us some details of your setup? (compiler, versions of gtk+, main gnome libs, etc.)
Can you guys please get gnome-applets from CVS (HEAD), build the mixer from that and see if that works? Just to be sure it's not some other version conflict (my patch may accidently depend on another patch which is not in 2.12.0 or so, which may totally screw up everything).
Ronald, I just made two seperate tests. 1. With CVS. Mixer applet was still broken, any adjustments of volume resulted in my master volume level going to 0 (confirmed by watching alsamixer while doing it). 2. With CVS, patch from comment #7 reverted. Mixer worked fine (as it does in 2.10.1). Fryderyk, I am using Gentoo with: gcc 3.3.6 glibc 2.3.5 gtk+-2.8.6 gnome 2.12/2.12.1 (everything is updated to the most recent version available). alsa (and it's utilities) 1.0.9 kernel 2.6.13 (w/ the Con Kolivas' ck3 patch)
Can you apply the patches from comment 13 and 17/20 (read both) and give me the output of them? I'd like to know what causes this, and maybe an artificial environment with the values that you will give me will help me.
With fresh CVS checkout (already with Ronald's sensitivity changes) mixer is still broken (behaves as I described before) Looks like gcc 3.3.6 guys are in trouble (just a wild guess)
You may want to change all the floats/gfloats into doubles/gdoubles in my patch from comment 7. Also, in the commit I did this morning (see webcvs), change the float into a double. If it's a compiler bug that I'm triggering, that may fix it.
Closer guess, change the lrintf() from patch in comment 7 to a rintf(), since we're passing a float and not a double. That may well fix the bug you're seeing.
*** Bug 318991 has been marked as a duplicate of this bug. ***
Ronald, I did some further testing based on your recommendations. From comment #35, in the CVS code, changing all relevant instances of float -> double and gfloat -> gdouble (including the commit made earlier today), did nothing to fix the problem. From comment #36, leaving everything else the same as CVS (i.e. not making the above changes), and changing lrintf to rintf does not fix the problem. Just for kicks, I also tried compiling 2.12.1 with CFLAGS="-O0", and no LDFLAGS set (I normally have them set to "-W1,O1"), and that did not change anything. I will try your suggestions in comment #33.
Ronald, I changed the code in applet.c so it looks like this: if (res) { /* gconf */ key = panel_applet_gconf_get_full_key (PANEL_APPLET (applet), GNOME_VOLUME_APPLET_KEY_ACTIVE_ELEMENT); gconf_client_notify_add (applet->client, key, cb_gconf, applet, NULL, NULL); g_free (key); GList *item; for (item = applet->tracks; item; item = item->next) { GstMixerTrack *track = item->data; printf ("Track %s, vol %d - %d\n", track->label, track->min_volume, track->max_volume); } printf ("%p\n", applet->tracks); key = panel_applet_gconf_get_full_key (PANEL_APPLET (applet), GNOME_VOLUME_APPLET_KEY_ACTIVE_TRACK); gconf_client_notify_add (applet->client, key, cb_gconf, applet, NULL, NULL); g_free (key); } It produces the following when running from the command line (as instructed in http://www.davyd.id.au/articles/debugging-gnome-applets.shtml) ./mixer_applet2 (mixer_applet2:17258): Gtk-CRITICAL **: gtk_bin_remove: assertion `bin->child == child' failed Track Master, vol 0 - 31 0x819b0cc
That's the same as me, should be good... Re: comment 38, can you please apply the patch from comment 7 reversely to CVS and then confirm that it works again, and then apply it part-by-part and see which part of the patch breaks it? Something tells me it's one specific chunk that screws up some part...
Created attachment 53552 [details] [review] patch for 2.12.1 I could not change volume with mixer applet as well as comment #12, #29. When having fixed it as follows, I could change volume. - From comment #35, I changed all the floats/gfloats to doubles/gdoubles. - In addition, I changed the lrintf() to lrint(). I am using: gcc-3.3.6 glibc-2.3.3 gtk+-2.8.6 gnome 2.12.1 gstreamer-0.8.10 alsa-1.0.9 kernel-2.6.12
Thank you! This confirms some compiler-suspicions of me (thanks to others for suggesting that). Can the other two reporters please confirm that this patch fixes it? I'll apply it if it works.
Confirmed. Works pretty well with this patch.
OK, applied than. Thanks for being helpful, guys!
That patch does not fix the problem for me. If I lower the volume via the volume applet to zero, withthe mixer open, it mutes, and must be unmuted by clicking on the mute button. Please reopen.
That is unrelated to this bug, please open a new one.
I did, and it was marked a dupe of this one: http://bugzilla.gnome.org/show_bug.cgi?id=318991
No, in that bug report, it states that "if I modify the volume, it mutes", which is this bug. What you describe is "if I bring the volume down to zero, it mutes", which is not the same. Please be accurate in bug descriptions, otherwise we (developers) will be confused and we will not be able to help in fixing the issue at hand.
Ah, I failed to make that distinction. The "just change" is fixed now, the "zero mutes" is not fixed, I'll open a new bug for that.
Thank you, I'll try to have a look soon.
The "mute on zero" problem appears to be bug #170575, so I'm satisfied.
Everything works on my end too, thank you Ronald for working with me, and thank you Kazuki for the patch :)