On Wed, 23 Jun 2021 19:47, Carlos E. R.
On Wednesday, 2021-06-23 at 19:27 +0200, Carlos E. R. wrote:
On Wednesday, 2021-06-23 at 21:10 +0900, Masaru Nomiya wrote:
Thanks.
Maybe connection with driver is not stable.
Does
$ systemctl status bluetooth.service
returns "Failed"?
Not exactly:
Telcontar:~ # systemctl status bluetooth.service ● bluetooth.service - Bluetooth service Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disabled) Active: inactive (dead) Docs: man:bluetoothd(8) Telcontar:~ #
I just returned from hibernation half an hour ago, and no problem, it is working. Maybe something happens (some program using sound) and breaks.
I just reinstated a cronjob that was failing before - an speach clock:
/etc/cron.d/mine:
0,30 * * * * cer /home/cer/bin/dar_la_hora_en_cron hora
TEMPORAL=`mktemp /tmp/decir.wav.XXXXXXXXXXXXX` ERROR=$? case $ERROR in 0) ;; *) echo "Error $ERROR in mktemp" exit ;; esac
case "$1" in time) /bin/date +"%B %e, %k hours %-M minutes " | espeak -v en --stdin -a 20 -w $TEMPORAL ;; hora) LANG=es_ES.UTF-8 LC_ALL=es_ES.UTF-8 /bin/date +"Es %e de %B, y son las %k horas y %-M minutos " | espeak -v es --stdin -a 20 -w $TEMPORAL ;; *) echo -e "Error de entrada en $0" exit ;; esac
DATE=`date --rfc-3339=ns`
/usr/bin/aplay $TEMPORAL >> /tmp/dar_la_hora_en_cron.log 2>&1 rm $TEMPORAL
It should run in 4 minutes :-)
Well... the script when called from the terminal worked fine, but when it ran from cron, crashed sound. Machine can not play anything, but there is a low background noise playing continously on the left speaker only. I can mail that to you directly if you want it, recorded on the phone. pavucontrol did not reveal any program producing sound, but the volume worked.
Restart pulse does nothing (not fails, but doesn't repair this problem).
yast sound, reconfigure, works.
Well, disabling cron job clock speach again.
I have other scripts that try to produce sounds in background to tell me things that are not working since months for one or another reason.
A hint for your sound from cron vs sound from termial: Compare the output of /usr/bin/env from a script called via cron and the same script called from a termial. In my case (was on a Leap 42.2) I've had to set & export some variables: --------------- bash code start here xt=$(echo /tmp/.ICE-unix/*) test -z "$SESSION_MANAGER" && export SESSION_MANAGER=local/${HOST}:@$xt,unix/${HOST}:$xt test -z "$XAUTHORITY" && export XAUTHORITY=$HOME/.Xauthority test -z "$XDG_RUNTIME_DIR" && export XDG_RUNTIME_DIR=/run/user/$UID test -z "$ALSA_CONFIG_PATH" && export ALSA_CONFIG_PATH=/etc/alsa-pulse.conf test -z "$AUDIODRIVER" && export AUDIODRIVER=pulseaudio test -z "$SDL_AUDIODRIVER" && export SDL_AUDIODRIVER=pulse --------------- bash code end here also for diagnosis running pacmd info >>/tmp/pacmd.log in your script gives hints that would otherwise be missed HtH - Yamaban.