Discussion:
Two questions about logind and seats
(too old to reply)
nerdopolis
2017-08-01 23:32:51 UTC
Permalink
Raw Message
First, when I attach a 2nd graphics card to seat1, it seems CanMultisession is
set to 0. Is there a way to change that? or is that only supported on seat0,
that supports the TTYs?
Yes, this is only supported where VTs are supported, and that is
only seat0.
Thanks, It's currently a kernel limitation I assume? I guess I'll worry about
multiple sessions on non seat0 seats when it _is_ supported.
Yeah the VCs are drawn by the kernel, hence doing multi-session on
other but the first seat would mean either updating the kernel or
doing something purely in userspace with a userspace terminal
renderer. David Hermann was working on something like this, but he
lost interest.
Lennart
Out of curiosity, what would the likes of Weston, X, and other Display Servers
need on seats outside of seat0? A device to set KD_GRAPHICS on, like a special
type of pty or something?
Lennart Poettering
2017-08-02 07:17:37 UTC
Permalink
Raw Message
Post by nerdopolis
First, when I attach a 2nd graphics card to seat1, it seems CanMultisession is
set to 0. Is there a way to change that? or is that only supported on seat0,
that supports the TTYs?
Yes, this is only supported where VTs are supported, and that is
only seat0.
Thanks, It's currently a kernel limitation I assume? I guess I'll worry about
multiple sessions on non seat0 seats when it _is_ supported.
Yeah the VCs are drawn by the kernel, hence doing multi-session on
other but the first seat would mean either updating the kernel or
doing something purely in userspace with a userspace terminal
renderer. David Hermann was working on something like this, but he
lost interest.
Lennart
Out of curiosity, what would the likes of Weston, X, and other Display Servers
need on seats outside of seat0? A device to set KD_GRAPHICS on, like a special
type of pty or something?
Nah. Graphical display managers just need a set of DRM and input
devices to operate on, they require no VTs, ttys, ptys or anything.

Lennart
--
Lennart Poettering, Red Hat
nerdopolis
2017-08-02 11:39:47 UTC
Permalink
Raw Message
Post by Lennart Poettering
Post by nerdopolis
First, when I attach a 2nd graphics card to seat1, it seems CanMultisession is
set to 0. Is there a way to change that? or is that only supported on seat0,
that supports the TTYs?
Yes, this is only supported where VTs are supported, and that is
only seat0.
Thanks, It's currently a kernel limitation I assume? I guess I'll worry about
multiple sessions on non seat0 seats when it _is_ supported.
Yeah the VCs are drawn by the kernel, hence doing multi-session on
other but the first seat would mean either updating the kernel or
doing something purely in userspace with a userspace terminal
renderer. David Hermann was working on something like this, but he
lost interest.
Lennart
Out of curiosity, what would the likes of Weston, X, and other Display Servers
need on seats outside of seat0? A device to set KD_GRAPHICS on, like a special
type of pty or something?
Nah. Graphical display managers just need a set of DRM and input
devices to operate on, they require no VTs, ttys, ptys or anything.
Lennart
Thanks, I was wondering what would be needed from the kernel, and/or user space
to be able to run two Display Servers on seat1/seat-1, and switch between them
though?
nerdopolis
2017-07-30 13:50:44 UTC
Permalink
Raw Message
Hi

It seems I answered my first question
seems setting --setenv=XDG_SEAT=seatx and that will cause pam_systemd.so to set
the session-seat to what the variable is set to. While the documentation says
that pam_systemd.so can _set_ to the variables, it wasn't clear that it also
_responds_ to what they are set to.


I still have my other question, is it possible to set CanMultisession to yes on
other seats besides seat0?

Thanks
Hi
I hope this is the right place to ask this. I have two questions about logind
and seats.
First, when I attach a 2nd graphics card to seat1, it seems CanMultisession is
set to 0. Is there a way to change that? or is that only supported on seat0,
that supports the TTYs?
Second, with systemd-run, and maybe a custom '-p PAMName=somepamfile' (if that
is required), is there a way to spawn a process on seat1 if it exits?
For seat0 sessions, they for instance can be started by specifying
-pTTYPath=/dev/ttyX -pStandardOutput=tty -pStandardError=tty -pStandardInput=tty
to systemd-run, which I know only seat0 supports ttys...
I try to do weston --seat=seat1 and it says that seat1 does not match the
session-seat.
Is there a way to start a process with under a specific session-seat?
Thanks
_______________________________________________
systemd-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Mantas Mikulėnas
2017-07-30 14:06:21 UTC
Permalink
Raw Message
Hi
I hope this is the right place to ask this. I have two questions about
logind
and seats.
First, when I attach a 2nd graphics card to seat1, it seems
CanMultisession is
set to 0. Is there a way to change that? or is that only supported on
seat0,
that supports the TTYs?
Second, with systemd-run, and maybe a custom '-p PAMName=somepamfile' (if
that
is required), is there a way to spawn a process on seat1 if it exits?
For seat0 sessions, they for instance can be started by specifying
-pTTYPath=/dev/ttyX -pStandardOutput=tty -pStandardError=tty
-pStandardInput=tty
to systemd-run, which I know only seat0 supports ttys...
I try to do weston --seat=seat1 and it says that seat1 does not match the
session-seat.
Is there a way to start a process with under a specific session-seat?
I haven't experimented much with multiseat, but here might be some things
mixed up... tty support is not the same as virtual console support – it's
possible to have the former without the latter.

AFAIK, only seat0 supports *virtual consoles*, which are currently used for
session switching. (For other seats, the kernel doesn't provide a
convenient mechanism, and I don't think a replacement method has been
implemented yet...)
However, StandardInput doesn't need VC switching or anything, just a
/dev/tty* device. Unfortunately I'm not sure if the kernel provides even
that for other seats :(
Lennart Poettering
2017-07-31 13:41:46 UTC
Permalink
Raw Message
Hi
I hope this is the right place to ask this. I have two questions about logind
and seats.
First, when I attach a 2nd graphics card to seat1, it seems CanMultisession is
set to 0. Is there a way to change that? or is that only supported on seat0,
that supports the TTYs?
Yes, this is only supported where VTs are supported, and that is only seat0.
Second, with systemd-run, and maybe a custom '-p PAMName=somepamfile' (if that
is required), is there a way to spawn a process on seat1 if it exits?
For seat0 sessions, they for instance can be started by specifying
-pTTYPath=/dev/ttyX -pStandardOutput=tty -pStandardError=tty
--pStandardInput=tty
Other seats don't have VTs, hence you cannot run anything on any such
VTs...

To make use of these other seats you need some kind of terminal
emulator that knows how to draw to DRM directly, and then you can
connect your service to that.
to systemd-run, which I know only seat0 supports ttys...
I try to do weston --seat=seat1 and it says that seat1 does not match the
session-seat.
Is there a way to start a process with under a specific session-seat?
Well, I don't know weston that well, but presumably you are invoking
it from a session that is attached to seat0, and it doesn't like that
you try to run it on a different seat then, which makes a ton of sense
to complain about. Contact the weston folks for help on this.

Lennart
--
Lennart Poettering, Red Hat
Loading...