libera/#devuan/ Thursday, 2025-01-09

freemangordongnarface: dbus is installed07:51
freemangordonrrq: I wonder why the same DDX works properly with elogind setup used in chimaera07:52
rrqdoes that Xorg has device mediation (via logind+dbus)?07:55
rrq(has => have)07:56
freemangordonyes07:57
freemangordonsec07:58
freemangordonto confirm in the code07:58
freemangordonhttps://github.com/maemo-leste-upstream-forks/xorg-server/blob/maemo/chimaera/debian/rules.flags#L10208:00
freemangordon"--enable-systemd-logind"08:00
freemangordonthis enables logind/dbus code, AFAIK08:00
freemangordonhttps://github.com/maemo-leste-upstream-forks/xorg-server/blob/maemo/chimaera/hw/xfree86/os-support/linux/systemd-logind.c08:01
freemangordonalso, I assume Xorg in bookworm has systemd support enabled, and it also works properly08:02
freemangordonhonestly, I didn't look at the details of why it works08:03
freemangordonit is really hard to compile/test xorg on dual-core OMAP08:04
rrqhmm Ill need to add that as remote repo to compare.. daedalus is built from https://git.devuan.org/devuan/xorg-server.git .. forked from salsa source08:09
freemangordonI can assume it is because systemd related daemon code does not make itself DRM master on startup, but calls xf86VTEnter() in systemd_logind_vtenter() in Xserver where appropriate and leaves to xorg/DDX code to do whatever is needed08:09
freemangordonwhile seatd makes itself DRM master as soon as it is started08:10
freemangordonhowever, I wonder why it still does not work even with seatd not running08:10
rrqpossibly; I have't explored the logind code thoroughly but I think it handled the actual swithcin as well, with Xorg as an event client via the "mediation channel"08:12
freemangordonrrq: do you want me to compile and test daedalus code with libseat disabled?08:12
freemangordonmaybe it handles the switching, but, *maybe* it drops DRM master appropriately08:14
freemangordonthat's why DDX can become DRM master when needed08:14
rrqif it's easy enough .. would be good to know if the libseat wrapping has lost something08:14
freemangordoneasy... not. but doable08:14
freemangordonit just takes time actually08:15
freemangordon2 OMAP cores/1GHz/1MB RAM :)08:15
freemangordonok, will do it and will provide the result08:15
rrqok.. meanwhile I'll see if a branch diff can say me something08:15
freemangordonok, thanks08:15
rrqfreemangordon: is the Xorg process run as root on working chimaera?08:34
freemangordonno08:34
freemangordonrrq: for some reason libseat cannot find elogind seat08:35
rrqis it that it needs libelogind0 (or logind) ?08:37
freemangordonno idea :), but elogind is running08:38
freemangordonalso, we create user session with https://github.com/maemo-leste-upstream-forks/autologin/blob/master/main.c08:38
freemangordonso, if I do 'autologin user bash&' from ssh shell I get bash in logind session on the device08:39
freemangordonstartx from there fails, with log 'backend logind failed to open seat, skipping'08:39
freemangordonin the meanwhile loginctl list-seats happily lists seat0 :)08:40
rrqright; the packaging was changed for replacing libsystemd0... needs install of libelogind-compat08:40
freemangordonlibelogind-compat is already the newest version (246.10-5).08:41
rrqcould you strace Xorg to see why the dbus connection fails?08:43
freemangordonlemme try08:44
rrqmmmm is /dev/ttyN owned by the user? .. (there was an old logind code issue with that but I hope that got updated in daedalus)08:46
freemangordoncrw--w---- 1 root tty 4, 7 Jan  9 07:47 /dev/tty708:48
rrqshould that be a non-root user?08:50
rrq(only root can run Xorg on VT7)08:50
freemangordonwe use autologin https://github.com/maemo-leste-upstream-forks/autologin (tinydm fork)08:52
rrqright.. specifically, the ttyN corresponding to VTn must be owned by the user wanting access to input devices.08:53
freemangordonhttps://github.com/maemo-leste-upstream-forks/autologin/blob/master/main.c#L9508:53
freemangordonwe start autologin as root, and it does some pam magis, so tty access is given to the user08:53
freemangordonlemme provide strace logs08:54
freemangordonit seems it *talks* to elogind08:54
rrqright; there was also an bug inherited from libsystemd0 that upon logout the ttyN was changed to be owned by root08:54
rrqi.e. you could run Xorg once on a login, but not twice without re-login08:55
freemangordonI see08:55
freemangordonwell, I cannot run it even once :)08:55
freemangordonhttps://pastebin.com/08:55
freemangordonpastebin limited first 512 kb08:56
rrqwell; the user must ave rw access to /dev/ttyN08:56
freemangordonsee the log08:57
rrqthe Xorg user08:57
freemangordon"path='/org/freedesktop/login1/session/_31"08:57
freemangordonok, seems it opens login connection08:59
rrqcould you try sharing via https://transfer.rrq.au08:59
freemangordonhttps://transfer.rrq.au/NbaY6O7egy/xserver.trace09:01
rrqok.. "Fatal server error: no screens found" ..09:04
rrqDRM_IOCTL_SET_VERSION denied09:05
freemangordonyes, because ddx fails with [  5378.376] (EE) OMAP(0): ERROR: Cannot set the DRM interface version.09:05
freemangordonyes09:05
freemangordonbecause libseat made itself DRM master09:05
freemangordonsorry, have to run, bbl09:05
rrqwhat does that mean? ... would you have a doc pointer about that?09:06
rrqok09:06
rrqlater09:06
freaxeh2so how do I set my resolution09:24
freaxeh2I'm on my ryzen 5800x devuan gaming system. with an rx580 graphics card using displayport on my new monitor and I'm stuck at 800x60009:25
Hurgotronlook into xrandr09:29
freaxeh2ok ty09:29
freaxeh2https://pastebin.com/SKauhTgv09:33
freaxeh2makes me think i havent even got drivers installed yet09:33
freaxeh2sigh ill reinstall devuan and do some partitioning and install windows 11 alongside it09:36
rrqfreemangordon: afaict DRM_MASTER (or not) is set for the file descriptor; seatd sets DRM_MASTER on the file descriptor for /dev/dri/card0 that is returned to Xorg.09:57
rrqfreemangordon: however the log shows a number of other openat for the same path, which is confusing (to me)09:58
rrqfreemangordon: in any case, that Xorg run uses logind backend, which presumably also sets DRM_MASTER on that file descriptor. That'd be log line 1085.10:05
rrqthen there's a subsequent openat "/dev/dri/card0 on line 1086 ... not sure what that is10:07
rrqfreemangordon: then yet another at line 138110:08
rrqfreemangordon: and another at line 349710:09
freemangordonrrq: yes, DDX opens /dev/dri/card011:28
rrqhmm how come it works on debian (bookworm)? it also has device mediation, so should hae the same issue (that the mediated opening of /dev/dri/card0 is drm_master)11:32
rrqbtw I also saw in the log that Xorg doesn;t have write access on /dev/tty0 .. (though not sure if that's relevant here)11:40
freemangordonit is not (tty0)12:12
freemangordonI suspect bookworm xorg does not become DRM master12:12
freemangordonor, it becomes DRM master *after* DDX did what it has to do12:15
freemangordonok, I will try to modernize DDX driver to use  xf86_platform_device_odev_attributes()->fd and/or xf86DRMMasterFd12:30
rrqthe idea behind the mediation is that the Xorg user doesn't have permissions but opens devices through that mediation... the drm_master issue adds the constraint of using that first fd12:33
freemangordonyeah, I see12:34
rrqI thought elogind would copy systemd-logind so would do that drm_master in the same way12:34
freemangordonthat's why I will try to 'fix' ddx driver to be compatible with that12:34
rrqok .. meanwhile I will regenerate :)12:34
freemangordonbut perhaps it does not become master immediately12:34
jjakobI installed rasdaemon, it doesn't start due to "insserv: FATAL: service mountdebugfs has to be enabled to use service rasdaemon" but there is no mountdebugfs service12:58
jjakobI try to install fwupd, it says it will remove libsystemd013:39
jjakobah it's replaced by libelogind013:39
freemangordonrrq: it is getting even better :) accrding to git log of xfree86/os-support/linux/lnx_platform.c, patch af4c84ce8 is applied and there are 2 more patches on top, see https://git.devuan.org/devuan/xorg-server/commits/branch/suites/daedalus-security/hw/xfree86/os-support/linux/lnx_platform.c16:13
freemangordonbut, if you look in the file, that revert is actually not there16:14
freemangordonthat line shall be reverted https://git.devuan.org/devuan/xorg-server/src/branch/suites/daedalus-security/hw/xfree86/os-support/linux/lnx_platform.c#L3116:15
freemangordonand according to git blame, it comes from a commit that happened 6 years ago https://git.devuan.org/devuan/xorg-server/blame/branch/suites/daedalus-security/hw/xfree86/os-support/linux/lnx_platform.c16:15
freemangordonwithout that reverted, there is noone to set busid for devices that are not on PIC bus :)16:16
freemangordon*PCI16:16
freemangordonand busid not being set is the reason why DDX tries to open primary node directly and to control it https://github.com/maemo-leste/xf86-video-omap/blob/master/src/omap_driver.c#L51516:19
freemangordon(gdb) p *pEnt16:20
freemangordon$2 = {index = 1, location = {type = BUS_NONE, id = {pci = 0x0, sbus = {fbNum = 0}, plat = 0x0}}, chipset = 0, active = 1, device = 0x5bae30, driver = 0x5cb7f0}16:20
freemangordon$3 = {identifier = 0x5c5590 "Video Device", vendor = 0x0, board = 0x0, chipset = 0x0, ramdac = 0x0, driver = 0x5c55e8 "omap", myScreenSection = 0x5b7100, claimed = 1, dacSpeeds = {0, 0, 0, 0}, numclocks = 0, clock = {16:20
freemangordon    0 <repeats 128 times>}, clockchip = 0x0, busID = 0x0, active = 1, inUse = 0, videoRam = 0, MemBase = 0, IOBase = 0, chipID = -1, chipRev = -1, options = 0x5c5618, irq = -1, screen = 0}16:20
rrqfreemangordon: morning. commit af4c84ce8 concerns 2 files... moving busid setting for into lnx_platform.c it seems (using the mediated fd) ... (quick glance)21:10
rrqfor devices21:10
rrqthat was then... not sure wether/how that has survived though21:11
rrq.. yes; code is there, with or withot the libseat patch.21:22
rrq(I'm looking at get_drm_info)21:24

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!