Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CONFIG_VT killed, by not using seat0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
fpemud
Apprentice
Apprentice


Joined: 15 Feb 2012
Posts: 289

PostPosted: Thu Jun 27, 2019 11:09 pm    Post subject: CONFIG_VT killed, by not using seat0 Reply with quote

After some study I found VT is only available on seat0, which is the default seat on linux.
I create a new seat called "seat-main", move all devices from seat0 to this seat.
After I compile a kernel with CONFIG_VT=n, gdm and gnome-shell use this new seat seamlessly.
Of course fast-user-switch is not usable, console-for-GUI-failure is not usable, but they are not very important to my desktop system as I have a rescue usb-stick.
The above solution is based on systemd-logind, but I think it can be also be used for elogind.


The steps are as follows:

1. Create a udev rule file, put all devices from seat0 to seat-main.
Code:
fpemud-workstation /home/fpemud # cat /lib/udev/rules.d/72-fpemud-refsystem-seat-main.rules
# To kill CONFIG_VT, fpemud-refsystem use seat-main instead of seat0
TAG=="seat", ENV{ID_SEAT}="seat-main"


2. Compile a kernel with CONFIG_VT=n
Code:
fpemud-workstation /home/fpemud # cat /boot/config-x86_64-5.0.15 | grep CONFIG_VT
# CONFIG_VT is not set
# CONFIG_VT6655 is not set
# CONFIG_VT6656 is not set


3. Change DE and display manager to gnome-shell and gdm.
Code:
fpemud-workstation /home/fpemud # ls /etc/systemd/system -l | grep display-manager
lrwxrwxrwx 1 root root   31 Jun 26 06:23 display-manager.service -> /lib/systemd/system/gdm.service


4. Reboot



Other things:
1. Without VT and VGACON, I can't see startup messages of linux kernel.
2. In fact lightdm supports multi-seat, but it doesn't support CONFIG_VT=n as it accesses /dev/tty0.
3. There's no need to modify xorg.conf at all.
4. I don't know why, but gdm + mate results blank screen.



Reference:
[1] https://www.freedesktop.org/wiki/Software/systemd/multiseat/
[2] https://github.com/dvdhrm/kmscon/issues/103
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5439

PostPosted: Fri Jun 28, 2019 1:16 pm    Post subject: Reply with quote

Greetings,

I'm not using systemd, I do use lightdm, in order to add new seat, I'd run Xorg and the called tool add-local-x-seat <X_SESSION_ID> which resulted in a working login screen.
does this helps you to get what you need?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
CaptainBlood
Veteran
Veteran


Joined: 24 Jan 2010
Posts: 1453

PostPosted: Fri Jun 28, 2019 6:29 pm    Post subject: Reply with quote

Hi,
I feel confused trying to understand the use case you're trying to achieve.
Could you please elaborate a little?

I'm not sure I could be helpful anyhow, but at least I might learn something :)

Thks 4 ur attention.
Back to top
View user's profile Send private message
fpemud
Apprentice
Apprentice


Joined: 15 Feb 2012
Posts: 289

PostPosted: Sat Jun 29, 2019 8:35 am    Post subject: Reply with quote

There's no specific use case.
I just think David Herrmann's killing CONFIG_VT is really cool and is the future.

My /dev is much cleaner after CONFIG_VT=n. :D
Code:
fpemud-notepad /etc/pulse # ls /dev
autofs           drm_dp_aux0  kmsg                port    sda3      ttyS2
block            drm_dp_aux1  kvm                 ppp     sda4      ttyS3
bsg              drm_dp_aux2  log                 ptmx    sda5      uhid
bus              fb0          loop-control        ptp0    shm       urandom
char             fd           mapper              pts     snapshot  userio
console          full         mem                 random  snd       vga_arbiter
core             fuse         memory_bandwidth    rfkill  stderr    vhci
cpu              hpet         mqueue              rtc     stdin     vhost-net
cpu_dma_latency  hugepages    net                 rtc0    stdout    vhost-vsock
cuse             initctl      network_latency     sda     tty       zero
disk             input        network_throughput  sda1    ttyS0
dri              kmem         null                sda2    ttyS1


lightdm supports multiseat.
It depends on /dev/tty0 which does not exist when CONFIG_VT=n. This is the real problem.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5439

PostPosted: Sat Jun 29, 2019 2:20 pm    Post subject: Reply with quote

all relevant entries regarding this are from 2012-2013.
afaics, it didn't go on from there, e.g. it was never made it out of the drawing board.
there is a missing part here, the userspace part.
unless you find it, I don't think there is any reason to pursue this.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5439

PostPosted: Sat Jun 29, 2019 2:27 pm    Post subject: Reply with quote

you can try reducing the number of ttys by changing MAX_NR_CONSOLES in /usr/src/linux/include/uapi/linux/vt.h
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
CaptainBlood
Veteran
Veteran


Joined: 24 Jan 2010
Posts: 1453

PostPosted: Mon Jul 01, 2019 4:48 am    Post subject: Reply with quote

fpemud wrote:
Code:
fpemud-notepad /etc/pulse # ls /dev
autofs           drm_dp_aux0  kmsg                port    sda3      ttyS2
block            drm_dp_aux1  kvm                 ppp     sda4      ttyS3
bsg              drm_dp_aux2  log                 ptmx    sda5      uhid
bus              fb0          loop-control        ptp0    shm       urandom
char             fd           mapper              pts     snapshot  userio
console          full         mem                 random  snd       vga_arbiter
core             fuse         memory_bandwidth    rfkill  stderr    vhci
cpu              hpet         mqueue              rtc     stdin     vhost-net
cpu_dma_latency  hugepages    net                 rtc0    stdout    vhost-vsock
cuse             initctl      network_latency     sda     tty       zero
disk             input        network_throughput  sda1    ttyS0
dri              kmem         null                sda2    ttyS1
Would be nice to show the alternate.
Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6354

PostPosted: Mon Jul 01, 2019 11:04 pm    Post subject: Reply with quote

If you want a tidy /dev/ then configure CONFIG_NR_TTY_DEVICES (available in any good patchset) to a number less than 63. Better than removing the core of the kernel and relying on abandonware like kmscon to patch it up.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum