pulseaudio不工作:“主页目录无法访问:权限被拒绝”

我使用Clementine,它昨天开始拒绝播放任何内容并显示“拒绝访问”警告框。 与Rhythmbox相同。 过了一会儿,我意识到我的声音指示也是灰色的,声音设置中没有声卡可见。

认为 Pulseaudio是罪魁祸首,但没有确定性(见下面的输出)。 我在13.04出现问题,但我没有看到如何使用干净的配置重新启动它,或者我是否需要更改任何内容。

lionel@prime:~$ pulseaudio -vvvv I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us. D: [pulseaudio] core-util.c: RealtimeKit worked. I: [pulseaudio] core-util.c: Successfully gained nice level -11. I: [pulseaudio] main.c: This is PulseAudio 3.0 D: [pulseaudio] main.c: Compilation host: x86_64-pc-linux-gnu D: [pulseaudio] main.c: Compilation CFLAGS: -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option D: [pulseaudio] main.c: Running on host: Linux x86_64 3.8.0-29-generic #42-Ubuntu SMP Tue Aug 13 19:40:39 UTC 2013 D: [pulseaudio] main.c: Found 8 CPUs. I: [pulseaudio] main.c: Page size is 4096 bytes D: [pulseaudio] main.c: Compiled with Valgrind support: no D: [pulseaudio] main.c: Running in valgrind mode: no D: [pulseaudio] main.c: Running in VM: no D: [pulseaudio] main.c: Optimized build: yes D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled. I: [pulseaudio] main.c: Machine ID is 77bf4823eb9fbd64b69d605100000002. I: [pulseaudio] main.c: Using runtime directory /run/user/lionel/pulse. E: [pulseaudio] core-util.c: Home directory not accessible: Permission denied 

ls -l /run/user/lionel/pulseaudio --dump-conf

 lionel@prime:~$ ls -l /run/user/lionel/ total 0 drwx------ 2 lionel lionel 60 août 28 15:15 dconf dr-x------ 2 lionel lionel 0 août 28 12:30 gvfs drwx------ 2 lionel lionel 40 août 28 12:30 gvfs-burn drwx------ 2 lionel lionel 120 août 28 12:30 keyring-iiUWPh drwx------ 2 lionel lionel 40 août 28 15:11 pulse lionel@prime:~$ pulseaudio --dump-conf ### Read from configuration file: /etc/pulse/daemon.conf ### daemonize = no fail = yes high-priority = yes nice-level = -11 realtime-scheduling = yes realtime-priority = 5 allow-module-loading = yes allow-exit = yes use-pid-file = yes system-instance = no local-server-type = user cpu-limit = no enable-shm = yes flat-volumes = no lock-memory = no exit-idle-time = 20 scache-idle-time = 20 dl-search-path = /usr/lib/pulse-3.0/modules default-script-file = /etc/pulse/default.pa load-default-script-file = yes log-target = auto log-level = notice resample-method = speex-float-1 enable-remixing = yes enable-lfe-remixing = no default-sample-format = s16le default-sample-rate = 44100 alternate-sample-rate = 48000 default-sample-channels = 2 default-channel-map = front-left,front-right default-fragments = 8 default-fragment-size-msec = 10 enable-deferred-volume = yes deferred-volume-safety-margin-usec = 1 deferred-volume-extra-delay-usec = 0 shm-size-bytes = 0 log-meta = no log-time = no log-backtrace = 0 rlimit-fsize = -1 rlimit-data = -1 rlimit-stack = -1 rlimit-core = -1 rlimit-rss = -1 rlimit-as = -1 rlimit-nproc = -1 rlimit-nofile = 256 rlimit-memlock = -1 rlimit-locks = -1 rlimit-sigpending = -1 rlimit-msgqueue = -1 rlimit-nice = 31 rlimit-rtprio = 9 rlimit-rttime = 1000000 

好的,我最终得到了它。

这是我的主文件夹和pulseaudio的权限问题。

运行以下命令以修复当前$USER$HOME目录权限:

 sudo chown -R $USER:$USER $HOME/ 

我使用http://www.linuxquestions.org/questions/linux-software-2/problem-with-pulse-audio-834041/和http://ubuntuforums.org/showthread.php?p=6208727作为来源。

我的解决方案是使用以下命令修复权限: sudo chown -R lionel:lionel /home/lionel然后使用pavucontrol取消静音输出。

侏儒指标仍然是灰色的,但音乐又回来了,这是一件好事。

(我只是想稍微提高一下标记的答案,但是比我认为的更简单的评论。我认为至少为下一个人发帖是有用的。如果主持人不同意这个答案可能会被降级如果更合适,请对所选答案发表评论。)

pavucontrol的引用相当神秘,这种反应对我来说有点不太有用,但确实让我找到了解决方案。

我没有任何许可和所有权问题似乎是这里的主要焦点。 为了这个目的,我必须安装的pavucontrol确实允许我在播放标签上从“高清晰度音频控制器数字立体声(HDMI)”改为“内置音频模拟立体声”, 我的音频再次开始工作就像以前一样

我仍然不知道我的ThinkPad(运行Mint 13,基本上是Ubuntu 12.04 LTS)进入这种不工作的状态,但这就是我能够获得音频(特别是使用Pulse的Audacious Player)工作的方式。 我希望这有帮助。

与OP有相同的问题,但无法更改$ HOME的权限我发现了一种不同的启动pulseaudio的方法:使用不同的$ HOME显式启动pulseaudion,如

 > HOME=/tmp/$USER pulseaudio --start 

现在为我运行程序。 确保/tmp/$USER存在。

心连心