Yeah, this is what I meant by "X11-specific" solutions. Besides simply being an ugly hack (what if I don't have any spare outputs?), I'm not going to go back to XOrg just for that and a kernel-level solution sounds much more reliable anyway.
Kernel level sounds like the wrong approach to me. It might be more generic if done right, but having X11/Wayland support arbitrary virtual outputs directly seems much simpler and probably performs better. On X11 you can do this if you have an intel GPU by adding stuff to your xorg.conf. That makes it inconvenient and more of a hack than anything, but if this were to exist a layer above and you could simply add and remove them dynamically via xrandr it would be perfect. It had to be duplicated for Wayland though.
I'd normally agree, but seeing how long it took to get screensharing implemented "on Wayland" (the terminology gets weird there) and how much of a mess it is even now that it finally is (GNOME making up its own unnecessarily complicated system, KDE copying GNOME but badly and Weston doing something more reasonable but completely different and incompatible), I wouldn't hold my breath for a reliable implementation of virtual displays.
Any engineering going towards doing this on X11 is wasted at this point and waiting on the Wayland community to agree on and implement a common interface is going to take years, so a kernel-level solution seems like the only way to have this right now. FWIW, that is how SpaceDesk does it on Windows and their performance is great, so it's not like it's impossible to make it work.
I've actually already managed to get a kernel-level virtual display working, but haven't tested with Deskreen yet as it's 1am and I've been staring at C code for too long now. Might post it on HN if I end up actually packaging it up into something usable.
True, the situation currently is suboptimal. It feels like X11 was given up on while Wayland and its implementations and ecosystem aren't quite there yet.
I guess for Windows, a dummy driver is the only way to go since the layers above that are off limits for 3rd parties and it would be Microsoft who had to go ahead and do something there. But as you mentioned the wayland community is pretty chaotic with getting basic features implemented, so effectively it might be the same situation as with Windows ;-)
I'd be interested in seeing your finished product and trying out how it will handle different things you throw at it though.
I dreamed of people like you with deep knowledge of internals of operating systems will come together to solve the problem of virtual drivers! I mostly made Deskreen for that purpose. To bring a problem to community so we can make a really cool stuff that will outshine all the commercial applications out there and be the best screen sharing solution.
That is a wonder of collective learning :)
It would be really great if you share a solution on Deskreen github.
To be fair, I didn't write the kernel side of the implementation - that already existed and was made by DisplayLink, a company that Deskreen is actually in a way competing with.
I merely wrote a userspace utility that lets you make virtual screens without worrying about the low-level stuff like EDID and such. I'll definitely be posting something on GH once I've tested it more tho.