You are not logged in.

#1 2016-08-23 08:51:50

physkets
Member
From: India
Registered: 2016-08-22
Posts: 52

How to safely 'systemctl stop gdm.service' ?

I just moved on to Arch Linux the other day, and am enjoying the flexibility and control.

I decided to use Gnome as my DE and GDM as its DM. I do not want to `systemctl enable gdm.service` because I do not always need it. So, when I do, I just: `start gdm.service`. But now, when I need to `stop gdm.service`, not all the processes that started after starting the service are killed, and gnome freezes.

Also, there is this post about similar issues: https://bbs.archlinux.org/viewtopic.php?id=205709

So does anyone know of a safe way for me to revert to the pre-start state, other than a system reboot?

Thanks!

Offline

#2 2016-08-23 10:55:54

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,651

Re: How to safely 'systemctl stop gdm.service' ?

Try

systemctl isolate multi-user.target

"Legally", you should rather not invoke the gdm service, but enable it, make the multiuser target the default and conditionally "systemctl isolate graphical.target" (this is like telinit used to be)

See https://wiki.archlinux.org/index.php/Sy … ent_target on details.

Offline

#3 2016-08-23 11:35:48

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: How to safely 'systemctl stop gdm.service' ?

Log out before you kill the DM.

Offline

#4 2016-08-23 11:58:59

edacval
Member
From: .LT
Registered: 2008-10-23
Posts: 98

Re: How to safely 'systemctl stop gdm.service' ?

You can add (or uncomment) in /etc/systemd/logind.conf

KillUserProcesses=yes

Offline

#5 2016-08-23 16:28:27

physkets
Member
From: India
Registered: 2016-08-22
Posts: 52

Re: How to safely 'systemctl stop gdm.service' ?

@Seth  This looks like it is exactly what I want. But why do you say that it is not quite right for me to 'start' gdm.service?

I haven't yet tried this on my Arch machine, but I did on my Manjaro laptop. Heres what I saw:

  -  `isolate multi-user.target` removed all the DE and DM  (Xfce and LightDM)
  -  Power consumption jumped up from 13W to 23W  (probably due to optimus - nvidia discreet graphics)
  -  `isolate graphical.target` brought back DM, but couldn't login
  -  systemctl says STATE=degraded, and that plymouth seems to have failed to start.

I will try it tomorrow on my Arch machine and post.

@Awebb, I always do smile

@edacval, Do you think I should add that even if I follow both Seth's and Awebb's suggestions ?

Last edited by physkets (2016-08-23 16:29:30)

Offline

#6 2016-08-23 16:49:50

edacval
Member
From: .LT
Registered: 2008-10-23
Posts: 98

Re: How to safely 'systemctl stop gdm.service' ?

@edacval, Do you think I should add that even if I follow both Seth's and Awebb's suggestions ?

This is quickest way to return to pre-logon state, just log out and all processes in your old session will be killed

Offline

#7 2016-08-23 19:28:18

physkets
Member
From: India
Registered: 2016-08-22
Posts: 52

Re: How to safely 'systemctl stop gdm.service' ?

edacval wrote:

This is quickest way to return to pre-logon state, just log out and all processes in your old session will be killed

But I want to get to a pre-gdm state. i.e., runlevel 3, and be able to go back without a reboot.

Offline

#8 2016-08-23 21:35:06

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: How to safely 'systemctl stop gdm.service' ?

There are no runlevels in systemd. You might want to google for "systemd runlevel", "systemd session" and "systemd seat".

EDIT:

@Awebb, I always do smile

How can Gnome freeze, if you have been logged out of Gnome?

Last edited by Awebb (2016-08-23 21:37:06)

Offline

#9 2016-08-24 04:40:43

physkets
Member
From: India
Registered: 2016-08-22
Posts: 52

Re: How to safely 'systemctl stop gdm.service' ?

@Seth  It did not work. I set default to multi-user, enabled gdm.service and rebooted. Then:

  -  `isolate graphical` -> started gdm; I couldn't login at first, but when I tried again, I could.
  -  `isolate multi-user` -> no gdm anymore, but htop still shows a process.
  -  `isolate graphical` -> gdm doesn't start.

The following is the output of `systemctl status gdm.service` after steps 2 and 3:
https://gist.github.com/physkets/cdd9a7 … bceeeaf025

Offline

#10 2016-09-04 12:22:49

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,651

Re: How to safely 'systemctl stop gdm.service' ?

Sorry,  I don't get mails for forum entries ;-)

Seems a particular gdm issue.
https://bugzilla.redhat.com/show_bug.cgi?id=1330518

Try using the xorg backend (in case wayland is used) - or use another DM.
https://wiki.archlinux.org/index.php/GD … leshooting

Offline

#11 2016-09-05 14:33:39

physkets
Member
From: India
Registered: 2016-08-22
Posts: 52

Re: How to safely 'systemctl stop gdm.service' ?

seth wrote:

Sorry,  I don't get mails for forum entries ;-)

Seems a particular gdm issue.
https://bugzilla.redhat.com/show_bug.cgi?id=1330518

Try using the xorg backend (in case wayland is used) - or use another DM.
https://wiki.archlinux.org/index.php/GD … leshooting

Ah! I see...  Well, then for now, I will reboot the machine whenever I need to be gdm free, and start it with `systemctl start`.

Offline

Board footer

Powered by FluxBB