Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Elogind and pulseaudio
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 568

PostPosted: Tue Nov 13, 2018 11:51 pm    Post subject: Elogind and pulseaudio Reply with quote

I noticed some weeks ago that if I plugged in a sound device, such as a headset, while I was logged into X, pavucontrol did not detect it. However, if I logged out and back in, it was there. While trying to find the cause, I noticed that elogind was running even though I had disabled it in my USE flags and had disabled the daemon from running during startup. After I ended the process, the problem persisted, even though the process was not running, but if I uninstalled elogind, then it worked correctly again (I could plug in and use a headset without logging out and back in). It's like clockwork; install elogind, and it stops showing new sound devices, even though the process is not running; uninstall it (without logging out or changing anything else, apart from reconnecting the headset), and new sound devices start working again.

It looks like the only package that needs elogind even when USE="-elogind" is skypeforlinux. I added sys-auth/elogind-238.2 to /etc/portage/profile/package.provided, which unfortunately but understandably stopped skypeforlinux from working. Why in the world does Skype care which init system I use, or handles login-related things? Oh, well, I'm also using a Skype plugin for Pidgin, and there is always the web version.

I don't mind that much, since I don't really need elogind or Skype, but I wanted to mention it in case anyone else encountered this, or it helped anyone, or maybe someone has advice for one in this situation.
Back to top
View user's profile Send private message
mega_flow
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jun 2016
Posts: 84
Location: Belgium

PostPosted: Wed Nov 14, 2018 5:58 am    Post subject: Reply with quote

elogind have noting to do with init but is a replacement for consolekit
the main different from consolekit to elogind is which u dont need to use GROUP (audio,video,devplug.....)
i only have wheel and portage in my group. This allow u to use wayland on a none systemd init.
only issue i have with elogind and pulseaudio, is that pulseaudio keep running when logging the user out
U can change this behaviour in /etc/pulse/ setting or edit /etc/elogind/logind.conf
KillUserProcesses=no >> KillUserProcesses=yes
Back to top
View user's profile Send private message
Yamakuzure
Advocate
Advocate


Joined: 21 Jun 2006
Posts: 2284
Location: Adendorf, Germany

PostPosted: Wed Nov 14, 2018 10:38 am    Post subject: Reply with quote

keet, elogind is a drop-in replacement for systemd-login. So it has the same requirements to work properly like ConsoleKit and systemd have: Use it exclusively for everything or not at all.

When I look at the skypeforlinux ebuild, I can see that it has a runtime dependency on either elogind or systemd. As elogind is listed first, it will be pulled in if neither is installed. I have no internal knowledge of Skype4Linux, and am only interpreting the ebuild here. But it seems that you can't use it, if your system is built with ConsoleKit support.

Whether this is an oversight, or whether Skype4Linux is just not compatible with ConsoleKit, I can not say.
_________________
Important German:
  1. "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
  2. "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 568

PostPosted: Sun Nov 18, 2018 3:33 am    Post subject: Reply with quote

Quote:
elogind have noting to do with init but is a replacement for consolekit


Right; I mentioned only elogind, but was actually referring to Skype's requirement for systemd or elogind. It's still interesting that this one program seems like it cannot work with consolekit or any other login session manager (or whatever one calls it) except systemd's (e)logind.

The main part that I found strange is that even if elogind is not running (as far as I can tell; there is no process for it), its presence (installation) somehow interferes with pulseaudio's sound device detection. As I noted, merely having this program installed (while using consolekit) prevents pulseaudio from being able to use a sound device that I plug in, unless I log out and back in.
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Sun Nov 18, 2018 3:53 am    Post subject: Reply with quote

keet wrote:
Right; I mentioned only elogind, but was actually referring to Skype's requirement for systemd or elogind. It's still interesting that this one program seems like it cannot work with consolekit or any other login session manager (or whatever one calls it) except systemd's (e)logind.

You'll have to blame Microsoft for that; they are the authors of the closed-source Skype for Linux.

keet wrote:
The main part that I found strange is that even if elogind is not running (as far as I can tell; there is no process for it), its presence (installation) somehow interferes with pulseaudio's sound device detection. As I noted, merely having this program installed (while using consolekit) prevents pulseaudio from being able to use a sound device that I plug in, unless I log out and back in.

Even if you do not add elogind to a runlevel, D-Bus launches it, so are you sure it never runs? You cannot have both ConsoleKit and elogind installed simultaneously and expect your installation to behave in a sane way, i.e. you cannot have two different login and session managers installed simultaneously. You will need to either uninstall elogind and stick with ConsoleKit and use Skype for Web in a browser, or uninstall ConsoleKit and switch to elogind and use Skype for Linux. Despite having no complaints about ConsoleKit, I chose the latter path as I want to use Skype for Linux quite regularly. It's a pity Microsoft have coded Skype for Linux to require systemd-logind (and hence its fork elogind), but we have no control over Microsoft. They have targetted Skype for Linux at the much larger Linux userbase of Ubuntu, Red Hat, Fedora, openSUSE, Debian etc. that all use systemd.
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3267
Location: Canada

PostPosted: Sun Nov 18, 2018 10:16 am    Post subject: Reply with quote

Yamakuzure wrote:
keet, elogind is a drop-in replacement for systemd-login. So it has the same requirements to work properly like ConsoleKit and systemd have: Use it exclusively for everything or not at all.

When I look at the skypeforlinux ebuild, I can see that it has a runtime dependency on either elogind or systemd. As elogind is listed first, it will be pulled in if neither is installed. I have no internal knowledge of Skype4Linux, and am only interpreting the ebuild here. But it seems that you can't use it, if your system is built with ConsoleKit support.

Whether this is an oversight, or whether Skype4Linux is just not compatible with ConsoleKit, I can not say.



It is not oversiight, it is somebody's decision. Skype4Linux worked happily with consolekit before version 8.30, Since 8.30 elogind (or systemd) became the requirement (at first ebuild missed it, so many people were hit with skype4linux exiting immediately on start after update).
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3267
Location: Canada

PostPosted: Sun Nov 18, 2018 10:26 am    Post subject: Reply with quote

elogind has (unfortunate ?) philosophy that it is launched as needed via dbus interface. So the only way to avoid it running is, essentially, to unistall it completely.
Which is of course completely orthogonal to rc init scripts philosophy


BTW, consolekit has the same approach :)
Back to top
View user's profile Send private message
Yamakuzure
Advocate
Advocate


Joined: 21 Jun 2006
Posts: 2284
Location: Adendorf, Germany

PostPosted: Wed Nov 21, 2018 12:55 pm    Post subject: Reply with quote

dmpogo wrote:
elogind has (unfortunate ?) philosophy that it is launched as needed via dbus interface. So the only way to avoid it running is, essentially, to unistall it completely.
Which is of course completely orthogonal to rc init scripts philosophy


BTW, consolekit has the same approach :)
I have added that on user request. Originally I was fine in leaving the exec field set to /dev/null. See the (a bit lengthy) discussion here: https://github.com/elogind/elogind/issues/25

Further it can be toxic for your system to have more than one session tracker installed. Weird things, mainly meaning that stuff is not working, can happen if you have both libsystemd and libelogind installed. If you then build a package with autodetection in its build system, it will most probably link against (and use) libsystemd, and just not work if elogind is used for session tracking. Sorry, but that's like it is... :?
_________________
Important German:
  1. "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
  2. "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum