:: Re: [DNG] [libseat/backend/logind.c…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Андрей Сорокин
Fecha:  
A: Mark Hindley
Cc: dng
Asunto: Re: [DNG] [libseat/backend/logind.c:137] Could not take device: Device or resource busy
> Andrey,
>
> I think something is wrong with your setup.
>
> On Wed, Jun 28, 2023 at 02:59:41PM +0700, А. Сорокин via Dng wrote:
>
>> I have installed Daedalus-preview, and have noticed, that it does not
>> let me open second X-session (from another TTY), when there is already
>> one X-session is opened (from one TTY). Before firing a bug, i wanted
>> to counsel here -- may i have missed something, and now it is intended
>> system behaviour.
>>
>> In the X lof file i get the following corresponding errors:
>>
>> [ 5304.581] (II) seatd_libseat init
>> [ 5304.582] (EE) [libseat/backend/seatd.c:308] Could not poll connection: Broken pipe
>> [ 5304.582] (II) [libseat/libseat.c:76] Backend 'seatd' failed to open seat, skipping
>
> If seatd is installed and running, this is unexpected.
>
> I have
>
> $ dpkg -l seatd
> Desired=Unknown/Install/Remove/Purge/Hold
> | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
> ||/ Name Version Architecture Description
> +++-==============-============-============-================================================
> ii seatd 0.7.0-6 amd64 minimal user, seat and session management daemon
> $ ps -lfC seatd
> F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
> 4 S root 1500 1 0 80 0 - 623 - Jun18 ? 00:00:00 /usr/sbin/seatd -g video
> $ ls -l /run/seatd.*
> -rw-r--r-- 1 root root 5 Jun 18 10:40 /run/seatd.pid
> srwxrwx--- 1 root video 0 Jun 18 10:40 /run/seatd.sock
>
> If yours doesn't look like that reinstall/configure seatd.
>
>> [ 5304.612] (II)[libseat/libseat.c:73] Seat opened with backend 'logind' [ 5304.612]
>
> But you also have elogind installed and running. Do you need/want that?
>
> I suggest you avoid using both seatd and elogind whilst debugging. You can either
>
> - uninstall whichever you don't want
>
> - Use the LIBSEAT_BACKEND environment variable to limit. For example
>
> LIBSEAT_BACKEND=logind startx
>
> Always use the same backend for both startx sessions.
>
> Mark
>
>> (II) seatd_libseat enable [ 5304.612] (II) seatd_libseat handled 1
>> events [ 5304.612] (II) seatd_libseat handled 1 events
>> [ 5304.713] (II) seatd_libseat client activated
>> [ 5304.713] (II) xfree86: Adding drm device (/dev/dri/card0)
>> [ 5304.713] (II) Platform probe for
>> /sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/drm/card0 [
>> 5304.713] (II) seatd_libseat try open graphics /dev/dri/card0 [
>> 5304.714] (EE) [libseat/backend/logind.c:137] Could not take device:
>> Device or resource busy [ 5304.714] (EE) seatd_libseat open graphics
>> /dev/dri/card0 (-1) failed: -11
>
> Do you have a display manager installed as well (slim, lightdm, sddm, gdm...)?
> If so, stop it and try again.
>
> Mark


i, Mark! Thank you for your answer!

dpkg and ls command you have shown give same resaults for me.
I have removed elogind, so seatd only remained of these two, but the problems still present:
. only one x-session at once,
. swithching between X and console sessions some times takes away keyboard control -- only reboot helps.

But the errors in the X log file changed:

[    63.315] (II) seatd_libseat init
[    63.315] (EE) [libseat/backend/seatd.c:308] Could not poll connection: Broken pipe
[    63.315] (II) [libseat/libseat.c:76] Backend 'seatd' failed to open seat, skipping
[    63.315] (EE) [libseat/backend/logind.c:660] Could not get primary session for user: No data available
[    63.315] (II) [libseat/libseat.c:76] Backend 'logind' failed to open seat, skipping
[    63.316] (II) [seatd/seat.c:39] Created VT-bound seat seat0
[    63.316] (II) [seatd/server.c:145] New client connected (pid: 2803, uid: 1002, gid: 1001)
[    63.316] (II) [libseat/backend/seatd.c:633] Started embedded seatd
[    63.316] (EE) [common/terminal.c:162] Could not open target tty: Permission denied
[    63.316] (EE) [seatd/seat.c:61] Could not open tty0 to update VT: Permission denied
[    63.316] (II) [seatd/seat.c:170] Added client 0 to seat0
[    63.316] (EE) [common/terminal.c:162] Could not open target tty: Permission denied
[    63.316] (EE) [seatd/seat.c:72] Could not open terminal for VT 0: Permission denied
[    63.316] (EE) [seatd/seat.c:461] Could not open VT for client
[    63.316] (EE) [common/terminal.c:162] Could not open target tty: Permission denied
[    63.316] (EE) [seatd/seat.c:86] Could not open terminal to clean up VT 0: Permission denied
[    63.316] (II) [libseat/libseat.c:73] Seat opened with backend 'builtin'
[    63.417] (II) seatd_libseat client activated


[    63.417] (II) xfree86: Adding drm device (/dev/dri/card0)
[    63.417] (II) Platform probe for /sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/drm/card0
[    63.417] (DB) seatd_libseat not active


...

[    63.613] (EE) modeset(0): drmSetMaster failed: Permission denied
[    63.613] (EE) 
Fatal server error:
[    63.613] (EE) AddScreen/ScreenInit failed for driver 0


[    63.614] (II) seatd_libseat finish
[    63.614] (DB) [seatd/seat.c:518] Closing inactive VT
[    63.615] (EE) [common/terminal.c:162] Could not open target tty: Permission denied
[    63.615] (EE) [seatd/seat.c:86] Could not open terminal to clean up VT 0: Permission denied
[    63.615] (II) [seatd/seat.c:524] Closed client 0 on seat0
[    63.615] (II) [seatd/seat.c:192] Removed client 0 from seat0
[    63.615] (II) [seatd/client.c:471] Client disconnected
[    63.615] (EE) Server terminated with error (1). Closing log file.
[    63.615] (II) [libseat/backend/seatd.c:645] Stopped embedded seatd


-- when attempted to run second x-session while first one is running by another user.

So, *any* ideas are welcome. For i do not know what to do with this and suppose "Daedalus" can not be used in this configuration as this is a fresh installation and only DM was removed since X was also chosen among other install options to be installed on the system.

Andrey.