You are not logged in.
Hello,
besides the not-so-clear title, I've been investigating for what first looked like a pulseaudio problem for a while, and I'm now sharing what I found with you :
An Arch system with systemd, auto-loggin on a TTY and auto-start of X
Pulseaudio wouldn't start anymore at boot, but everything worked fine if it was started a while after, provided one would have sudo killall -9 pulseaudio before, and there was no major upgrade that could be related to this change.
Journalctl showed dbus related messages, saying that pulse wasn't able to find it, and a general failure in main.c start.
Actually, a part of the boot process was the following :
|-----> lots of things, and at a point dbus
Init --> |
|-----> auto-logging service (getty stuff) -----> .xinitrc ------> pulseaudio
and there was no guarantee that dbus was already started when pulse audio was.
To add this guarantee, edit your autologging service and add the following
[Unit]
... your stuff ...
#lines to add :
Requires=dbus.Service #I'm not sure this one is needed, if anyone here can confirm it
After=dbus.Service
##
..rest of the file..
reboot, and enjoy
Last edited by NougatRillettes (2012-12-30 16:05:02)
Offline
Hi,
Pulseaudio is not starting on my machine since I removed Slim and started lauching X after login with startx.
With any DM, Pulseaudio works fine and is started automatically.
If I start Pulseaudio manually after X is launched everything's fine.
I tried adding the lines you mentioned to
/etc/systemd/system/getty.target.wants/getty\@tty1.service
with no luck.
Is there anything I can do to have pulseaudio starting when X is launched?
Here's .xinitrc in case it might give a hint:
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
xset s off
setxkbmap fr
xset +fp /usr/share/fonts/local
xset fp rehash
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
exec startxfce4
Thank you in advance!
Last edited by geekmiki (2013-01-04 12:30:39)
Offline
I know this is an older post, but I'm hoping by bumping it someone will be able to help me with this issue even though the thread is marked as [SOLVED], so that I won't have to create a new post.
I'm trying to set up a host to autologin a user, then automatically startx to enter a desktop environment. I am using these guides:
https://wiki.archlinux.org/index.php/au … al_console
https://wiki.archlinux.org/index.php/Start_X_at_Login
I haven't yet set up the startx at login, but I've done that before, so I don't expect any issues or problems.
I successfully set up autologin using the first link and everything seemed fine. However, on the startx at login wiki, it states:
Tips
This method can be combined with automatic login to virtual console. When doing this you have to set correct dependencies for the autologin systemd service to ensure that dbus is started before ~/.xinitrc is read and hence pulseaudio started (see: BBS#155416)
I don't have pulseaudio issues to worry about, but I do have an exec line to start lxde. So, I followed that link to this thread and created the lines NougatRillettes suggested. Here's the complete file:
/etc/systemd/system/getty@tty1.service.d/autologin.conf
[Unit]
Requires=dbus.Service
After=dbus.Service
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin <username> --noclear %I 38400 linux
Then, when I reboot the kernel spits this out:
Nov 06 14:39:23 [Host] systemd[1]: Set hostname to <[Host]>.
Nov 06 14:39:23 [Host] systemd[1]: [/etc/systemd/system/getty@tty1.service.d/autologin.conf:2] Failed to add dependency on dbus.Service, ignoring: Invalid argument
Nov 06 14:39:23 [Host] systemd[1]: [/etc/systemd/system/getty@tty1.service.d/autologin.conf:3] Failed to add dependency on dbus.Service, ignoring: Invalid argument
Nov 06 14:39:23 [Host] systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service failed to load: No such file or directory.
I rechecked the wikis and noticed:
Tips & Tricks
Avoiding unnecessary dmesg errors
To avoid errors related to display-manager.service in dmesg, you should set the default target to multi-user instead of graphical:
# systemctl enable multi-user.target
So I went ahead and enabled multi-user.target and rebooted, thinking that would solve the problem, but it didn't...the error messages were the same.
I'm hoping someone can help...and maybe update those two wikis if there's any information missing. I'm also wondering if I should reverse the last step I described by disabling multi-user.target.
Offline
Have you tried using just
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin <username> --noclear %I 38400 linux
Offline
Have you tried using just
[Service] ExecStart= ExecStart=-/usr/bin/agetty --autologin <username> --noclear %I 38400 linux
Yes, I did. That was my original configuration when I first tested it and it went fine. I only added the [Unit] entries after rechecking the wikis and thinking that I needed to add those lines so that dbus.Service would start before "exec startlxde" in ~/.xinitrc. I haven't yet set up the automatic startx part yet because of the error messages I described. I was assuming I needed to add those lines because of the way I interpreted the advice in the wikis.
Offline
Try using just https://bbs.archlinux.org/viewtopic.php … 8#p1346578 , add whatever you need to make X start automatically.
Offline
Try using just https://bbs.archlinux.org/viewtopic.php … 8#p1346578 , add whatever you need to make X start automatically.
OK, I'll try it...I guess the last question is whether I should disable multi-user.target since I only enabled it on the advice of the wiki, but I'm not sure if it really applies to this issue.
Edit: I will keep multi-user.target enabled since I'm not using a display manager, but booting directly into a user X session after an autologin at a virtual console.
In summary, I've removed the [Unit] section posted above, kept the [Service] section, enabled multi-user.target and made the necessary edits to ~/.bash_profile per wiki and have successfully booted, autologin and startx into an lxde environment.
Last edited by bpont (2013-11-06 22:53:12)
Offline