Jump to content
funtoo forums
  • 0

No "users switch" with KDE (sddm)


For some time now the user change does not work using sddm. I tried to use gdm as a login manager while not having gnome3, but nothing to do, because using KDE session to manage the "login manager" still uses sddm. Has anyone else encountered the same problem?
Should I contact kde.org?

Thanx for any suggestion :)

Share this post

Link to post
Share on other sites

19 answers to this question

Recommended Posts

  • 1

Hi Sandro,

Me to is running KDE and I am growing more and more frustrated of the lack of switching user in KDE and SDDM.

I have tried to reinstall with elogind instead, with both elogind and consolkit to no gain. SDDM wiki says it shall work and it used to work. I even installed artix linux (arch with openrc) and there it worked.

On my installation I can select "switch user" and are prompted to create a new session. The new session is never created and I am prompted for my password instead with the option to swicth user. If I switch user there I am again prompted for my own password.

Can't find anything in the logs.

I am pondering on why things is working in artix linux and not in funtoo, what are we doing different in this respect?





Share this post

Link to post
Share on other sites
  • 1

According to search results the proper way to manually fire of a new session from CLI is:

qdbus --system org.freedesktop.DisplayManager /org/freedesktop/DisplayManager/Seat0 org.freedesktop.DisplayManager.Seat.SwitchToGreeter

That returns an error and won't work.

I am in no way versed in DBUS but if I query the service name for object I get:

~ # qdbus --literal --system org.freedesktop.DisplayManager 

There is no Seat no more.

According to an (possibly outdated) documentation or more likely todo-list of DBUS stuff on SDDM: https://github.com/sddm/sddm/wiki/org.freedesktop.DisplayManager it looks like there shall be an object org.freedesktop.DisplayManager.Seat as well as a Session that is not there. I figure that if the DBUS call to get the new session started fails it kind of won't work.

So question is, why is the services missing?

Is there anyone with a working SDDM that can post the result of the same query above?

Share this post

Link to post
Share on other sites
  • 1

Its the same. I have looked into the code of SDDM and the object path shall really be /org/freedesktop/DisplayManager/Seat0 assuming that there is a seat 0.

if you try the following and compare the output:

~ $ qdbus --literal --system org.freedesktop.DisplayManager /org/freedesktop/DisplayManager org.freedesktop.DisplayManager.Seats 
[Variant: [Argument: ao {}]]


This kind of indicates that there is no seats setup thus there is no object Seat0. I tried to add some additional traces to see if the object Seat0 was ever created but with the trace on it hang :(


I will continue to read code for a while.

Share this post

Link to post
Share on other sites
  • 1

I found it. Good thing I like C++ :)

The error is in the source code. To support seats SDDM checks the availability of either elogind or consolekit, one must be available. The default configuration for funtoo kde is consolekit and there is a typo in the DBUS-call that makes the call fail which is equal to no consolekit available.

What you can do is to patch it manually for now. I did the following (just tested, works for me - have my second user logged in right now):

Manually run the ebuild-functions instead of an emerge

/var/tmp/portage # ebuild /var/git/meta-repo/kits/desktop-kit/x11-misc/sddm/sddm-0.17.0-r1.ebuild setup
/var/tmp/portage # ebuild /var/git/meta-repo/kits/desktop-kit/x11-misc/sddm/sddm-0.17.0-r1.ebuild unpack

Manually patch the file:
/var/tmp/portage # vim /var/tmp/portage/x11-misc/sddm-0.17.0-r1/work/sddm-0.17.0/src/daemon/LogindDBusTypes.cpp 
Edit Row 66; remove the / from "/org.freedesktop.ConsoleKit.Manager" so it becomes "org.freedesktop.ConsoleKit.Manager"

/var/tmp/portage # ebuild /var/git/meta-repo/kits/desktop-kit/x11-misc/sddm/sddm-0.17.0-r1.ebuild configure
/var/tmp/portage # ebuild /var/git/meta-repo/kits/desktop-kit/x11-misc/sddm/sddm-0.17.0-r1.ebuild compile 
/var/tmp/portage # ebuild /var/git/meta-repo/kits/desktop-kit/x11-misc/sddm/sddm-0.17.0-r1.ebuild install 

Copy the new binaries (I took both just in case they share some code):
/var/tmp/portage # cp /var/tmp/portage/x11-misc/sddm-0.17.0-r1/image/usr/bin/sddm* /usr/bin/

I will write a bug to SDDM and to Funtoo (and perhaps Gentoo) for a quick fix.

Share this post

Link to post
Share on other sites
  • 1

Sadly this did not solve the problem :(

So here is how I actually get it to work after a number of reboots;


Boot computer. Go to tty1 or 2 and login as root. stop xdm. restart consolekit. start xdm. Unpatched sddm works.


Doesn't work:

Boot computer where both xdm and consolekit is started won't work.

Boot computer where xdm is not in default. Manually start xdm. No cigar.

Boot computer with consolekit in boot and xdm in default, still no cigar.


Share this post

Link to post
Share on other sites
  • 0

The 2nd user is in groups:

	ci74771ht ~ # grep vincio /etc/group 

Share this post

Link to post
Share on other sites
  • 0
ci4771ht ~ # qdbus --system org.freedesktop.DisplayManager /org/freedesktop/DisplayManager/Sea
t0 org.freedesktop.DisplayManager.Seat.SwitchToGreeter
Error: org.freedesktop.DBus.Error.UnknownObject
No such object path '/org/freedesktop/DisplayManager/Seat0'


	ci4771ht ~ # qdbus --literal --system org.freedesktop.DisplayManager  

I've the same outputs.

I must send other "outputs" ?

I'll be happy to give feedbacks ^^

Tell me _'_

Share this post

Link to post
Share on other sites
  • 0

erikr: You're more advanced than me ... sorry :'(

i've made some experiment but "no0thing new" :|

I'll retry with lightdm ....

but couls i see your

	# rc-config list


Share this post

Link to post
Share on other sites
  • 0

If I use "lightdm" as login manager, all works fine ^^

But i'd like that also sddm & gdm will works very good

°(excuse my bad US_language)"

Share this post

Link to post
Share on other sites
  • 0

Sorry Sandro, I didn't know how familiar you are with Linux and Funtoo.

To get it to work is fairly simple (at least on my machine) but there is one thing you need to do every time you boot. I normally keep my computer in sleep to RAM and rarely reboots so it is no effort for me.

What you can try is the following:

Allow the boot to complete and SDM to show. Before you login, press CTRL-ALT-F2 and you will have a text prompt offer to login.

The do the following:

Login as root. Add the following commands:

# /etc/init.d/xdm stop
# /etc/init.d/consolekit restart
# /etc/init.d/xdm start ;exit

(The last ;exit is just to ensure that you are loged from the root-account or annyone can press CTRL-ALT_F2 and gain root-access). 


My rc-settings  right now is:

# rc-config list
Available init scripts
  alsasound                 boot
  binfmt                    boot
  bootmisc                  boot
  cgroups                   sysinit
  consolekit                default
  cronie                    default
  cupsd                     default
  dbus                      default
  devfs                     sysinit
  dmcrypt                   boot
  dmesg                     sysinit
  fsck                      boot
  hostname                  boot
  hwclock                   boot
  keymaps                   boot
  killprocs                 shutdown
  kmod-static-nodes         sysinit
  local                     default
  localmount                boot
  loopback                  boot
  modules                   boot
  mount-ro                  shutdown
  mtab                      boot
  net.eth0                  default
  netmount                  default
  opentmpfiles-dev          sysinit
  opentmpfiles-setup        boot
  procfs                    boot
  root                      boot
  savecache                 shutdown
  sshd                      default
  swap                      boot
  sysctl                    boot
  sysfs                     sysinit
  sysklogd                  default
  termencoding              boot
  udev                      sysinit
  urandom                   boot
  xdm                       default


Share this post

Link to post
Share on other sites
  • 0

Ok .. i know about tty and other things; i'll retry using your "guide".

But i haven't my PC "on" 24h / 24h ... Anyway i eat something then i'll retry ^^

Share this post

Link to post
Share on other sites
  • 0

Thanx for the output ^^

I had already experienced your technique.

Unfortunately, even using your "technique" ... I always have problems with the "switch user" (Could it depend on some "USE flag")?
Forgive my ignorance .... so far it seems to me "resolutive" only the use of lightdm :|

forgive me if I "bored" you with my posts.
Thx Very Much Dear Master :)

Share this post

Link to post
Share on other sites
  • 0

Well, it is more fun to put an effort in understanding why this does not work if I am not alone the same problem :) Besides, I learned a lot so far.

One thign I learned is the importance of having a well defined and clean testing environment. In Funtoo/Gentoo this includes the USE-flag settings. And as you asked for my USE_flags I realized that I did some fidling with elogind and gave it up, removed the elogind USE-flag but never rebuilt or ran emerge -a --depclean to clean out.

So that I think have happened during the long thread is that I have had both consolekit and elogind running but I was not aware of that elogind was installed. Elogind is derived from systemd and is the systemd loginmanager. My need for sessions is greater than my aversion of systemd - thus i will try elogind :)

On my present system, that seems to work well in terms of multi session KDE (as I need that for my work that starts right now) I did the following:

In /etc/portage/make.conf I added the following to the USE-variable:

USE="-consolekit elogind"

The I rebuilt world

# emerge -vatDuU --with-bdeps y @world

I now have a system that relies on elogind instead of consolekit. Mostly.

The init-.file for XDM is still problematic as the dependency to consolekit is hard coded. I had to change this manually. Copy row 55 and comment out the original line and change the uncommented line to use elogind instead of consolekit so it looks like this:

        after readahead-list ypbind autofs openvpn gpm lircmd      
        after quota keymaps
        before alsasound                                          
        # Start before X                                         
        #use consolekit dbus xfs      
        use elogind dbus xfs        


Lastly remove consolekit from the rc-order and add elogind instead. I added elogind to boot, not sure if this is correct.

# rc-update del consolekit default
# rc-update add elogind boot

Reboot and experience some new sessions :)

There is a drawback. KDE Wallet is not automatically unlocked. There might be others - I have not found them yet.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now