Add systemd support #32

Closed
jristz opened this Issue Mar 5, 2013 · 17 comments

6 participants

@jristz

Actually the support of mdm in systemd is poor or none (but I can manage many workaround to make it work)
you can provide systemd support, is probably unlikeli that Ubuntu (LM base) change from upstart to systemd but Debian can (or not we are not sure), this support for other side can help upstream in Archlinux, Fedora, OpenSUSE and so that already migrated to systemd in find a good option add this display

the modifications neede are support for hibernate, suspend,shutdown (throw poerfoff NOT shutdown command) thow logind a .service archive
that I think

This is the service for systemd that I use in Arch

[Unit]
Description=Linux Mint Display Manager
Documentation=man:mdm(1)
Conflicts=getty@tty1.service
After=systemd-user-sessions.service getty@tty1.service

[Service]
ExecStart=/usr/sbin/mdm --nodaemon
ExecReload=/usr/sbin/mdm-restart
ExecStop=/usr/sbin/mdm-stop
StandardOutput=syslog
Restart=always
RestartSec=1s
TimeoutStopSec=5s
IgnoreSIGPIPE=no

[Install]
Alias=display-manager.service

this is a generic, I have another different for plymouth

[Unit]
Description=LightDM Display Manager
Documentation=man:mdm(1)
Conflicts=getty@tty1.service
After=systemd-user-sessions.service getty@tty1

Conflicts=plymouth-quit.service
After=plymouth-quit.service

[Service]
ExecStart=/usr/sbin/mdm --nodaemon
ExecReload=/usr/sbin/mdm-restart
ExecStop=/usr/sbin/mdm-stop
Restart=always
RestartSec=1s
TimeoutStopSec=5s
StandardOutput=syslog

[Install]
WantedBy=graphical.target
Alias=display-manager.service

the line confict=getty@tty1.service is a workaround for a infinite mdm-restart that happend every 1 minute if tty1 is runing

yes, alongside we add custom pan rules that thank to this the hibernate and suspend work, I not thi using stock powermanager (I use powerdown script) but probably unlickeli to work for the logind lack

pam rules:

#%PAM-1.0
auth            requisite       pam_nologin.so
auth            required        pam_env.so
auth            required        pam_unix.so
-auth       optional    pam_gnome_keyring.so
account         required        pam_unix.so
session         required        pam_limits.so
session         required        pam_unix.so
password        required        pam_unix.so

-session    required        pam_loginuid.so
-session        optional        pam_systemd.so
-session    optional    pam_gnome_keyring.so auto_start

I think that this can help you if you want add systemd

@dmashal

very nice

@glebihan
Linux Mint member

@jristz : Integration with the init system is something that has to be done by each distro maintainer (too many differences from one distro to another for this to be handled upstream).
The debian packaging is included in mdm's source tree, but integration with upstart is still part of the debian packaging and not of the actual upstream tree.
In the same way, integration with systemd would have to be done by the arch maintainer (don't know if there's one at the moment ?).

@glebihan glebihan closed this Mar 5, 2013
@dmashal

Why was this closed? @clefebvre and I have been talking about this for a while. Upstart is far from becoming a standard, and debian is going systemd. The fact of the matter is mdm should support as many as possible.

@clefebvre clefebvre reopened this Mar 5, 2013
@clefebvre
Linux Mint member

Hi, let's chat about it when we get a chance. I was in favor of adding systemd support in MDM itself as long as it doesn't interfere with non-systemd distros. Glebihan might have some valid concerns though so we'll need to discuss this together.

Re-opening it for now and waiting until we get an opportunity to chat.

@stefano-k
Linux Mint member

It is possible to add optional systemd support, keeping compatibility with consolekit.
http://www.freedesktop.org/wiki/Software/systemd/writing-display-managers

@jristz

or making at build time select if --whit-kit=consolekit or logind (systemd)
at option at build time make the option for the builder to select
whitch support, but tis prevent for use multiple kit (consolekit or logind) in boot

for other part selectin at runtime like an option or autodetection is best for those cases
and @dmashal Debian now have systemd in sid: http://packages.debian.org/sid/systemd but yes a REALLY old version and remmber that udev fuse the project againt systemd around 184 or a little more high version as far I remmmeber

@glebihan
Linux Mint member

Sorry everyone for closing this is a bit too quickly. I didn't know there had been discussions about that already.
I still think this shouldn't be implemented upstream (for the reasons I mentioned above), but it's fine with me if it is.

@jristz

@glebihan you confused init with logind, here the only think that is needed is support for logind (and provide a mdm.service by you) and no more, because is already ready the mdm for all other tasks
you say:mdm. service by we? yes systemd encourage use ONLY the services provided by upstream and NO make modification to these unles these modification fix bugs

in resumé: mdm only need logind and a .service (plain text archive) and no more

@dmashal

@jristz @stefano-k @clefebvre I've been talking about this for a while and I will test this on Fedora rawhide with a minimal install.

@jristz Do you use IRC?

@jristz

@dmashal Remmeber first remove the Conflicts=getty@tty1.service and the getty@tty1.service in the After=
I cannot figure Why but if I not add this on Arch mdm re-start ever 1 min
For the first test

IRC I have and acount but actually I not use much frequent,anyway...any chanel in speciffic??

@dmashal

#mate freenode

@dmashal

@jristz can you fork mdm and commit this to your repo? I am testing it now, if it's good you should submit a pull request.

@clefebvre
Linux Mint member

Hi there, just a follow up after glebihan and I talked about this. We're ok with adding support for systemd/logind in MDM itself. I might need some time to test stuff and make sure everything is fine but this is likely to go in.

@jristz

www.phoronix.com/scan.php?page=news_item&px=MTMyMDE

partialy related, because Mint is based on Ubuntu, and Logind is part of Systemd
Is for now a simple proposal but this add a little (maibe minial) priority to logind support

@tarakbumba

Any news on this front? I can see mdm doesn't get systemd support yet. It would be nice using mdm on a systemd enabled system, like my Mageia install.

@jristz

cince now Ubuntu will use systemD, you will reconcider and add complete systemd support for mdm?
I want know the actual state of this issue

@clefebvre
Linux Mint member

Hi,

Although nothing was done since we last spoke, this is indeed something that needs to be done. Don't hesitate to turn this into a pull request. I'm working on locale and session support at the moment, but I'm planning to look into this prior to Mint 17 (May 2014).

@clefebvre clefebvre closed this Oct 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment