Description of problem: Curmudgeon recently tried to restart a Mageia system using the time-honored REISUB method (aka Magic SysRq keys). Curmudgeon discovered that both Alt-SysReq-E and Alt-SysReq-I don't do what I've come to expect them to over many years of Linux use, that is, send TERM and KILL signals, respectively. Rather, they both seem to restart the DM (complete with auto-login, if it's turned on), which would seem exactly counter to what these commands are traditionally supposed to do (that is, stop processes, not spawn/respawn them). Version-Release number of selected component (if applicable): systemd 44-13.mga2 How reproducible: There really is a loop (bug) and the X (DM) is restarting every time I press Alt-SysReq-I Steps to Reproduce: 1. Repeatedly press Alt-SysReq-I in Mageia 2 2. 3.
does it work with echo e (or i) > /proc/sysrq-trigger ?
ah yes and "cat /proc/sys/kernel/sysrq" show what ?
# echo e > /proc/sysrq-trigger and # echo i > /proc/sysrq-trigger the X (DM) is restarting too. If you make 10 times, restarts the X (DM) 10 times. $ cat /proc/sys/kernel/sysrq 1 I think it do not is the keyboard, and yes as systemd handles requests from the shortcut: 'e' - Send a SIGTERM to all processes, except for init. 'i' - Send a SIGKILL to all processes, except for init.
Before Mageia 2 with systemd always worked as described in http://www.kernel.org/doc/Documentation/sysrq.txt
Take a look at this comment: https://bugzilla.redhat.com/show_bug.cgi?id=752593#c33
This is expected behaviour. The DM is meant to restart after the binary dies. Just typing killall X (or perhaps the containing DM) would exhibit the same behaviour - i.e. it is nothing to do with the sysreq keys. If you don't like this behaviour simply copy the prefdm.service systemd unit to /etc/systemd/system/, edit it accordingly to disable the restart and run "systemctl enable --force prefdm.service"
Status: NEW => RESOLVEDCC: (none) => mageiaResolution: (none) => INVALID
CC: (none) => olavSummary: REISUB broken with SystemD in Mageia 2 => Alt-SysRq-R,E,I,S,U,B broken with systemd in Mageia 2
How sysvinit has another behavior I imagined bug. I'll test and comment on the result to prevent this loop.
I did as told and did not work: # systemctl enable --force prefdm.service Warning: unit files do not carry install information. No operation executed.
Oh right, yeah it doesn't include install info and is just enabled statically, so just add the following to the unit file: [Install] WantedBy=graphical.target And then rerun the enable command.
Actually, make that: [Install] Alias=display-manager.service WantedBy=graphical.target (the prefdm.service is a bit quirky install wise, but it's being phased out so it'll be easier to customise in mga3)
I tested it and now everything worked as expected. Thank you!
No problem. Note that if you have the same system when you upgrade to Mageia 3 then you will likely have to tidy this up (which would just be a matter of a (systemctl disable prefdm.service and the an rm of the copied unit itself). This is because we'll likely move away from this massively ugly wrapper around the various DMs and let each have their own separate unit (e.g. gdm.service, kdm.service etc). On the flip side, this should then make your preferred DM easier to fiddle with in the future :)