Environment: Up to dated rasbian.
pi@raspberrypi:/etc $ cat os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@raspberrypi:/etc $
I would like to make my RPI to a Bluetooth speaker as I can connect it to my speaker system with HDMI. And I followed this answer. However, it turns out that there is no audio output after I successfully paired and connected it to my phone. But omxplayer
works fine.
After a few investigations, I found that there is something wrong with pulseaudio
. I found those issues from syslog
pulseaudio[895]: [autospawn] core-util.c: Failed to create random directory /tmp/pulse-jQKTIx5u3FhO: Read-only file system
pulseaudio[895]: [autospawn] lock-autospawn.c: Cannot access autospawn lock.
pulseaudio[895]: [pulseaudio] main.c: Failed to acquire autospawn lock
systemd-udevd[855]: Process '/usr/lib/udev/bluetooth' failed with exit code 1.
systemd-udevd[853]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.
I am confused that /tmp
is writeable from shell --- both mkdir
and touch
works fine.
And it seems that there is nothing wrong with /tmp
pi@raspberrypi:/etc $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 30G 5.3G 23G 19% /
devtmpfs 460M 0 460M 0% /dev
tmpfs 464M 0 464M 0% /dev/shm
tmpfs 464M 13M 452M 3% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 464M 0 464M 0% /sys/fs/cgroup
/dev/mmcblk0p1 41M 22M 20M 53% /boot
tmpfs 93M 4.0K 93M 1% /run/user/1000
pi@raspberrypi:/etc $ ls -dhl /tmp
drwxrwxrwt 16 root root 4.0K Mar 18 14:32 /tmp
pi@raspberrypi:/etc $ cat fstab
proc /proc proc defaults 0 0
PARTUUID=98e0451d-01 /boot vfat defaults 0 2
PARTUUID=98e0451d-02 / ext4 defaults,noatime 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
pi@raspberrypi:/etc $
I really have no idea what's going on.
Update:
Here comes the output of mount
command:
/dev/mmcblk0p2 on / type ext4 (rw,noatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=470128k,nr_inodes=117532,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=25,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=94944k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
ls -lah /tmp/pulse-jQKTIx5u3FhO
(it is possible that it does not exist)/tmp
is1777
which means every user should have the permission to create a directory under/tmp
. According to the source code there must be something wrong withmkdir(fn,m)
. I tried to recompile pulseaudio with-O0 -g
so I can attachgdb
to it. However, packing a debian package ... hmmmm hard to say.tmpfs
and/tmp
are not the same thing. The former is frequently but not necessarily used for the latter. In this case, as it is for current versions of Raspian,/tmp
is not atmpfs
filesystem.