LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 12-05-2019, 02:20 PM   #1
bionor
Member
 
Registered: Dec 2019
Posts: 44

Rep: Reputation: 1
No available TTYs when logged in to GNOME session (LFS v9 SysV)


I've been trying to figure out why I have no functioning TTYs as soon as I log into the GUI. GDM starts in tty7 and gnome-session in tty2, which is as I understand it how GNOME works now, which is fine I suppose, although I would prefer it if it only used one TTY. My main issue though is that I only get a black screen with a blinking dot in the upper left corner for all the other TTYs.

I can issue something like this:
Code:
/sbin/agetty -8 38400 tty3 linux
And then I do get a functioning TTY3, but I would like all of them to be available without doing anything and would prefer it not to be an ugly hack as in adding the aggety to something like ~/.bashrc (if that would even work because when I issue the command the terminal is busy until I log out of the TTY).

My /etc/inittab is as per the book and looks like this:
Code:
# Begin /etc/inittab

id:5:initdefault:

si::sysinit:/etc/rc.d/init.d/rc S

l0:0:wait:/etc/rc.d/init.d/rc 0
l1:S1:wait:/etc/rc.d/init.d/rc 1
l2:2:wait:/etc/rc.d/init.d/rc 2
l3:3:wait:/etc/rc.d/init.d/rc 3
l4:4:wait:/etc/rc.d/init.d/rc 4
l5:5:wait:/etc/rc.d/init.d/rc 5
l6:6:wait:/etc/rc.d/init.d/rc 6

ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

su:S016:once:/sbin/sulogin

1:2345:respawn:/sbin/agetty --noclear tty1 9600
2:2345:respawn:/sbin/agetty tty2 9600
3:2345:respawn:/sbin/agetty tty3 9600
4:2345:respawn:/sbin/agetty tty4 9600
5:2345:respawn:/sbin/agetty tty5 9600
6:2345:respawn:/sbin/agetty tty6 9600

# End /etc/inittab
Shouldn't that mean I should have tty1 through tty6 available, except for those already taken by GDM and GNOME?

Last edited by bionor; 12-05-2019 at 02:23 PM.
 
Old 12-06-2019, 12:07 AM   #2
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
How are you getting to the tty's? Are you trying to alt-f# out of the desktop? If that's the case, check the logs and see what's killing them. Seeing as systemd likes to reap ttys when a display manager is launched, I suspect that it is likely to be elogind.
 
Old 12-06-2019, 04:00 AM   #3
bionor
Member
 
Registered: Dec 2019
Posts: 44

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Luridis View Post
How are you getting to the tty's? Are you trying to alt-f# out of the desktop? If that's the case, check the logs and see what's killing them. Seeing as systemd likes to reap ttys when a display manager is launched, I suspect that it is likely to be elogind.
Yes, I'm using the alt-f# method and yes I'm inclined to believe that elogind might be a possible suspect here as well. The whole linux-pam-dbus-elogind complex has me slightly confused. I checked the logs now, nothing obviously stands out, except for an I/O error, but not sure whether that's relevant for this particular issue. Here's /var/log/sys.log | grep elogind after a reboot, login and then creating a tty with "sudo agetty tty3":
Code:
Dec  6 10:51:00 bioLinux kernel: <37>[50676.158923] elogind-daemon[692]: System is rebooting..
Dec  6 10:51:00 bioLinux kernel: <38>[50676.186340] elogind-daemon[692]: Removed session 4.
Dec  6 10:51:00 bioLinux kernel: <36>[50676.244189] elogind-daemon[692]: Failed to restore VT, ignoring: Input/output error
Dec  6 10:51:00 bioLinux kernel: <36>[50676.741197] elogind-daemon[692]: Received signal 15 [TERM]
Dec  6 10:51:23 bioLinux kernel: <38>[    3.938367] elogind-daemon[684]: New seat seat0.
Dec  6 10:51:23 bioLinux kernel: <38>[    3.956607] elogind-daemon[684]: Watching system buttons on /dev/input/event1 (Power Button)
Dec  6 10:51:23 bioLinux kernel: <38>[    3.958678] elogind-daemon[684]: Watching system buttons on /dev/input/event0 (Lid Switch)
Dec  6 10:51:23 bioLinux kernel: <38>[    3.960526] elogind-daemon[684]: Watching system buttons on /dev/input/event2 (Sleep Button)
Dec  6 10:51:23 bioLinux kernel: <38>[    4.027822] elogind-daemon[684]: Watching system buttons on /dev/input/event4 (AT Translated Set 2 keyboard)
Dec  6 10:51:23 bioLinux kernel: <38>[    4.305100] elogind-daemon[684]: New session c1 of user gdm.
Dec  6 10:51:25 bioLinux kernel: <38>[    6.095666] elogind-daemon[684]: Sleep mode "suspend" is disabled by configuration.
Dec  6 10:51:34 bioLinux kernel: <38>[   14.437400] elogind-daemon[684]: New session 1 of user bio.
Dec  6 10:51:35 bioLinux kernel: <38>[   15.892548] elogind-daemon[684]: Sleep mode "suspend" is disabled by configuration.
Dec  6 10:51:44 bioLinux kernel: <38>[   25.011598] elogind-daemon[684]: Removed session c1.
EDIT: Looking at the time in the log, it seems that the last entry is when I log in through GDM. Is this expected behavior, or a possible hint of what my issue is?

Last edited by bionor; 12-06-2019 at 04:38 AM.
 
Old 12-06-2019, 11:07 AM   #4
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
I would start by disabling gdm and booting into the shell. Then create an .xinitrc that exec's your gnome-session and see if you can alt-F# there. If so, you know that this is related to the display manager. Personally, I've never really tried to do this with a display manager installed.
 
Old 12-06-2019, 12:27 PM   #5
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
FYI
with Gnome, f3 > f6 all switch and give algin prompt

f1 gdm
f2 desktop
f7 blinking cursor
 
Old 12-06-2019, 02:10 PM   #6
bionor
Member
 
Registered: Dec 2019
Posts: 44

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Luridis View Post
I would start by disabling gdm and booting into the shell. Then create an .xinitrc that exec's your gnome-session and see if you can alt-F# there. If so, you know that this is related to the display manager. Personally, I've never really tried to do this with a display manager installed.
Yes, of course, very clever Should have thought of that, elimination method... I'll do that once I get back from work.

Quote:
Originally Posted by spiky0011 View Post
FYI
with Gnome, f3 > f6 all switch and give algin prompt

f1 gdm
f2 desktop
f7 blinking cursor
Yes, except I've configured GDM to start from 7 to save a slot.

I'll post the result of the testing soon

Last edited by bionor; 12-06-2019 at 02:12 PM.
 
Old 12-06-2019, 04:16 PM   #7
bionor
Member
 
Registered: Dec 2019
Posts: 44

Original Poster
Rep: Reputation: 1
All the TTYs are there when booting directly into shell and starting GUI with "startx". So that means something related to GDM is killing it. At least we have some more information now.
 
Old 12-07-2019, 06:11 AM   #8
bionor
Member
 
Registered: Dec 2019
Posts: 44

Original Poster
Rep: Reputation: 1
So I tried with lightdm instead of GDM and it did not kill the TTYs, so it's definitely something that GDM does that kills it. At least now I have a functioning workaround, but I'd prefer to use GDM if possible.
 
Old 12-07-2019, 11:33 AM   #9
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
GDM is tighly integrated with systemd | elogind. I still think it is worth a look there.
 
Old 12-07-2019, 04:17 PM   #10
bionor
Member
 
Registered: Dec 2019
Posts: 44

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Luridis View Post
GDM is tighly integrated with systemd | elogind. I still think it is worth a look there.
Yes, I think so too. I got another clue today, which may or may not be related, but I think so. When logged on through GDM "sudo nautilus" won't work until I enter "xhost +SI:localuser:root", but when logged on through lightdm that issue isn't there. I don't know much about elogind or dbus or any of that stuff, but might this be a clue to a common cause? As far as I'm aware, everything in that department is done as per the book, but still something is probably off there.

EDIT: There's one thing I actually haven't done as the book says and that is the part in this section that says:
Quote:
Note that this boot script only starts the system-wide D-Bus daemon. Each user requiring access to D-Bus services will also need to run a session daemon as well.
That's because it suggests that the dbus session be started with the xinitrc file, which I'm not sure whether is executed when running gnome with wayland or not. Manually running dbus-launch in a terminal didn't seem to affect the "sudo nautilus" issue anyway.

Last edited by bionor; 12-07-2019 at 04:24 PM.
 
Old 12-07-2019, 05:02 PM   #11
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
What happens if you start a non wayland Gnome?
gnome on xorg
 
Old 12-07-2019, 05:48 PM   #12
bionor
Member
 
Registered: Dec 2019
Posts: 44

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by spiky0011 View Post
What happens if you start a non wayland Gnome?
gnome on xorg
When using gnome on xorg through gdm the "sudo nautilus" issue is gone, but the tty issue is still there. This is confusing me. With lightdm I can do" sudo nautilus" just fine with wayland, but not with gdm.

Last edited by bionor; 12-07-2019 at 05:53 PM.
 
Old 12-08-2019, 12:08 AM   #13
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi
As you have mentioned "xhost +SI:localuser:root" that is a Wayland problem,and you will need that I have it in .bashrc of user. So I can run a root terminal.

You say you set GDM to start tty7 unset that and leave it as standard

When you use lxdm is it launching Wayland?
Code:
echo $XDG_SESSION_TYPE

Last edited by spiky0011; 12-08-2019 at 12:27 AM.
 
Old 12-08-2019, 04:19 AM   #14
bionor
Member
 
Registered: Dec 2019
Posts: 44

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by spiky0011 View Post
Hi
As you have mentioned "xhost +SI:localuser:root" that is a Wayland problem,and you will need that I have it in .bashrc of user. So I can run a root terminal.
Yes, done that But didn't know it was a wayland thing, thanks!

Quote:
Originally Posted by spiky0011 View Post
You say you set GDM to start tty7 unset that and leave it as standard

When you use lxdm is it launching Wayland?
Code:
echo $XDG_SESSION_TYPE
Initially gdm did start up with the default settings, I changed it partly to see if affected this issue. Do you mean lightdm? I don't have lxdm installed, but yes lightdm gives me the choice same as gdm.
 
Old 12-08-2019, 11:12 AM   #15
bionor
Member
 
Registered: Dec 2019
Posts: 44

Original Poster
Rep: Reputation: 1
Actually although lightdm does give the option to choose between wayland or xorg, running "echo $XDG_SESSION_TYPE" reveals it's always running on X. Seems we've narrowed the issue down a bit further.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to launch "cinnamon-session-cinnamon" X session "cinnamon-session-cinnamon" -found; Falling back to default "session." xxxindigo Linux Mint 22 09-01-2019 09:21 AM
[SOLVED] Is there an easy way to convert sysV to systemd scripts? Or add dependencies to a sysV script? irey Linux - Software 2 10-19-2016 06:51 AM
Session key renegotiation if session lasts longer than configured (e.g. an hour) then session keys needs to be renegotiated. dakshinya Linux - Newbie 1 02-04-2016 04:15 PM
LFS with Runit (without SysV) ReaperX7 Linux From Scratch 119 07-10-2014 03:15 PM
mozilla works fine when logged in as a user but crashes when logged in as root jimi Linux - General 6 04-02-2003 08:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 10:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration