Pulseaudio module-combine-sink always throws Failure - alsa

I am new to PulseAudio. As per my requirement, I need my audio output to be routed to either connected speaker, Bluetooth speaker, or both.
I am able to play the media file on speaker, or Bluetooth headset individually, however, I am not able to play on both.
I tried combining the two sinks, however, it always throws me the error:
Failure: Module initialization failed
Here's is the code snippet:
root#raspberrypi3:~# pactl list short sinks
1 palerts module-null-sink.c s16le 2ch 44100Hz SUSPENDED
2 pfeedback module-null-sink.c s16le 2ch 44100Hz SUSPENDED
3 pringtones module-null-sink.c s16le 2ch 44100Hz SUSPENDED
4 pmedia module-null-sink.c s16le 2ch 44100Hz SUSPENDED
5 pdefaultapp module-null-sink.c s16le 2ch 44100Hz SUSPENDED
6 peffects module-null-sink.c s16le 2ch 44100Hz SUSPENDED
7 pvoicerecognition module-null-sink.c s16le 2ch 44100Hz SUSPENDED
8 ptts module-null-sink.c s16le 2ch 44100Hz SUSPENDED
9 pndk module-null-sink.c s16le 2ch 44100Hz SUSPENDED
11 alsa_output.0.analog-stereo module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
13 bluez_sink.FC_58_FA_F3_07_6F module-bluez5-device.c s16le 2ch 44100Hz SUSPENDED
For music playback:
root#raspberrypi3:~# paplay abc.wav -d alsa_output.0.analog-stereo
root#raspberrypi3:~# paplay abc.wav -d bluez_sink.FC_58_FA_F3_07_6F
Both work as per expectation.
However the problem is with the following statement:
root#raspberrypi3:~# pactl load-module module-combine-sink sink-name=combine sink_properties=device.description=Combined slaves=alsa_output
.0.analog-stereo,bluez_sink.FC_58_FA_F3_07_6F
Failure: Module initialization failed
I tried cleaning ~/.pulse directory, Commenting module-suspend-on-idle, but nothing seems to be of any help.
Any pointers will be of great help.

Figured out the reason why it was not working.
On checking the logs of pulseaudio, I found that it was not able to find the module-combine-sink library.
I copied the libraries manually in /usr/lib/pulse-9.0/modules, restarted the pulseaudio, and it started working as expected, i.e. audio routed to both devices.

Related

Cannot sync with the NTP server

I am using lubuntu Linux 18.04 Bionic. When I print ntpq -pn I cannot see that my computer is synced with my desired NTP server.
I have tried several tutorials like here: LINK. I took the NTP servers from Google HERE and included the all 4 servers to my config file.
Then, I did the following things in order to sync with one of the Google NTP servers:
sudo service stop
sudo service ntpdate time1.google.com and received a log ntpdate[2671]: adjust time server 216.239.35.0 offset -0.000330 sec
sudo service start
Here is my /etc/ntp.conf file:
driftfile /var/lib/ntp/ntp.drift
leapfile /usr/share/zoneinfo/leap-seconds.list
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
restrict -4 default kod notrap nomodify nopeer noquery limited
restrict -6 default kod notrap nomodify nopeer noquery limited
restrict 127.0.0.1
restrict ::1
restrict source notrap nomodify noquery
server time1.google.com iburst
server time2.google.com iburst
server time3.google.com iburst
server time4.google.com iburst
After doing the steps above, I got this result from ntpq -pn:
remote refid st t when poll reach delay offset jitter
+216.239.35.0 .GOOG. 1 u 33 64 1 36.992 0.519 0.550
+216.239.35.4 .GOOG. 1 u 32 64 1 20.692 0.688 0.612
*216.239.35.8 .GOOG. 1 u 36 64 1 22.233 0.088 1.091
-216.239.35.12 .GOOG. 1 u 32 64 1 33.480 -0.218 1.378
Why my computer is not synced?
EDIT:
Here is my log output after sudo systemctl status ntp.service:
ntp.service - Network Time Service
Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-01-17 11:37:33 CET; 17min ago
Docs: man:ntpd(8)
Process: 2704 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, status=0/SUCCESS)
Main PID: 2712 (ntpd)
CGroup: /system.slice/ntp.service
└─2712 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 105:108
Jan 17 11:37:33 ELAR-Systems ntpd[2712]: proto: precision = 1.750 usec (-19)
Jan 17 11:37:33 ELAR-Systems ntpd[2712]: leapsecond file ('/usr/share/zoneinfo/leap-seconds.list'): good hash
Jan 17 11:37:33 ELAR-Systems ntpd[2712]: leapsecond file ('/usr/share/zoneinfo/leap-seconds.list'): loaded, e
Jan 17 11:37:33 ELAR-Systems ntpd[2712]: Listen and drop on 0 v6wildcard [::]:123
Jan 17 11:37:33 ELAR-Systems ntpd[2712]: Listen and drop on 1 v4wildcard 0.0.0.0:123
Jan 17 11:37:33 ELAR-Systems ntpd[2712]: Listen normally on 2 lo 127.0.0.1:123
Jan 17 11:37:33 ELAR-Systems ntpd[2712]: Listen normally on 3 wlan0 192.168.86.26:123
Jan 17 11:37:33 ELAR-Systems ntpd[2712]: Listen normally on 4 lo [::1]:123
Jan 17 11:37:33 ELAR-Systems ntpd[2712]: Listen normally on 5 wlan0 [fe80::71d6:ec6e:fa92:b53%4]:123
Jan 17 11:37:33 ELAR-Systems ntpd[2712]: Listening on routing socket on fd #22 for interface updates
Your system time actually is getting synced but is running off very quick.
The Raspberry Pi, Arduino, Asus Tinker and the other PCB single-board computers have no onboard RTC (real time clock) and no battery to keep it up constantly. It has nothing to do with RAM or current, but simply the fact that there is no hardware clock on the computer.
On my raspberry pi, the time went off several minutes within an hour.
The "software clock" on the computer is impacted by system load and is very unstable.
An RTC extension (for RPI) looks like this:
(Source: www.robotshop.com)

Many G gracefull finishing in server-status

In my server-status apache2.4 in ubuntu16.04 i have many G status. somtimes most of 3000 thread is G . Some queries failed.
High G status is problem or not related?
server: 32 core cpu and 128GB RAM
server status :
Server load: 21.45 22.57 22.66
Total accesses: 1153411 - Total Traffic: 11.5 GB
CPU Usage: u322.14 s2221.14 cu0 cs0 - 24.1% CPU load
109 requests/sec - 1.1 MB/second - 10.4 kB/request
900 requests currently being processed, 60 idle workers
mpm_event config:
ServerLimit 140
StartServers 30
MinSpareThreads 35
MaxSpareThreads 80
# ThreadLimit 64
ThreadsPerChild 30
MaxRequestWorkers 4000
MaxConnectionsPerChild 500
If you don't use the event MPM, these tie up a thread. "MaxConnectionsPerChild 500" is exceptionally low and under any non-trivial load you will be constantly killing off processes which will send all their active requests into 'G' state.

Flink Streaming Job is Failed Automatically

I am running a flink streaming job with parallelism 1 .
Suddenly after 8 hours job failed . It showed
Association with remote system [akka.tcp://flink#192.168.3.153:44863] has failed, address is now gated for [5000] ms. Reason is: [Disassociated].
2017-04-12 00:48:36,683 INFO org.apache.flink.yarn.YarnJobManager - Container container_e35_1491556562442_5086_01_000002 is completed with diagnostics: Container [pid=64750,containerID=container_e35_1491556562442_5086_01_000002] is running beyond physical memory limits. Current usage: 2.0 GB of 2 GB physical memory used; 2.9 GB of 4.2 GB virtual memory used. Killing container.
Dump of the process-tree for container_e35_1491556562442_5086_01_000002 :
|- PID PPID PGRPID SESSID CMD_NAME USER_MODE_TIME(MILLIS) SYSTEM_TIME(MILLIS) VMEM_USAGE(BYTES) RSSMEM_USAGE(PAGES) FULL_CMD_LINE
|- 64750 64748 64750 64750 (bash) 0 0 108654592 306 /bin/bash -c /usr/java/jdk1.7.0_67-cloudera/bin/java -Xms724m -Xmx724m -XX:MaxDirectMemorySize=1448m -Djava.library.path=/opt/cloudera/parcels/CDH/lib/hadoop/lib/native/ -Dlog.file=/var/log/hadoop-yarn/container/application_1491556562442_5086/container_e35_1491556562442_5086_01_000002/taskmanager.log -Dlogback.configurationFile=file:logback.xml -Dlog4j.configuration=file:log4j.properties org.apache.flink.yarn.YarnTaskManagerRunner --configDir . 1> /var/log/hadoop-yarn/container/application_1491556562442_5086/container_e35_1491556562442_5086_01_000002/taskmanager.out 2> /var/log/hadoop-yarn/container/application_1491556562442_5086/container_e35_1491556562442_5086_01_000002/taskmanager.err
|- 64756 64750 64750 64750 (java) 269053 57593 2961149952 524252 /usr/java/jdk1.7.0_67-cloudera/bin/java -Xms724m -Xmx724m -XX:MaxDirectMemorySize=1448m -Djava.library.path=/opt/cloudera/parcels/CDH/lib/hadoop/lib/native/ -Dlog.file=/var/log/hadoop-yarn/container/application_1491556562442_5086/container_e35_1491556562442_5086_01_000002/taskmanager.log -Dlogback.configurationFile=file:logback.xml -Dlog4j.configuration=file:log4j.properties org.apache.flink.yarn.YarnTaskManagerRunner --configDir .
Container killed on request. Exit code is 143
Container exited with a non-zero exit code 143
There are no application/code side error.
Need help to understand what could be the cause ?
The job is killed, because it exceeds memory limits set in Yarn.
See this part of your error message:
Container [pid=64750,containerID=container_e35_1491556562442_5086_01_000002] is running beyond physical memory limits. Current usage: 2.0 GB of 2 GB physical memory used; 2.9 GB of 4.2 GB virtual memory used. Killing container.

Restart a mpi slave after checkpoint before failure on ARMv6

UPDATE
I have an university project in which I should build up a cluster with RPis.
Now we have a fully functional system with BLCR/MPICH on.
BLCR works very well with normal processes linked with the lib.
Demonstrations we have to show from our management web interface are:
parallel execution of a job
migration of processes across the nodes
fault tolerance with MPI
We are allowed to use the simplest computations.
The first one we got easily, with MPI too. The second point we actually have only working with normal processes (without MPI). Regarding the third point I have less idea how to implement a master-slave MPI scheme, in which I can restart a slave process, which also affects point two because we should/can/have_to make a checkpoint of the slave process, kill/stop it and restart it on another node. I know that I have to handle the MPI_Errors myself but how to restore the process? It would be nice if someone could post me a link or paper (with explanations) at least.
Thanks in advance
UPDATE:
As written earlier our BLCR+MPICH stuff works or seems to.
But... When I start MPI Processes checkpointing seems to work well.
Here the proof:
... snip ...
Benchmarking: dynamic_5: md5($s.$p.$s) [32/32 128x1 (MD5_Body)]... DONE
Many salts: 767744 c/s real, 767744 c/s virtual
Only one salt: 560896 c/s real, 560896 c/s virtual
Benchmarking: dynamic_5: md5($s.$p.$s) [32/32 128x1 (MD5_Body)]... [proxy:0:0#node2] requesting checkpoint
[proxy:0:0#node2] checkpoint completed
[proxy:0:1#node1] requesting checkpoint
[proxy:0:1#node1] checkpoint completed
[proxy:0:2#node3] requesting checkpoint
[proxy:0:2#node3] checkpoint completed
... snip ...
If I kill one Slave-Process on any node I get this here:
... snip ...
===================================================================================
= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
= EXIT CODE: 9
= CLEANING UP REMAINING PROCESSES
= YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================
... snip ...
It is ok because we have a checkpoint so we can restart our application.
But it doesn't work:
pi 7380 0.0 0.2 2984 1012 pts/4 S+ 16:38 0:00 mpiexec -ckpointlib blcr -ckpoint-prefix /tmp -ckpoint-num 0 -f /tmp/machinefile -n 3
pi 7381 0.1 0.5 5712 2464 ? Ss 16:38 0:00 /usr/bin/ssh -x 192.168.42.101 "/usr/local/bin/mpich/bin/hydra_pmi_proxy" --control-port masterpi:47698 --rmk user --launcher ssh --demux poll --pgid 0 --retries 10 --usize -2 --proxy-id 0
pi 7382 0.1 0.5 5712 2464 ? Ss 16:38 0:00 /usr/bin/ssh -x 192.168.42.102 "/usr/local/bin/mpich/bin/hydra_pmi_proxy" --control-port masterpi:47698 --rmk user --launcher ssh --demux poll --pgid 0 --retries 10 --usize -2 --proxy-id 1
pi 7383 0.1 0.5 5712 2464 ? Ss 16:38 0:00 /usr/bin/ssh -x 192.168.42.105 "/usr/local/bin/mpich/bin/hydra_pmi_proxy" --control-port masterpi:47698 --rmk user --launcher ssh --demux poll --pgid 0 --retries 10 --usize -2 --proxy-id 2
pi 7438 0.0 0.1 3548 868 pts/1 S+ 16:40 0:00 grep --color=auto mpi
I don't know why but the first time I restart the app on every node the process seems to be restarted (I got it from using top or ps aux | grep "john" but no output to the management (or on the management console/terminal) is shown. It just hangs up after showing me:
mpiexec -ckpointlib blcr -ckpoint-prefix /tmp -ckpoint-num 0 -f /tmp/machinefile -n 3
Warning: Permanently added '192.168.42.102' (ECDSA) to the list of known hosts.
Warning: Permanently added '192.168.42.101' (ECDSA) to the list of known hosts.
Warning: Permanently added '192.168.42.105' (ECDSA) to the list of known hosts.
My plan B is just to test with own application if the BLCR/MPICH stuff really works. Maybe there some troubles with john.
Thanks in advance
**
UPDATE
**
Next problem with simple hello world. I dispair slowly. Maybe I'm confused too much.
mpiexec -ckpointlib blcr -ckpoint-prefix /tmp/ -ckpoint-interval 3 -f /tmp/machinefile -n 4 ./hello
Warning: Permanently added '192.168.42.102' (ECDSA) to the list of known hosts.
Warning: Permanently added '192.168.42.105' (ECDSA) to the list of known hosts.
Warning: Permanently added '192.168.42.101' (ECDSA) to the list of known hosts.
[proxy:0:0#node2] requesting checkpoint
[proxy:0:0#node2] checkpoint completed
[proxy:0:1#node1] requesting checkpoint
[proxy:0:1#node1] checkpoint completed
[proxy:0:2#node3] requesting checkpoint
[proxy:0:2#node3] checkpoint completed
[proxy:0:0#node2] requesting checkpoint
[proxy:0:0#node2] HYDT_ckpoint_checkpoint (./tools/ckpoint/ckpoint.c:111): Previous checkpoint has not completed.[proxy:0:0#node2] HYD_pmcd_pmip_control_cmd_cb (./pm/pmiserv/pmip_cb.c:905): checkpoint suspend failed
[proxy:0:0#node2] HYDT_dmxu_poll_wait_for_event (./tools/demux/demux_poll.c:77): callback returned error status
[proxy:0:0#node2] main (./pm/pmiserv/pmip.c:206): demux engine error waiting for event
[proxy:0:1#node1] requesting checkpoint
[proxy:0:1#node1] HYDT_ckpoint_checkpoint (./tools/ckpoint/ckpoint.c:111): Previous checkpoint has not completed.[proxy:0:1#node1] HYD_pmcd_pmip_control_cmd_cb (./pm/pmiserv/pmip_cb.c:905): checkpoint suspend failed
[proxy:0:1#node1] HYDT_dmxu_poll_wait_for_event (./tools/demux/demux_poll.c:77): callback returned error status
[proxy:0:1#node1] main (./pm/pmiserv/pmip.c:206): demux engine error waiting for event
[proxy:0:2#node3] requesting checkpoint
[proxy:0:2#node3] HYDT_ckpoint_checkpoint (./tools/ckpoint/ckpoint.c:111): Previous checkpoint has not completed.[proxy:0:2#node3] HYD_pmcd_pmip_control_cmd_cb (./pm/pmiserv/pmip_cb.c:905): checkpoint suspend failed
[proxy:0:2#node3] HYDT_dmxu_poll_wait_for_event (./tools/demux/demux_poll.c:77): callback returned error status
[proxy:0:2#node3] main (./pm/pmiserv/pmip.c:206): demux engine error waiting for event
[mpiexec#masterpi] control_cb (./pm/pmiserv/pmiserv_cb.c:202): assert (!closed) failed
[mpiexec#masterpi] HYDT_dmxu_poll_wait_for_event (./tools/demux/demux_poll.c:77): callback returned error status
[mpiexec#masterpi] HYD_pmci_wait_for_completion (./pm/pmiserv/pmiserv_pmci.c:197): error waiting for event
[mpiexec#masterpi] main (./ui/mpich/mpiexec.c:331): process manager error waiting for completion
hello.c
/* C Example */
#include <stdio.h>
#include <mpi.h>
int main (argc, argv)
int argc;
char *argv[];
{
int rank, size, i, j;
char hostname[1024];
hostname[1023] = '\0';
gethostname(hostname, 1023);
MPI_Init (&argc, &argv); /* starts MPI */
MPI_Comm_rank (MPI_COMM_WORLD, &rank); /* get current process id */
MPI_Comm_size (MPI_COMM_WORLD, &size); /* get number of processes */
i = 0;
for(i ; i < 400000000; i++){
for(j; j < 4000000; j++){
}
}
printf("%s done...", hostname);
printf("%s: %d is alive\n", hostname, getpid());
MPI_Finalize();
return 0;
}

bumblebee + wine + directx9 not working

I'm trying to run dxdiag or any other DX9 game from bumblebee+wine and no luck. These games works well without bumblebee in integrated graphic card. And no wine soft works well with bumblebee.
primusrun
$ primusrun bash
$ wine dxdiag
primus: warning: recreating incompatible pbuffer
primus: warning: recreating incompatible pbuffer
$
syslog output:
rtkit-daemon[2489]: Successfully made thread 23036 of process 23036 (n/a) owned by '1000' RT at priority 3.
rtkit-daemon[2489]: Supervising 1 threads of 1 processes of 1 users.
kernel: [147774.078061] bbswitch: enabling discrete graphics
kernel: [147774.221739] pci 0000:01:00.0: power state changed by ACPI to D0
kernel: [147774.245670] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=none,decodes=none:owns=none
kernel: [147774.245900] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 304.88 Wed Mar 27 14:26:46 PDT 2013
acpid: client 23009[0:1002] has disconnected
acpid: client 23009[0:1002] has disconnected
acpid: client connected from 23066[0:1002]
acpid: 1 client rule loaded
acpid: client connected from 23066[0:1002]
acpid: 1 client rule loaded
bumblebeed[11391]: [XORG] (WW) NVIDIA(0): Unable to get display device for DPI computation.
rtkit-daemon[2489]: Successfully made thread 23071 of process 23033 (n/a) owned by '1000' RT at priority 2.
rtkit-daemon[2489]: Supervising 2 threads of 2 processes of 1 users.
kernel: [147778.018119] bbswitch: disabling discrete graphics
kernel: [147778.030858] pci 0000:01:00.0: Refused to change power state, currently in D0
kernel: [147778.030896] pci 0000:01:00.0: power state changed by ACPI to D3cold
optirun has similar result:
$ optirun bash
$ wine dxdiag
[VGL] NOTICE: Pixel format of 2D X server does not match pixel format of
[VGL] Pbuffer. Disabling PBO readback.
$
The syslog has the same error with optirun:
bumblebeed[11391]: [XORG] (WW) NVIDIA(0): Unable to get display device for DPI computation.
Any help? thank you!
This may or may not help, but try installing the primus-libs-ia32 package, it may be a 32 bit application you're trying to run (if you're on a 64 bit system, this could be the problem).

Resources