| freemangordon | gnarface: dbus is installed | 07:51 |
|---|---|---|
| freemangordon | rrq: I wonder why the same DDX works properly with elogind setup used in chimaera | 07:52 |
| rrq | does that Xorg has device mediation (via logind+dbus)? | 07:55 |
| rrq | (has => have) | 07:56 |
| freemangordon | yes | 07:57 |
| freemangordon | sec | 07:58 |
| freemangordon | to confirm in the code | 07:58 |
| freemangordon | https://github.com/maemo-leste-upstream-forks/xorg-server/blob/maemo/chimaera/debian/rules.flags#L102 | 08:00 |
| freemangordon | "--enable-systemd-logind" | 08:00 |
| freemangordon | this enables logind/dbus code, AFAIK | 08:00 |
| freemangordon | https://github.com/maemo-leste-upstream-forks/xorg-server/blob/maemo/chimaera/hw/xfree86/os-support/linux/systemd-logind.c | 08:01 |
| freemangordon | also, I assume Xorg in bookworm has systemd support enabled, and it also works properly | 08:02 |
| freemangordon | honestly, I didn't look at the details of why it works | 08:03 |
| freemangordon | it is really hard to compile/test xorg on dual-core OMAP | 08:04 |
| rrq | hmm 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 source | 08:09 |
| freemangordon | I 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 needed | 08:09 |
| freemangordon | while seatd makes itself DRM master as soon as it is started | 08:10 |
| freemangordon | however, I wonder why it still does not work even with seatd not running | 08:10 |
| rrq | possibly; 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 |
| freemangordon | rrq: do you want me to compile and test daedalus code with libseat disabled? | 08:12 |
| freemangordon | maybe it handles the switching, but, *maybe* it drops DRM master appropriately | 08:14 |
| freemangordon | that's why DDX can become DRM master when needed | 08:14 |
| rrq | if it's easy enough .. would be good to know if the libseat wrapping has lost something | 08:14 |
| freemangordon | easy... not. but doable | 08:14 |
| freemangordon | it just takes time actually | 08:15 |
| freemangordon | 2 OMAP cores/1GHz/1MB RAM :) | 08:15 |
| freemangordon | ok, will do it and will provide the result | 08:15 |
| rrq | ok.. meanwhile I'll see if a branch diff can say me something | 08:15 |
| freemangordon | ok, thanks | 08:15 |
| rrq | freemangordon: is the Xorg process run as root on working chimaera? | 08:34 |
| freemangordon | no | 08:34 |
| freemangordon | rrq: for some reason libseat cannot find elogind seat | 08:35 |
| rrq | is it that it needs libelogind0 (or logind) ? | 08:37 |
| freemangordon | no idea :), but elogind is running | 08:38 |
| freemangordon | also, we create user session with https://github.com/maemo-leste-upstream-forks/autologin/blob/master/main.c | 08:38 |
| freemangordon | so, if I do 'autologin user bash&' from ssh shell I get bash in logind session on the device | 08:39 |
| freemangordon | startx from there fails, with log 'backend logind failed to open seat, skipping' | 08:39 |
| freemangordon | in the meanwhile loginctl list-seats happily lists seat0 :) | 08:40 |
| rrq | right; the packaging was changed for replacing libsystemd0... needs install of libelogind-compat | 08:40 |
| freemangordon | libelogind-compat is already the newest version (246.10-5). | 08:41 |
| rrq | could you strace Xorg to see why the dbus connection fails? | 08:43 |
| freemangordon | lemme try | 08:44 |
| rrq | mmmm 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 |
| freemangordon | crw--w---- 1 root tty 4, 7 Jan 9 07:47 /dev/tty7 | 08:48 |
| rrq | should that be a non-root user? | 08:50 |
| rrq | (only root can run Xorg on VT7) | 08:50 |
| freemangordon | we use autologin https://github.com/maemo-leste-upstream-forks/autologin (tinydm fork) | 08:52 |
| rrq | right.. specifically, the ttyN corresponding to VTn must be owned by the user wanting access to input devices. | 08:53 |
| freemangordon | https://github.com/maemo-leste-upstream-forks/autologin/blob/master/main.c#L95 | 08:53 |
| freemangordon | we start autologin as root, and it does some pam magis, so tty access is given to the user | 08:53 |
| freemangordon | lemme provide strace logs | 08:54 |
| freemangordon | it seems it *talks* to elogind | 08:54 |
| rrq | right; there was also an bug inherited from libsystemd0 that upon logout the ttyN was changed to be owned by root | 08:54 |
| rrq | i.e. you could run Xorg once on a login, but not twice without re-login | 08:55 |
| freemangordon | I see | 08:55 |
| freemangordon | well, I cannot run it even once :) | 08:55 |
| freemangordon | https://pastebin.com/ | 08:55 |
| freemangordon | pastebin limited first 512 kb | 08:56 |
| rrq | well; the user must ave rw access to /dev/ttyN | 08:56 |
| freemangordon | see the log | 08:57 |
| rrq | the Xorg user | 08:57 |
| freemangordon | "path='/org/freedesktop/login1/session/_31" | 08:57 |
| freemangordon | ok, seems it opens login connection | 08:59 |
| rrq | could you try sharing via https://transfer.rrq.au | 08:59 |
| freemangordon | https://transfer.rrq.au/NbaY6O7egy/xserver.trace | 09:01 |
| rrq | ok.. "Fatal server error: no screens found" .. | 09:04 |
| rrq | DRM_IOCTL_SET_VERSION denied | 09:05 |
| freemangordon | yes, because ddx fails with [ 5378.376] (EE) OMAP(0): ERROR: Cannot set the DRM interface version. | 09:05 |
| freemangordon | yes | 09:05 |
| freemangordon | because libseat made itself DRM master | 09:05 |
| freemangordon | sorry, have to run, bbl | 09:05 |
| rrq | what does that mean? ... would you have a doc pointer about that? | 09:06 |
| rrq | ok | 09:06 |
| rrq | later | 09:06 |
| freaxeh2 | so how do I set my resolution | 09:24 |
| freaxeh2 | I'm on my ryzen 5800x devuan gaming system. with an rx580 graphics card using displayport on my new monitor and I'm stuck at 800x600 | 09:25 |
| Hurgotron | look into xrandr | 09:29 |
| freaxeh2 | ok ty | 09:29 |
| freaxeh2 | https://pastebin.com/SKauhTgv | 09:33 |
| freaxeh2 | makes me think i havent even got drivers installed yet | 09:33 |
| freaxeh2 | sigh ill reinstall devuan and do some partitioning and install windows 11 alongside it | 09:36 |
| rrq | freemangordon: 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 |
| rrq | freemangordon: however the log shows a number of other openat for the same path, which is confusing (to me) | 09:58 |
| rrq | freemangordon: 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 |
| rrq | then there's a subsequent openat "/dev/dri/card0 on line 1086 ... not sure what that is | 10:07 |
| rrq | freemangordon: then yet another at line 1381 | 10:08 |
| rrq | freemangordon: and another at line 3497 | 10:09 |
| freemangordon | rrq: yes, DDX opens /dev/dri/card0 | 11:28 |
| rrq | hmm 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 |
| rrq | btw 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 |
| freemangordon | it is not (tty0) | 12:12 |
| freemangordon | I suspect bookworm xorg does not become DRM master | 12:12 |
| freemangordon | or, it becomes DRM master *after* DDX did what it has to do | 12:15 |
| freemangordon | ok, I will try to modernize DDX driver to use xf86_platform_device_odev_attributes()->fd and/or xf86DRMMasterFd | 12:30 |
| rrq | the 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 fd | 12:33 |
| freemangordon | yeah, I see | 12:34 |
| rrq | I thought elogind would copy systemd-logind so would do that drm_master in the same way | 12:34 |
| freemangordon | that's why I will try to 'fix' ddx driver to be compatible with that | 12:34 |
| rrq | ok .. meanwhile I will regenerate :) | 12:34 |
| freemangordon | but perhaps it does not become master immediately | 12:34 |
| jjakob | I 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 service | 12:58 |
| jjakob | I try to install fwupd, it says it will remove libsystemd0 | 13:39 |
| jjakob | ah it's replaced by libelogind0 | 13:39 |
| freemangordon | rrq: 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.c | 16:13 |
| freemangordon | but, if you look in the file, that revert is actually not there | 16:14 |
| freemangordon | that line shall be reverted https://git.devuan.org/devuan/xorg-server/src/branch/suites/daedalus-security/hw/xfree86/os-support/linux/lnx_platform.c#L31 | 16:15 |
| freemangordon | and 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.c | 16:15 |
| freemangordon | without that reverted, there is noone to set busid for devices that are not on PIC bus :) | 16:16 |
| freemangordon | *PCI | 16:16 |
| freemangordon | and 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#L515 | 16:19 |
| freemangordon | (gdb) p *pEnt | 16: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 |
| rrq | freemangordon: morning. commit af4c84ce8 concerns 2 files... moving busid setting for into lnx_platform.c it seems (using the mediated fd) ... (quick glance) | 21:10 |
| rrq | for devices | 21:10 |
| rrq | that was then... not sure wether/how that has survived though | 21: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/!