Jump to content
Read the Funtoo Newsletter: Summer 2023 ×
  • 0

No "users switch" with KDE (sddm)


Sandro

Question

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 :)

Link to comment
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?

 

 

 

 

Link to comment
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 
/
/org
/org/freedesktop
/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?

Link to comment
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.

Link to comment
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.

Link to comment
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;

Works:

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.

 

Link to comment
Share on other sites

  • 0

The 2nd user is in groups:

>
	ci74771ht ~ # grep vincio /etc/group 
lp::7:lp,sandro,vincio 
audio::18:sandro,vincio 
cdrom::19:sandro,vincio 
video::27:root,sandro,vincio,sddm,gdm,boinc 
cdrw::80:sandro,vincio 
usb::85:sandro,vincio 
users::100:games,sandro,vincio 
vincio:!:1001: 
plugdev:x:104:sandro,vincio 
games:x:35:sandro,vincio

Link to comment
Share on other sites

  • 0
1)
[code]
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'
[/code]

2)

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

I've the same outputs.

I must send other "outputs" ?

I'll be happy to give feedbacks ^^

Tell me _'_

Link to comment
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
  NetworkManager
  agetty
  alsasound                 boot
  binfmt                    boot
  bluetooth
  bootmisc                  boot
  busybox-ntpd
  busybox-watchdog
  cgroups                   sysinit
  consolefont
  consolekit                default
  cronie                    default
  cups-browsed
  cupsd                     default
  dbus                      default
  devfs                     sysinit
  device-mapper
  dhcpcd
  dhcpd
  dhcrelay
  dhcrelay6
  dmcrypt                   boot
  dmesg                     sysinit
  dmeventd
  elogind
  fsck                      boot
  fuse
  git-daemon
  gpm
  hostname                  boot
  hwclock                   boot
  ip6tables
  iptables
  keymaps                   boot
  killprocs                 shutdown
  kmod-static-nodes         sysinit
  local                     default
  localmount                boot
  loopback                  boot
  lvm
  lvm-monitoring
  lvmetad
  mdadm
  mdraid
  modules                   boot
  modules-load
  mount-ro                  shutdown
  mtab                      boot
  mysql
  mysql-s6
  mysql-supervise
  net-online
  net.eth0                  default
  net.lo
  netif.tmpl
  netmount                  default
  nfs
  nfsclient
  nfsmount
  ntp-client
  ntpd
  nullmailer
  numlock
  nvidia-persistenced
  nvidia-smi
  opentmpfiles-dev          sysinit
  opentmpfiles-setup        boot
  openvpn
  osclock
  pciparm
  procfs                    boot
  pwcheck
  pydoc-2.7
  pydoc-3.4
  root                      boot
  rpc.idmapd
  rpc.pipefs
  rpc.statd
  rpcbind
  rsyncd
  runsvdir
  s6-svscan
  saned
  saslauthd
  savecache                 shutdown
  slapd
  sntp
  sshd                      default
  svnserve
  swap                      boot
  swclock
  syncthing
  sysctl                    boot
  sysfs                     sysinit
  sysklogd                  default
  teamviewerd
  termencoding              boot
  udev                      sysinit
  udev-postmount
  urandom                   boot
  wpa_supplicant
  xdm                       default
  xdm-setup

 

Link to comment
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 :)

Link to comment
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.

Link to comment
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
×
×
  • Create New...