Skip to content

Conversation

@cepelinas9000
Copy link
Contributor

@cepelinas9000 cepelinas9000 commented Sep 3, 2025

Adds libseat support, it is adapted devuan patches for Xlibre.

Firstly, currently draft mode - technically it is nearly verbatium patch (with Xlibre adaptations) from https://git.devuan.org/devuan/xorg-server/compare/suites/experimental...support-libseat-upstream

Secondly, with extra work and additional patches: it should be possible to start xserver from AppImage/chroot - as long there are working device enumeration (or nodes configured beforehand - seatd opens device nodes for xserver and sents via unix socket as fd's)

@b-aaz there are mentioned at https://sr.ht/~kennylevinsen/seatd/ FreeBSD support it working or in early stages (I didn't check deeply) ?

Fixes: #202

To test it, you need libseat and seatd running (doesn't matter as service - you can start as root via tmux). Only problem, that if you have already running X server libseatd will try revoke display driver node and fails (you need initialize with X running).

If you don't want to install seatd:

$ git clone https://git.sr.ht/~kennylevinsen/seatd
$ cd seatd
$ meson setup --prefix=/tmp/seat build
$ (cd build;ninja install)
....

then just start if

# cd /tmp/seatd/bin
localhost /tmp/seatd/bin # ./seatd -u as -g as 
### "-u" and "-g" switches change socket uid/gid for easier testing

but don't forget when compiling Xlibre you need to provide seatd directory:

PKG_CONFIG_PATH=/tmp/x11libre/lib64/pkgconfig meson setup --prefix=/tmp/x11libre build

and when running LD_LIBRARY_PATH

$ LD_LIBRARY_PATH=/tmp/seatd/lib64/ ./X :1 -retro -seat seat0 -keeptty vt7

these parameters necessary for now (that why draft):

 -seat seat0 -keeptty vt7

edit: added test instructions

@cepelinas9000 cepelinas9000 changed the base branch from master to maint-25.0 September 3, 2025 22:12
@callmetango
Copy link
Contributor

@cepelinas9000
Copy link
Contributor Author

@cepelinas9000 Did you have a look at comment 3220492682 · Add seatd/libseat support · Issue #202 · X11Libre/xserver and especially LeePen/xlibre - xlibre - Devuan git store?

Now I have looked :) Missed that comment, Mark have fixed additional blocking bugs (in this PR Xserver refuses to start when there are no '-seat' argument given)

@callmetango
Copy link
Contributor

Now I have looked :)

Excellent. 😉 I added a "Fixes: ..." line to the description above so the feature request ticket gets a link to here.

@callmetango callmetango linked an issue Sep 3, 2025 that may be closed by this pull request
3 tasks
if (xorgHWOpenConsole)
xf86CloseConsole();

seatd_libseat_fini();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does that compile w/o seatd enabled ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the CI tests where passing. The original patch have #ifdef and following style code (see, seatd-libseat.h:

#ifdef SEATD_LIBSEAT
...
#else
#define seatd_libseat_init()
		
#define seatd_libseat_fini()
#endif

@metux
Copy link
Contributor

metux commented Sep 4, 2025

The terminology "rootless" is ambiguous here, because it usually refers to an Xserver without an actual root window.

@cepelinas9000 cepelinas9000 changed the title Add libseat support (rootless Xserver) Add libseat support (run Xserver as ordinary user) Sep 4, 2025
@cepelinas9000
Copy link
Contributor Author

The terminology "rootless" is ambiguous here, because it usually refers to an Xserver without an actual root window.

I changed PR title to less confusing

@callmetango
Copy link
Contributor

@cepelinas9000 I think the target branch of this pull request should be changed from maint-25.0 to master since this is a new feature, no?

@cepelinas9000
Copy link
Contributor Author

@cepelinas9000 I think the target branch of this pull request should be changed from maint-25.0 to master since this is a new feature, no?

I change this to master when will be ready. Now it temporary measure to not deal with intermediate merge conflicts🤞.

@b-aaz
Copy link
Contributor

b-aaz commented Sep 4, 2025

Yes it is available on FreeBSD.
https://www.freshports.org/sysutils/seatd/

if (may_fail)
return 0;
FatalError("parse_vt_settings: Cannot open /dev/tty0 (%s)\n",
FatalError("parse_vt_settings: Cannot open /dev/tty0 (%s), maybe missing fot ex. '-seat seat0' parameter? (in case trying to run in rootless mode) \n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"fot ex." ? is this a spelling error?

@b-aaz
Copy link
Contributor

b-aaz commented Sep 4, 2025

This is a large change, In my opinion it needs as large of a change in documentation too, things like new flags and configs should be noted.
It would be nice to also include some operational info too, Things like how to setup and run X with seatd.

Another thing that I forgot to mention is that FreeBSD has seatd but elogind is NOT available.

@cepelinas9000
Copy link
Contributor Author

cepelinas9000 commented Sep 11, 2025

This is progress update, there need more work and testing:

  • shuffled code - now it compiles on bsd systems. You can run on FreeBSD. It will connect to seatd and send commands for console switch. But i just didn't found easy mean to test (vesa, qxl drivers wants access to ram and uses different code path)
  • That is not yet seatd is not full integration , currently works with video drivers which have access to device nodes (i mean `/dev/dri/*' and so on).
  • Patches named "..x../4" because i have additional patch, but is not fully in this scope (need small patch to libseat - it for ability to pass connected seat fd to Xserver).

@callmetango
Copy link
Contributor

@b-aaz

This is a large change, In my opinion it needs as large of a change in documentation too, things like new flags and configs should be noted. It would be nice to also include some operational info too, Things like how to setup and run X with seatd.

Another thing that I forgot to mention is that FreeBSD has seatd but elogind is NOT available.

Yes, I concur!

@callmetango
Copy link
Contributor

@cepelinas9000 Would you mind to involve the Devuan devs or did you already? Basically the patchset against Xorg was created by them, wasn't it?

@callmetango
Copy link
Contributor

@cepelinas9000

Totally don't mind it would be even helpful.

I invited the Devuan devs by posting to libera/#devuan-dev/ Thursday, 2025-09-18.

@ONykyf
Copy link
Contributor

ONykyf commented Sep 22, 2025

@cepelinas9000

To test it, you need libseat and seatd running (doesn't matter as service - you can start as root via tmux). Only problem, that if you have already running X server libseatd will try revoke display driver node and fails (you need initialize with X running).

I don't know anything about libseat/seatd, but would like to try it. Some questions on the topic:

  • libseat/seatd must be initialized with or without X server running?

  • can libseat/seatd be restricted to handle only part of hardware, maybe all not initialized yet?

  • if yes, is it possible to run several seatd instances at once, or to have one X server started through seatd and another one started in another way?

@cepelinas9000
Copy link
Contributor Author

cepelinas9000 commented Sep 22, 2025

I don't know anything about libseat/seatd, but would like to try it. Some questions on the topic:

* libseat/seatd must be initialized _with_ or _without_ X server running?

* can libseat/seatd be restricted to handle only _part_ of hardware, maybe all not initialized yet?

* if yes, is it possible to run several seatd instances at once, or to have one X server started through seatd and another one started in another way?

To answer thesese questions, I want to test myself too (time shortage etc...) and familiarize myself.

Libseat doing following:

  • seatd initialization is to perform vt terminal switch (operation which requires root user) - the sad part (same for logind) it gets current active terminal vt from /dev/tty0 (or equivalent) during client initialization. (relavant code: https://github.com/kennylevinsen/seatd/blob/900e359f99818df434389eb3a39ee767f1d84f2c/seatd/seat.c#L213)... yes it is for vt_bound session, but which ones are saw it where vt bound (i didn't performed deeply test with non vt bound session). As from previous sentence you see from where -keeptty switch came. (Want to start Xserver on other tty... the start script will look like sudo chvt 8;sleep 0.1;./X :2 -keeptty

  • libseat only knows seat0 (that current limitation, logind from systemd is advanced - it tries to limit by udev seat), in this context seat0 mean anything what controls current /dev/tty0 switching and library don't touch devices directly. It its code only reacts to vt changes. In practice doesn't matter if multiple seatd running - you need to avoid running multiple Xservers on same vt

  • what seatd does: it open devices (Xserver perform scanning as usual, just seatd open device nodes), passes its fds, and disables/enables (during vt switch) with ioctls: EVIOCREVOKE, HIDIOCREVOKE and DRM_IOCTL_SET_MASTER/DRM_IOCTL_DROP_MASTER - in other words it forcibly disable/enable any input and output controls.

p.s seatd only open device nodes which recognizes: /dev/dri/, hid devices, evdev devices

@cepelinas9000 cepelinas9000 force-pushed the seatd-rootless branch 2 times, most recently from 02f5d3c to 409243e Compare September 27, 2025 21:46
@cepelinas9000
Copy link
Contributor Author

cepelinas9000 commented Sep 27, 2025

Now if libseat active, the modesetting driver tries to open gpu device node trough seatd (if not - performs as usual). The implication is that: user doesn't not need to have any rights to /dev/dri/card*, of course other story that /dev/dri/renderD* was directly opened when trying with strace glxgears.

Added short image, as long as you can access seatd.sock - you can start Xorg server as any user:

as_user

Refactored code should work on freebsd (or any bsd) as long there is seatd activate (possible to connect to /var/run/seatd.sock) and kms video kernel driver. (couldn't test freebsd because qemu gpu driver was not kms).

#ifdef SEATD_LIBSEAT
// try get device from seatd arbiter
if (dev){
fd = seatd_libseat_open_graphics(dev);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@X11Libre/wranglers ping. @metux @stefan11111

I took liberty and increased public sdk surface with seatd_libseat_open_graphics export (it asks seatd server to perform open operation and via fd passing returns file fd), my question is: shouldn't (in far future) be some sort api* o deal with device opening. Or I missed something?

  • for example amdgpu calls open directly, same intel

@AleryBerry
Copy link

I just wanted to comment that I tried this PR on my Void Linux system and it works perfectly on greetd + tuigreet! I'm so happy that I can now run rootless X11 on my machine ❤️. Many thanks to the XLibre community for this beautiful work.
2025-10-05_15-59

XLibre X Server 1.25.0
X Protocol Version 11, Revision 0
[2025-10-05 15:50:43] Current Operating System: Linux art 6.6.109_1 #1 SMP PREEMPT_DYNAMIC Thu Oct  2 23:53:12 UTC 2025 x86_64
[2025-10-05 15:50:43] Kernel command line: root=UUID=0f1b2445-2045-4702-9b82-8431d17e3198 rw quiet splash console=tty1
[2025-10-05 15:50:43]  
[2025-10-05 15:50:43] Current version of pixman: 0.46.4
[2025-10-05 15:50:43] 	Before reporting problems, check https://github.com/X11Libre/xserver
	to make sure that you have the latest version.
[2025-10-05 15:50:43] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[2025-10-05 15:50:43] (==) Log file: "/home/aleryberry/.local/share/xorg/Xorg.0.log", Time: Sun Oct  5 15:50:43 2025
[2025-10-05 15:50:43] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[2025-10-05 15:50:43] (==) No Layout section.  Using the first Screen section.
[2025-10-05 15:50:43] (==) No screen section available. Using defaults.
[2025-10-05 15:50:43] (**) |-->Screen "Default Screen Section" (0)
[2025-10-05 15:50:43] (**) |   |-->Monitor "<default monitor>"
[2025-10-05 15:50:43] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[2025-10-05 15:50:43] (==) Automatically adding devices
[2025-10-05 15:50:43] (==) Automatically enabling devices
[2025-10-05 15:50:43] (==) Automatically adding GPU devices
[2025-10-05 15:50:43] (==) Automatically binding GPU devices
[2025-10-05 15:50:43] (==) Max clients allowed: 256, resource mask: 0x1fffff
[2025-10-05 15:50:43] (WW) The directory "/usr/share/fonts/X11/OTF" does not exist.
[2025-10-05 15:50:43] 	Entry deleted from font path.
[2025-10-05 15:50:43] (==) FontPath set to:
	/usr/share/fonts/X11/misc,
	/usr/share/fonts/X11/TTF,
	/usr/share/fonts/X11/Type1,
	/usr/share/fonts/X11/100dpi,
	/usr/share/fonts/X11/75dpi
[2025-10-05 15:50:43] (==) ModulePath set to "/usr/lib/xorg/modules"
[2025-10-05 15:50:43] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[2025-10-05 15:50:43] (II) Module ABI versions:
[2025-10-05 15:50:43] 	X.Org ANSI C Emulation: 1.4
[2025-10-05 15:50:43] 	X.Org Video Driver: 28.0
[2025-10-05 15:50:43] 	X.Org XInput driver : 26.0
[2025-10-05 15:50:43] 	X.Org Server Extension : 11.0
[2025-10-05 15:50:43] (II) seatd_libseat init
[2025-10-05 15:50:43] (II) [libseat/libseat.c:73] Seat opened with backend 'seatd'
[2025-10-05 15:50:43] (II) [libseat/backend/seatd.c:212] Enabling seat
[2025-10-05 15:50:43] (II) seatd_libseat enable
[2025-10-05 15:50:43] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[2025-10-05 15:50:43] (II) seatd_libseat handled 2 events
[2025-10-05 15:50:43] (II) seatd_libseat client activated
[2025-10-05 15:50:43] (II) xfree86: Adding drm device (/dev/dri/card0)
[2025-10-05 15:50:43] (II) Platform probe for /sys/devices/pci0000:00/0000:00:02.0/drm/card0
[2025-10-05 15:50:43] (II) seatd_libseat try open graphics /dev/dri/card0
[2025-10-05 15:50:43] (II) seatd_libseat opened graphics: /dev/dri/card0 (1:11)
[2025-10-05 15:50:43] (--) PCI:*(0@0:2:0) 8086:3185:103c:864d rev 6, Mem @ 0xa0000000/16777216, 0x90000000/268435456, I/O @ 0xf000/64, BIOS @ 0x????????/131072
[2025-10-05 15:50:43] (II) LoadModule: "glx"
[2025-10-05 15:50:43] (II) Loading /usr/lib/xorg/modules/xlibre-25.0/extensions/libglx.so
[2025-10-05 15:50:43] (II) Module glx: vendor="X.Org Foundation"
[2025-10-05 15:50:43] 	compiled for 1.25.0, module version = 1.0.0
[2025-10-05 15:50:43] 	ABI class: X.Org Server Extension, version 11.0
[2025-10-05 15:50:43] (==) Matched intel as autoconfigured driver 0
[2025-10-05 15:50:43] (==) Matched modesetting as autoconfigured driver 1
[2025-10-05 15:50:43] (==) Matched fbdev as autoconfigured driver 2
[2025-10-05 15:50:43] (==) Matched vesa as autoconfigured driver 3
[2025-10-05 15:50:43] (==) Assigned the driver to the xf86ConfigLayout
[2025-10-05 15:50:43] (II) LoadModule: "intel"
[2025-10-05 15:50:43] (WW) Warning, couldn't open module intel
[2025-10-05 15:50:43] (EE) Failed to load module "intel" (module does not exist, 0)
[2025-10-05 15:50:43] (II) LoadModule: "modesetting"
[2025-10-05 15:50:43] (II) Loading /usr/lib/xorg/modules/xlibre-25.0/drivers/modesetting_drv.so
[2025-10-05 15:50:43] (II) Module modesetting: vendor="X.Org Foundation"
[2025-10-05 15:50:43] 	compiled for 1.25.0, module version = 1.25.0
[2025-10-05 15:50:43] 	Module class: X.Org Video Driver
[2025-10-05 15:50:43] 	ABI class: X.Org Video Driver, version 28.0
[2025-10-05 15:50:43] (II) LoadModule: "fbdev"
[2025-10-05 15:50:43] (WW) Warning, couldn't open module fbdev
[2025-10-05 15:50:43] (EE) Failed to load module "fbdev" (module does not exist, 0)
[2025-10-05 15:50:43] (II) LoadModule: "vesa"
[2025-10-05 15:50:43] (WW) Warning, couldn't open module vesa
[2025-10-05 15:50:43] (EE) Failed to load module "vesa" (module does not exist, 0)
[2025-10-05 15:50:43] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[2025-10-05 15:50:43] (II) modeset(0): using drv /dev/dri/card0
[2025-10-05 15:50:43] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[2025-10-05 15:50:43] (II) modeset(0): Creating default Display subsection in Screen section
	"Default Screen Section" for depth/fbbpp 24/32
[2025-10-05 15:50:43] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[2025-10-05 15:50:43] (==) modeset(0): RGB weight 888
[2025-10-05 15:50:43] (==) modeset(0): Default visual is TrueColor
[2025-10-05 15:50:43] (II) Loading sub module "glamoregl"
[2025-10-05 15:50:43] (II) LoadModule: "glamoregl"
[2025-10-05 15:50:43] (II) Loading /usr/lib/xorg/modules/xlibre-25.0/libglamoregl.so
[2025-10-05 15:50:43] (II) Module glamoregl: vendor="X.Org Foundation"
[2025-10-05 15:50:43] 	compiled for 1.25.0, module version = 1.0.1
[2025-10-05 15:50:43] 	ABI class: X.Org ANSI C Emulation, version 1.4
[2025-10-05 15:50:43] (II) modeset(0): glamor: Using OpenGL 4.6 context.
[2025-10-05 15:50:43] (II) modeset(0): glamor X acceleration enabled on Mesa Intel(R) UHD Graphics 600 (GLK 2)
[2025-10-05 15:50:43] (II) modeset(0): glamor initialized
[2025-10-05 15:50:43] (==) modeset(0): VariableRefresh: disabled
[2025-10-05 15:50:43] (==) modeset(0): AsyncFlipSecondaries: disabled
[2025-10-05 15:50:43] (II) modeset(0): Atomic modesetting disabled
[2025-10-05 15:50:43] (II) modeset(0): TearFree: enabled
[2025-10-05 15:50:43] (II) modeset(0): Output eDP-1 has no monitor section
[2025-10-05 15:50:43] (II) modeset(0): Output HDMI-1 has no monitor section
[2025-10-05 15:50:44] (II) modeset(0): Output DP-1 has no monitor section
[2025-10-05 15:50:44] (II) modeset(0): EDID for output eDP-1
[2025-10-05 15:50:44] (II) modeset(0): Manufacturer: AUO  Model: ce90  Serial#: 0
[2025-10-05 15:50:44] (II) modeset(0): Year: 2020  Week: 0
[2025-10-05 15:50:44] (II) modeset(0): EDID Version: 1.4
[2025-10-05 15:50:44] (II) modeset(0): Digital Display Input
[2025-10-05 15:50:44] (II) modeset(0): 6 bits per channel
[2025-10-05 15:50:44] (II) modeset(0): Digital interface is DisplayPort
[2025-10-05 15:50:44] (II) modeset(0): Max Image Size [cm]: horiz.: 31  vert.: 17
[2025-10-05 15:50:44] (II) modeset(0): Gamma: 2.20
[2025-10-05 15:50:44] (II) modeset(0): No DPMS capabilities specified
[2025-10-05 15:50:44] (II) modeset(0): Supported color encodings: RGB 4:4:4 
[2025-10-05 15:50:44] (II) modeset(0): First detailed timing is preferred mode
[2025-10-05 15:50:44] (II) modeset(0): Preferred mode is native pixel format and refresh rate
[2025-10-05 15:50:44] (II) modeset(0): Display is continuous-frequency
[2025-10-05 15:50:44] (II) modeset(0): redX: 0.56 redY: 0.34   greenX: 0.34 greenY: 0.57
[2025-10-05 15:50:44] (II) modeset(0): blueX: 0.16 blueY: 0.13   whiteX: 0.31 whiteY: 0.33
[2025-10-05 15:50:44] (II) modeset(0): Manufacturer's mask: 0
[2025-10-05 15:50:44] (II) modeset(0): Supported detailed timing:
[2025-10-05 15:50:44] (II) modeset(0): clock: 76.30 MHz   Image Size:  309 x 173 mm
[2025-10-05 15:50:44] (II) modeset(0): h_active: 1366  h_sync: 1404  h_sync_end 1426 h_blank_end 1592 h_border: 0
[2025-10-05 15:50:44] (II) modeset(0): v_active: 768  v_sync: 771  v_sync_end 777 v_blanking: 798 v_border: 0
[2025-10-05 15:50:44] (II) modeset(0): Supported detailed timing:
[2025-10-05 15:50:44] (II) modeset(0): clock: 50.87 MHz   Image Size:  309 x 173 mm
[2025-10-05 15:50:44] (II) modeset(0): h_active: 1366  h_sync: 1404  h_sync_end 1426 h_blank_end 1592 h_border: 0
[2025-10-05 15:50:44] (II) modeset(0): v_active: 768  v_sync: 771  v_sync_end 777 v_blanking: 798 v_border: 0
[2025-10-05 15:50:44] (II) modeset(0): Unknown vendor-specific block 2
[2025-10-05 15:50:44] (II) modeset(0): EDID (in hex):
[2025-10-05 15:50:44] (II) modeset(0): 	00ffffffffffff0006af90ce00000000
[2025-10-05 15:50:44] (II) modeset(0): 	001e0104951f117803c0d58f56589329
[2025-10-05 15:50:44] (II) modeset(0): 	20505400000001010101010101010101
[2025-10-05 15:50:44] (II) modeset(0): 	010101010101ce1d56e250001e302616
[2025-10-05 15:50:44] (II) modeset(0): 	360035ad10000018df1356e250001e30
[2025-10-05 15:50:44] (II) modeset(0): 	2616360035ad10000018000000000000
[2025-10-05 15:50:44] (II) modeset(0): 	00000000000000000000000000000002
[2025-10-05 15:50:44] (II) modeset(0): 	001048ff0f3c7d480f1b7d202020003d
[2025-10-05 15:50:44] (II) modeset(0): Printing probed modes for output eDP-1
[2025-10-05 15:50:44] (II) modeset(0): Modeline "1366x768"x60.06  76.30  1366 1404 1426 1592  768 771 777 798 -hsync -vsync (47.93 kHz eP)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "1366x768"x40.04  50.87  1366 1404 1426 1592  768 771 777 798 -hsync -vsync (31.95 kHz e)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "1280x720"x60.06  64.08  1280 1328 1360 1440  720 723 728 741 +hsync -vsync (44.50 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "1024x768"x60.06  65.06  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.41 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "960x720"x60.06  117.12  960 1024 1128 1300  720 720 722 750 doublescan -hsync +vsync (90.09 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "928x696"x60.06  109.17  928 976 1088 1264  696 696 698 719 doublescan -hsync +vsync (86.36 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "896x672"x60.06  102.48  896 960 1060 1224  672 672 674 697 doublescan -hsync +vsync (83.72 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "1024x576"x60.06  42.17  1024 1072 1104 1184  576 579 584 593 +hsync -vsync (35.61 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "960x600"x60.06  77.08  960 984 1000 1040  600 601 604 617 doublescan +hsync -vsync (74.11 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "960x540"x60.06  37.40  960 1008 1040 1120  540 543 548 556 +hsync -vsync (33.39 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "800x600"x60.06  38.44  800 824 896 1024  600 601 603 625 +hsync +vsync (37.54 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "840x525"x60.06  59.67  840 864 880 920  525 526 529 540 doublescan +hsync -vsync (64.86 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "864x486"x60.06  30.75  864 912 944 1024  486 489 494 500 +hsync -vsync (30.03 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "700x525"x60.06  61.08  700 744 820 940  525 526 532 541 doublescan +hsync +vsync (64.98 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "800x450"x60.06  48.94  800 824 840 880  450 451 454 463 doublescan +hsync -vsync (55.61 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "640x512"x60.06  54.04  640 664 720 844  512 512 514 533 doublescan +hsync +vsync (64.02 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "700x450"x60.06  43.38  700 724 740 780  450 451 456 463 doublescan +hsync -vsync (55.61 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "640x480"x60.06  25.22  640 656 752 800  480 490 492 525 -hsync -vsync (31.53 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "720x405"x60.06  22.14  720 768 800 880  405 408 413 419 +hsync -vsync (25.16 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "684x384"x60.06  36.25  684 708 724 764  384 385 390 395 doublescan +hsync -vsync (47.45 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "640x360"x60.06  17.97  640 688 720 800  360 363 368 374 +hsync -vsync (22.46 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "512x384"x60.06  32.53  512 524 592 672  384 385 388 403 doublescan -hsync -vsync (48.41 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "512x288"x60.06  21.05  512 536 552 592  288 289 292 296 doublescan +hsync -vsync (35.55 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "480x270"x60.06  18.70  480 504 520 560  270 271 274 278 doublescan +hsync -vsync (33.39 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "400x300"x60.06  19.19  400 412 448 512  300 300 301 312 doublescan +hsync +vsync (37.48 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "432x243"x60.06  15.38  432 456 472 512  243 244 247 250 doublescan +hsync -vsync (30.03 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "320x240"x60.06  12.59  320 328 376 400  240 245 246 262 doublescan -hsync -vsync (31.47 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "360x202"x60.06  11.05  360 384 400 440  202 204 206 209 doublescan +hsync -vsync (25.10 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): Modeline "320x180"x60.06  8.98  320 344 360 400  180 181 184 187 doublescan +hsync -vsync (22.46 kHz d)
[2025-10-05 15:50:44] (II) modeset(0): EDID for output HDMI-1
[2025-10-05 15:50:44] (II) modeset(0): EDID for output DP-1
[2025-10-05 15:50:44] (II) modeset(0): Output eDP-1 connected
[2025-10-05 15:50:44] (II) modeset(0): Output HDMI-1 disconnected
[2025-10-05 15:50:44] (II) modeset(0): Output DP-1 disconnected
[2025-10-05 15:50:44] (II) modeset(0): Using exact sizes for initial modes
[2025-10-05 15:50:44] (II) modeset(0): Output eDP-1 using initial mode 1366x768 +0+0
[2025-10-05 15:50:44] (==) modeset(0): Using gamma correction (1.00, 1.00, 1.00)
[2025-10-05 15:50:44] (==) modeset(0): DPI set to (96, 96)
[2025-10-05 15:50:44] (II) Loading sub module "fb"
[2025-10-05 15:50:44] (II) LoadModule: "fb"
[2025-10-05 15:50:44] (II) Module "fb" already built-in
[2025-10-05 15:50:44] (==) modeset(0): Backing store enabled
[2025-10-05 15:50:44] (==) modeset(0): Silken mouse enabled
[2025-10-05 15:50:44] (II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
[2025-10-05 15:50:44] (==) modeset(0): DPMS enabled
[2025-10-05 15:50:44] (II) modeset(0): [DRI2] Setup complete
[2025-10-05 15:50:44] (II) modeset(0): [DRI2]   DRI driver: iris
[2025-10-05 15:50:44] (II) modeset(0): [DRI2]   VDPAU driver: va_gl
[2025-10-05 15:50:44] (II) Output(s) initialized
[2025-10-05 15:50:44] (II) Initializing extension Generic Event Extension
[2025-10-05 15:50:44] (II) Initializing extension SHAPE
[2025-10-05 15:50:44] (II) Initializing extension MIT-SHM
[2025-10-05 15:50:44] (II) Initializing extension XInputExtension
[2025-10-05 15:50:44] (II) Initializing extension XTEST
[2025-10-05 15:50:44] (II) Initializing extension BIG-REQUESTS
[2025-10-05 15:50:44] (II) Initializing extension SYNC
[2025-10-05 15:50:44] (II) Initializing extension XKEYBOARD
[2025-10-05 15:50:44] (II) Initializing extension XC-MISC
[2025-10-05 15:50:44] (II) Initializing extension XFIXES
[2025-10-05 15:50:44] (II) Initializing extension RENDER
[2025-10-05 15:50:44] (II) Initializing extension RANDR
[2025-10-05 15:50:44] (II) Initializing extension COMPOSITE
[2025-10-05 15:50:44] (II) Initializing extension DAMAGE
[2025-10-05 15:50:44] (II) Initializing extension MIT-SCREEN-SAVER
[2025-10-05 15:50:44] (II) Initializing extension DOUBLE-BUFFER
[2025-10-05 15:50:44] (II) Initializing extension RECORD
[2025-10-05 15:50:44] (II) Initializing extension DPMS
[2025-10-05 15:50:44] (II) Initializing extension Present
[2025-10-05 15:50:44] (II) Initializing extension DRI3
[2025-10-05 15:50:44] (II) Initializing extension X-Resource
[2025-10-05 15:50:44] (II) Initializing extension XVideo
[2025-10-05 15:50:44] (II) Initializing extension XVideo-MotionCompensation
[2025-10-05 15:50:44] (II) Initializing extension GLX
[2025-10-05 15:50:44] (II) GLX: Initialized glamor GL provider for screen 0
[2025-10-05 15:50:44] (II) GLX: Another vendor is already registered for screen 0
[2025-10-05 15:50:44] (II) Initializing extension XFree86-VidModeExtension
[2025-10-05 15:50:44] (II) Initializing extension XFree86-DGA
[2025-10-05 15:50:44] (II) Initializing extension XFree86-DRI
[2025-10-05 15:50:44] (II) Initializing extension DRI2
[2025-10-05 15:50:44] (II) Extensions initialized
[2025-10-05 15:50:44] (II) modeset(0): Damage tracking initialized
[2025-10-05 15:50:44] (II) modeset(0): Setting screen physical size to 361 x 203
[2025-10-05 15:50:44] (II) Screen(s) initialized
[2025-10-05 15:50:44] (II) config/udev: Adding input device Video Bus (/dev/input/event3)
[2025-10-05 15:50:44] (**) Video Bus: Applying InputClass "libinput keyboard catchall"
[2025-10-05 15:50:44] (II) LoadModule: "libinput"
[2025-10-05 15:50:44] (II) Loading /usr/lib/xorg/modules/xlibre-25.0/input/libinput_drv.so
[2025-10-05 15:50:44] (II) Module libinput: vendor="X.Org Foundation"
[2025-10-05 15:50:44] 	compiled for 1.25.0, module version = 1.5.0
[2025-10-05 15:50:44] 	Module class: X.Org XInput Driver
[2025-10-05 15:50:44] 	ABI class: X.Org XInput driver, version 26.0
[2025-10-05 15:50:44] (II) Using input driver 'libinput' for 'Video Bus'
[2025-10-05 15:50:44] (II) seatd_libseat try open /dev/input/event3
[2025-10-05 15:50:44] (II) seatd_libseat opened /dev/input/event3 (2:22)
[2025-10-05 15:50:44] (**) Video Bus: always reports core events
[2025-10-05 15:50:44] (**) Option "Device" "/dev/input/event3"
[2025-10-05 15:50:45] (II) event3  - Video Bus: is tagged by udev as: Keyboard
[2025-10-05 15:50:45] (II) event3  - Video Bus: device is a keyboard
[2025-10-05 15:50:45] (II) event3  - Video Bus: device removed
[2025-10-05 15:50:45] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input3/event3"
[2025-10-05 15:50:45] (II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD, id 6)
[2025-10-05 15:50:45] (II) event3  - Video Bus: is tagged by udev as: Keyboard
[2025-10-05 15:50:45] (II) event3  - Video Bus: device is a keyboard
[2025-10-05 15:50:45] (II) config/udev: Adding input device Power Button (/dev/input/event2)
[2025-10-05 15:50:45] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[2025-10-05 15:50:45] (II) Using input driver 'libinput' for 'Power Button'
[2025-10-05 15:50:45] (II) seatd_libseat try open /dev/input/event2
[2025-10-05 15:50:45] (II) seatd_libseat opened /dev/input/event2 (3:25)
[2025-10-05 15:50:45] (**) Power Button: always reports core events
[2025-10-05 15:50:45] (**) Option "Device" "/dev/input/event2"
[2025-10-05 15:50:45] (II) event2  - Power Button: is tagged by udev as: Keyboard
[2025-10-05 15:50:45] (II) event2  - Power Button: device is a keyboard
[2025-10-05 15:50:45] (II) event2  - Power Button: device removed
[2025-10-05 15:50:45] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input2/event2"
[2025-10-05 15:50:45] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 7)
[2025-10-05 15:50:45] (II) event2  - Power Button: is tagged by udev as: Keyboard
[2025-10-05 15:50:45] (II) event2  - Power Button: device is a keyboard
[2025-10-05 15:50:45] (II) config/udev: Adding input device Lid Switch (/dev/input/event1)
[2025-10-05 15:50:45] (II) No input driver specified, ignoring this device.
[2025-10-05 15:50:45] (II) This device may have been added with another device file.
[2025-10-05 15:50:45] (II) config/udev: Adding input device HDA Intel PCH Mic (/dev/input/event9)
[2025-10-05 15:50:45] (II) No input driver specified, ignoring this device.
[2025-10-05 15:50:45] (II) This device may have been added with another device file.
[2025-10-05 15:50:45] (II) config/udev: Adding input device HDA Intel PCH Headphone (/dev/input/event10)
[2025-10-05 15:50:45] (II) No input driver specified, ignoring this device.
[2025-10-05 15:50:45] (II) This device may have been added with another device file.
[2025-10-05 15:50:45] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=3 (/dev/input/event11)
[2025-10-05 15:50:45] (II) No input driver specified, ignoring this device.
[2025-10-05 15:50:45] (II) This device may have been added with another device file.
[2025-10-05 15:50:45] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=7 (/dev/input/event12)
[2025-10-05 15:50:45] (II) No input driver specified, ignoring this device.
[2025-10-05 15:50:45] (II) This device may have been added with another device file.
[2025-10-05 15:50:45] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=8 (/dev/input/event13)
[2025-10-05 15:50:45] (II) No input driver specified, ignoring this device.
[2025-10-05 15:50:45] (II) This device may have been added with another device file.
[2025-10-05 15:50:45] (II) config/udev: Adding input device SYNA3296:00 06CB:CD50 Mouse (/dev/input/event7)
[2025-10-05 15:50:45] (**) SYNA3296:00 06CB:CD50 Mouse: Applying InputClass "libinput pointer catchall"
[2025-10-05 15:50:45] (II) Using input driver 'libinput' for 'SYNA3296:00 06CB:CD50 Mouse'
[2025-10-05 15:50:45] (II) seatd_libseat try open /dev/input/event7
[2025-10-05 15:50:45] (II) seatd_libseat opened /dev/input/event7 (4:26)
[2025-10-05 15:50:45] (**) SYNA3296:00 06CB:CD50 Mouse: always reports core events
[2025-10-05 15:50:45] (**) Option "Device" "/dev/input/event7"
[2025-10-05 15:50:45] (II) event7  - SYNA3296:00 06CB:CD50 Mouse: is tagged by udev as: Mouse
[2025-10-05 15:50:45] (II) event7  - SYNA3296:00 06CB:CD50 Mouse: device is a pointer
[2025-10-05 15:50:45] (II) event7  - SYNA3296:00 06CB:CD50 Mouse: device removed
[2025-10-05 15:50:45] (II) libinput: SYNA3296:00 06CB:CD50 Mouse: Step value 0 was provided, libinput Fallback acceleration function is used.
[2025-10-05 15:50:45] (II) libinput: SYNA3296:00 06CB:CD50 Mouse: Step value 0 was provided, libinput Fallback acceleration function is used.
[2025-10-05 15:50:45] (II) libinput: SYNA3296:00 06CB:CD50 Mouse: Step value 0 was provided, libinput Fallback acceleration function is used.
[2025-10-05 15:50:45] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:17.1/i2c_designware.3/i2c-9/i2c-SYNA3296:00/0018:06CB:CD50.0001/input/input15/event7"
[2025-10-05 15:50:45] (II) XINPUT: Adding extended input device "SYNA3296:00 06CB:CD50 Mouse" (type: MOUSE, id 8)
[2025-10-05 15:50:45] (**) Option "AccelerationScheme" "none"
[2025-10-05 15:50:45] (**) SYNA3296:00 06CB:CD50 Mouse: (accel) selected scheme none/0
[2025-10-05 15:50:45] (**) SYNA3296:00 06CB:CD50 Mouse: (accel) acceleration factor: 2.00
[2025-10-05 15:50:45] (**) SYNA3296:00 06CB:CD50 Mouse: (accel) acceleration threshold: 4
[2025-10-05 15:50:45] (II) event7  - SYNA3296:00 06CB:CD50 Mouse: is tagged by udev as: Mouse
[2025-10-05 15:50:45] (II) event7  - SYNA3296:00 06CB:CD50 Mouse: device is a pointer
[2025-10-05 15:50:45] (II) config/udev: Adding input device SYNA3296:00 06CB:CD50 Mouse (/dev/input/mouse0)
[2025-10-05 15:50:45] (II) No input driver specified, ignoring this device.
[2025-10-05 15:50:45] (II) This device may have been added with another device file.
[2025-10-05 15:50:45] (II) config/udev: Adding input device SYNA3296:00 06CB:CD50 Touchpad (/dev/input/event8)
[2025-10-05 15:50:45] (**) SYNA3296:00 06CB:CD50 Touchpad: Applying InputClass "libinput touchpad catchall"
[2025-10-05 15:50:45] (II) Using input driver 'libinput' for 'SYNA3296:00 06CB:CD50 Touchpad'
[2025-10-05 15:50:45] (II) seatd_libseat try open /dev/input/event8
[2025-10-05 15:50:45] (II) seatd_libseat opened /dev/input/event8 (5:27)
[2025-10-05 15:50:45] (**) SYNA3296:00 06CB:CD50 Touchpad: always reports core events
[2025-10-05 15:50:45] (**) Option "Device" "/dev/input/event8"
[2025-10-05 15:50:45] (II) event8  - SYNA3296:00 06CB:CD50 Touchpad: is tagged by udev as: Touchpad
[2025-10-05 15:50:45] (II) event8  - SYNA3296:00 06CB:CD50 Touchpad: device is a touchpad
[2025-10-05 15:50:45] (II) event8  - SYNA3296:00 06CB:CD50 Touchpad: device removed
[2025-10-05 15:50:45] (II) libinput: SYNA3296:00 06CB:CD50 Touchpad: Step value 0 was provided, libinput Fallback acceleration function is used.
[2025-10-05 15:50:45] (II) libinput: SYNA3296:00 06CB:CD50 Touchpad: Step value 0 was provided, libinput Fallback acceleration function is used.
[2025-10-05 15:50:45] (II) libinput: SYNA3296:00 06CB:CD50 Touchpad: Step value 0 was provided, libinput Fallback acceleration function is used.
[2025-10-05 15:50:45] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:17.1/i2c_designware.3/i2c-9/i2c-SYNA3296:00/0018:06CB:CD50.0001/input/input16/event8"
[2025-10-05 15:50:45] (II) XINPUT: Adding extended input device "SYNA3296:00 06CB:CD50 Touchpad" (type: TOUCHPAD, id 9)
[2025-10-05 15:50:45] (**) Option "AccelerationScheme" "none"
[2025-10-05 15:50:45] (**) SYNA3296:00 06CB:CD50 Touchpad: (accel) selected scheme none/0
[2025-10-05 15:50:45] (**) SYNA3296:00 06CB:CD50 Touchpad: (accel) acceleration factor: 2.00
[2025-10-05 15:50:45] (**) SYNA3296:00 06CB:CD50 Touchpad: (accel) acceleration threshold: 4
[2025-10-05 15:50:45] (II) event8  - SYNA3296:00 06CB:CD50 Touchpad: is tagged by udev as: Touchpad
[2025-10-05 15:50:45] (II) event8  - SYNA3296:00 06CB:CD50 Touchpad: device is a touchpad
[2025-10-05 15:50:45] (II) config/udev: Adding input device SYNA3296:00 06CB:CD50 Touchpad (/dev/input/mouse1)
[2025-10-05 15:50:45] (II) No input driver specified, ignoring this device.
[2025-10-05 15:50:45] (II) This device may have been added with another device file.
[2025-10-05 15:50:45] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event0)
[2025-10-05 15:50:45] (**) AT Translated Set 2 keyboard: Applying InputClass "libinput keyboard catchall"
[2025-10-05 15:50:45] (II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'
[2025-10-05 15:50:45] (II) seatd_libseat try open /dev/input/event0
[2025-10-05 15:50:45] (II) seatd_libseat opened /dev/input/event0 (6:28)
[2025-10-05 15:50:45] (**) AT Translated Set 2 keyboard: always reports core events
[2025-10-05 15:50:45] (**) Option "Device" "/dev/input/event0"
[2025-10-05 15:50:45] (II) event0  - AT Translated Set 2 keyboard: is tagged by udev as: Keyboard
[2025-10-05 15:50:45] (II) event0  - AT Translated Set 2 keyboard: device is a keyboard
[2025-10-05 15:50:45] (II) event0  - AT Translated Set 2 keyboard: device removed
[2025-10-05 15:50:45] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio0/input/input0/event0"
[2025-10-05 15:50:45] (II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD, id 10)
[2025-10-05 15:50:45] (II) event0  - AT Translated Set 2 keyboard: is tagged by udev as: Keyboard
[2025-10-05 15:50:45] (II) event0  - AT Translated Set 2 keyboard: device is a keyboard
[2025-10-05 15:50:45] (II) config/udev: Adding input device PC Speaker (/dev/input/event5)
[2025-10-05 15:50:45] (II) No input driver specified, ignoring this device.
[2025-10-05 15:50:45] (II) This device may have been added with another device file.
[2025-10-05 15:50:45] (II) config/udev: Adding input device kmonad-output (/dev/input/event14)
[2025-10-05 15:50:45] (**) kmonad-output: Applying InputClass "libinput pointer catchall"
[2025-10-05 15:50:45] (**) kmonad-output: Applying InputClass "libinput keyboard catchall"
[2025-10-05 15:50:45] (II) Using input driver 'libinput' for 'kmonad-output'
[2025-10-05 15:50:45] (II) seatd_libseat try open /dev/input/event14
[2025-10-05 15:50:45] (II) seatd_libseat opened /dev/input/event14 (7:29)
[2025-10-05 15:50:45] (**) kmonad-output: always reports core events
[2025-10-05 15:50:45] (**) Option "Device" "/dev/input/event14"
[2025-10-05 15:50:45] (II) event14 - kmonad-output: is tagged by udev as: Keyboard Mouse
[2025-10-05 15:50:45] (II) event14 - kmonad-output: device is a pointer
[2025-10-05 15:50:45] (II) event14 - kmonad-output: device is a keyboard
[2025-10-05 15:50:45] (II) event14 - kmonad-output: device removed
[2025-10-05 15:50:45] (II) libinput: kmonad-output: needs a virtual subdevice
[2025-10-05 15:50:45] (**) Option "config_info" "udev:/sys/devices/virtual/input/input18/event14"
[2025-10-05 15:50:45] (II) XINPUT: Adding extended input device "kmonad-output" (type: MOUSE, id 11)
[2025-10-05 15:50:45] (**) Option "AccelerationScheme" "none"
[2025-10-05 15:50:45] (**) kmonad-output: (accel) selected scheme none/0
[2025-10-05 15:50:45] (**) kmonad-output: (accel) acceleration factor: 2.00
[2025-10-05 15:50:45] (**) kmonad-output: (accel) acceleration threshold: 4
[2025-10-05 15:50:45] (II) event14 - kmonad-output: is tagged by udev as: Keyboard Mouse
[2025-10-05 15:50:45] (II) event14 - kmonad-output: device is a pointer
[2025-10-05 15:50:45] (II) event14 - kmonad-output: device is a keyboard
[2025-10-05 15:50:45] (II) config/udev: Adding input device Wireless hotkeys (/dev/input/event4)
[2025-10-05 15:50:45] (**) Wireless hotkeys: Applying InputClass "libinput keyboard catchall"
[2025-10-05 15:50:45] (II) Using input driver 'libinput' for 'Wireless hotkeys'
[2025-10-05 15:50:45] (II) seatd_libseat try open /dev/input/event4
[2025-10-05 15:50:45] (II) seatd_libseat opened /dev/input/event4 (8:30)
[2025-10-05 15:50:45] (**) Wireless hotkeys: always reports core events
[2025-10-05 15:50:45] (**) Option "Device" "/dev/input/event4"
[2025-10-05 15:50:45] (II) event4  - Wireless hotkeys: is tagged by udev as: Keyboard
[2025-10-05 15:50:45] (II) event4  - Wireless hotkeys: device is a keyboard
[2025-10-05 15:50:45] (II) event4  - Wireless hotkeys: device removed
[2025-10-05 15:50:45] (**) Option "config_info" "udev:/sys/devices/virtual/input/input4/event4"
[2025-10-05 15:50:45] (II) XINPUT: Adding extended input device "Wireless hotkeys" (type: KEYBOARD, id 12)
[2025-10-05 15:50:45] (II) event4  - Wireless hotkeys: is tagged by udev as: Keyboard
[2025-10-05 15:50:45] (II) event4  - Wireless hotkeys: device is a keyboard
[2025-10-05 15:50:45] (II) config/udev: Adding input device HP WMI hotkeys (/dev/input/event6)
[2025-10-05 15:50:45] (**) HP WMI hotkeys: Applying InputClass "libinput keyboard catchall"
[2025-10-05 15:50:45] (II) Using input driver 'libinput' for 'HP WMI hotkeys'
[2025-10-05 15:50:45] (II) seatd_libseat try open /dev/input/event6
[2025-10-05 15:50:45] (II) seatd_libseat opened /dev/input/event6 (9:31)
[2025-10-05 15:50:45] (**) HP WMI hotkeys: always reports core events
[2025-10-05 15:50:45] (**) Option "Device" "/dev/input/event6"
[2025-10-05 15:50:45] (II) event6  - HP WMI hotkeys: is tagged by udev as: Keyboard Switch
[2025-10-05 15:50:45] (II) event6  - HP WMI hotkeys: device is a keyboard
[2025-10-05 15:50:45] (II) event6  - HP WMI hotkeys: device removed
[2025-10-05 15:50:45] (**) Option "config_info" "udev:/sys/devices/virtual/input/input6/event6"
[2025-10-05 15:50:45] (II) XINPUT: Adding extended input device "HP WMI hotkeys" (type: KEYBOARD, id 13)
[2025-10-05 15:50:45] (II) event6  - HP WMI hotkeys: is tagged by udev as: Keyboard Switch
[2025-10-05 15:50:45] (II) event6  - HP WMI hotkeys: device is a keyboard
[2025-10-05 15:50:45] (II) Input(s) initialized
[2025-10-05 15:50:45] (**) kmonad-output: Applying InputClass "libinput pointer catchall"
[2025-10-05 15:50:45] (**) kmonad-output: Applying InputClass "libinput keyboard catchall"
[2025-10-05 15:50:45] (II) Using input driver 'libinput' for 'kmonad-output'
[2025-10-05 15:50:45] (II) seatd_libseat reuse 23 for /dev/input/event14
[2025-10-05 15:50:45] (II) seatd_libseat opened /dev/input/event14 (-1:23)
[2025-10-05 15:50:45] (**) kmonad-output: always reports core events
[2025-10-05 15:50:45] (**) Option "Device" "/dev/input/event14"
[2025-10-05 15:50:45] (II) libinput: kmonad-output: is a virtual subdevice
[2025-10-05 15:50:45] (**) Option "config_info" "udev:/sys/devices/virtual/input/input18/event14"
[2025-10-05 15:50:45] (II) XINPUT: Adding extended input device "kmonad-output" (type: KEYBOARD, id 14)

@cepelinas9000
Copy link
Contributor Author

moved opening device node down - now tries open as current process firstly then tries call seatd and improved failure case message (see: https://github.com/X11Libre/xserver/pull/935/files#diff-54b8e9df3c29f5a215f2ffe63e1d897036c6263c7699a3be0d1bbb53e7e040f6R120 )

xf86OpenConsole();
else
if (xorgHWOpenConsole) {
if (!seatd_libseat_controls_session()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation looks wrong on github here for some reason.
Did you use tabs instead of spaces?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That my mixup didn't notice that original diff had tabs here, i just copied from it.

if (xorgHWOpenConsole) {
if (!seatd_libseat_controls_session()) {
xf86CloseConsole();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation looks wrong on github here for some reason.
Did you use tabs instead of spaces?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

}

#ifdef SEATD_LIBSEAT
// try get device from seatd arbiter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a C-style comment


#ifdef SEATD_LIBSEAT
// try get device from seatd arbiter
if (seatd_libseat_controls_session()){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should only be done if we don't have an fd from above. Otherwise, we have a leak.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, does this have to be implemented by the drivers?
It can't be handled by the X server alone?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should only be done if we don't have an fd from above. Otherwise, we have a leak.

Good catch, i moved that block code without thinking...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, does this have to be implemented by the drivers? It can't be handled by the X server alone?

I'm wondering too, but going through drivers all of them manually calls too open, or missing I something?

Copy link
Contributor

@stefan11111 stefan11111 Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with this, but perhaps you can take a look at the logind code?
I don't see any logind-specific code in the drivers.

Also, how exactly does fd = seatd_libseat_open_graphics(dev); work?
You can't just pass fd's from the daemon to the X server.
Does it open a socket to the seatd process and pass the data to/from the real fd? What about the ioctl's we use on the graphics device?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with this, but perhaps you can take a look at the logind code?
I don't see any logind-specific code in the drivers.

When everything works™, device is opened with same seatd_libseat_open_graphics(dev), during get_drm_info probing ( hw/xfree86/os-support/shared/drm_platform.c#L26 ) in driver with help xf86_platform_device_odev_attributes (search in driver.c) call.

But if there is some failure, then driver call hw_open function and tries manually open device. The systemd-logind code doesn't handle this case at all...

Also, how exactly does fd = seatd_libseat_open_graphics(dev); work?
You can't just pass fd's from the daemon to the X server.

It work exactly passing fd's: opens fd from elevated process, via unix socket sends fd to xserver. The twist is that it saves fd inside and additionally calls drop master / revoke ioctls (why it works - 'dup semantics here', you can play with example https://gist.github.com/cepelinas9000/8f30a41894adb84c2786b4d658ac73c9 )

Does it open a socket to the seatd process and pass the data to/from the real fd? What about the ioctl's we use on the graphics device?

Yes it opens session during initialization, for seatd unix socket or dbus connection if systemd-logind. The ioctl business as usual - it return fd and that all. Obviously if seat/logind crashes - worse case scenario during chvt you won't return from tty text mode.

]
endif

if host_machine.system() == 'linux' or host_machine.system().endswith('bsd')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@b-aaz Is this the correct way to check for bsd?


if (fd == -1)
if (fd == -1) {
// Try opening the path directly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a C-style comment


#include "seatd-libseat.h"

// ============ libseat client adapter ======================
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a C-style comment

xf86EnableInputDeviceForVTSwitch(pInfo);
}
}
xf86InputEnableVTProbe(); // Add any paused input devices
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a C-style comment

}
}
xf86InputEnableVTProbe(); // Add any paused input devices
xf86platformVTProbe(); // Probe for outputs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a C-style comment

free(xfmt);
}

// ============== seatd-libseat.h API functions =============
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a C-style comment

@stefan11111
Copy link
Contributor

@cepelinas9000 This pr is intended for maint? Not master?

@cepelinas9000
Copy link
Contributor Author

@cepelinas9000 This pr is intended for maint? Not master?

To master - when it will be +/- ok then i rebase it.

cepelinas9000 and others added 6 commits October 26, 2025 21:10
This is initial patch for libseat. Technicaly verbatim code from Devuan
xorg server moved to os-support/shared directory as it can support other
oses than linux.

The original repository: https://git.devuan.org/devuan/xorg-server.git
The patch between fc24510f17e89a5bbac1065abab758a4d0c42634 and
6bf6238

Co-Authored-By: Mark Hindley <[email protected]>
Co-Authored-By: Ralph Ronnquist <[email protected]>
Signed-off-By: Tautvis <[email protected]>
Format libseat.c style to align with Xlibre

Signed-off-By: Tautvis <[email protected]>
Refactor libseat code for Xlibre and add to meson.build:

* update meson for seat-libseat
* refactor code:
  * seatd-libseat.c - add aditional private include headers
  * add cast to libseat_set_log_handler argument 1 for (libseat_log_func),
  for warning silencing
  * make seatd_libseat_init to accept keeptty state as parameter
  * include xf86Events, xf86_priv - make visible xf86VTLeave for seatd code (it
    is neccesary because seatd can force console leave)

Signed-off-By: Tautvis <[email protected]>
Add xf86VTKeepTtyIsSet function to export KeepTty state.

When seatd activates, it takes control of current vt (in global sense)!,
this code only activates sesion control code when XServer started
using same vt (for more context see c88a325 commit ).

Signed-off-By: Tautvis <[email protected]>
Add necessary code into Xserver to support libseat (this time enabling
functionality).

Code used from Devuan repository + local changes to make functional in Xlibre

Co-Authored-By: Mark Hindley <[email protected]>
Co-Authored-By: Ralph Ronnquist <[email protected]>
Signed-off-By: Tautvis <[email protected]>
The device node with seatd like with systemd-logind are opened during probe
(see get_drm_info in hw/xfree86/os-support/shared/drm_platform.c),
but in case of failure, the modesetting driver tries to open device
node directly (open_hw function in modesetting/driver.c).

This patch aligns functionality and as last resort ask's seatd arbiter
to open device for us.

To make it functional seatd_libseat_controls_session, seatd_libseat_open_graphics needs _X_EXPORT

Signed-off-By: Tautvis <[email protected]>
@cepelinas9000 cepelinas9000 changed the base branch from maint-25.0 to master October 26, 2025 20:57
@cepelinas9000
Copy link
Contributor Author

  • Rebased on master
  • It looks found all inconsistent tab usages
  • @b-aaz for dragonflybsd i checking host_machine.system() == 'dragonfly'
  • I split style change into own patch, maybe it can come with 1st commit?
  • reworded message in modesetting driver.c to reflect why open_hw can be called

@cepelinas9000 cepelinas9000 marked this pull request as ready for review October 29, 2025 11:53
@cepelinas9000
Copy link
Contributor Author

@stefan11111 @X11Libre/dev ping

@Soccera1
Copy link

Other than a couple of unnecessary newlines seemingly added for no reason or an unrelated reason (eg. fixing whitespace consistency should probably be a separate mr) (which aren't a huge issue in my eyes), it looks good to me.

#ifdef SEATD_LIBSEAT
#include <xf86Xinput.h>
extern int seatd_libseat_init(void);
extern int seatd_libseat_init(BOOL KeepTty_state);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, we can safely use stdbool here.
No need to use protocol header types here, if we're not directly dealing with the X11 protocol.

dbus_required = get_option('systemd_logind') == 'true'
dbus_dep = dependency('dbus-1', version: '>= 1.0', required: dbus_required)

seat_libseat_required = get_option('seatd_libseat') == 'true'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we perhaps move those to the hw/xfree86/common meson file ?

extern void seatd_libseat_close_device(InputInfoPtr p);
extern int seatd_libseat_switch_session(int session);
extern Bool seatd_libseat_controls_session(void);
extern _X_EXPORT Bool seatd_libseat_controls_session(void);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a comment that these symbols are only allowed for in-tree drivers and NOT part of public SDK.


#ifdef SEATD_LIBSEAT
/* try get device from seatd arbiter */
if (fd == -1 && seatd_libseat_controls_session()){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps move the whole thing into the seatd support code ? (instead of potentially duplicated within drivers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add seatd/libseat support

8 participants