Bug 380525 - sox synth can not play white noise
Summary: sox synth can not play white noise
Status: RESOLVED UPSTREAM
Alias: None
Product: plasma-pa
Classification: Plasma
Component: general (show other bugs)
Version: 5.10.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-03 23:34 UTC by AppAraat
Modified: 2017-06-05 12:22 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description AppAraat 2017-06-03 23:34:20 UTC
# Overview:
play -n synth whitenoise gain -6
This command outputs white noise. Requires sox to be installed and it might be loud (provided it works as intended). I use this command for various purposes, including testing of audio output devices and further signal path.

# Steps to reproduce:
1) Download and install the package called sox
2) In the terminal, run "play -n synth whitenoise gain -6" (without the quotes)


# Actual results:

Terminal output:

shm_open() failed: No such file or directory
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Protocol error

play FAIL formats: can't open output file `default': snd_pcm_open error: Connection refused

Audio output: Nothing.


# Expected results:

Terminal output:

  Encoding: n/a           
  Channels: 1 @ 32-bit   
 Samplerate: 48000Hz      
Replaygain: off         
 Duration: unknown      

In:0.00% 00:00:02.05 [00:00:00.00] Out:98.3k [ =====|===== ]           Clip:0    

Audio output: White noise.


# Build Date & Platform:
I first experienced this around 2017.04.23, not sure what date it was but I believe it was still on Plasma 5.9.4

# Additional information:

Hardware: Lenovo X230 with i5-3360m CPU.

└─$  sudo lspci -vvv -s '00:1b.0'
[sudo] password for me: 
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
        Subsystem: Lenovo 7 Series/C210 Series Chipset Family High Definition Audio Controller
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 30
        Region 0: Memory at f1530000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [50] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 00000000fee002f8  Data: 0000
        Capabilities: [70] Express (v1) Root Complex Integrated Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0
                        ExtTag- RBE-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 128 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
        Capabilities: [100 v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed- WRR32- WRR64- WRR128-
                Ctrl:   ArbSelect=Fixed
                Status: InProgress-
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=01
                        Status: NegoPending- InProgress-
                VC1:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=1 ArbSelect=Fixed TC/VC=22
                        Status: NegoPending- InProgress-
        Capabilities: [130 v1] Root Complex Link
                Desc:   PortNumber=0f ComponentID=00 EltType=Config
                Link0:  Desc:   TargetPort=00 TargetComponent=00 AssocRCRB- LinkType=MemMapped LinkValid+
                        Addr:   00000000fed1c000
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
Comment 1 AppAraat 2017-06-03 23:38:16 UTC
I made a thread on Reddit: https://www.reddit.com/r/kde/comments/6735s4/neon_ue_audio_issues_cant_connect_to_pulseaudio/

Therein, I've documented the output of the following commands:


└─$ speaker-test

speaker-test 1.1.0

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
shm_open() failed: No such file or directory
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Protocol error

Playback open error: -111,Connection refused

---

└─$  pactl list 
shm_open() failed: No such file or directory
Connection failure: Protocol error

---

So this sounds like it's a much bigger issue than sox not being able to play white noise.
Comment 2 David Rosca 2017-06-04 07:40:49 UTC
It has nothing to do with plasma-pa, please report it to PulseAudio.
Comment 3 AppAraat 2017-06-04 16:03:09 UTC
All right, I will try sorting it out with the PulseAudio folks, but be aware that I've also tried this under Lubuntu 16.04.2 and all mentioned commands worked as they're supposed to, with exception of pactl (because I hadn't installed it).


# Lubuntu 16.04.2 package list:

lubuntu@lubuntu:~$ apt list --installed |grep pulse
 
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
 
libpulse-mainloop-glib0/xenial-updates,now 1:8.0-0ubuntu3.2 amd64 [installed]
libpulse0/xenial-updates,now 1:8.0-0ubuntu3.2 amd64 [installed]

---

# Neon UE package list:

└─$ apt list --installed |grep pulse
 
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
 
libcanberra-pulse/xenial,now 0.30-2.1ubuntu1 amd64 [installed,automatic]
libpulse-mainloop-glib0/xenial-updates,now 1:8.0-0ubuntu3.2 amd64 [installed,automatic]
libpulse0/xenial-updates,now 1:8.0-0ubuntu3.2 amd64 [installed,automatic]
libpulsedsp/xenial-updates,now 1:8.0-0ubuntu3.2 amd64 [installed,automatic]
pulseaudio/xenial-updates,now 1:8.0-0ubuntu3.2 amd64 [installed,automatic]
pulseaudio-module-bluetooth/xenial-updates,now 1:8.0-0ubuntu3.2 amd64 [installed,automatic]
pulseaudio-module-gconf/xenial-updates,now 1:8.0-0ubuntu3.2 amd64 [installed,automatic]
pulseaudio-module-x11/xenial-updates,now 1:8.0-0ubuntu3.2 amd64 [installed,automatic]
pulseaudio-utils/xenial-updates,now 1:8.0-0ubuntu3.2 amd64 [installed,automatic]
Comment 4 David Rosca 2017-06-04 16:05:52 UTC
Then try those commands without plasmashell running (eg. after pkill plasmashell) to make sure plasma-pa is not interfering with it.
Comment 5 AppAraat 2017-06-05 12:16:13 UTC
Unfortunately I get the same unsuccessful results in that case:


┌───| ~ ](me@neon_UE)|[14:12][p:6606][bn:45][j:0]► [1] 
└─$  ps -auxwww | grep -i plasma
me       10646  0.0  0.0  14228   960 pts/45   S+   14:12   0:00 grep --color=auto plasma

┌───| ~ ](me@neon_UE)|[14:12][p:6606][bn:45][j:0]► [0] 
└─$ play -n synth whitenoise gain -6
shm_open() failed: No such file or directory
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Protocol error

play FAIL formats: can't open output file `default': snd_pcm_open error: Connection refused

┌───| ~ ](me@neon_UE)|[14:13][p:6606][bn:45][j:0]► [2] 
└─$  speaker-test 

speaker-test 1.1.0

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
shm_open() failed: No such file or directory
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Protocol error

Playback open error: -111,Connection refused
Comment 6 AppAraat 2017-06-05 12:22:34 UTC
Also, I'm not sure if this is related but when I bring back plasmashell, my hardware volume buttons no longer work and I can not see anything in Devices and Applications when I click the Audio Volume applet in the panel.


└─$  plasmashell
kf5.kcoreaddons.desktopparser: Could not locate service type file kservicetypes5/plasma-popupapplet.desktop, tried ("/home/me/.local/share", "/usr/share/usr/share/xsessions/plasma", "/usr/local/share", "/usr/share", "/var/lib/snapd/desktop")
requesting unexisting screen 0
WARNING: Cannot find style "org.kde.desktop" - fallback: "/usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Controls/Styles/Desktop"
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
Notifications service registered
networkmanager-qt: void NetworkManager::NetworkManagerPrivate::propertiesChanged(const QVariantMap&) Unhandled property "AllDevices"
networkmanager-qt: void NetworkManager::NetworkManagerPrivate::propertiesChanged(const QVariantMap&) Unhandled property "Devices"
networkmanager-qt: void NetworkManager::NetworkManagerPrivate::propertiesChanged(const QVariantMap&) Unhandled property "GlobalDnsConfiguration"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "LldpNeighbors"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Real"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "LldpNeighbors"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Real"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "LldpNeighbors"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Real"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "LldpNeighbors"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Real"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "S390Subchannels"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "LldpNeighbors"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Real"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "LldpNeighbors"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Real"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "LldpNeighbors"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Real"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "LldpNeighbors"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Real"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "LldpNeighbors"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Real"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "LldpNeighbors"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Real"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "LldpNeighbors"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Real"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "LldpNeighbors"
networkmanager-qt: virtual void NetworkManager::DevicePrivate::propertyChanged(const QString&, const QVariant&) Unhandled property "Real"
Trying to use rootObject before initialization is completed, whilst using setInitializationDelayed. Forcing completion
Both point size and pixel size set. Using pixel size.
Both point size and pixel size set. Using pixel size.
Both point size and pixel size set. Using pixel size.
Plasma Shell startup completed
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
QXcbConnection: XCB error: 2 (BadValue), sequence: 4172, resource id: 83886311, major code: 142 (Unknown), minor code: 3
QXcbConnection: XCB error: 2 (BadValue), sequence: 4188, resource id: 77594628, major code: 142 (Unknown), minor code: 3
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput
shm_open() failed: No such file or directory
org.kde.plasma.pulseaudio: context kaput

...etc.