Bug 100561 - KMix doesn't go into the system tray at startup
Summary: KMix doesn't go into the system tray at startup
Status: RESOLVED DUPLICATE of bug 58901
Alias: None
Product: kmix
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: VLO normal
Target Milestone: ---
Assignee: Christian Esken
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-01 17:16 UTC by Josh Berry
Modified: 2005-07-11 01:16 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
kmixrc (1.44 KB, text/plain)
2005-03-25 18:27 UTC, Josh Berry
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Berry 2005-03-01 17:16:40 UTC
Version:            (using KDE KDE 3.4.0)
Installed from:    Gentoo Packages
Compiler:          gcc 3.4 
OS:                Linux

With KDE 3.4rc1, I can't get KMix to go into the system tray at startup.  All its options (in the preferences dialog) are correct, however, when I start KDE, KMix opens its mixer window displaying all the volume controls.  It does not appear in the system tray like it should.
Comment 1 Christian Esken 2005-03-01 21:01:16 UTC
Cannot reproduce that problem. It works wonderful here.
Comment 2 satmd 2005-03-18 23:44:04 UTC
Confirmed on KDE3.4final (gentoo, gcc 3.3.5), but it shows up in the tray area.
Comment 3 Christian Esken 2005-03-19 09:29:25 UTC
Josh, you state 2 things in your comment #2 states:
(1) Confirmed on KDE3.4final
(2) it shows up in the tray area

So, quoting you, you say "it shows up in the tray area". So can I close this bug report as fixed? Why do you say "but"?!?
Comment 4 Josh Berry 2005-03-19 19:43:12 UTC
Comment #2 wasn't from me. ;)

Actually, I think it not showing up in the system tray had to do with Composite being turned on.  It shows up now that I have composite turned off, but that's only half the problem.

The other half of the problem is that it always pops up the mixer window when I log in.  So, KMix opens both the system tray AND the mixer window ... which I always have to close after I finish logging in.  This is mildly annoying.
Comment 5 Christian Esken 2005-03-20 15:15:47 UTC
Can't reproduce this here, either - sorry. KMix window will show here when you left it open after logging in. It will not show if you closed the KMix main window. So I'd like to make sure I understood your configuration correct:
- Do you have KMix on the Systray?
- Do you have KMix running as PanelApplet?

PS: As long as we haven't solved your problem: You can close KMix Main Window by presing the "Esc" key (it saves you one keystroke against Alt-F4 ;-) 
Comment 6 Josh Berry 2005-03-20 22:59:19 UTC
I have KMix running in the system tray.  I do not have it open as a panel applet.

I tried deleting and recreating my ~/.kde directory -- still no luck.  I always close the KMix window and make sure it's closed before I log out.

I wonder, I'm using manually-saved sessions ... do I have to save my session before I log out?  (I'm pretty sure I tried this already, but I don't remember for certain, so I thought I should ask.)
Comment 7 Josh Berry 2005-03-22 20:18:58 UTC
Manually saving the session does not fix the problem.  I closed everything that was open, and left KMix sitting in the system tray (i.e. no open mixer window), saved my session, logged out and back in.  When I came back in, KMix popped open the mixer window, just like before.
Comment 8 Christian Esken 2005-03-25 12:35:15 UTC
Please post your ~/.kde/share/config/kmixrc . I'd like to check whether there is something wrong in there.
Comment 9 Christian Esken 2005-03-25 14:04:32 UTC
CVS commit by esken: 

Backport of a bugfix (invalid usage of snd_mixer_selem_id_get_index()). This also possibly fixes bug 100561.
CCBUGS:100561


  M +0 -1      mixer_alsa.h   1.19.2.1
  M +7 -9      mixer_alsa9.cpp   1.53.2.1


--- kdemultimedia/kmix/mixer_alsa.h  #1.19:1.19.2.1
@@ -35,5 +35,4 @@ class Mixer_ALSA : public Mixer
                 AlsaMixerSidList mixer_sid_list;
 
-                bool masterChosen;
                 bool _initialUpdate;
                 snd_mixer_t *_handle;

--- kdemultimedia/kmix/mixer_alsa9.cpp  #1.53:1.53.2.1
@@ -57,5 +57,4 @@ Mixer_ALSA::Mixer_ALSA( int device, int 
         Mixer( device, card ), _handle(0)
 {
-        masterChosen = false;
         _initialUpdate = true;
 }
@@ -70,12 +69,5 @@ Mixer_ALSA::identify( snd_mixer_selem_id
         QString name = snd_mixer_selem_id_get_name( sid );
 
-        if ( name == "Master" )
-        {
-                if (!masterChosen) {
-                        m_masterDevice = snd_mixer_selem_id_get_index( sid );
-                        masterChosen = true; // -<- this makes KMix select the *first* master device
-                }
-                return MixDevice::VOLUME;
-        }
+        if ( name == "Master" ) return MixDevice::VOLUME;
         if ( name == "Capture" ) return MixDevice::RECMONITOR;
         if ( name == "Master Mono" ) return MixDevice::VOLUME;
@@ -107,4 +99,5 @@ Mixer_ALSA::openMixer()
     bool virginOpen = m_mixDevices.isEmpty();
     bool validDevice = false;
+    bool masterChosen = false;
     int err;
 
@@ -210,4 +203,9 @@ Mixer_ALSA::openMixer()
         // New mix device
         MixDevice::ChannelType ct = (MixDevice::ChannelType)identify( sid );
+        if (!masterChosen && ct==MixDevice::VOLUME) {
+           // Determine a nicer MasterVolume
+           m_masterDevice = mixerIdx;
+           masterChosen = true;
+        }
 
         if( virginOpen )
Comment 10 Josh Berry 2005-03-25 18:27:29 UTC
Created attachment 10346 [details]
kmixrc

Here's my kmixrc.  It's rather long, so I decided to attach it instead of psam
you with the contents in one huge comment.
Comment 11 Andrew Prosser 2005-04-06 21:31:58 UTC
I got this too. Kmix appears in the tray, but also all the sliders appear on the screen. The window seems to be lauched before it gets rendered by the theme/style as the startup reaches the second part of the startup sequence (Services). Normally something that has been saved in the tray doesn't appear until towards the end of the startup sequence. Judging from the X startup log I think that kmixctrl is only supposed to be restoring the volume controls at the point that the kmix window is appearing.
   I've got Slackware 10.1 installed and have tried compiling from source and using the contributed packages from the KDE ftp mirrors. I have also attempted re-compiling with the proposed fix, but with no luck. Each time I test I wipe out /tmp and also the ~/.kde* files and directories. Still no luck.
Comment 12 Damir Perisa 2005-04-13 23:31:15 UTC
i can confirm this on kde 3.4.0 ... in fact, there is a similar bug already posted: bug 49142 ... and it should be reopened and this marked as dupe to it
Comment 13 Damir Perisa 2005-04-13 23:33:48 UTC
bug 58901 is yet another dupe (or the other way around)
Comment 14 Dripple 2005-06-14 08:42:01 UTC
I have the same behaviour here, using KUbuntu and KDE 3.4.1 : kmix opens mixer window at session startup (same bug as http://bugs.kde.org/show_bug.cgi?id=61532)
Comment 15 Christian Esken 2005-07-11 01:16:26 UTC

*** This bug has been marked as a duplicate of 58901 ***