Note: Remember to reply to all/reply to list
> Wow! Thank you for correcting me! Then, assuredly, i'm talking on> multi-session. But why i, then, can not have multi-session with> "SeatD"? -- For when second user tries to run x-session, it gets> following errors:> > [ 1267.570] (II) seatd_libseat init> [ 1267.570] (EE) [libseat/backend/seatd.c:308] Could not poll> connection: Broken pipe [ 1267.570] (II) [libseat/libseat.c:76]> Backend 'seatd' failed to open seat, skipping [ 1267.570] (EE)
Your connection to seatd failed. You should debug the seatd daemon,
which should print some information to stderr. Also consider changing
the seatd loglevel by passing `-l debug` to seatd where it is started.
> [libseat/backend/logind.c:660] Could not get primary session for user:> No data available [ 1267.570] (II) [libseat/libseat.c:76] Backend> 'logind' failed to open seat, skipping [ 1267.571] (II)> [seatd/seat.c:39] Created VT-bound seat seat0 [ 1267.571] (II)> [seatd/server.c:145] New client connected (pid: 5498, uid: 1002, gid:> 1001) [ 1267.571] (II) [libseat/backend/seatd.c:633] Started embedded> seatd
Note that you are falling back to the built-in/embedded backend here,
which you do not want to use. Solve the initial issue so that normal
seatd is used instead.
> So, if you say that "SeatD" can do multi-sessions, then question is> "How?" -- for no only errors i get instead of the second x-session when> one x-session is already running under another user.
When you use VTs, you can have one session per VT. Your display manager
may deal with this for you, allocating and changing to new VTs at login,
but you can also just do that manually by just changing VT to log into
another session.
When VTs are disabled (running seatd with SEATD_VTBOUND=0), then new
sessions are always accepted in the background. The keybinding to change
VT in X or your Wayland server will instead change session.
Locking is either done per session, or by changing to a session/VT that
just shows a display manager or lock screen that blocks session/VT
changes until logged back in.
elogind also supports this use-case, although slightly differently. If
it fails in the logs, you might just have to debug your elogind setup
(pam stack, polkit, ...) - although that is outside the scope of this
mailing list.
Hi, Kenny,
Tue, 22 Aug 2023 11:34:52 +0200 you wrote:
> > [ 1267.570] (II) seatd_libseat init> > [ 1267.570] (EE) [libseat/backend/seatd.c:308] Could not poll> > connection: Broken pipe [ 1267.570] (II) [libseat/libseat.c:76]> > Backend 'seatd' failed to open seat, skipping [ 1267.570] (EE) > > Your connection to seatd failed. You should debug the seatd daemon, > which should print some information to stderr. Also consider changing > the seatd loglevel by passing `-l debug` to seatd where it is started.
I start x-session with startx command.
I did set SEATD_LOGLEVEL=debug on command line and started startx -- it
seems the output the same:
[ 4889.918] (II) seatd_libseat init
[ 4889.919] (EE) [libseat/backend/seatd.c:308] Could not poll
connection: Broken pipe [ 4889.919] (II) [libseat/libseat.c:76]
Backend 'seatd' failed to open seat, skipping [ 4889.919] (EE)
[libseat/backend/logind.c:660] Could not get primary session for user:
No data available [ 4889.919] (II) [libseat/libseat.c:76] Backend
'logind' failed to open seat, skipping [ 4889.919] (II)
[seatd/seat.c:39] Created VT-bound seat seat0 [ 4889.920] (II)
[seatd/server.c:145] New client connected (pid: 5575, uid: 1020, gid:
100) [ 4889.920] (II) [libseat/backend/seatd.c:633] Started embedded
seatd [ 4889.920] (EE) [common/terminal.c:162] Could not open target
tty: Permission denied [ 4889.920] (EE) [seatd/seat.c:61] Could not
open tty0 to update VT: Permission denied [ 4889.920] (II)
[seatd/seat.c:170] Added client 0 to seat0 [ 4889.920] (EE)
[common/terminal.c:162] Could not open target tty: Permission denied [
4889.920] (EE) [seatd/seat.c:72] Could not open terminal for VT 0:
Permission denied [ 4889.920] (EE) [seatd/seat.c:461] Could not open
VT for client [ 4889.920] (EE) [common/terminal.c:162] Could not open
target tty: Permission denied [ 4889.920] (EE) [seatd/seat.c:86] Could
not open terminal to clean up VT 0: Permission denied [ 4889.920] (II)
[libseat/libseat.c:73] Seat opened with backend 'builtin' [ 4890.020]
(II) seatd_libseat client activated [ 4890.021] (II) xfree86: Adding
drm device (/dev/dri/card0) [ 4890.021] (II) Platform probe for
/sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/drm/card0 [
4890.021] (DB) seatd_libseat not active
,,,
[ 4890.221] (II) seatd_libseat finish
[ 4890.222] (DB) [seatd/seat.c:518] Closing inactive VT
[ 4890.222] (EE) [common/terminal.c:162] Could not open target tty:
Permission denied [ 4890.222] (EE) [seatd/seat.c:86] Could not open
terminal to clean up VT 0: Permission denied [ 4890.223] (II)
[seatd/seat.c:524] Closed client 0 on seat0 [ 4890.223] (II)
[seatd/seat.c:192] Removed client 0 from seat0 [ 4890.223] (EE)[
4890.223] (II) [seatd/client.c:471] Client disconnected Server
terminated with error (1). Closing log file. [ 4890.224] (II)
[libseat/backend/seatd.c:645] Stopped embedded seatd
Trying running seatd -l debug as same user gave me these errors:
00:00:00.000 [seatd/seatd.c:167] Removing leftover socket at
/run/seatd.sock 00:00:00.000 [seatd/seatd.c:169] Could not remove
leftover socket: Permission denied
If to edit /etc/init.d/seatd with START_ARGS="-l debug" -- that gives
error on service restart. :^(
> > [libseat/backend/logind.c:660] Could not get primary session for> > user: No data available [ 1267.570] (II) [libseat/libseat.c:76]> > Backend 'logind' failed to open seat, skipping [ 1267.571] (II)> > [seatd/seat.c:39] Created VT-bound seat seat0 [ 1267.571] (II)> > [seatd/server.c:145] New client connected (pid: 5498, uid: 1002,> > gid: 1001) [ 1267.571] (II) [libseat/backend/seatd.c:633] Started> > embedded seatd > > Note that you are falling back to the built-in/embedded backend here, > which you do not want to use. Solve the initial issue so that normal > seatd is used instead.
What do you mean under "first issue"? -- Debug-level messages?
And under "normal seatd is used instead"? -- I use seatd only -- no
elogind present.
> When you use VTs, you can have one session per VT. Your display> manager may deal with this for you, allocating and changing to new> VTs at login, but you can also just do that manually by just changing> VT to log into another session.
Which command changes to new VTs at login? -- I start x-sessions with
startx, but you see that seatd complains on permissions, and i do not
know how i can achieve those permissions. I have users in the video
group, and they can start x-sessions but not at the same time. So, which
command changes to new VT?
> When VTs are disabled (running seatd with SEATD_VTBOUND=0), then new > sessions are always accepted in the background. The keybinding to> change VT in X or your Wayland server will instead change session.
I did set SEATD_VTBOUND=0 in /etc/init.d/seatd, did restart service
but no luck.
I can switch between x-session and console without problems. Why to
change this keybinding?
Seems, the more i read, the more i do not understand! :^)
> Locking is either done per session, or by changing to a session/VT> that just shows a display manager or lock screen that blocks> session/VT changes until logged back in.> > elogind also supports this use-case, although slightly differently.> If it fails in the logs, you might just have to debug your elogind> setup (pam stack, polkit, ...) - although that is outside the scope> of this mailing list.
Why all this problems? -- Why it does not work as it did before? --
Since you say "SeatD" has such functionality?
Andrey.
> If to edit /etc/init.d/seatd with START_ARGS="-l debug" -- that gives> error on service restart. :^(
I cannot guess what errors you see. If you need help with your init
scripts, ask in an appropriate community forum for your distribution.
> What do you mean under "first issue"?
Your libseat log contains:
1. A failed connection to the running seatd instance ("Could not poll
connection: Broken pipe")
2. A failed attempt to use elogind as fallback ("Could not get primary
session for user")
3. A final failed attempt to use a built-in seatd instance as fallback
(permission denied)
Only the first error is relevant to debug, the rest are meant to fail in
your case. Figuring out what the *running* seatd instance has to say
(preferably with debug loglevel) might shed some light on what is going on.
> Why all this problems? -- Why it does not work as it did before? --> Since you say "SeatD" has such functionality?
I do not know what has changed on your machine or in your distribution.
Ask in an appropriate community forum for your distribution. The Xorg
libseat patches are also developed and maintained by Devuan, so they
might be more familiar with how to use them.
Hi, Kenny,
Thu, 24 Aug 2023 14:12:58 +0200 you wrote:
> I cannot guess what errors you see. If you need help with your init > scripts, ask in an appropriate community forum for your distribution.
I have set loglevel to debug. The log of the second attempted to run
x-session user (when already running x-session by the first user)
contains:
[ 554.475] (II) seatd_libseat init
[ 554.476] (EE) [libseat/backend/seatd.c:308] Could not poll
connection: Broken pipe
[ 554.476] (II) [libseat/libseat.c:76] Backend 'seatd' failed to open
seat, skipping
[ 554.476] (EE) [libseat/backend/logind.c:660] Could not get primary
session for user: No data available
[ 554.476] (II) [libseat/libseat.c:76] Backend 'logind' failed to
open seat, skipping
[ 554.476] (II) [seatd/seat.c:39] Created VT-bound seat seat0
[ 554.476] (II) [seatd/server.c:145] New client connected (pid: 3091,
uid: 1002, gid: 1001)
[ 554.476] (II) [libseat/backend/seatd.c:633] Started embedded seatd
[ 554.476] (EE) [common/terminal.c:162] Could not open target tty:
Permission denied
[ 554.477] (EE) [seatd/seat.c:61] Could not open tty0 to update VT:
Permission denied
[ 554.477] (II) [seatd/seat.c:170] Added client 0 to seat0
[ 554.477] (EE) [common/terminal.c:162] Could not open target tty:
Permission denied
[ 554.477] (EE) [seatd/seat.c:72] Could not open terminal for VT 0:
Permission denied
[ 554.477] (EE) [seatd/seat.c:461] Could not open VT for client
[ 554.477] (EE) [common/terminal.c:162] Could not open target tty:
Permission denied
[ 554.477] (EE) [seatd/seat.c:86] Could not open terminal to clean up
VT 0: Permission denied
[ 554.477] (II) [libseat/libseat.c:73] Seat opened with backend
'builtin'
[ 554.577] (II) seatd_libseat client activated
[ 554.578] (II) xfree86: Adding drm device (/dev/dri/card0)
...
[ 554.578] (DB) seatd_libseat not active
...
[ 554.770] (EE) modeset(0): drmSetMaster failed: Permission denied
[ 554.770] (EE)
Fatal server error:
[ 554.770] (EE) AddScreen/ScreenInit failed for driver 0
[ 554.770] (EE)
[ 554.770] (EE) [ 554.772] (II) seatd_libseat finish
[ 554.772] (DB) [seatd/seat.c:518] Closing inactive VT
[ 554.772] (EE) [common/terminal.c:162] Could not open target tty:
Permission denied
[ 554.772] (EE) [seatd/seat.c:86] Could not open terminal to clean up
VT 0: Permission denied
[ 554.772] (II) [seatd/seat.c:524] Closed client 0 on seat0
[ 554.772] (II) [seatd/seat.c:192] Removed client 0 from seat0
[ 554.772] (II) [seatd/client.c:471] Client disconnected
[ 554.772] (EE) Server terminated with error (1). Closing log file.
[ 554.772] (II) [libseat/backend/seatd.c:645] Stopped embedded seatd
> Your libseat log contains:> > 1. A failed connection to the running seatd instance ("Could not poll > connection: Broken pipe")> 2. A failed attempt to use elogind as fallback ("Could not get> primary session for user")> 3. A final failed attempt to use a built-in seatd instance as> fallback (permission denied)> > Only the first error is relevant to debug, the rest are meant to fail> in your case. Figuring out what the *running* seatd instance has to> say (preferably with debug loglevel) might shed some light on what is> going on.
Hope, the above new log helps. But to me it seems an x-server
problem because of the "drmSetMaster failed: Permission denied".
> > Why all this problems? -- Why it does not work as it did before? --> > Since you say "SeatD" has such functionality?> > I do not know what has changed on your machine or in your> distribution. Ask in an appropriate community forum for your> distribution. The Xorg libseat patches are also developed and> maintained by Devuan, so they might be more familiar with how to use> them.
I had asked them, they promised to fix, but instead did release the
next "stable" release of "DeVuan"...
So, my option is to return back to the stable release of "DeVuan", when
"ELoginD" was used yet, OR solve the problem here. ;^)
Andrey.
On 8/27/23 23:48, Андрей Сорокин wrote:
> I have set loglevel to debug. The log of the second attempted to run > x-session user (when already running x-session by the first user) contains:
The loglevel changes the log output of the seatd service itself, which
is what might help here. The log output of libseat/X is unchanged.
Hi, Kenny,
Mon, 28 Aug 2023 09:31:05 +0200 you wrote:
> On 8/27/23 23:48, Андрей Сорокин wrote:> > I have set loglevel to debug. The log of the second attempted to> > run x-session user (when already running x-session by the first> > user) contains:> > The loglevel changes the log output of the seatd service itself,> which is what might help here. The log output of libseat/X is> unchanged.
I was looking at the user's x-server log file. Since in seatd config
file (/etc/default/seatd) now i have
DAEMON_ARGS="-g video -l debug"
where does seatd writes its logs? -- In /var/log there is no seatd
file/dir.
Andrey.