[Arch] How to reduce tty device number?

Post Reply
Moricio78
Posts: 24
Joined: Wed Oct 22, 2014 11:43 pm
languages_spoken: french
ODROIDs: U3
Location: France, Pays de Loire
Contact:

[Arch] How to reduce tty device number?

Unread post by Moricio78 » Sat Aug 29, 2015 3:50 pm

Hello,

On my Archlinux I have 320 /dev/tty* (0 to yzf).
And so much sys-devices-virtual-tty-tty*.device (loaded active plugged) in systemctl.

I can't find the file where this number is set.

I tried with NAutoVTs=6 in /etc/systemd/logind.conf but no changes.
Have you an idea?

Thanks

User avatar
odroid
Site Admin
Posts: 30028
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: [Arch] How to reduce tty device number?

Unread post by odroid » Sat Aug 29, 2015 7:11 pm

I think you would better post the question on ALARM forum.
http://archlinuxarm.org/forum/

gripped
Posts: 691
Joined: Tue May 21, 2013 11:34 pm
languages_spoken: english
ODROIDs: U2 XU U3 XU3
Contact:

Re: [Arch] How to reduce tty device number?

Unread post by gripped » Sat Aug 29, 2015 10:32 pm

I think it is kernel related

https://raw.githubusercontent.com/hardk ... _defconfig

Code: Select all

CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
(it is also set in the u2 kernel)

On my Desktop Intel Arch CONFIG_LEGACY_PTYS is not set

Code: Select all

ls -l /dev/tty* | wc -l
69
On odroid XU3

Code: Select all

ls -1 /dev/tty* | wc -l
329
329-69-4(the four /dev/ttySAC*)=256

So if they really bother you I think you have to compile the kernel with CONFIG_LEGACY_PTYS is not set.

As always I could be wrong ;)

Moricio78
Posts: 24
Joined: Wed Oct 22, 2014 11:43 pm
languages_spoken: french
ODROIDs: U3
Location: France, Pays de Loire
Contact:

Re: [Arch] How to reduce tty device number?

Unread post by Moricio78 » Mon Aug 31, 2015 2:50 pm

I was afraid to this answer.
Thank you for information, I will try to compile a new kernel.

Moricio78
Posts: 24
Joined: Wed Oct 22, 2014 11:43 pm
languages_spoken: french
ODROIDs: U3
Location: France, Pays de Loire
Contact:

Re: [Arch] How to reduce tty device number?

Unread post by Moricio78 » Wed Sep 02, 2015 5:38 pm

Finally I used the following commands in u-boot and it works
setenv mmcargs 'setenv bootargs ...... pty.legacy_count=2'
saveenv
Now I am 65 tty.
It's better but I do not understand why 65.

NC-Tony-Casanova
Posts: 8
Joined: Mon Nov 20, 2017 10:23 am
languages_spoken: english
ODROIDs: HC-1
Contact:

Re: [Arch] How to reduce tty device number?

Unread post by NC-Tony-Casanova » Thu Aug 09, 2018 10:19 am

Has anyone figured out how to reduce the number of ttys on ODROID?

76 ttys on UBUNTU

ls -l /dev/tty* | wc -l
76


This is not just ARCH.

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial


cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.5 LTS"
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

User avatar
tobetter
Posts: 2812
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Contact:

Re: [Arch] How to reduce tty device number?

Unread post by tobetter » Sat Aug 11, 2018 1:02 am

NC-Tony-Casanova wrote:Has anyone figured out how to reduce the number of ttys on ODROID?

76 ttys on UBUNTU

ls -l /dev/tty* | wc -l
76


This is not just ARCH.

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial


cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.5 LTS"
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
You would be able to reduce the number of virtual consoles /dev/tty[0-63] after recompiling the kernel if you change MAX_NR_CONSOLES to other number you'd like to.

Code: Select all

  6 /*
  7  * These constants are also useful for user-level apps (e.g., VC
  8  * resizing).
  9  */
 10 #define MIN_NR_CONSOLES 1       /* must be at least 1 */
 11 #define MAX_NR_CONSOLES 63      /* serial lines start at 64 */
 12                 /* Note: the ioctl VT_GETSTATE does not work for
 13                    consoles 16 and higher (since it returns a short) */
 14 

NC-Tony-Casanova
Posts: 8
Joined: Mon Nov 20, 2017 10:23 am
languages_spoken: english
ODROIDs: HC-1
Contact:

Re: [Arch] How to reduce tty device number?

Unread post by NC-Tony-Casanova » Tue Aug 14, 2018 1:54 pm

Thank you. I will give it a try.

Post Reply

Return to “Other OS”

Who is online

Users browsing this forum: No registered users and 0 guests