Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
skypeforlinux 8.30.0.50 segfaults with dbus
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
sl70
Guru
Guru


Joined: 18 Jun 2002
Posts: 449
Location: Saitama, JP

PostPosted: Thu Sep 20, 2018 7:32 pm    Post subject: skypeforlinux 8.30.0.50 segfaults with dbus Reply with quote

skypeforlinux updated to version 8.30.0.50 yesterday, but wouldn't start. Kept getting these messages:
Code:
Sep 19 18:34:06 myhost kernel: skypeforlinux[18915]: segfault at 18 ip 00007fa189144eae sp 00007ffe88fc86d0 error 4 in libdbus-1.so.3.14.14[7fa18912b000+44000]


I downgraded to 8.29.0.50 and it works OK. Is there anything else I can do?
BTW, I can't interpret this message. Is Skype segfaulting, or is it causing a segfault in libdbus?
TIA.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21605

PostPosted: Fri Sep 21, 2018 12:57 am    Post subject: Reply with quote

The process skypeforlinux was terminated by a segmentation fault. The fault occurred while running code in libdbus-1.so. This may mean that libdbus-1.so has a bug, or it may mean that some other module, possibly skypeforlinux or possibly some other shared object in the process, has a bug that caused it to pass invalid input to libdbus-1.so. For example, suppose libdbus-1.so is documented to require a valid non-null session pointer for function Foo. The implementer of Foo relies on this and dereferences the session pointer without checking. Suppose further that some caller, possibly skypeforlinux, or possibly a shared object used by skypeforlinux, incorrectly passes a null pointer, in violation of the documented requirements. In that case, libdbus-1.so will be the faulting address, but the bug is in the module that did not adhere to the documented requirements.
Back to top
View user's profile Send private message
sl70
Guru
Guru


Joined: 18 Jun 2002
Posts: 449
Location: Saitama, JP

PostPosted: Fri Sep 21, 2018 2:04 am    Post subject: Reply with quote

Ah, I see. Thanks, Hu. So, even if skypforlinux (or whatever) is passing invalid arguments to libdbus, shouldn't libdbus be robust enough to accept invalid data passed to it without crashing everything?
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


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

PostPosted: Fri Sep 21, 2018 7:27 am    Post subject: Reply with quote

sl70,

I wonder if you have the same problem as user markymark55 in the following Skype for Linux Forum thread:

https://answers.microsoft.com/en-us/skype/forum/skype_linux-skype_startms-skype_signms/skype-never-starts-skypeforlinux830050-1x8664rpm/6b28328b-eeda-41b1-b406-7a98dd285ee5

I am using skypeforlinux-8.29.0.50 and have not yet upgraded to skypeforlinux-8.30.0.50. I don't use systemd or elogind (my installations use OpenRC and ConsoleKit), but I now rather fear I would have to switch from ConsoleKit to elogind if I want to upgrade to skypeforlinux-8.30.0.50. A week ago I did install skypeforlinux-8.30.76.41 from Microsoft's unstable repository and saw exactly the same behaviour as the OP (Manuel Garcia Wolff) in the above-mentioned Microsoft forum thread, so it does look like systemd or OpenRC+elogind could be required for >skypeforlinux-8.29.0.50. I suppose Microsoft develops Skype for Linux packages for Debian, Ubuntu and Fedora, all of which use systemd, so they have opted to use systemd-logind in the latest Skype for Linux packages. Frustrating, if that is indeed the case.

PaulM_385 wrote:
It looks like skypeforlinux 8.30 requires logind (from systemd or elogind). So this will only be a problem on systems not running systemd. Once I installed elogind, skypeforlinux 8.30 ran fine.

_________________
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
sl70
Guru
Guru


Joined: 18 Jun 2002
Posts: 449
Location: Saitama, JP

PostPosted: Fri Sep 21, 2018 12:41 pm    Post subject: Reply with quote

Oh, yeah. That's looks like my problem, indeed. I've resisted installing systemd for years. I guess I will just not update Skype. Thanks, @fitzcarraldo.
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


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

PostPosted: Fri Sep 21, 2018 2:05 pm    Post subject: Reply with quote

sl70 wrote:
Oh, yeah. That's looks like my problem, indeed. I've resisted installing systemd for years. I guess I will just not update Skype.

I'm in the same boat, so I'll keep using skypeforlinux-8.29.0.50 for the time being too. Both my Gentoo installations are working very well with OpenRC+ConsoleKit, so I'm wary of switching from OpenRD+ConsoleKit to OpenRC+elogind, as I have reason to believe elogind may not be entirely without issues in my KDE installations.
_________________
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
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21605

PostPosted: Sat Sep 22, 2018 12:33 am    Post subject: Reply with quote

sl70 wrote:
So, even if skypforlinux (or whatever) is passing invalid arguments to libdbus, shouldn't libdbus be robust enough to accept invalid data passed to it without crashing everything?
Not necessarily. The example I gave above is easy to guard against, but suppose the requirement was "The caller must supply a pointer to a writable area at least 2048 bytes long" and the called function proceeded to write 2048 bytes to that area. If the buggy caller passes a pointer to a 512 byte buffer, how is the called function supposed to detect that the buffer is too small? At the C interface level, there is no supporting runtime that can be queried to determine the true size of the passed buffer. If the called function does not detect that the buffer is too small, it will corrupt memory when it overwrites the 1.5K following the provided buffer.
Back to top
View user's profile Send private message
grgdvo
n00b
n00b


Joined: 21 May 2017
Posts: 15

PostPosted: Mon Sep 24, 2018 1:01 am    Post subject: Reply with quote

OpenRC+consolekit XFCE+slim
Just oneshot-ed the elogind package to the system without adding to runlevels or anything else.
skypeforlinux is running fine. System restart is fine too.
Any errors have not yet seen. Staying so for now.
Fitzcarraldo, thanks a lot for hint!
Back to top
View user's profile Send private message
skidnik
n00b
n00b


Joined: 24 Mar 2018
Posts: 3

PostPosted: Mon Sep 24, 2018 7:25 pm    Post subject: Reply with quote

grgdvo wrote:
OpenRC+consolekit XFCE+slim
Just oneshot-ed the elogind package to the system without adding to runlevels or anything else.
skypeforlinux is running fine. System restart is fine too.
Any errors have not yet seen. Staying so for now.
Fitzcarraldo, thanks a lot for hint!

Do camera and microphone work? Cos I have two guesses (assuming my limited knowledge on the subject) on why would skype need logind: either it needs authorization to access hardware, or they finally ditched gnome-keyring for something internally implemented.

update: tried oneshotting elogind, helpend me too. camera works, sound works aswell, at least with pulse. now rebuilding my plasma desktop with elogind.
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


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

PostPosted: Tue Sep 25, 2018 6:21 pm    Post subject: Reply with quote

grgdvo,

Thank you for the information about Skype for Linux >8.29.0.50 working if elogind is installed but not launched.

skidnik,

As I'm using KDE Plasma too, please keep us posted on how your installation performs once you have replaced ConsoleKit with elogind. I may decide to switch from ConsoleKit to elogind if you find that you don't experience any problems a few days after you have switched from ConsoleKit to elogind.
_________________
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
Fitzcarraldo
Advocate
Advocate


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

PostPosted: Wed Sep 26, 2018 10:52 pm    Post subject: Reply with quote

So I decided to try grgdvo's approach of installing elogind and not adding it to any runlevel:

Code:
# rc-update show -v | grep elogind
              elogind |                                       
# rc-update show -v | grep consolekit
           consolekit | boot

I re-installed skypeforlinux-8.30.0.50 and it does indeed now work. Then I installed the latest version of Skype for Linux from the Microsoft unstable repository by using my local overlay, while still keeping elogind installed without adding it to any runlevel:

Code:
# eix -I skype
[I] net-im/skypeforlinux
     Available versions:  ~8.29.0.41^msd (~)8.29.0.50^msd (~)8.30.0.50^msd (~)8.31.76.93^msd[1] {pax_kernel ABI_X86="64"}
     Installed versions:  8.31.76.93^msd[1](23:39:37 26/09/18)(-pax_kernel ABI_X86="64")
     Homepage:            https://www.skype.com/
     Description:         Instant messaging client, with support for audio and video

[1] "local_overlay" /usr/local/portage

skypeforlinux-8.31.76.93 also works.

I'm not sure what impact, if any, having both daemons running simultaneously will have, though:

Code:
# ps -ef | grep console | grep -v colour
root      3055     1  0 23:08 ?        00:00:00 /usr/sbin/console-kit-daemon
# ps -ef | grep elogind | grep -v colour
root     13194     1  0 23:33 ?        00:00:00 elogind-daemon


EDIT: OK, I decided to go the whole hog and switch to elogind properly. I followed the Gentoo Wiki article except I did not bother to enable Simplified Mandatory Access Control Kernel Support. The Wiki article does not mention removing consolekit from the boot runlevel or default runlevel (whichever it happens to be in), but I did. Also, I had to copy my hook scripts from /etc/pm/sleep.d/ to /lib/elogind/system-sleep/ and modify them to cater for new $1 and $2 (man systemd-sleep(8)):

Arch Linux wiki wrote:
Argument 1: either pre or post, depending on whether the machine is going to sleep or waking up
Argument 2: suspend, hibernate or hybrid-sleep, depending on which is being invoked

_________________
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
skidnik
n00b
n00b


Joined: 24 Mar 2018
Posts: 3

PostPosted: Thu Sep 27, 2018 4:27 pm    Post subject: Reply with quote

Fitzcarraldo wrote:
grgdvo
As I'm using KDE Plasma too, please keep us posted on how your installation performs once you have replaced ConsoleKit with elogind. I may decide to switch from ConsoleKit to elogind if you find that you don't experience any problems a few days after you have switched from ConsoleKit to elogind.

Everything goes smooth so far, afaik if power menu buttons work auth went well, I'm on stable, it's my home desktop, nothing fancy: web, messaging, music, videos, occasional ssh to some server in case of emergency.
Plasma profile, OpenRC, sddm, network-manager.
Back to top
View user's profile Send private message
grgdvo
n00b
n00b


Joined: 21 May 2017
Posts: 15

PostPosted: Fri Sep 28, 2018 8:46 am    Post subject: Reply with quote

grgdvo wrote:
System restart is fine too.
Any errors have not yet seen. Staying so for now.


I have to say, that i hurried with a conclusion, that system works fine.
No! Some wrong behaviour was found.

After the elogind package installation I found that elogind-daemon is running
(through dbus system serivces, see /usr/share/dbus-1/system-services/org.freedesktop.login1.service)
and registering itself in dbus service list

Code:
~ $ dbus-send --system --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames
method return ....
<skipped...>
      string "org.freedesktop.login1"


Excatly to this object SKYPE is accessed when starting.
Accordingly, if it does not found it (no elogind), then it fails with error descrived above.
So, the elogind package is need to be installed in the system,
or SKYPE will not be work.

And now founded wrong behaviour.
In my XFCE environment i can't any more do shutdown/restart/suspend/hibernate
under the ordinary user. These buttons in log out dialog are disabled.
As in this picture, for example.
[IMG]https://cdn1.imggmi.com/uploads/2018/9/28/530bd734d28b823ab8cf494e96dc86d1-full.jpg[/IMG]

A long time ago I already tried to resolve this problem. I don't remember
what was done, but the buttons were in enabled state.
(probably some configuration issues in ConsoleKit/PolicyKit)

Now, IMHO, it is impossible to solve this problem (by easy methods),
except to uninstall elogind package and to use the previous SKYPE version.
The problem goes deep into the source code of xfce4-session package.

There is a such code roughly there.

Code:
#define LOGIND_RUNNING() (access ("/run/systemd/seats/", F_OK) >= 0)

static void
xfsm_shutdown_init (XfsmShutdown *shutdown)
{
  ...........

  if (LOGIND_RUNNING())
    shutdown->systemd = xfsm_systemd_get ();
  else
    shutdown->consolekit = xfsm_consolekit_get ();

  ...........
}

.................

gboolean
xfsm_shutdown_can_shutdown (XfsmShutdown  *shutdown,
                            gboolean      *can_shutdown,
                            GError       **error)
{
  .............
  if (shutdown->systemd != NULL)
    {[/url]
      if (xfsm_systemd_can_shutdown (shutdown->systemd, can_shutdown, error))   // RETURN can_shutdown=FALSE here!!!
        return TRUE;
    }
  else if (shutdown->consolekit != NULL) // NO CODE RUNING!!, see above *_init function
    {
      if (xfsm_consolekit_can_shutdown (shutdown->consolekit, can_shutdown, error))
        return TRUE;
    }
  .............
}


As can be seen, "shutdown->consolekit" pointer does not even initialize.
Respectively there are no requests to ConsoleKit, so there are no requests to PolicyKit,
and so no rights to shutdown in my user's XFCE environemnt.

At the end of my post the conclusion is following.
I guess that it will not lead to something good the existence of two login managers in the system.
I will not try to configure elogind such that it will grant me required rights.
And i'm not yet ready to fully migrate to systemd.
So, i downgrade my system on SKYPE 8.29.0.50, which is not required elogind yet.
I will follow further what's happening.

Sorry for long post! Thanks!
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


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

PostPosted: Fri Sep 28, 2018 9:12 am    Post subject: Reply with quote

grgdvo wrote:
And i'm not yet ready to fully migrate to systemd.

elogind is not systemd, it is a fork of only the login manager from systemd. You do not have to migrate to systemd, i.e. you do not install systemd. You could try OpenRC+elogind instead of OpenRC+ConsoleKit. That is what skidnik and I have done. Here is what I did:

1. Followed the instructions in the Gentoo Wiki article on migrating to elogind (I did not bother to enable Simplified Mandatory Access Control Kernel Support in the kernel). It is not difficult.

The packages that Portage rebuilt in my case when I changed the USE flags in /etc/portage/make.conf from "consolekit -systemd" to "elogind -consolekit -systemd" and issued the command "emerge --ask --changed-use --deep @world" were as follows:

sys-apps/dbus
sys-auth/pambase
sys-apps/qingy
sys-process/procps
sys-auth/polkit
sys-apps/accountsservice
net-misc/networkmanager
sys-fs/udisks
kde-plasma/kscreenlocker
kde-plasma/powerdevil

2. Removed ConsoleKit from the boot runlevel and added elogind:

Code:
# rc-update del consolekit boot
# rc-update add elogind boot

(If consolekit had been in the default runlevel, I would have removed it from there.)

EDIT: I entered the command "emerge --ask --depclean" to clean up, and that uninstalled consolekit. If you don't do a depclean, or depclean does not uninstall consolekit, then uninstall consolekit.

3. Copied my bespoke suspend/resume hook scripts from /etc/pm/sleep.d/ to /lib/elogind/system-sleep/ and modified them to cater for new $1 ('pre' or 'post') and $2 ('suspend', 'hibernate', or 'hybrid-sleep'). For example:

Code:
#!/bin/bash
case $1/$2 in
  pre/*)
    # Put here any commands you want to be run when suspending or hibernating.
    ;;
  post/*)
    # Put here any commands you want to be run when resuming from suspension or thawing from hibernation.
    ;;
esac


4. Rebooted.

I'm using KDE in Gentoo, but all the buttons to Reboot, Shutdown, Suspend, Hibernate, Lock Screen, Logout and Switch User still work as they did before.
_________________
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


Last edited by Fitzcarraldo on Sun Sep 30, 2018 3:42 pm; edited 2 times in total
Back to top
View user's profile Send private message
grgdvo
n00b
n00b


Joined: 21 May 2017
Posts: 15

PostPosted: Sat Sep 29, 2018 1:18 am    Post subject: Reply with quote

Fitzcarraldo, thank you once more! I will try your recommendations.
Back to top
View user's profile Send private message
bagas
Apprentice
Apprentice


Joined: 29 Jun 2018
Posts: 206

PostPosted: Sat Sep 29, 2018 5:28 am    Post subject: Reply with quote

I still do not understand what you need to do to work with new net-im/skypeforlinux-8.30.0.50.
At me it too does not start skypeforlinux-8.30.0.50.
Code:
$ xfce4-about --version
xfce4-about 4.13.4 (Xfce 4.12)

Code:
$ uname -rms
Linux 4.9.122-gentoo x86_64

Code:
# qlist -IUv | awk '{print $1}' | grep dbus
dev-libs/dbus-glib-0.108
dev-python/dbus-python-1.2.4
dev-qt/qtdbus-5.9.6
dev-util/gdbus-codegen-2.56.2-r1
sys-apps/dbus-1.10.24
Back to top
View user's profile Send private message
skidnik
n00b
n00b


Joined: 24 Mar 2018
Posts: 3

PostPosted: Sat Sep 29, 2018 11:25 am    Post subject: Reply with quote

grgdvo wrote:

And now founded wrong behaviour.
In my XFCE environment i can't any more do shutdown/restart/suspend/hibernate
under the ordinary user. These buttons in log out dialog are disabled.

Fitzcarraldo is right. Add a global -systemd -consolekit elogind use flags and 'emerge -uDU --with-bdeps=y @world', than enable elogind to bootlevel. AFAIR XFCE is started somewhat specifically with startx (it uses ~/.xinitrc file) if it is to use consolekit so you might also look into that. Or if you use a DM, then I guess you just have to rebuild it with elogind use.
Back to top
View user's profile Send private message
filbar
n00b
n00b


Joined: 23 Nov 2005
Posts: 11

PostPosted: Sat Sep 29, 2018 5:00 pm    Post subject: Gentoo and Skypeforlinux Reply with quote

[Moderator note: This post, and only this post, was originally a separate thread. -Hu]

I have problems with latest skypeforlinux in gentoo. It is related to segfault in dbus.

Code:
[127989.197770] skypeforlinux[29861]: segfault at 18 ip 00007fa7bd92462e sp 00007ffecf2a4020 error 4 in libdbus-1.so.3.19.7[7fa7bd90a000+45000]
[127989.197779] Code: 20 48 89 77 08 89 57 10 48 c7 47 18 00 00 00 00 c7 47 20 ff ff ff 7f 48 89 47 28 c3 f6 47 01 01 75 32 53 48 8b 47 28 48 89 fb <48> 8b 40 18 48 85 c0 74 06 ff d0 85 c0 75 13 8b 73 10 48 8b 7b 08


I try to update dbus to latest version available but this dont helps. Gentoo I have fullz updated too.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3267
Location: Canada

PostPosted: Sun Sep 30, 2018 2:57 am    Post subject: Reply with quote

Fitzcarraldo wrote:
grgdvo wrote:
And i'm not yet ready to fully migrate to systemd.

elogind is not systemd, it is a fork of only the login manager from systemd. You do not have to migrate to systemd, i.e. you do not install systemd. You could try OpenRC+elogind instead of OpenRC+ConsoleKit. That is what skidnik and I have done. Here is what I did:

1. Followed the instructions in the Gentoo Wiki article on migrating to elogind (I did not bother to enable Simplified Mandatory Access Control Kernel Support in the kernel). It is not difficult.

The packages that Portage rebuilt in my case when I changed the USE flags in /etc/portage/make.conf from "consolekit -systemd" to "elogind -consolekit -systemd" and issued the command "emerge --ask --changed-use --deep @world" were as follows:

sys-apps/dbus
sys-auth/pambase
sys-apps/qingy
sys-process/procps
sys-auth/polkit
sys-apps/accountsservice
net-misc/networkmanager
sys-fs/udisks
kde-plasma/kscreenlocker
kde-plasma/powerdevil

2. Removed ConsoleKit from the boot runlevel and added elogind:

Code:
# rc-update del consolekit boot
# rc-update add elogind boot

(If consolekit had been in the default runlevel, I would have removed it from there.)

3. Copied my bespoke suspend/resume hook scripts from /etc/pm/sleep.d/ to /lib/elogind/system-sleep/ and modified them to cater for new $1 ('pre' or 'post') and $2 ('suspend', 'hibernate', or 'hybrid-sleep'). For example:

Code:
#!/bin/bash
case $1/$2 in
  pre/*)
    # Put here any commands you want to be run when suspending or hibernating.
    ;;
  post/*)
    # Put here any commands you want to be run when resuming from suspension or thawing from hibernation.
    ;;
esac


4. Rebooted.

I'm using KDE in Gentoo, but all the buttons to Reboot, Shutdown, Suspend, Hibernate, Lock Screen, Logout and Switch User still work as they did before.


Thanks for excelent instructions !

I have migrated to elogind on my laptop and desktop, with similar KDE setups, and on laptop everything worked flawlessly. One comment however. It was not sufficient
to remove consolekit from runlevel. I had to umerge it, otherwise consolekit was getting lauched anyway (perhaps via dbus ?) when KDE was lauched.

On the desktop, (where consolekit was not even in any runlevel) however, sddm does not launch anything after the transition. Its log
says just
Code:

[19:39:54.719] (II) DAEMON: Initializing...
[19:39:54.724] (II) DAEMON: Starting...
[19:39:54.725] (II) DAEMON: Logind interface found

and then there is no switch to vt7 or anything else. I can launch KDE with startx no problem.

However, if I stoip elogind service from running, sddm launches fine, saying
Code:

[19:49:41.191] (II) DAEMON: Initializing...
[19:49:41.194] (II) DAEMON: Starting...
[19:49:41.194] (II) DAEMON: No session manager found
[19:49:41.194] (II) DAEMON: Adding new display on vt 7 ...
....


How to debug this ? Seems compiling sddm with -consolekit -elogind would do the trick :)
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


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

PostPosted: Sun Sep 30, 2018 10:43 am    Post subject: Reply with quote

dmpogo wrote:
One comment however. It was not sufficient
to remove consolekit from runlevel. I had to umerge it, otherwise consolekit was getting lauched anyway (perhaps via dbus ?) when KDE was lauched.

Ah, yes. I forgot to mention that, after "emerge --ask --changed-use --deep @world" I used "emerge --ask --depclean" to clean up, and that removed a few packages (including consolekit). I'll edit my earlier post to add that.

dmpogo wrote:
However, if I stoip elogind service from running, sddm launches fine, saying
Code:

[19:49:41.191] (II) DAEMON: Initializing...
[19:49:41.194] (II) DAEMON: Starting...
[19:49:41.194] (II) DAEMON: No session manager found
[19:49:41.194] (II) DAEMON: Adding new display on vt 7 ...
....


How to debug this ? Seems compiling sddm with -consolekit -elogind would do the trick

The laptop that I migrated from ConsoleKit to elogind uses LightDM, not SDDM. I have not migrated yet on an older laptop of mine that does use SDDM. I'll have a go when I get some free time in the next couple of days.
_________________
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
Fitzcarraldo
Advocate
Advocate


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

PostPosted: Sun Sep 30, 2018 4:31 pm    Post subject: Reply with quote

OK, I have migrated my second laptop (Gentoo ~amd64, KDE, SDDM, AMD GPU) from OpenRC+ConsoleKit to OpenRC+elogind. When I rebooted, the SDDM greeter was displayed but, whenever I entered my password and pressed ENTER, the screen would go blank for a few seconds and then return to the SDDM greeter. My username is fitzcarraldo with user ID 1000, but I also have another user account (different username, with user ID 1001) on that laptop, and I could login successfully to that account. The contents of /home/fitzcarraldo/.local/share/sddm/xorg-session.log were as follows:

Code:
dbus[20982]: Unable to set up transient service directory: XDG_RUNTIME_DIR "/home/fitzcarraldo/tmp" not available: No such file or directory
/etc/X11/xinit/xinitrc.d/99-xinput: line 2: xinput: command not found
QStandardPaths: XDG_RUNTIME_DIR points to non-existing path '/home/fitzcarraldo/tmp', please create it with 0700 permissions.
QStandardPaths: XDG_RUNTIME_DIR points to non-existing path '/home/fitzcarraldo/tmp', please create it with 0700 permissions.
Fontconfig warning: "/etc/fonts/conf.avail/65-culmus.conf", line 24: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.avail/65-culmus.conf", line 31: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.avail/65-culmus.conf", line 31: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.avail/65-culmus.conf", line 37: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.avail/65-culmus.conf", line 45: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.avail/65-culmus.conf", line 45: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.avail/65-culmus.conf", line 45: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.avail/65-culmus.conf", line 53: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.avail/65-culmus.conf", line 53: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.avail/65-culmus.conf", line 53: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.avail/65-culmus.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
startkde: Starting up...
QStandardPaths: XDG_RUNTIME_DIR points to non-existing path '/home/fitzcarraldo/tmp', please create it with 0700 permissions.
kdeinit5: Aborting. bind() failed: Permission denied
Could not bind to socket '/kdeinit5__0'
QStandardPaths: XDG_RUNTIME_DIR points to non-existing path '/home/fitzcarraldo/tmp', please create it with 0700 permissions.
kdeinit5_wrapper: Warning: connect(/kdeinit5__0) failed: : No such file or directory
QStandardPaths: XDG_RUNTIME_DIR points to non-existing path '/home/fitzcarraldo/tmp', please create it with 0700 permissions.
QStandardPaths: XDG_RUNTIME_DIR points to non-existing path '/home/fitzcarraldo/tmp', please create it with 0700 permissions.
Qt: Session management error: networkIdsList argument is NULL
Configuring Lock Action
QStandardPaths: XDG_RUNTIME_DIR points to non-existing path '/home/fitzcarraldo/tmp', please create it with 0700 permissions.
org.kde.kf5.ksmserver: KSMServer: cannot open /KSMserver__0: Permission denied
org.kde.kf5.ksmserver: KSMServer: Aborting.
startkde: Shutting down...
QStandardPaths: XDG_RUNTIME_DIR points to non-existing path '/home/fitzcarraldo/tmp', please create it with 0700 permissions.
kdeinit5_wrapper: Warning: connect(/kdeinit5__0) failed: : No such file or directory
Error: Can not contact kdeinit5!
startkde: Done.


So I did the following:

Code:
$ su fitzcarraldo
$ mkdir /home/fitzcarraldo/tmp
$ chmod 700 /home/fitzcarraldo/tmp
$ sudo reboot


And now I can login OK to my primary account (user fitzcarraldo, ID 1000) via the SDDM greeter.

Regarding the steps to migrate from ConsoleKit to elogind, this is what I did:

1. Used the menuconfig TUI to see if I needed to change anything in the kernel configuration (see Gentoo Wiki article on elogind), but I didn't:
Code:
$ cd /usr/src/linux
$ su
Password:
# make menuconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/bin2c
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
  HOSTCC  scripts/kconfig/lxdialog/util.o
  HOSTCC  scripts/kconfig/lxdialog/inputbox.o
  HOSTCC  scripts/kconfig/lxdialog/textbox.o
  HOSTCC  scripts/kconfig/lxdialog/yesno.o
  HOSTCC  scripts/kconfig/lxdialog/menubox.o
  HOSTLD  scripts/kconfig/mconf
scripts/kconfig/mconf  Kconfig


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

#


2. Edited /etc/portage/make.conf to change USE="consolekit -systemd" to USE="elogind -consolekit -systemd".

3. "emerge --ask --changed-use --deep @world" as per Gentoo Wiki article on elogind:

Code:
# emerge --ask --changed-use --deep @world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] sys-auth/elogind-238.1  USE="acl pam (policykit) -debug -doc (-selinux)"
[ebuild   R    ] sys-apps/dbus-1.12.10  USE="elogind*"
[ebuild   R    ] sys-process/procps-3.3.15-r1  USE="elogind*"
[ebuild   R    ] x11-misc/sddm-0.18.0  USE="elogind* -consolekit*"
[ebuild   R    ] sys-auth/pambase-20150213-r2  USE="elogind* -consolekit*"
[ebuild   R    ] sys-auth/polkit-0.115-r1  USE="elogind*"
[ebuild   R    ] sys-fs/udisks-2.8.0  USE="elogind*"
[ebuild   R    ] sys-apps/accountsservice-0.6.50-r1  USE="elogind*"
[ebuild   R    ] net-misc/networkmanager-1.14.0  USE="elogind* -consolekit*"
[ebuild   R    ] kde-plasma/powerdevil-5.13.5  USE="-consolekit*"

Would you like to merge these packages? [Yes/No] Yes
>>> Verifying ebuild manifests
>>> Running pre-merge checks for net-misc/networkmanager-1.14.0
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/4.12.12-gentoo/build
 * Found sources for kernel version:
 *     4.12.12-gentoo
 * Checking for SYSFS_DEPRECATED support ...                                                                                                                                                                                                [ ok ]
>>> Emerging (1 of 10) sys-auth/elogind-238.1::gentoo
>>> Installing (1 of 10) sys-auth/elogind-238.1::gentoo
>>> Emerging (2 of 10) sys-apps/dbus-1.12.10::gentoo
>>> Installing (2 of 10) sys-apps/dbus-1.12.10::gentoo
>>> Emerging (3 of 10) sys-process/procps-3.3.15-r1::gentoo
>>> Emerging (4 of 10) x11-misc/sddm-0.18.0::gentoo
>>> Emerging (5 of 10) sys-auth/pambase-20150213-r2::gentoo
>>> Installing (4 of 10) x11-misc/sddm-0.18.0::gentoo
>>> Installing (5 of 10) sys-auth/pambase-20150213-r2::gentoo
>>> Installing (3 of 10) sys-process/procps-3.3.15-r1::gentoo
>>> Emerging (6 of 10) sys-auth/polkit-0.115-r1::gentoo
>>> Installing (6 of 10) sys-auth/polkit-0.115-r1::gentoo
>>> Emerging (7 of 10) sys-fs/udisks-2.8.0::gentoo
>>> Emerging (8 of 10) sys-apps/accountsservice-0.6.50-r1::gentoo
>>> Emerging (9 of 10) net-misc/networkmanager-1.14.0::gentoo
>>> Installing (8 of 10) sys-apps/accountsservice-0.6.50-r1::gentoo
>>> Installing (7 of 10) sys-fs/udisks-2.8.0::gentoo
>>> Installing (9 of 10) net-misc/networkmanager-1.14.0::gentoo
>>> Emerging (10 of 10) kde-plasma/powerdevil-5.13.5::gentoo
>>> Installing (10 of 10) kde-plasma/powerdevil-5.13.5::gentoo
>>> Jobs: 10 of 10 complete                         Load avg: 5.69, 5.21, 3.17
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

 * IMPORTANT: config file '/etc/pam.d/system-auth' needs updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.
 * After world updates, it is important to remove obsolete packages with
 * emerge --depclean. Refer to `man emerge` for more information.


4. Updated the pam config file as instructed in the output of the above-mentioned emerge command:

Code:
# etc-update
Scanning Configuration files...
The following is the list of files which need updating, each
configuration file is followed by a list of possible replacement files.
1) /etc/pam.d/system-auth (1)
Please select a file to edit by entering the corresponding number.
              (don't use -3, -5, -7 or -9 if you're unsure what to do)
              (-1 to exit) (-3 to auto merge all files)
                           (-5 to auto-merge AND not use 'mv -i')
                           (-7 to discard all updates)
                           (-9 to discard all updates AND not use 'rm -i'): -3
Replacing /etc/pam.d/system-auth with /etc/pam.d/._cfg0000_system-auth
mv: overwrite '/etc/pam.d/system-auth'? y
Exiting: Nothing left to do; exiting. :)


5. Checked if consolekit package was still installed (it was) and which runlevel it was in:

Code:
# eix -I consolekit
[I] sys-auth/consolekit
     Available versions:  0.4.6 1.1.0-r1 1.1.2 1.2.0 (~)1.2.1 **9999 {acl cgroups debug doc evdev pam pm-utils policykit selinux systemd-units test udev KERNEL="linux"}
     Installed versions:  1.2.1(02:49:29 21/01/18)(acl pam policykit udev -cgroups -debug -doc -evdev -pm-utils -selinux -test KERNEL="linux")
     Homepage:            https://github.com/ConsoleKit2/ConsoleKit2 https://www.freedesktop.org/wiki/Software/ConsoleKit
     Description:         Framework for defining and tracking users, login sessions and seats

# rc-update show -v | grep consolekit
           consolekit |      default


6. Removed consolekit from any runlevel and added elogind to the boot runlevel:

Code:
# rc-update del consolekit default
 * service consolekit removed from runlevel default
# rc-update add elogind boot
 * service elogind added to runlevel boot


7. Removed superfluous packages:

Code:
# emerge --ask --depclean

 * Always study the list of packages to be cleaned for any obvious
 * mistakes. Packages that are part of the world set will always
 * be kept.  They can be manually added to this set with
 * `emerge --noreplace <atom>`.  Packages that are listed in
 * package.provided (see portage(5)) will be removed by
 * depclean, even if they are part of the world set.
 *
 * As a safety measure, depclean will not remove any packages
 * unless *all* required dependencies have been resolved.  As a
 * consequence of this, it often becomes necessary to run
 * `emerge --update --newuse --deep @world` prior to depclean.

Calculating dependencies... done!
>>> Calculating removal order...

>>> These are the packages that would be unmerged:

 sys-power/pm-utils
    selected: 1.4.1-r7
   protected: none
     omitted: none

 app-laptop/radeontool
    selected: 1.6.3
   protected: none
     omitted: none

 sys-power/pm-quirks
    selected: 20100619-r1
   protected: none
     omitted: none

 sys-apps/vbetool
    selected: 1.1
   protected: none
     omitted: none

All selected packages: =sys-power/pm-quirks-20100619-r1 =app-laptop/radeontool-1.6.3 =sys-power/pm-utils-1.4.1-r7 =sys-apps/vbetool-1.1

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

Would you like to unmerge these packages? [Yes/No] Yes
>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in: 5 4 3 2 1
>>> Unmerging (1 of 4) sys-power/pm-utils-1.4.1-r7...
>>> Unmerging (2 of 4) app-laptop/radeontool-1.6.3...
>>> Unmerging (3 of 4) sys-power/pm-quirks-20100619-r1...
>>> Unmerging (4 of 4) sys-apps/vbetool-1.1...
Packages installed:   1594
Packages in world:    332
Packages in system:   43
Required packages:    1594
Number removed:       4

 * GNU info directory index is up-to-date.


8. Checked if consolekit was still installed:

Code:
# eix -I consolekit
[I] sys-auth/consolekit
     Available versions:  0.4.6 1.1.0-r1 1.1.2 1.2.0 (~)1.2.1 **9999 {acl cgroups debug doc evdev pam pm-utils policykit selinux systemd-units test udev KERNEL="linux"}
     Installed versions:  1.2.1(02:49:29 21/01/18)(acl pam policykit udev -cgroups -debug -doc -evdev -pm-utils -selinux -test KERNEL="linux")
     Homepage:            https://github.com/ConsoleKit2/ConsoleKit2 https://www.freedesktop.org/wiki/Software/ConsoleKit
     Description:         Framework for defining and tracking users, login sessions and seats


9. As consolekit was still installed, I unistalled it:

Code:
# emerge --ask --depclean consolekit

Calculating dependencies... done!
>>> Calculating removal order...

>>> These are the packages that would be unmerged:

 sys-auth/consolekit
    selected: 1.2.1
   protected: none
     omitted: none

All selected packages: =sys-auth/consolekit-1.2.1

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

Would you like to unmerge these packages? [Yes/No] Yes
>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in: 5 4 3 2 1
>>> Unmerging (1 of 1) sys-auth/consolekit-1.2.1...
Packages installed:   1593
Packages in world:    332
Packages in system:   43
Required packages:    1593
Number removed:       1

 * GNU info directory index is up-to-date.


10. Checked if there were any suspend or hibernate scripts:

Code:
# updatedb
# locate sleep.d
/usr/lib64/pm-utils/sleep.d
/usr/lib64/pm-utils/sleep.d/01laptop-mode
/usr/portage/sys-power/pm-utils/files/sleep.d
/usr/portage/sys-power/pm-utils/files/sleep.d/50unload_alx

As you can see above, there were no bespoke scripts (i.e. scripts that I had previously created in /etc/pm/sleep.d/) but there is a pm-utils suspend/resume|hibernate/thaw script for the installed laptop-mode-tools, so I may need to copy the 01laptop-mode script to /lib/elogind/ and modify it to use the new $1 and $2 variables as I explained in an earlier post, but that is not important in this case. For the time being, my second laptop appears to be working fine after migrating from ConsoleKit to elogind and I added the ~/tmp directory as I explained at the start of this post.
_________________
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
jorgicio
n00b
n00b


Joined: 17 Oct 2014
Posts: 47

PostPosted: Tue Oct 02, 2018 2:38 pm    Post subject: Reply with quote

I tried the elogind method and it makes Skype working again (however, past versions work with Consolekit2).

Also, the sad part of all that doesn't fit very well with MATE. MATE does work only with Consolekit or full SystemD, not working with elogind. Indeed, MATE packages still depend on Consolekit.
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


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

PostPosted: Tue Oct 02, 2018 11:46 pm    Post subject: Reply with quote

jorgicio,

I don't use MATE but you have my sympathy. All I can suggest is that you file bug reports in the Gentoo Bugzilla against the MATE packages that depend on ConsoleKit but not elogind.

In my case I was perfectly happy with ConsoleKit, and it is only Skype that utimately forced me to migrate to elogind. Ironic, considering that Skype is owned by Microsoft.

dmpogo,

Did you get to the bottom of your problem on your desktop machine? The contents of the sddm log that you posted makes me wonder whether you are experiencing the problem reported in the following threads:

SDDM '>x11-misc/sddm-0.15.0' not working [Solved-ish]

sddm Problem

Have you tried merging sys-apps/haveged and adding it to the boot runlevel, to see if it helps?

If that makes no difference, I would suggest downgrading SDDM to see if that has any effect. Not a long-term solution, but it might help isolate which package is causing the problem.

Another experiment I would try would be to temporarily configure SDDM for autologin, again just to see if you can then reach the desktop machine's Desktop.

Does your desktop machine have an NVIDIA GPU, by any chance?
_________________
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: Wed Oct 03, 2018 4:19 am    Post subject: Reply with quote

Fitzcarraldo wrote:


Did you get to the bottom of your problem on your desktop machine? The contents of the sddm log that you posted makes me wonder whether you are experiencing the problem reported in the following threads:

SDDM '>x11-misc/sddm-0.15.0' not working [Solved-ish]

sddm Problem

Have you tried merging sys-apps/haveged and adding it to the boot runlevel, to see if it helps?

If that makes no difference, I would suggest downgrading SDDM to see if that has any effect. Not a long-term solution, but it might help isolate which package is causing the problem.

Another experiment I would try would be to temporarily configure SDDM for autologin, again just to see if you can then reach the desktop machine's Desktop.

Does your desktop machine have an NVIDIA GPU, by any chance?


Thanks, it does look similar to what is discussed in that thread. I have not progressed much in the debugging, was busy, but I'll lok at your suggestions. Given that I practically never log out or reboot this desktop, I have a bit of time :)

And yes, this desktop has NVIDIA GPU and runs nvidia proprietary trivers. I thought about it, and checked at least the difference of having nvidia module loaded or not before starting sddm - no difference. It is quite old machine and nvidia-drivers have to be kept at 304 version.


What also I did today, is switched my office desktop to elogind. This one also has NVIDIA GPU (but somewhat newer one). I don't seem have problems to logout
and login back, but I did not check sddm cold start - i.e /etc/init.d/xdm restart. Had to have the machine operational :)
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


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

PostPosted: Wed Oct 03, 2018 10:58 am    Post subject: Reply with quote

Hello again dmpogo,

My main laptop, which I migrated to elogind first, has NVIDIA Optimus hardware (GeForce GTX 860M discrete GPU plus Intel HD Graphics 4600 integrated GPU) and I use nvidia-drivers with it (I don't use Bumblebee), so the NVIDIA driver on your desktop machine may not be the root cause.

If I understood correctly your post today in the other thread (the first link in my previous post), SDDM on your desktop machine now works as expected after you removed elogind from any runlevel and left D-Bus to start elogind automatically. If that is indeed the case, I suppose there is no incentive to investigate further. If it is working fine that way, congrats!
_________________
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
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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