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

[solved] phonon not working for non root user

Tags: None
(comma "," separated)
User avatar
StAn666
Registered Member
Posts
15
Karma
0
OS
Hi, I am unable to play sound in KDE. The problem started when KDE/phonon notified me that certain sound cards are no longer available and if kde should fix this. I clicked onto "yes" and now I have no more sound.

Even though there are some devices listed in systemsettings->multimedia I hear nothing when pressing the "test" button. When I open systemsettings->multimedia as root (!) there are suddenly devices listed where the test plays a sound! But when I try to find the same devices as a normal user the devices are not listed anymore. :((

Non kde apps are playing sound properly, even vlc that uses phonon (?) plays sound but I do not hear any kde notifications nor do amarok and juk play any sound.

How can it be, that the working devices can only be used by root? :o

I already flushed .kde/share/config/phonon* but that did not help...

My sound card is:
Code: Select all
stan@zerberus ~ $ sh soundcardinfo.sh
/proc/asound/cards:                   
 0 [Audigy2        ]: Audigy2 - SB Audigy 2 Platinum [SB0240P]
                      SB Audigy 2 Platinum [SB0240P] (rev.4, serial:0x10021102) at 0xa880, irq 23

/proc/asound/pcm:
00-00: emu10k1 : ADC Capture/Standard PCM Playback : playback 32 : capture 1
00-01: emu10k1 mic : Mic Capture : capture 1                               
00-02: emu10k1 efx : Multichannel Capture/PT Playback : playback 8 : capture 1
00-03: emu10k1 : Multichannel Playback : playback 1                           
00-04: p16v : p16v : playback 1 : capture 1                                   

/proc/asound/card0/codec97#0/ac97#?-?:
0-0/0: SigmaTel STAC9721,23           

PCI Subsys Vendor: 0x0000
PCI Subsys Device: 0x0000

Flags: 0
Capabilities     :
DAC resolution   : 18-bit
ADC resolution   : 18-bit
3D enhancement   : SigmaTel 3D Enhancement

Current setup
Mic gain         : +0dB [+0dB]
POP path         : pre 3D
Sim. stereo      : off
3D enhancement   : off
Loudness         : off
Mono output      : MIX
Mic select       : Mic1
ADC/DAC loopback : off
Extended ID      : codec=0 rev=0 AMAP DSA=0
Extended status  : PRJ

Last edited by StAn666 on Fri Aug 21, 2009 5:04 pm, edited 3 times in total.
User avatar
StAn666
Registered Member
Posts
15
Karma
0
OS
I see, this is not a bug, it's a feature. Removed all of the (until now) useless policykit nonsens, rebooted and now I have sound again.

Systemsettings now shows me devices like

* SB Audigy 2 Platinum [SB0240P] (rev.4, serial: 0x10021102) () #4
(this is a very clear description for a sound card, isn't it? >:D )

and all the other devices that where shown before (those with a _real_ description, like "center") are still there and - as you can imagine - still not working. (Why are the even there!?)

I don't understand why policykit made it into kde 4.3 but I cannot configure proper permissions with it (like sound card usage)... And why the hell do I not get notified by KDE that I do not have permissions for doing something, leaving me scratch my head?

-> I'm looking forward to kde 4.4 :)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Please execute the following command in Konsole:
Code: Select all
rm $(kde4-config --localprefix)/cache-$(hostname)/libphonon/hardwaredatabase
kbuildsycoca4 --noincremental


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
StAn666
Registered Member
Posts
15
Karma
0
OS
Thanks for your reply, I will try it today in the evening because I am currently at work. Could I re-enable policykit after executing this command?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Yes, it is completely safe ( and recommended ) to re-enable policykit after doing this. It was likely unrelated to the problem.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
StAn666
Registered Member
Posts
15
Karma
0
OS
I did what you suggested and now sound is working again (with policykit enabled). The devices that were only visible for the superuser are now also shown to a normal user. Thanks for your help.
(philipp)
Registered Member
Posts
13
Karma
0
OS
Hi, I have exactly the same problem as described by StAn666. However I'm not able to reproduce the steps to solve the problem.

Especially I'm not sure how to perform the following:
I see, this is not a bug, it's a feature. Removed all of the (until now) useless policykit nonsens, rebooted and now I have sound again.


What exactly must I do to remove all "useless" (or even all) policykit nonsens?

How is bcooksley's hint in comment 3 related to this? Does this contribute to the solution at all? (This step alone does not solve the problem, at least for me)

Can you help me with this?

Cheers Phil
User avatar
StAn666
Registered Member
Posts
15
Karma
0
OS
(philipp) wrote:What exactly must I do to remove all "useless" (or even all) policykit nonsens?


Please notice that I am running Gentoo Linux, I don't think it's a good idea to remove policykit-stuff on kubuntu.

(philipp) wrote:How is bcooksley's hint in comment 3 related to this? Does this contribute to the solution at all? (This step alone does not solve the problem, at least for me)

Executing the mentioned command solved my problem, so the comment is absolutly related to this :-)
(philipp)
Registered Member
Posts
13
Karma
0
OS
hmmm,

have you executed the commands suggested by bcooksley as root or as yourself?

I thought that this probably is a right-management issue, so i added myself to the audio group. But that didn't help either.

have you any further ideas?

Cheers Phil
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Given that Phonon doesn't even interact in any form with PolicyKit, removing it should have no effect.
The command I gave in comment 3 should be executed under your normal account.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
(philipp)
Registered Member
Posts
13
Karma
0
OS
hmm, executed the command. I can see that the devicelists in the multimedia-dialog in systemsettings show devices in a different order, so the list seems to be reset. However it did not have th desired effect. I still can't play sounds as a normal user...
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Please try running a Phonon application such as Dragon Player in Konsole, and see if any relevant output, for permissions is output.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
(philipp)
Registered Member
Posts
13
Karma
0
OS
Hi,

i ran dragonplayer. The console did not give any valuable output at all, but a funny thing happend:

running the program and playing a file as a normal user gave no output at all. The video starts to play, but no sound.

running the program and playing a file via sudo gave the following output:

Code: Select all
sudo dragon                                             
[sudo] password for normaluser:                                                   
Error: "/var/tmp/kdecache-normaluser" is owned by uid 1000 instead of uid 0.     
Error: "/tmp/kde-normaluser" is owned by uid 1000 instead of uid 0.               
Error: "/tmp/kde-normaluser" is owned by uid 1000 instead of uid 0.               
Error: "/tmp/ksocket-normaluser" is owned by uid 1000 instead of uid 0.           
kdeinit4: Shutting down running client.                                         
kdeinit4: preparing to launch /usr/lib/libkdeinit4_klauncher.so                 
Error: "/tmp/ksocket-normaluser" is owned by uid 1000 instead of uid 0.           
Error: "/tmp/kde-normaluser" is owned by uid 1000 instead of uid 0.               
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kded4.so                     
Error: "/var/tmp/kdecache-normaluser" is owned by uid 1000 instead of uid 0.     
Error: "/tmp/kde-normaluser" is owned by uid 1000 instead of uid 0.               
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kbuildsycoca4.so             
kbuildsycoca4 running...                                                       
Error: "/var/tmp/kdecache-normaluser" is owned by uid 1000 instead of uid 0.     
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kbuildsycoca4.so             
kbuildsycoca4 running...                                                       
Error: "/var/tmp/kdecache-normaluser" is owned by uid 1000 instead of uid 0.     
Error: "/var/tmp/kdecache-normaluser" is owned by uid 1000 instead of uid 0.     
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kconf_update.so             
Home directory /home/normaluser not ours.                                         
QMainWindow::saveState(): 'objectName' not set for QDockWidget 0xa2bf7d0 ';     
QMainWindow::saveState(): 'objectName' not set for QDockWidget 0xa2bf7d0 ';     
QMainWindow::saveState(): 'objectName' not set for QDockWidget 0xa2bf7d0 ';


again a playing movie but no sound.

Then I ran the program with kdesudo (therefore no output). The program started i saw the movie and there was sound! (The movie was an mpeg4)



When I start amarok with --debug option (as a normal user) and I start playing an mp3-File I get se following output:

amarok: END__: void EngineSubject::stateChangedNotify(Phonon::State, Phonon::State) - Took 0.01s
amarok: END__: void EngineController::slotStateChanged(Phonon::State, Phonon::State) - Took 0.01s
amarok: BEGIN: void EngineController::slotStateChanged(Phonon::State, Phonon::State)
amarok: [EngineController] [WARNING!] Phonon failed to play this URL. Error: "Cannot find demultiplexer plugin for MRL [file://home/normaluser/Dokumente/test.mp3]"

run with sudo, everything works fine (i.e. I can play the file)

Any suggestions?

Cheers and thanks a lot for all your support

Phil
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The following message indicates a permissions issue with Xine...

Code: Select all
Cannot find demultiplexer plugin for MRL..


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
(philipp)
Registered Member
Posts
13
Karma
0
OS
Hi,

I have purged and reinstalklled the following packages:

libxine1 libxine1-bin libxine1-console libxine1-ffmpeg libxine1-misc-plugins libxine1-x phonon-backend-xine

However no success, still no sound as a normal user.

I have then installed gestreamer additionally with xine:
amaroks debuglog shows now even less:

Code: Select all
amarok:         BEGIN: void EngineController::playUrl(const KUrl&, uint)                                                                                                           
amarok:           [EngineController] URL:  "file:///home/normaluser/Dokumente/test.mp3"
amarok:           BEGIN: void EngineController::slotNewTrackPlaying(const Phonon::MediaSource&) 


so everything looks right, but I still have no sound

Hm I still think that this is a permission issue and there is somewhere some file that has not the right permission... But how can one find it??

Chers Phil


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], lockheed