You are not logged in.
System:
4.5.4-1-ARCH x86_64 GNU/Linux
ALSA v1.1.1
HDMI sound
Task description:
I would like to get a short "Boot complete" sound at the point
where the machine is fully up waiting at the "login:".
On "System V"-type init the task is very simple:
insert a line like "aplay Bootup.wav" in 'rc.local'.
PROBLEM
I cannot reproduce this action in the "systemd" Arch.
Tests:
I created a '/usr/lib/systemd/system/test.service' file:
[Unit]
Description=test Service
After=systemd-logind.service
[Service]
Type=simple
ExecStart=/sbin/speaker-test -c2 -l1
[Install]
WantedBy=multi-user.target
This works "perfectly" (OK sound, as I expected) EXCEPT
when I change the "ExecStart" line above to my ultimate goal,
ExecStart=/sbin/aplay /root/Bootup.wav
I do NOT get any sound.
IMPORTANT
Once I log in when I do the very same command
/sbin/aplay /root/Bootup.wav
at the console prompt, I get (as expected) the perfect sound
(also, as expected, a speaker-test continues to work OK).
BTW, Bootup.wav is a short 2-sec sound, especially compared
to the interminable speaker-test sound!
----------------------------------------------------------------------------------
In the final analysis, it seems my problem could be solved
if I knew the answer to the question,
What is the difference in the way ALSA generates sound through
its 'speaker-test' and thorough its 'aplay', for the same
hardware and _configuration_ (/etc/asound.conf, no ~/.asoundrc)
which is affected by the "state" of the system (user logged in or not).
Thanks,
-- Alex
Offline
/root/Bootup.wav
/root is the home folder of the user root, check it's permissions :
drwxr-x--- 21 root root 4096 8 jan 15:34 root
try putting Bootup.wav in / to test if that works.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline