Pulse audio doesn't start on boot unless i run some commands - linux

as the title says, pulse audio doesn't start when booting. I need to run
rm -rf /tmp/pulse* ~/.pulse* ~/.config/pulse
pulseaudio -k
pulseaudio --start
in order for it to start. I have even put these commands on an .sh and made this script to run on boot but it doesn's work unless i execute this file manually, sometimes i even have to run it twice.
OS: Manjaro Linux with i3
Pulseaudio: pulseaudio 13.0-dirty
Audio Devices: 00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09) 00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03)
[+] Discord and Godot Engine can find any input or output devices!

Have you set up pulseaudio daemon in startup?
If not you can set up using following (depending on your linux version)
systemctl enable pulseaudio and systemctl start pulseaudio

I had the same issue with pulseaudio on my Manjaro with i3. The problem was with .i3/config, I just commented line:
exec --no-startup-id pulseaudio
Also, you can try to restart pulseaudio after boot by adding this line to .i3/config:
exec --no-startup-id systemctl --user restart pulseadio

Related

How to integrate Bluetooth headphones to control playback on Linux (Mint) players?

My headphones are WH-1000xm3. System being used is Linux Mint.
How to make playback work?
install playerctl
wget http://ftp.nl.debian.org/debian/pool/main/p/playerctl/libplayerctl2_2.0.1-1_amd64.deb
wget http://ftp.nl.debian.org/debian/pool/main/p/playerctl/playerctl_2.0.1-1_amd64.deb
sudo dpkg -i libplayerctl2_2.0.1-1_amd64.deb playerctl_2.0.1-1_amd64.deb
install xbindkeys
Add command to a ~/.xbindkeysrc file:
"playerctl play-pause"
m:0x0 + c:208
XF86AudioMute
This way you can control chrome, vlc, video/audio players playback remotely via your headphones
This is tested for Linux Mind 19.3 Tricia with Sony WH-1000XM3

bcm43xx_init Initialization timed out with buildroot raspberry pi 3 hciattach

I am trying to get the Bluetooth to work in Raspberry Pi 3.
I am using buildroot with:
BlueZ 5.45 ( changed the package to get the latest)
Not using systemd, but I run bluetoothd because
the bluez script is for systemd.
In buildroot I enabled the bt firmware.
I can see the hci_uart.ko file and the Bluetooth firmware hcd file
I removed the console=ttyAMA0,115200 from cmdline.txt
I added rfkill for busybox but I only see the wifi interface, no Bluetooth interface.
running:
hciattach /dev/ttyAMA0 bcm43xx 921600 noflow -
output showed:
bcm43xx_init
Initialization timed out
tried 115200, the same.
Notes:
When using BlueZ 3 I am getting invalid id
I read that it is somehow related to BlueZ version so I did take the latest
All the above was taken after deep search.
So what I am missing here?
How can I get the Bluetooth to start running in my Raspberry Pi 3
with buildroot as image creator?
Thank you all!
The main problem is that buildroot adds the pi3-miniuart-bt overlay
in config.txt.
To remove it we need to remove if from the post-image.sh script as parameter to the above script.
In raspberry pi 3 the ttyAMA0 was assigned to bluetooth and the pi3-miniuart-bt restored it back to be serial com port, which disconnects the bluetooth again.
To summarize the steps in buildroot.
Add the bluetooth firmware.
Add bluez 5 utils.
Change the package from bluez 5.44 to 5.45
Add the above sleep. (delete the .stamp_build in bluez to build it again)
remove the /dev/ttyAMA0 from cmdline.txt
After building, check on the target (pi3)
the BCM4343 hcd firmware
hci_uart.ko should be there
hci_uart is not running in case of busybox init (only in systemd)
so just modprobe hci_uart. run lsmod to see that it is running.
To start the service and load the firmware, use hciattach:
hciattach /dev/ttyAMA0 bcm43xx 921600 noflow -
Start the bluetoothd daemon:
/usr/libexec/bluetooth/bluetoothd &
Power up the bluetooth hardware using bluetoothctl (power on and agent on).
Now you should see it using hcitool dev.
Again, if you don't remove the overlay you will get timeout.
That it. the hci device should be seen now.
you can see it using:
rfkill list ( install it from busybox-menuconfig)
hciconfig -a
The above steps does not get the console to work properly on the Pi 3 but this is a different story.
As described in the commit adding the firmware, you unfortunately need to patch bluez5_utils to get the firmware to work:
https://git.buildroot.net/buildroot/commit/?id=1f94f1aaab2e786542a83327358570a828d68f45

Dummy Soundcard for Amazon linux server

I need to use an application which needs a soundcard in an amazon ec2 instance with the default ubuntu 16.04 installed on it. Problem is that there's no soundcard available. I've tried everything on google on how to create a dummy soundcard so the program runs with no problem, but nothing helped because it was outdated. This is what lspcireturns:
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 01)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Unassigned class [ff80]: XenSource, Inc. Xen Platform Device (rev 01)
lsmod | grep snd does not return ANYTHING which makes me think that I might me missing all modules, and not just snd-dummy.
I've been trying to setup a dummy by using the command sudo modprobe snd-dummy which returns the following error:
modprobe: FATAL: Module snd-dummy not found in directory /lib/modules/4.4.0-1013-aws
Any clues?
If anyone still has the same issue:
You are probably using an AMI that comes with a kernel compiled without the snd-dummy module. The ALSA wiki suggests building this module from source (alsa-driver) but this is out of date.
I was able to run an application that needs a soundcard on EC2 by installing pulseaudio
sudo apt install pulseaudio
pulseaudio --start
After which I get:
$ aplay test.wav
Playing WAVE 'test.wav' : Unsigned 8 bit, Rate 22257 Hz, Mono
And the soundcard-needing application runs normally. If this is not enough for you, you might need to enable the default sink:
pactl load-module module-null-sink sink_name=auto_null
pactl set-default-sink auto_null
More details here Linux application fails with "Invalid CTL" and "Unknown PCM"

Pulseaudio no audio via bluetooth a2dp connection buildroot

Edit:
I discovered, that if I run parec | paplay --raw it does play back properly.
How is this possible? There should be just a simple module-loopback error or something like that.
I´m using the CHIP SBC from getchip.com to build an embedded bluetooth audio receiver.
getchip.com offers a debian linux and a customizable buildroot distribution.
I got everything working on the debian distribution with one exception. The volume control with iOS devices don´t work because of the lack of uinput inside the debian kernel.
That´s why i tried to get it to work with the buildroot distribution. It took me a while to get bluetoothd running with simple-agent, as well as pulseaudio built with bluetooth support and the dbus configuration.
I finally got everything ready.
But:
I can connect to the sbc, but there is no sound playing on the headphone jack.
My debugging steps so far:
I´m able to play a local .wav file via paplay
just fine.
I allowed every communication via dbus
the pulseaudio logs show, that sound is coming from the bluetooth source.
the module-switch-on-connect does spawn a loopback from the bluetooth source to the same audio sink as paplay uses.
Debug Logs:
Boot log
Pulseaudio verbose startup
/usr/bin/pulseaudio -vvvv --system --daemonize --disallow-exit
Bluetoothd verbose connection
/usr/libexec/bluetooth/bluetoothd -C -d &
and the bt-agent:
/usr/bin/bt-agent -d -c NoInputNoOutput -p /home/cubbo/.config/bluetooth-default-pin
Pulseaudio verbose connection
Configuration:
Pulseaudio system.pa
Pulseaudio daemon.conf
dbus system.conf
dbus-1/system.d/bluetooth.conf
dbus-1/system.d/pulseaudio-bluetooth.conf
bluetooth/audio.conf
bluetooth/main.conf
I´m pretty sure that I just miss some little configuration and it´ll play just fine. But after nearly one week of debugging I wanted to ask you for help.
I hope I´ve done everything right with attaching the logs via pastebin.
I would appreciate your help!
Thanks!
Greetings, Phil.
I had a similar problem on Antergos, A2DP was not available in pulseaudio.
A2DP was available only when restarting bluethooth service by "systemctl restart bluethooth"
It resulted to be a problem caused by GDM that opened another instance of pulseaudio and captured the bluethooth device. I prevented pulseaudio capturing bluethooth device by masking it for GDM user.
https://wiki.archlinux.org/index.php/Bluetooth_headset#Connecting_works.2C_but_I_cannot_play_sound
$ mkdir -p ~/.config/systemd/user
$ ln -s /dev/null ~/.config/systemd/user/pulseaudio.socket
[restart required]

Can`t find ttyUSB[id]

I have just started with my Raspberry Pi and I have a project where I want to read data from the USB port. I have installed Java JDK8 and written the program that compiles and run. But I get the message that /dev/ttyUSB1 does not exist.
I just have a cable from the USB port on the Arduino going to the USB port on the RPi and I am using Raspbian Debian Wheezy
When I go to DIR /dev/ and use $ ls, I can only find tty0 up to tty63. I have searched on the internet and some say that you can use ttyAMA0, but this does not work. I have also searched for the same problem, but have not found a answer to my problem.
I have used $ lsusb which gave me 4 devices (001-004) on Bus 001. I can see that, for example, my USB keyboard is listed as Bus 001 Device 004: ID 1532:010b Razer USA, Ltd.
and if I run $ dmesg | grep Manufacturer I get that:
[xxxxxxxxx] usb 1-1.2: Manufacturer: Razer
So my question is why does my usb devices not get listed as ttyUSB[id]? Do I have to manually attach it?
I am a bit noob when it comes to Linux.
Hope someone can help me!
I have some bad news for you. The reason you have no /dev/ttyUSB[n] devices on the RPi (when you connect your Arduino) is because you need the Arduino drivers (FTDI drivers in particular). The unfortunate thing is that these drivers don't yet exist for the Arm platform (which includes the RPi). This is according to the FTDI web page showing support. Note the lack of Linux driver support for Arm.
Apparently on Arm running Linux the only way to program the Arduino is via the serial port interface directly via the GPIO pins. Information on doing this can be found here . You will also have to do something similar on the Arduino side see this information.
Once you have the two devices connected via straight serial then your going to probably run into another SNAFU. By default apparently on the RPi Linux will use the serial port for sending debug/console output. In order to use the serial interface for something that behavior has to be modified. This article discusses that. In particular disabling the kernel from using the serial port for terminal use this would seem to apply:
The following steps (based on a clean 2012-07-15-wheezy-raspbian install
Open a terminal on the Raspberry, or connect to Raspberry Pi through SSH.
Make a backup of the /boot/cmdline.txt file.
sudo cp /boot/cmdline.txt /boot/cmdline_backup.txt
Edit /boot/cmdline.txt file:
sudo vi /boot/cmdline.txt
This file contains:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 $
Remove the parameters that reference the UART serial port (ttyAMA0):
dwc_otg.lpm_enable=0 console=tty1 $
Comment next line in /etc/inittab:
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Reboot Raspberry Pi
sudo reboot
If you use a different Linux distro than Debian it would be different but the basics would still apply (modifying the kernel command line)

Resources