On Wed, 9 Oct 2019 09:59:29 +0200 Hans de Goede <hdego...@redhat.com> wrote:
> Hi Pekka, > > On 09-10-2019 09:47, Pekka Paalanen wrote: > > On Tue, 8 Oct 2019 22:19:45 +0200 > > Hans de Goede <hdego...@redhat.com> wrote: > > > >> My main reason for suggesting either one is that I personally am aware > >> of at least 2 issues (both related to secondary USB GPUs handling) which > >> are only present in master and not in the 1.20 branch and which I really > >> would like to see fixed before a new release. I have taking a look at > >> these on my to do list, but not at the top of it (yet). > > > > Hi Hans, > > > > it so happens that I am, too, looking at some secondary DRM device > > hotplug issues. I think I've seen three different things: not enough > > RandR events to make Mutter take a hotplugged device & output into use, > > Xorg crash on DRM device hotplug, and failure to start with Xorg USB > > DRM device plugged in. > > > > Do you have any public records of the issues you have on your plate? > > No I've not filed issues yet, since I was planning on debugging them > myself, but if are both seeing these issues then having gitlab > issues to track them might be a good idea. > > I am using a gm12u320 based mini projector (Acer C120) for most of > my tests, but I believe that this will reproduce with an udl (USB 2 version) > device too. If necessary I can try to reproduce with an udl device too. Hi Hans, I'm working with a Dell DisplayLink dock, USB 3 version, so it's using the proprietary userspace and the EVDI out-of-tree kernel driver (open source). I'd prefer talking about DRM devices or such, because these USB things do not have a GPU. Having a GPU or not behind a DRM device is sometimes noteworthy. > Thinking more about it I'm seeing 3 things: > > 1. USB GPU is not seen (not shown in xrandr --list-providers, not usable) > when present before Xorg is started. For me, this case seems to stop Xorg from starting: MESA-LOADER: failed to retrieve device information MESA-LOADER: failed to open evdi (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri) failed to load driver: evdi (EE) Fatal server error: (EE) AddScreen/ScreenInit failed for gpu driver 0 -1 > > 2. Hot plugging the USB GPU sometimes causes things to crash shortly > afterwards. I've seen this. Looks like a bad pointer, but I couldn't yet figure out where from. I did get Valgrind to tell me this: ==1843== Invalid free() / delete / delete[] / realloc() ==1843== at 0x483AD4B: realloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==1843== by 0x24BA68: XNFreallocarray (utils.c:1167) ==1843== by 0x26D4F1: xf86SetDepthBpp (xf86Helper.c:558) ==1843== by 0x644DB72: PreInit (driver.c:951) ==1843== by 0x27F3B6: xf86platformAddDevice (xf86platformBus.c:638) ==1843== by 0x29E1F0: NewGPUDeviceRequest (lnx_platform.c:176) ==1843== by 0x2C27FB: device_added (udev.c:140) ==1843== by 0x2C2D9F: socket_handler (udev.c:375) ==1843== by 0x249B40: ospoll_wait (ospoll.c:657) ==1843== by 0x243682: WaitForSomething (WaitFor.c:208) ==1843== by 0x17ADBB: Dispatch (dispatch.c:421) ==1843== by 0x17EFF5: dix_main (main.c:274) ==1843== Address 0x5d982d0 is 0 bytes after an unallocated block of size 0 in arena "client" > 3. Hot unplugging the USB GPU always causes a crash shortly > afterwards. Unplugging does not happen in my case, because EVDI does not remove the DRM device. It simply marks the connector as disconnected instead, and the DRM device is re-used for the next DisplayLink device. > > My test environment is xserver master + mutter/gnome-shell 3.34 on > top of Xorg. Last time I tried downgrading the xserver to 1.20 made all > 3 issues go away (*) Good to know. I was debugging a first hotplug issue on gnome-shell/mutter from git, a revision within the past few weeks. Xserver was stock Ubuntu 19.04 (1.20.4), but then I wanted to add prints in it, switched to git master without thinking, and started seeing these crashes. > I think I might also be seeing some variant of your "not enough hotplug > events" bug. With the gm12u320 projector when hotplugged it is listed > as "unknown" in gnome's display-settings until I change the settings > once and then it becomes "Acer" as it should be. I believe that this > issue is actually also present in the 1.20 branch. In my case, I see an "add" and three HOTPLUG events via udev when I hotplug the DisplayLink dock and it creates the DRM device node on the spot. Mutter receives just one RandR event though, which it deems is not a hotplug, and looking at the config timestamps I think the event indeed is reflecting too old state. 'xrandr' will show everything about the new connector just fine though, IIRC. Knowing that there are regressions in xserver master, I will first concentrate on my primary issue with the "not enough hotplug events". Once I have that sorted out, I might be able to help with the other issues. Let's keep each other updated, so we don't do duplicate effort. :-) Thanks, pq
pgpcerHXEmYux.pgp
Description: OpenPGP digital signature
_______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel