-novtswitch don't immediately switch to new VT sudo /usr/bin/Xorg :102 -novtswitch Still immediately switches to new VT. Or is there another way to make this work. I'm testing some user switching stuff and I'd like to start an Xorg server in the "background". Thanks.
Created attachment 158265 [details] partial fix This seems to fix the bug in the initialization where the VT is activated when it shouldn't be. However, there is another bug somewhere that assumes that the VT was switched to and corrupts the current VT... looking for it.
yea I talked to ajax about this before and he said the switch didn't really work, so it's at least not a surprise.
Seems to go awry at dix/main.c:785 if (!(*pfnInit)(i, pScreen, argc, argv))
Occurs with nv, intel, and nvidia drivers.
The deal is, the driver's init function expects that it has the hardware. So the only sense in which novtswitch is meaningful, is when you're starting the X server on a card that the kernel is not using for the virtual terminal head. You can't start an Xorg server "in the background", because many parts of initialization can fail, and you can't know whether you'll succeed or not without going ahead and touching the hardware. The best you could do is a deferred launch that just waits to start the new server until its VT is brought foreground; but that's not actually going to hide much latency.
Ajax, thanks for the explaination. So, yeah, it sounds like this approach won't work.
Closing as WONTFIX. I think it's something that needs consideration upstream, but we're not going to solve that problem here.