You are not logged in.

#1 2012-09-30 12:50:41

mrzeznicki
Member
From: Cracow, Poland
Registered: 2012-06-02
Posts: 31

[SOLVED] systemd - login on VTs

Hi
This is probably pretty lame question, but anyway. I use systemd and it boots into graphical.target, starting X and KDE, which is what I want. Also, judging from /etc/systemd/logind.conf it allocates 6 VTs

cat /etc/systemd/logind.conf 
...
[Login]
#NAutoVTs=6
#ReserveVT=6
....

so my X session is on tty7, that is ok. Now, I heard that it spawns gettys "on-demand" whenever you switch to another TTY, so when I do Ctrl+Alt+f1 it is supposed to spawn getty.service on the first VT. Here is my getty@tty1.service (I changed it a little from the default getty@.service so it is not a symlink)

cat /etc/systemd/system/getty.target.wants/getty@tty1.service 
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Getty on %I
Documentation=man:agetty(8)
After=systemd-user-sessions.service plymouth-quit-wait.service
After=rc-local.service

# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes

# On systems without virtual consoles, don't start any getty. (Note
# that serial gettys are covered by serial-getty@.service, not this
# unit
ConditionPathExists=/dev/tty0

[Service]
Environment=TERM=linux
# the VT is cleared by TTYVTDisallocate
ExecStart=-/sbin/agetty --noclear %I 38400
Type=idle
Restart=always
RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=no
TTYVHangup=no
TTYVTDisallocate=no
KillMode=process
IgnoreSIGPIPE=no

# Unset locale for the console getty since the console has problems
# displaying some internationalized messages.
Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=

# Some login implementations ignore SIGTERM, so we send SIGHUP
# instead, to ensure that login terminates cleanly.
KillSignal=SIGHUP

[Install]
Alias=getty.target.wants/getty@tty1.service

Now, all this is fine, but why I cannot see login propmt? I just see "Welcome to GRUB" and that's all, no way to type in anything. I'd like to have a login program there if possible.

Last edited by mrzeznicki (2012-10-15 09:35:13)

Offline

#2 2012-09-30 14:27:45

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [SOLVED] systemd - login on VTs

Why did you feel that you needed to change anything?  I think that it spawns on-demand, so w/ the defaults, they will appear when you switch to one for the first time.  This will look no different to you, the user, but if you don't switch to one, it will simply be waiting instead of constantly running an unnecessary getty.

Offline

#3 2012-09-30 14:35:59

mrzeznicki
Member
From: Cracow, Poland
Registered: 2012-06-02
Posts: 31

Re: [SOLVED] systemd - login on VTs

WonderWoofy wrote:

Why did you feel that you needed to change anything?

Well, mostly because of the effect described above. After switching I did not get login prompt, just "Welcome to GRUB!", so I figured that sth had to be wrong with those settings. Actually it didn't help anything.

Offline

#4 2012-09-30 14:36:50

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [SOLVED] systemd - login on VTs

Aaahhh, I read that as, I changed this stuff and now I got no login.  Sorry for the misunderstanding.


Edit:  Maybe  bit more info about your system?  I have an Intel HD4000, but I vaguely remember reading somewhere that the propritary nvidia (maybe ATI) drivers had issues w/ tty's and graphical simutaneously.  I can't be certain, since I don't use, but in any case, knowing what your machine is may help.

Last edited by WonderWoofy (2012-09-30 14:38:35)

Offline

#5 2012-09-30 14:46:56

mrzeznicki
Member
From: Cracow, Poland
Registered: 2012-06-02
Posts: 31

Re: [SOLVED] systemd - login on VTs

WonderWoofy wrote:

Maybe  bit more info about your system?  I have an Intel HD4000, but I vaguely remember reading somewhere that the propritary nvidia (maybe ATI) drivers had issues w/ tty's and graphical simutaneously.  I can't be certain, since I don't use, but in any case, knowing what your machine is may help.

It shouldn't be the case - my arch runs on the top of vmware, so it uses vmware's drivers for graphics and what not. I don't know if this is helpful but  agetty seems to be starting with no problems:

$ systemctl status getty@tty1.service 
getty@tty1.service - Getty on tty1
          Loaded: loaded (/etc/systemd/system/getty.target.wants/getty@tty1.service)
          Active: active (running) since Sun, 30 Sep 2012 16:23:47 +0200; 22min ago
            Docs: man:agetty(8)
        Main PID: 414 (agetty)
          CGroup: name=systemd:/system/getty@.service/tty1
                  └ 414 /sbin/agetty --noclear tty1 38400

Sep 30 16:23:47 arch systemd[1]: Starting Getty on tty1...
Sep 30 16:23:47 arch systemd[1]: Started Getty on tty1.

Offline

#6 2012-09-30 15:14:13

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,688
Website

Re: [SOLVED] systemd - login on VTs

Have you tried other ttys (3-6)?

I ask because you assume that X is running on tty7, that is most likely not true.  I do not use a graphical target, I log in to tty1 and launch X from there, then X runs on tty2.  I can get free tty's on tty3-tt6.

I've never used the graphical target, but I suspect it also launches X on the first available tty.  If tty1 is similarly used to launch X and it runs on tty2, then you'd only have ttys on 3-6.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Online

#7 2012-09-30 15:31:15

mrzeznicki
Member
From: Cracow, Poland
Registered: 2012-06-02
Posts: 31

Re: [SOLVED] systemd - login on VTs

Trilby wrote:

Have you tried other ttys (3-6)?

I ask because you assume that X is running on tty7, that is most likely not true.  I do not use a graphical target, I log in to tty1 and launch X from there, then X runs on tty2.  I can get free tty's on tty3-tt6.

I've never used the graphical target, but I suspect it also launches X on the first available tty.  If tty1 is similarly used to launch X and it runs on tty2, then you'd only have ttys on 3-6.

Yes, I have. It is the same. I assume that X is running on tty7 because ctr+alt+f7 brings me to a X session. Nevertheless, every non-graphical session gives me the same result. Blank screen with Welcome to GRUB!. I am certain that systemd actually spawns those darn gettys because, having switched to tty3:

$ systemctl status getty@tty3.service 
getty@tty3.service - Getty on tty3
          Loaded: loaded (/etc/systemd/system/getty.target.wants/getty@tty3.service)
          Active: active (running) since Sun, 30 Sep 2012 17:25:17 +0200; 3s ago
            Docs: man:agetty(8)
        Main PID: 2443 (agetty)
          CGroup: name=systemd:/system/getty@.service/tty3
                  └ 2443 /sbin/agetty --noclear tty3 38400

Are you able to login on non-X VTs without problem and out-of-the-box?

Offline

#8 2012-09-30 15:33:15

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,688
Website

Re: [SOLVED] systemd - login on VTs

mrzeznicki wrote:

Are you able to login on non-X VTs without problem and out-of-the-box?

Yes, but I have never used the graphical.target. (Though I just found the damn thing is running, along with bluetooth+cryptsetup.target no matter how many times I disable them.)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Online

#9 2012-09-30 16:14:00

mrzeznicki
Member
From: Cracow, Poland
Registered: 2012-06-02
Posts: 31

Re: [SOLVED] systemd - login on VTs

Trilby wrote:

Yes, but I have never used the graphical.target.

Well, there isn't anything special in graphical.target. It is basically just multi-user.target that additionally requires display-manager.service (which is aliased by kdm.service on my machine). I am confused roll

Offline

#10 2012-10-01 19:57:00

mrzeznicki
Member
From: Cracow, Poland
Registered: 2012-06-02
Posts: 31

Re: [SOLVED] systemd - login on VTs

Well, ok, good news :-) It turns out that all the time I have been able to login on any non-X VT smile It is just that I cannot see any input or output, when I blindly typed in an username and password it logged me in:

$ systemctl status getty@tty3.service 
getty@tty3.service - Getty on tty3
          Loaded: loaded (/etc/systemd/system/getty.target.wants/getty@tty3.service)
          Active: active (running) since Mon, 01 Oct 2012 23:02:27 +0200
            Docs: man:agetty(8)
        Main PID: 412 (login)
          CGroup: name=systemd:/system/getty@.service/tty3
                  ‣ 412 login -- rzeznik

Oct 01 23:02:27 arch systemd[1]: Starting Getty on tty3...
Oct 01 23:02:27 arch systemd[1]: Started Getty on tty3.
Oct 01 21:49:06 arch login[412]: pam_unix(login:session): session opened for user rzeznik by LOGIN(uid=0)
[2154][root@arch:]$ who
rzeznik  tty3         2012-10-01 21:49
rzeznik  :0           2012-10-01 21:05
rzeznik  pts/0        2012-10-01 21:05 (:0)

Is this issue easier to solve? smile

Last edited by mrzeznicki (2012-10-01 19:57:21)

Offline

#11 2012-10-11 07:41:44

madx
Member
Registered: 2012-10-11
Posts: 10

Re: [SOLVED] systemd - login on VTs

Hi,

I have the exact same problem.

I'm using Arch on a MacBook Pro 5,5 with the proprietary nvidia driver. I have no output when I switch to a console, but I can login the same way you did though:

~ $ systemctl status getty@tty1.service
getty@tty1.service - Getty on tty1
	  Loaded: loaded (/usr/lib/systemd/system/getty@.service; enabled)
	  Active: active (running) since Thu, 11 Oct 2012 09:29:10 +0200; 9min ago
	    Docs: man:agetty(8)
	Main PID: 341 (agetty)
	  CGroup: name=systemd:/system/getty@.service/tty1
		  └ 341 /sbin/agetty --noclear tty1 38400

~ $ who
madx     tty1         2012-10-11 09:38
madx     tty7         2012-10-11 09:30 (:0)

I'm trying to investigate on this issue since it is very inconvenient if your X session crashes

Offline

#12 2012-10-11 09:03:47

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: [SOLVED] systemd - login on VTs

To clear up some confusion from the first post: getty is always started on TTY1, the others are started on-demand.  The "on-demand" gettys are launched by instantiating autovt@.service, which by default is a symlink to getty@.service, but this can be changed.

Offline

#13 2012-10-15 09:27:01

mrzeznicki
Member
From: Cracow, Poland
Registered: 2012-06-02
Posts: 31

Re: [SOLVED] systemd - login on VTs

Hi,
Thanks to all that answered, problem solved itself automagically. Now, out of sudden, it works. If you ask me, this is result of either setting in kernel config CONFIG_DRM_VMWGFX_FBCON=y (happened recently), that

Enable framebuffer console under vmwgfx

, or updating vmware drivers while installing mesa9/xorg-server13. This way or that, now it works perfectly.

Offline

Board footer

Powered by FluxBB