By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 503

Summary: kmix wont autostart
Product: TDE Reporter: RJ <ogldelphi>
Component: tdemultimediaAssignee: Timothy Pearson <kb9vqf>
Status: RESOLVED FIXED    
Severity: blocker CC: bugwatch, cheapsexandbooze, darrella, dzfixes-box1, slavek.banko
Priority: P5    
Version: 3.5.13 [Trinity]   
Hardware: Other   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:
Bug Depends on: 1096    
Bug Blocks:    
Attachments: kmixrc
kmix.desktop

Description RJ 2011-08-19 04:13:25 CDT
Autostart tick checked but kmix wont autostart.

Debian 6
Comment 1 Timothy Pearson 2011-08-19 12:28:28 CDT
Did you install 3.5.13 from SVN or from the nightly builds?
Comment 2 RJ 2011-08-19 12:58:19 CDT
Yes, I'm using something that was built in "Trinity Nightly Builds" (updated today morning)
Comment 3 Timothy Pearson 2011-08-19 13:10:46 CDT
Can you please send the exact version number of kmix-trinity?

You can get this information with
dpkg -l | grep kmix-trinity

Bear in mind that the nightly builds are not stable, and bugs may be due to binary build issues (missing library symbols, etc.) that are not present in the actual source code.
Comment 4 RJ 2011-08-19 13:42:05 CDT
Sure. Here it is:
$ dpkg -l | grep kmix-trinity
ii  kmix-trinity 4:3.5.13-0debian7+r1246260+pr1~squeeze  sound mixer applet for KDE3

Yes, it is not stable but I like to be on a bleeding edge.

p.s I'm going to testing testing testing Trinity until all bugs will not appear on this bugzilla (joke but with a bit of truth :)
Comment 5 Timothy Pearson 2011-08-19 13:52:31 CDT
(In reply to comment #4)
> Sure. Here it is:
> $ dpkg -l | grep kmix-trinity
> ii  kmix-trinity 4:3.5.13-0debian7+r1246260+pr1~squeeze  sound mixer applet for
> KDE3
> 
> Yes, it is not stable but I like to be on a bleeding edge.

OK, and in this case you are running the latest version of kmix, so there may be a problem in the source.

> 
> p.s I'm going to testing testing testing Trinity until all bugs will not appear
> on this bugzilla (joke but with a bit of truth :)

Sounds good to me!  Just be sure to pass along the exact version number of the binary package in question; that way we can rule out binary problems and bugs that have already been fixed.

Thanks!
Comment 6 Timothy Pearson 2011-08-20 17:15:19 CDT
Can you please attach the following files:
/opt/trinity/share/applications/kde/kmix.desktop
~/.trinity/share/config/kmixrc

Thanks!
Comment 7 RJ 2011-08-21 09:14:48 CDT
Created attachment 80 [details]
kmixrc

kmixrc
Comment 8 RJ 2011-08-21 09:16:00 CDT
Created attachment 81 [details]
kmix.desktop

kmix.desktop
Comment 9 Darrell 2012-05-08 15:29:48 CDT
I believe the cause is kmix.desktop is not installed to ${PREFIX}/share/autostart. Therefore there is nothing to trigger the user's kmixrc autostart setting.

There is a restore_kmix_volumes.desktop installed to ${PREFIX}/share/autostart, but that file only controls volumes and not autostarting.

For a work-around perform the following:

* cp ${PREFIX}/share/applications/kde/kmix.desktop ${PREFIX}/share/autostart/

* If $TDEHOME/Autostart/kmix.desktop exists, then move that file to a safe temporary storage location.

* Temporarily disable starting with a session (KControl, TDE components, Session manager, Start with empty session).

* Restart Trinity. Verify kmix starts. If not, then ensure in the kmix settings that Autostart check box is selected and restart Trinity.

* After verifying kmix starts automatically, in kmix settings disable the Autostart check box. Restart Trinity and verify kmix does not start.

* In kmix settings enable the Autostart check box. Restart Trinity and verify kmix starts automatically.
Comment 10 Darrell 2012-05-08 16:37:36 CDT
I tested and pushed a patch in GIT hash 2cc2e3a2.

For those not using GIT sources the work-around in Comment 9 should provide a solution.

Resolved. Thank you for helping!
Comment 11 Timothy Pearson 2012-05-21 02:42:15 CDT
(In reply to comment #10)
> I tested and pushed a patch in GIT hash 2cc2e3a2.
> 
> For those not using GIT sources the work-around in Comment 9 should provide a
> solution.
> 
> Resolved. Thank you for helping!

Darrell,

Hate to reopen this but...

This is not the correct solution.  This patch caused the Autostart control in kmix to have no effect; kmix is always started regardless of the Autostart setting.

Please revert this patch until we can figure out what the real problem is.

Tim
Comment 12 Darrell 2012-05-21 11:49:48 CDT
Do you mean the new Autostart control that we recently added to the sources as kcmautostart? I'm not running that package at the moment and the kmix patch works as expected.

I'll install kcmautostart and test.

A bug in kcmautostart?
Comment 13 Darrell 2012-05-21 12:23:02 CDT
Never mind my previous post. If there is no kmix.desktop file in $PREFIX/share/autostart, then how does does TDE know to autostart kmix? What triggers the process?

In the 3.5.10 days I had to add kmix to my TDE profile Autostart directory. Do we still need to do that in TDE?
Comment 14 Timothy Pearson 2012-05-21 12:26:44 CDT
(In reply to comment #12)
> Do you mean the new Autostart control that we recently added to the sources as
> kcmautostart? I'm not running that package at the moment and the kmix patch
> works as expected.
> 
> I'll install kcmautostart and test.
> 
> A bug in kcmautostart?

No, I am referring to this control in KMix:
1.) Open the KMix main Mixer window
2.) Settings->Configure KMix
3.) Note the Autostart checkbox

I believe KMix uses the restore-volumes .desktop file to launch itself if needed, i.e. if that Autostart checkbox has been checked.

Tim
Comment 15 Darrell 2012-05-21 12:41:24 CDT
Ah, okay, I see. Quick test:

I removed $PREFIX/share/autostart/kmix.desktop. I disabled Autostart in the kmix settings. I open konsole and ran 'kmixctrl --restore'. Kmix did not start.

I'll reverse the patch but that quick test seems to reveal where the problem lies. Somehow when 'kmixctrl --restore' runs the Autostart directive is being ignored.
Comment 16 Timothy Pearson 2012-05-21 13:26:21 CDT
(In reply to comment #15)
> Ah, okay, I see. Quick test:
> 
> I removed $PREFIX/share/autostart/kmix.desktop. I disabled Autostart in the
> kmix settings. I open konsole and ran 'kmixctrl --restore'. Kmix did not start.
> 
> I'll reverse the patch but that quick test seems to reveal where the problem
> lies. Somehow when 'kmixctrl --restore' runs the Autostart directive is being
> ignored.

Looks like I may have been wrong about the exact mechanism in use, but the problem with the patch still remains.

Do you have a kmix.desktop file anywhere on your system?  If so, where is it?
Comment 17 Darrell 2012-05-21 13:54:17 CDT
I reversed the patch in GIT.

The only place is $PREFIX/share/applications/kde/kmix.desktop.

I saw your comment in bug report 995 about kmix always starting open rather than minimized in the system tray. After I reversed the patch kmix starts normally with a session restore, but won't autostart when starting with an empty session.
Comment 18 Timothy Pearson 2012-05-21 14:10:28 CDT
(In reply to comment #17)
> I reversed the patch in GIT.
> 
> The only place is $PREFIX/share/applications/kde/kmix.desktop.
> 
> I saw your comment in bug report 995 about kmix always starting open rather
> than minimized in the system tray. After I reversed the patch kmix starts
> normally with a session restore, but won't autostart when starting with an
> empty session.

My understanding is that TDE reads the files in $PREFIX/share/applications/kde/ looking for the Autostart keyword.  The fact that it is not starting indicates a deeper problem in tdelibs.
Comment 19 Timothy Pearson 2012-05-21 14:11:33 CDT
(In reply to comment #18)
> (In reply to comment #17)
> > I reversed the patch in GIT.
> > 
> > The only place is $PREFIX/share/applications/kde/kmix.desktop.
> > 
> > I saw your comment in bug report 995 about kmix always starting open rather
> > than minimized in the system tray. After I reversed the patch kmix starts
> > normally with a session restore, but won't autostart when starting with an
> > empty session.
> 
> My understanding is that TDE reads the files in $PREFIX/share/applications/kde/
> looking for the Autostart keyword.  The fact that it is not starting indicates
> a deeper problem in tdelibs.

I just thought of something...the Autostart for kmix is conditional on a key in in kmixrc.  If kmixrc is not present, I wonder if the Autostart condition is ignored.
Comment 20 Darrell 2012-05-21 15:53:24 CDT
Makes sense, but users who are experiencing this problem will have a kmixrc file because they purposely enable the Autostart check box, which automatically creates kmixrc.

In my case I verified the kmixrc Autostart key changes when I toggle the check box.

My guess is the detection mechanism no longer honors the Autostart key, or is not even looking for the key.
Comment 21 Timothy Pearson 2012-05-21 15:59:46 CDT
(In reply to comment #20)
> Makes sense, but users who are experiencing this problem will have a kmixrc
> file because they purposely enable the Autostart check box, which automatically
> creates kmixrc.
> 
> In my case I verified the kmixrc Autostart key changes when I toggle the check
> box.
> 
> My guess is the detection mechanism no longer honors the Autostart key, or is
> not even looking for the key.

So kmix does not start even with the kmixrc file present in the user's $HOME directory.  This is good to know.

Can you post both your kmix.desktop file and your kmixrc file to this report?

Thanks!
Comment 22 Darrell 2012-05-21 20:30:20 CDT
Correct, kmix does not autostart even with kmixrc present.

As far as I can tell, when the (empty) session starts and all of the $PREFIX/share/applications/kde/*.desktop files are scanned, the session manager should read the X-TDE-autostart-condition=kmixrc::Autostart:true key/value. Seems to me then that something in tdelibs is broken.

Consider that I added X-DCOP-ServiceType=Unique to kwikdisk.desktop and the applet still opens multiple times. As another test, I added X-DCOP-ServiceType=Unique to k9copy.desktop and again I was able to start multiple copies. Seems again there is a problem with tdelibs reading certain desktop keys.

Here is my profile kmix.desktop, without the Name/GenericName/Comment fluff:

[Desktop Entry]
Exec=kmix -caption "%c" %i %m
DocPath=kmix/index.html
OnlyShowIn=TDE;
Path=
Type=Application
MimeType=
Terminal=false
Icon=kmix
X-TDE-StartupNotify=true
X-DCOP-ServiceType=Unique
X-TDE-autostart-phase=2
X-TDE-autostart-after=panel
X-TDE-autostart-condition=kmixrc::Autostart:true
Categories=Qt;TDE;AudioVideo;Audio;Mixer;

Please remember in my local builds I convert "X-KDE-" keys to "X-TDE-" in support of bug report 892, hence those differences. I doubt that is the problem because the original poster, RJ, reported the problem with 3.5.13.

I notice kmixrc has no group category for the primary keys. Is that way in 3.5.10 too, but the kmix.desktop X-TDE-autostart-condition is correct with a double colon where the group category normally is listed.

Here is a copy of my (virtual machine) kmixrc without the switches fluff:

AllowDocking=true
Autostart=true
DockIconMuting=false
Labels=true
MasterMixer=ALSA::Intel_82801AA-ICH:1
Menubar=true
Orientation=Horizontal
Position=418,280
Size=444,272
Tickmarks=true
TrayVolumeControl=true
ValueStyle=Relative
Visible=true
starttdeRestore=true

By the way, while investigating this bug I found some remnant inadvertent "Qt::" conversions. Most were in comments, but one affects a Settings dialog control (Slider Qt::Orientation"). I will push that patch. Strictly typo stuff and nothing that helps here. :-(
Comment 23 Darrell 2012-05-21 21:30:53 CDT
I enabled the full kdDebug spew.

With kmixrc Autostart=true and kmix not in $TDEHOME/Autostart, I find the following messages:

[tdeinit] Got EXEC_NEW 'kmixctrl' from launcher.
kio (KLauncher): kmixctrl (pid 1981) up and running.
kmix: Trying ALSA Device 'default': found
kmix: Trying ALSA Device 'hw:0': found
kmixctrl: socket 0
kmix: Trying ALSA Device 'hw:0': found
kmix: Trying ALSA Device 'hw:0': found
kmixctrl: socket 0
kmix: Mixer::masterCard() searching for id=
kmix: Sound drivers supported: ALSA + OSS
kmix: Total number of detected Mixers: 1
kmix: MixSet::read() of group MixerIntel 82801AA-ICH
[tdeinit] PID 1981 terminated.

With kmixrc Autostart=true and kmix in $TDEHOME/Autostart, I find the following messages:

[tdeinit] Got EXEC_NEW 'kmixctrl' from launcher.
kio (KLauncher): kmixctrl (pid 2846) up and running.
kio (KRun):  new KRun 0x815dd80 file:///root/.trinity/Autostart/kmix.desktop timer=0x815ddd8
kio (KRun): KRun::run /root/.trinity/Autostart/kmix.desktop
kmix: Trying ALSA Device 'default': found
kmix: Trying ALSA Device 'hw:0': found
kmixctrl: socket 0
kmix: Trying ALSA Device 'hw:0': found
kmix: Trying ALSA Device 'hw:0': found
kmixctrl: socket 0
kmix: Mixer::masterCard() searching for id=
kmix: Sound drivers supported: ALSA + OSS
kmix: Total number of detected Mixers: 1
kmix: MixSet::read() of group MixerIntel 82801AA-ICH
kio (KLauncher): KLauncher: Got start_service_by_desktop_path('/root/.trinity/Autostart/kmix.desktop', ...)
tdecore (KStartupInfo): got:new:  ID="testbox;1337652288;976306;2826_TIME226794"   NAME="KMix" DESCRIPTION="Launching KMix" ICON=kmix SCREEN=0
tdecore (KStartupInfo): got:new:  ID="testbox;1337652288;976306;2826_TIME226794"   NAME="KMix" DESCRIPTION="Launching KMix" ICON=kmix SCREEN=0
[tdeinit] Got EXT_EXEC 'kmix' from launcher.
tdecore (KStartupInfo): got:change:  ID="testbox;1337652288;976306;2826_TIME226794"   BIN="kmix" DESKTOP=0
tdecore (KStartupInfo): got:change:  ID="testbox;1337652288;976306;2826_TIME226794"   BIN="kmix" DESKTOP=0
tdecore (KStartupInfo): got:change:  ID="testbox;1337652288;976306;2826_TIME226794"   HOSTNAME=testbox PID=2864
tdecore (KStartupInfo): got:change:  ID="testbox;1337652288;976306;2826_TIME226794"   HOSTNAME=testbox PID=2864
kio (KLauncher): kmix (pid 2864) up and running.
kmix: Trying ALSA Device 'default': found
kmix: Trying ALSA Device 'hw:0': found
kmix: socket 0
kmix: Trying ALSA Device 'hw:0': found
kmix: Trying ALSA Device 'hw:0': found
kmix: socket 0
kmix: Mixer::masterCard() searching for id=ALSA::Intel_82801AA-ICH:1
kmix: Sound drivers supported: ALSA + OSS
kmix: Total number of detected Mixers: 1
tdecore (KAction): KAction::initPrivate(): this = 0x8167728 name = "hide_kmixwindow" cut = Escape m_parentCollection = 0x8148e40
tdecore (KAction): Inserting hide_kmixwindow, Hide Mixer Window, Hide Mixer Window
tdecore (KAccel): KAccelBase::insertConnection( 0x8167bc8="hide_kmixwindow"; shortcut = Escape )  this = 0x8148198
tdecore (KAccel): KAccelPrivate::connectKey( "hide_kmixwindow", Escape = 0x1000 ): id = -4 m_pObjSlot = 0x8167728
tdecore (KAction): KActionCollection::beginXMLPlug( buildWidget = [KMixWindow pointer (0x80b3f10) to widget kmix-mainwindow#1, geometry=444x272+438+405] ): this = 0x8148e40 d->m_builderKAccel = (nil)
tdecore (KAccel): KAccel( watch = [KMixWindow pointer (0x80b3f10) to widget kmix-mainwindow#1, geometry=444x272+438+405], pParent = 0x8148e40, psName = KActionCollection-BuilderKAccel ): this = 0x817f9b0
kmix: Mixer::masterCard() searching for id=ALSA::Intel_82801AA-ICH:1
kmix: Mixer::masterCard() searching for id=ALSA::Intel_82801AA-ICH:1
[tdeinit] PID 2864 terminated.
Comment 24 Darrell 2012-05-30 14:58:53 CDT
A paper cut bug but a temporary workaround is to add kmix to $TDEHOME/Autostart. :-)
Comment 25 Timothy Pearson 2012-07-11 16:38:38 CDT
Someone needs to go over the autostart system with a fine toothed comb. ;-)  Bug 1096 indicates that there are problems beyond just kmix.
Comment 26 Timothy Pearson 2012-07-15 15:01:28 CDT
*** Bug 379 has been marked as a duplicate of this bug. ***
Comment 27 Timothy Pearson 2012-07-17 16:46:44 CDT
Bumping to blocker due to recent rash of reports on kmix problems.
Comment 28 David Hare 2012-07-18 19:36:25 CDT
No problems here with kmix autostart, always there in the tray. But I don't use saved sessions and I have a link to kmix.desktop in ~/trinity/Autostart.

Using 3.5.13 + slavek's updates in Squeeze

Snip from my kmixrc (originally manually created):

AllowDocking=true
Autostart=true
DockIconMuting=false
Labels=true
MasterMixer=ALSA::HDA_Intel:1
Menubar=true
Orientation=Horizontal
Position=320,307
Size=708,409
Tickmarks=true
TrayVolumeControl=true
ValueStyle=None
Visible=false
startkdeRestore=true

I got a hazy memory of kmix autostart in kde 3.5.10 when it was in Debian Sid being awkward to get working
Comment 29 Darrell 2012-07-20 07:11:41 CDT
Adding a link to kmix.desktop in ~/trinity/Autostart is a work-around. The link should not be needed because the configuration includes a check box GUI control for autostarting. :-)
Comment 30 Timothy Pearson 2012-07-20 13:26:23 CDT
This looks like the patch where kmix autostart control was added:
http://sisyphus.ru/en/srpm/Branch4/kdemultimedia/patches/7

Nothing seems wrong with the patch, but this might help trace whatever is failing in the TDE auutostart code.
Comment 31 Timothy Pearson 2012-07-24 02:13:50 CDT
kmix will never autostart due to the fact that the TDE autostart code does not even look for autostart conditions outside the defined autostart folders.  This bug is looking more like a session restore problem than anything else; i.e. kmix should not be saved as a running program for a session unless its mixer control window is active (i.e. just being present in the system tray should NOT insert kmix into a saved session list).
Comment 32 Timothy Pearson 2012-07-25 02:02:42 CDT
kmix autostart fixed in GIT hash 7da06e5.  Please test and verify!
Comment 33 Darrell 2012-07-25 13:17:47 CDT
Seems to work here. I tested only on Slackware 13.1 32-bit.
Comment 34 Darrell 2012-07-27 20:45:23 CDT
There is a potential bug with the latest patch.

Because the Autostart check box control was broken, many users likely have a kmix.desktop file or sym link in their Autostart directory. When users enable the Autostart check box control and they do not delete the file or sym link from their Autostart directory, kmix will seem to always start opened in a window. What is actually happening is kmix is being started twice.

Perhaps something like this might help:

if [ kmixrc Autostart=true ] && [-f $TDEHOME/Autostart/kmix.desktop ]; then
  rm -f $TDEHOME/Autostart/kmix.desktop
fi

Two places would be helpful: 1) when the kmixrc config file is saved and 2) during TDE startup.