This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Phonon sound without logging in to KDE (remote connection)

Tags: None
(comma "," separated)
mortoray
Registered Member
Posts
8
Karma
0
I am writing an App in QT using Phonon for sound. After a few problems I have this working fine with the GStreamer backend. However, I now notice that unless I log in to KDE I cannot hear any sound.

I do a remote connection to the machine (via ssh) and run the application. Though remote I still use the audio output of the machine. I want to get the audio working even if I don't login to the KDE desktop (since I won't be doing that remotely).

It appears that phonon itself does work, but there is just no output. That is, I can start the application and it doesn't complain. Furthermore if I leave the application running, then start KDE, the sound will suddenly start working. So perhaps it isn't that phonon isn't working, but just that there is some default mute setting or something when not logged in.

How can I enable sound without starting the kde desktop? (KDM/auth screen is of course running at this point)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
If you check using 'lsof' does the application have any sound device open?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
mortoray
Registered Member
Posts
8
Karma
0
What entries would I be looking for, there are quite a few?

The ones that jump out at me as being sound might be these:
AutoSprea 5926 mortoray mem REG 0,16 67108904 24990 /dev/shm/pulse-shm-3088761170
AutoSprea 5926 mortoray mem REG 0,16 67108904 24914 /dev/shm/pulse-shm-1923003117
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Yep, those are the ones. Looks like you use Pulseaudio. Do those entries change if you run it under KDE rather than outside it?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
mortoray
Registered Member
Posts
8
Karma
0
No, they don't change -- a few more appear as some more sounds play.

I think this point is important: the program starts playing sound the moment the KDE desktop is started on the machine. This happens without restarting the program, or even recreating the phonon MediaObject's.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
This is likely a Pulseaudio issue in this case. When KDE starts, it likely loads a module into Pulseaudio, applying the Phonon settings as set in the Phonon KCM. The fault is not in KDE or your application.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], Sogou [Bot], Yahoo [Bot]