Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [Solved] limited ttys (Read 550 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

[Solved] limited ttys

Hello,

Today I have noticed a weird behavior , maybe caused by recent upgrade.When I try to switch to another TTY  I cannot swicth over
TTY3. XFCE session is running on TTY3.

rc-update show -v shows>
Code: [Select]
agetty |      default                           
          agetty.tty1 |      default                          
          agetty.tty2 |      default                          
          agetty.tty3 |      default                          
          agetty.tty4 |      default                          
          agetty.tty5 |      default                          
          agetty.tty6 |      default

It started just recently and I have no idea whats wrong. Maybe it is related with my previous post about a line which is displayed when I boot
Code: [Select]
/init: line 5: tmpfiles: not found 

I humbly ask for help, this has never happened before.
I was thinking that I reinstall openrc, but before i would like to hear a advice from experts.

Thank you for any suggestions.

Re: limited ttys

Reply #1
So in logs I have found following lines, if I understand well I have to create a symbolic links and add those to runlevels, but as you can see in first post, they are already added to runlevels at boot.
Code: [Select]

cat LOG.txt | grep  "agetty*"
Sep 16 19:01:00 deepwater supervise-daemon[2234]: Supervisor command line: supervise-daemon agetty.tty1 --start --pidfile /run/agetty.tty1.pid --respawn-period 60 /sbin/agetty -- -J tty1 38400 linux
Sep 16 19:01:00 deepwater supervise-daemon[2236]: Child command line: /sbin/agetty -J tty1 38400 linux
Sep 16 19:01:00 deepwater supervise-daemon[2262]: Supervisor command line: supervise-daemon agetty.tty2 --start --pidfile /run/agetty.tty2.pid --respawn-period 60 /sbin/agetty -- tty2 38400 linux
Sep 16 19:01:00 deepwater supervise-daemon[2264]: Child command line: /sbin/agetty tty2 38400 linux
Sep 16 19:01:00 deepwater supervise-daemon[2290]: Supervisor command line: supervise-daemon agetty.tty3 --start --pidfile /run/agetty.tty3.pid --respawn-period 60 /sbin/agetty -- tty3 38400 linux
Sep 16 19:01:00 deepwater supervise-daemon[2292]: Child command line: /sbin/agetty tty3 38400 linux
Sep 16 19:01:00 deepwater supervise-daemon[2320]: Supervisor command line: supervise-daemon agetty.tty4 --start --pidfile /run/agetty.tty4.pid --respawn-period 60 /sbin/agetty -- tty4 38400 linux
Sep 16 19:01:00 deepwater supervise-daemon[2322]: Child command line: /sbin/agetty tty4 38400 linux
Sep 16 19:01:01 deepwater supervise-daemon[2348]: Supervisor command line: supervise-daemon agetty.tty5 --start --pidfile /run/agetty.tty5.pid --respawn-period 60 /sbin/agetty -- tty5 38400 linux
Sep 16 19:01:01 deepwater supervise-daemon[2350]: Child command line: /sbin/agetty tty5 38400 linux
Sep 16 19:01:01 deepwater supervise-daemon[2376]: Supervisor command line: supervise-daemon agetty.tty6 --start --pidfile /run/agetty.tty6.pid --respawn-period 60 /sbin/agetty -- tty6 38400 linux
Sep 16 19:01:01 deepwater supervise-daemon[2378]: Child command line: /sbin/agetty tty6 38400 linux
Sep 16 19:52:54 deepwater supervise-daemon[2377]: stopping /sbin/agetty, pid 2378
Sep 16 19:52:54 deepwater supervise-daemon[2349]: stopping /sbin/agetty, pid 2350
Sep 16 19:52:54 deepwater supervise-daemon[2321]: stopping /sbin/agetty, pid 2322
Sep 16 19:52:54 deepwater supervise-daemon[2291]: stopping /sbin/agetty, pid 2292
Sep 16 19:52:55 deepwater supervise-daemon[2263]: stopping /sbin/agetty, pid 2264
Sep 16 19:52:55 deepwater supervise-daemon[2235]: stopping /sbin/agetty, pid 2236
Sep 16 19:54:59 deepwater supervise-daemon[2227]: Supervisor command line: supervise-daemon agetty.tty1 --start --pidfile /run/agetty.tty1.pid --respawn-period 60 /sbin/agetty -- -J tty1 38400 linux
Sep 16 19:54:59 deepwater supervise-daemon[2229]: Child command line: /sbin/agetty -J tty1 38400 linux
Sep 16 19:54:59 deepwater supervise-daemon[2255]: Supervisor command line: supervise-daemon agetty.tty2 --start --pidfile /run/agetty.tty2.pid --respawn-period 60 /sbin/agetty -- tty2 38400 linux
Sep 16 19:54:59 deepwater supervise-daemon[2257]: Child command line: /sbin/agetty tty2 38400 linux
Sep 16 19:54:59 deepwater supervise-daemon[2289]: Supervisor command line: supervise-daemon agetty.tty3 --start --pidfile /run/agetty.tty3.pid --respawn-period 60 /sbin/agetty -- tty3 38400 linux
Sep 16 19:54:59 deepwater supervise-daemon[2291]: Child command line: /sbin/agetty tty3 38400 linux
Sep 16 19:54:59 deepwater supervise-daemon[2319]: Supervisor command line: supervise-daemon agetty.tty4 --start --pidfile /run/agetty.tty4.pid --respawn-period 60 /sbin/agetty -- tty4 38400 linux
Sep 16 19:54:59 deepwater supervise-daemon[2321]: Child command line: /sbin/agetty tty4 38400 linux
Sep 16 19:54:59 deepwater supervise-daemon[2347]: Supervisor command line: supervise-daemon agetty.tty5 --start --pidfile /run/agetty.tty5.pid --respawn-period 60 /sbin/agetty -- tty5 38400 linux
Sep 16 19:54:59 deepwater supervise-daemon[2349]: Child command line: /sbin/agetty tty5 38400 linux
Sep 16 19:54:59 deepwater supervise-daemon[2375]: Supervisor command line: supervise-daemon agetty.tty6 --start --pidfile /run/agetty.tty6.pid --respawn-period 60 /sbin/agetty -- tty6 38400 linux
Sep 16 19:54:59 deepwater supervise-daemon[2377]: Child command line: /sbin/agetty tty6 38400 linux
Sep 16 22:38:27 deepwater supervise-daemon[2376]: stopping /sbin/agetty, pid 2377
Sep 16 22:38:27 deepwater supervise-daemon[2348]: stopping /sbin/agetty, pid 2349
Sep 16 22:38:27 deepwater supervise-daemon[2320]: stopping /sbin/agetty, pid 2321
Sep 16 22:38:27 deepwater supervise-daemon[2290]: stopping /sbin/agetty, pid 2291
Sep 16 22:38:27 deepwater supervise-daemon[2256]: stopping /sbin/agetty, pid 2257
Sep 16 22:38:27 deepwater supervise-daemon[2228]: stopping /sbin/agetty, pid 2229
Sep 16 22:40:36 deepwater supervise-daemon[2242]: Supervisor command line: supervise-daemon agetty.tty1 --start --pidfile /run/agetty.tty1.pid --respawn-period 60 /sbin/agetty -- -J tty1 38400 linux
Sep 16 22:40:36 deepwater supervise-daemon[2244]: Child command line: /sbin/agetty -J tty1 38400 linux
Sep 16 22:40:36 deepwater supervise-daemon[2270]: Supervisor command line: supervise-daemon agetty.tty2 --start --pidfile /run/agetty.tty2.pid --respawn-period 60 /sbin/agetty -- tty2 38400 linux
Sep 16 22:40:36 deepwater supervise-daemon[2272]: Child command line: /sbin/agetty tty2 38400 linux
Sep 16 22:40:36 deepwater supervise-daemon[2298]: Supervisor command line: supervise-daemon agetty.tty3 --start --pidfile /run/agetty.tty3.pid --respawn-period 60 /sbin/agetty -- tty3 38400 linux
Sep 16 22:40:36 deepwater supervise-daemon[2300]: Child command line: /sbin/agetty tty3 38400 linux
Sep 16 22:40:36 deepwater supervise-daemon[2326]: Supervisor command line: supervise-daemon agetty.tty4 --start --pidfile /run/agetty.tty4.pid --respawn-period 60 /sbin/agetty -- tty4 38400 linux
Sep 16 22:40:36 deepwater supervise-daemon[2328]: Child command line: /sbin/agetty tty4 38400 linux
Sep 16 22:40:36 deepwater supervise-daemon[2356]: Supervisor command line: supervise-daemon agetty.tty5 --start --pidfile /run/agetty.tty5.pid --respawn-period 60 /sbin/agetty -- tty5 38400 linux
Sep 16 22:40:36 deepwater supervise-daemon[2358]: Child command line: /sbin/agetty tty5 38400 linux
Sep 16 22:40:36 deepwater supervise-daemon[2384]: Supervisor command line: supervise-daemon agetty.tty6 --start --pidfile /run/agetty.tty6.pid --respawn-period 60 /sbin/agetty -- tty6 38400 linux
Sep 16 22:40:36 deepwater supervise-daemon[2386]: Child command line: /sbin/agetty tty6 38400 linux
Sep 16 23:38:02 deepwater supervise-daemon[2385]: stopping /sbin/agetty, pid 2386
Sep 16 23:38:02 deepwater supervise-daemon[2357]: stopping /sbin/agetty, pid 2358
Sep 16 23:38:02 deepwater supervise-daemon[2327]: stopping /sbin/agetty, pid 2328
Sep 16 23:38:02 deepwater supervise-daemon[2299]: stopping /sbin/agetty, pid 2300
Sep 16 23:38:02 deepwater supervise-daemon[2271]: stopping /sbin/agetty, pid 2272
Sep 16 23:38:02 deepwater supervise-daemon[2243]: stopping /sbin/agetty, pid 2244
Sep 16 23:40:17 deepwater /etc/init.d/agetty[2251]: agetty cannot be started directly. You must create
Sep 16 23:40:17 deepwater /etc/init.d/agetty[2252]: symbolic links to it for the ports you want to start
Sep 16 23:40:17 deepwater /etc/init.d/agetty[2253]: agetty on and add those to the appropriate runlevels.
Sep 16 23:40:17 deepwater /etc/init.d/agetty[2225]: ERROR: agetty failed to start
Sep 16 23:40:17 deepwater supervise-daemon[2276]: Supervisor command line: supervise-daemon agetty.tty1 --start --pidfile /run/agetty.tty1.pid --respawn-period 60 /sbin/agetty -- -J tty1 38400 linux
Sep 16 23:40:17 deepwater supervise-daemon[2278]: Child command line: /sbin/agetty -J tty1 38400 linux
Sep 16 23:40:17 deepwater supervise-daemon[2304]: Supervisor command line: supervise-daemon agetty.tty2 --start --pidfile /run/agetty.tty2.pid --respawn-period 60 /sbin/agetty -- tty2 38400 linux
Sep 16 23:40:17 deepwater supervise-daemon[2306]: Child command line: /sbin/agetty tty2 38400 linux
Sep 16 23:40:17 deepwater supervise-daemon[2334]: Supervisor command line: supervise-daemon agetty.tty3 --start --pidfile /run/agetty.tty3.pid --respawn-period 60 /sbin/agetty -- tty3 38400 linux
Sep 16 23:40:17 deepwater supervise-daemon[2336]: Child command line: /sbin/agetty tty3 38400 linux
Sep 16 23:40:17 deepwater supervise-daemon[2362]: Supervisor command line: supervise-daemon agetty.tty4 --start --pidfile /run/agetty.tty4.pid --respawn-period 60 /sbin/agetty -- tty4 38400 linux
Sep 16 23:40:17 deepwater supervise-daemon[2364]: Child command line: /sbin/agetty tty4 38400 linux
Sep 16 23:40:17 deepwater supervise-daemon[2393]: Supervisor command line: supervise-daemon agetty.tty5 --start --pidfile /run/agetty.tty5.pid --respawn-period 60 /sbin/agetty -- tty5 38400 linux
Sep 16 23:40:17 deepwater supervise-daemon[2395]: Child command line: /sbin/agetty tty5 38400 linux
Sep 16 23:40:17 deepwater supervise-daemon[2422]: Supervisor command line: supervise-daemon agetty.tty6 --start --pidfile /run/agetty.tty6.pid --respawn-period 60 /sbin/agetty -- tty6 38400 linux
Sep 16 23:40:17 deepwater supervise-daemon[2424]: Child command line: /sbin/agetty tty6 38400 linux
Sep 16 23:44:42 deepwater supervise-daemon[2423]: stopping /sbin/agetty, pid 2424
Sep 16 23:44:43 deepwater supervise-daemon[2394]: stopping /sbin/agetty, pid 2395
Sep 16 23:44:43 deepwater supervise-daemon[2363]: stopping /sbin/agetty, pid 2364
Sep 16 23:44:43 deepwater supervise-daemon[2335]: stopping /sbin/agetty, pid 2336
Sep 16 23:44:43 deepwater supervise-daemon[2305]: stopping /sbin/agetty, pid 2306
Sep 16 23:44:43 deepwater supervise-daemon[2277]: stopping /sbin/agetty, pid 2278
Sep 16 23:47:20 deepwater /etc/init.d/agetty[2227]: agetty cannot be started directly. You must create
Sep 16 23:47:20 deepwater /etc/init.d/agetty[2228]: symbolic links to it for the ports you want to start
Sep 16 23:47:20 deepwater /etc/init.d/agetty[2229]: agetty on and add those to the appropriate runlevels.
Sep 16 23:47:20 deepwater /etc/init.d/agetty[2207]: ERROR: agetty failed to start
Sep 16 23:47:21 deepwater supervise-daemon[2252]: Supervisor command line: supervise-daemon agetty.tty1 --start --pidfile /run/agetty.tty1.pid --respawn-period 60 /sbin/agetty -- -J tty1 38400 linux
Sep 16 23:47:21 deepwater supervise-daemon[2254]: Child command line: /sbin/agetty -J tty1 38400 linux
Sep 16 23:47:21 deepwater supervise-daemon[2286]: Supervisor command line: supervise-daemon agetty.tty2 --start --pidfile /run/agetty.tty2.pid --respawn-period 60 /sbin/agetty -- tty2 38400 linux
Sep 16 23:47:21 deepwater supervise-daemon[2288]: Child command line: /sbin/agetty tty2 38400 linux
Sep 16 23:47:21 deepwater supervise-daemon[2316]: Supervisor command line: supervise-daemon agetty.tty3 --start --pidfile /run/agetty.tty3.pid --respawn-period 60 /sbin/agetty -- tty3 38400 linux
Sep 16 23:47:21 deepwater supervise-daemon[2318]: Child command line: /sbin/agetty tty3 38400 linux
Sep 16 23:47:21 deepwater supervise-daemon[2344]: Supervisor command line: supervise-daemon agetty.tty4 --start --pidfile /run/agetty.tty4.pid --respawn-period 60 /sbin/agetty -- tty4 38400 linux
Sep 16 23:47:21 deepwater supervise-daemon[2346]: Child command line: /sbin/agetty tty4 38400 linux
Sep 16 23:47:21 deepwater supervise-daemon[2372]: Supervisor command line: supervise-daemon agetty.tty5 --start --pidfile /run/agetty.tty5.pid --respawn-period 60 /sbin/agetty -- tty5 38400 linux
Sep 16 23:47:21 deepwater supervise-daemon[2374]: Child command line: /sbin/agetty tty5 38400 linux
Sep 16 23:47:21 deepwater supervise-daemon[2401]: Supervisor command line: supervise-daemon agetty.tty6 --start --pidfile /run/agetty.tty6.pid --respawn-period 60 /sbin/agetty -- tty6 38400 linux
Sep 16 23:47:21 deepwater supervise-daemon[2403]: Child command line: /sbin/agetty tty6 38400 linux

Re: limited ttys

Reply #2
So just a update, this is another hint i found
Code: [Select]
sudo rc-service agetty start
 * agetty cannot be started directly. You must create
 * symbolic links to it for the ports you want to start
 * agetty on and add those to the appropriate runlevels.
 * ERROR: agetty failed to start



So now I can only switch from TTY1 to TTY3 on which runs the XCFE session :(.

Re: limited ttys

Reply #3
So when I boot into LTS kernel I can switch into TTY1 - TTY5 and XFCE session runs on on TTY5.

When I boot into hardened kernel I can now boot now only into TTY1 and TTY2 where runs xfce sessions.

This is becoming strange, on gentoo wiki i have found this snippet
Code: [Select]
Start terminals as OpenRC services

Openrc-init does not use /etc/inittab, so the agetty processes for tty1 to tty6 will need to be started explicitly as services.

Create the links in /etc/init.d and add them to the default run level:
root #cd /etc/init.d
root #for n in `seq 1 6`; do ln -s agetty agetty.tty$n; rc-config add agetty.tty$n default; done



But in my /etc/init.d i already have those symlinks I guess
Code: [Select]
lrwxrwxrwx 1 root root    18 Sep  2 14:09 agetty.tty1 -> /etc/init.d/agetty
lrwxrwxrwx 1 root root    18 Sep  2 14:09 agetty.tty2 -> /etc/init.d/agetty
lrwxrwxrwx 1 root root    18 Sep  2 14:09 agetty.tty3 -> /etc/init.d/agetty
lrwxrwxrwx 1 root root    18 Sep  2 14:09 agetty.tty4 -> /etc/init.d/agetty
lrwxrwxrwx 1 root root    18 Sep  2 14:09 agetty.tty5 -> /etc/init.d/agetty
lrwxrwxrwx 1 root root    18 Sep  2 14:09 agetty.tty6 -> /etc/init.d/agetty



 and untill recently about one month ago everything run smoothly and.According to last I was logged on TTY7 , but frankly speaking I was not checking any other TTys, just a example.

Code: [Select]
tokaro   tty7         :0               Mon Jul 24 17:09 - crash (-30147+15:26)
tokaro   tty7         :0               Mon Jul 24 16:43 - 17:09  (00:25)
reboot   system boot  6.1.33-hardened1 Mon Jul 24 16:43 - 17:28  (00:44)

So some time ago I could switch from TTY1 - TTY7(xfce session)
and now only TTY1 - TTY2 on hardened kernel?


Re: limited ttys

Reply #4
Hi Guys,

Brief update. After a month or so I booted my laptop. To my surprise I can switch between TTY1 - TTY6. On TTY7 blinks only cursor(dash _).
The X runs on TTY3 I do not know why some months ago it was running as expected on TTY7.
Code: [Select]
tokaro   tty7         :0               Tue May 23 20:12 - down   (01:44)
tokaro   tty7         :0               Tue May 23 19:56 - 20:12  (00:16)
tokaro   tty7         :0               Tue May 23 19:51 - 19:56  (00:05)
tokaro   tty7         :0               Tue May 23 19:30 - 19:51  (00:20)
tokaro   tty7         :0               Tue May 23 19:27 - 19:30  (00:02)
reboot   system boot  6.3.2-artix1-1   Tue May 23 19:27 - 21:57  (02:29)

When I booted with LTS kernel X was on TTY4, it seems that X chooses randomly the TTY.

The last command shows that the first time I have booted the X with different TTY was in july.  Might it be related to kernel version?
Code: [Select]
tokaro   tty5         :0               Sun Jul 30 16:51 - down   (04:23)
reboot   system boot  6.4.6-hardened1- Sun Jul 30 16:51 - 21:14  (04:23)
tokaro   tty4         :0               Sat Jul 29 17:22 - down   (05:01)
reboot   system boot  6.4.4-hardened1- Sat Jul 29 17:22 - 22:24  (05:02)
tokaro   tty5         :0               Mon Jul 24 17:56 - down   (00:01)
reboot   system boot  6.4.4-hardened1- Mon Jul 24 17:55 - 17:57  (00:01)
tokaro   tty4         :0               Mon Jul 24 17:30 - down   (00:23)
reboot   system boot  6.4.4-hardened1- Mon Jul 24 17:30 - 17:54  (00:23)
reboot   system boot  6.1.33-hardened1 Wed Jan  8 01:43 - 17:28 (30147+15:45)
tokaro   tty7         :0               Mon Jul 24 17:09 - crash (-30147+15:26)
tokaro   tty7         :0               Mon Jul 24 16:43 - 17:09  (00:25)

Thank you.

Re: limited ttys

Reply #5
Hi,
 
So after installing several other DE I found out following. When i choose in SDDM(after booting) last used DE and log into it i get random number of TTYs activated.Sometimes X runs on TTY3 sometimes on TTY4 , when i want to switch with ctrl+alt+f5-f7, there is only a dash _ blinking, sometimes I can not switch above TTY4.
However when I log out from the firstly booted DE and return to SDDM welcome screen and choose other DE or WM , after logging in I have suddenly access to all default TTYs.
Here is a snippet from the LAST command
Code: [Select]
tokaro   tty7         :0               Sun Nov 19 21:56   still logged in
tokaro   pts/0        :0               Sun Nov 19 21:56 - 21:56  (00:00)
tokaro   tty7         :0               Sun Nov 19 21:56 - 21:56  (00:00)
tokaro   tty7         :0               Sun Nov 19 21:55 - 21:55  (00:00)
tokaro   tty4         :0               Sun Nov 19 21:54 - 21:55  (00:01)

As you can see, when i booted pc , and chose last used DE , I was signed in on TTY4, then log out and chose different DE and to my surprise I have access to all 7 TTYs, and X runs on TTY7 as expected.

So anybody , any idea what could be wrong? I have tried to trace back when it first started and it started sometime in July.
Could it be related to some problem with SSD? I use whole disk encryption with LVM and LUKS plus BTRFS.

Or the only solution is a fresh installation.

I have also tried to reinstall openrc and sddm.

Thanks for any suggestions.

Re: limited ttys

Reply #6
I guess that is SDDM to blame. I personally doesn't use DM and DE, I have Openbox and semi-manual autostart of Xorg after console login with this in .bash_profile:
Code: [Select]
[[ -f ~/.bashrc ]] && . ~/.bashrc
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
  startx 2> $HOME/.log/.xsession-errors
  logout
fi
So Xorg session is always on tty1, and ttys 2-6 are working.

Some reference reading: https://wiki.gentoo.org/wiki/X_without_Display_Manager

Sorry for not being much help.

Re: limited ttys

Reply #7
I also had some problems with switching tty's although not quite like your issue.
https://forum.artixlinux.org/index.php/topic,5664.msg35536.html#msg35536
It might be something to do with Xorg as it was not happening in Wayland, you could try installing Gnome and GDM (just as a temporary experiment) because using that desktop you can easily select either an Xorg or Wayland session from a drop down menu on the GDM login screen. When I bisected the kernel it was related to an unused section of code which suggests incorrect memory access is happening, I thought there must be a buffer overflow or some memory address error that can happen in relation to tty switching, perhaps due to a race condition as there is a random element to it's manifestation, and it affects 2 of my laptops with similar single thread speeds but not another with a different single thread speed. An E7470 has 4 cores and near identical performance to the unaffected M4500 with 8 cores, while the slightly affected older M4400 is slower overall but has a fast clock speed and only 2 cores. Due to the random element any of these findings could be coincidence though.

Edit:
This seems to be fixed for me now though, thanks to some update, I hadn't tried recently.

Re: limited ttys

Reply #8
Hi,

So after some time playing I found a solution. I have uninstalled SDDM. I have installed GDM but I have encountered the same buggy behavior.

So I have installed Lightdm and it works.
Code: [Select]
last | head
tokaro   tty7         :0               Thu Dec 14 15:47   still logged in
reboot   system boot  6.6.6-hardened1- Thu Dec 14 15:47   still running
reboot   system boot  6.6.6-hardened1- Mon Oct 20 22:58 - 15:45 (30004+17:46)
tokaro   tty7         :0               Thu Dec 14 15:30 - 15:44  (00:14)
tokaro   tty7         :0               Thu Dec 14 15:29 - 15:30  (00:00)
tokaro   tty7         :0               Thu Dec 14 14:11 - 15:29  (01:18)
tokaro   tty7         :0               Thu Dec 14 14:08 - 14:10  (00:02)
tokaro   tty7         :0               Thu Dec 14 14:04 - 14:08  (00:03)
tokaro   tty7         :0               Thu Dec 14 13:56 - 14:04  (00:07

After that I just did
Code: [Select]
rc-update add lightdm default

Thanks to all who tried to help.Maybe this will be usefull for others.
Merry Christmas