Hello, I was reading about the Windows User Mode Device Framework (aka UMDF) and I was interested in possibly working on adding support for UMDF drivers in Wine. I think there are Windows drivers out there that run entirely in usermode (e.g. some USB drivers) which could be successfully ported to Linux this way.
However I'm still new to Wine so I thought I'd ask - has anybody else ever explored doing this? Would this sort of thing be a good fit for Wine in general?
Thanks! Mark N
Hello Mark,
On 5/15/22 17:20, Mark N wrote:
Hello, I was reading about the Windows User Mode Device Framework (aka UMDF) and I was interested in possibly working on adding support for UMDF drivers in Wine. I think there are Windows drivers out there that run entirely in usermode (e.g. some USB drivers) which could be successfully ported to Linux this way.
However I'm still new to Wine so I thought I'd ask - has anybody else ever explored doing this? Would this sort of thing be a good fit for Wine in general?
In general I believe that there is value in running some Windows drivers, especially for domain-specific and obsolete software where writing an equivalent host driver is untenable.
On 5/15/22 20:00, Zebediah Figura wrote:
Hello Mark,
On 5/15/22 17:20, Mark N wrote:
Hello, I was reading about the Windows User Mode Device Framework (aka UMDF) and I was interested in possibly working on adding support for UMDF drivers in Wine. I think there are Windows drivers out there that run entirely in usermode (e.g. some USB drivers) which could be successfully ported to Linux this way.
However I'm still new to Wine so I thought I'd ask - has anybody else ever explored doing this? Would this sort of thing be a good fit for Wine in general?
In general I believe that there is value in running some Windows drivers, especially for domain-specific and obsolete software where writing an equivalent host driver is untenable.
Sorry, I accidentally sent before I was done writing...
Anyway, we currently have a USB driver in Wine. It hasn't seen much use yet; I've used it to run only one Windows driver.
I have some unfinished local work on WDF, which is currently focused entirely on the kernel side (KMDF). It's not very complete, partly because I haven't had much time to work on it, but mostly just because there hasn't been much demand to run real WDF drivers—I've only encountered one, in fact, besides a couple of anti-tamper drivers which appear to load wdfldr.sys and do nothing with it.
Accordingly I'm curious if there's real demand for such UMDF drivers, and if so what they are drivers for. If it's something that's covered by a generic host class, such as HID devices, that's not worth spending time on, but otherwise it's possible.
If you're interested in working on UMDF and find it worthwhile to do so, bug 49193 [1] has a bit of discussion about KMDF, which mostly applies to UMDF as well. In particular I'll note: although Microsoft sort of shares the sources, to be quite frank their code is a terrible, confusing mess, and I don't get the impression that sharing sources actually gains them any value. Not that our KMDF and UMDF shouldn't look similar (and maybe they could share files like the base WdfObject implementation), but I think development could proceed on them largely in parallel...
ἔρρωσο, Zeb
Hello Mark,
I'm just a hobby contributor, please view the following response in that light.
Personal opinion: I'd love to see something like that! Even something like ndiswrapper but in wine and usermode, but that's a different story ;) AFAIK, the API is pretty similar to kernel mode drivers, with obvious differences. Though I didn't look further into it, so I might be wrong. Maybe we could even have a shared implementation? After all, we have the unique situation that we run kernel mode drivers in userland as well...
There's certainly niche hardware that's not supported under Linux, they pop up from time to time in the forums. They might not ever be supported in Linux either. Although admittedly the need for that is not too high. In the end, it seems like a lot of work for marginal benefits - Still, why not? If you have fun working on it. Unpopular opinion: Even if there's a Linux driver, it doesn't hurt to have an alternative. Not all drivers are made equally, after all. There's been moments when people picked ndiswrapper over the Linux driver as well.
It's probably not easy to test though, since you need the hardware to test it against. Do you have a program/hardware in mind that you want supported? Sure would help give a direction in which to start. Just keep in mind that it's probably a lot of work, take it slow so you don't get overwhelmed. :)
Regards, Fabian Maurer
On Montag, 16. Mai 2022 00:20:14 CEST Mark N wrote:
Hello, I was reading about the Windows User Mode Device Framework (aka UMDF) and I was interested in possibly working on adding support for UMDF drivers in Wine. I think there are Windows drivers out there that run entirely in usermode (e.g. some USB drivers) which could be successfully ported to Linux this way.
However I'm still new to Wine so I thought I'd ask - has anybody else ever explored doing this? Would this sort of thing be a good fit for Wine in general?
Thanks! Mark N
On 5/16/22 15:11, Fabian Maurer wrote:
Unpopular opinion: Even if there's a Linux driver, it doesn't hurt to have an alternative. Not all drivers are made equally, after all. There's been moments when people picked ndiswrapper over the Linux driver as well.
Perhaps, although it's unfortunate when the only or best driver is not Free Software. Accordingly, given the choice, I'd rather advocate for improving the host driver than accommodating the Windows driver.
ndiswrapper is also kind of a different case anyway. A driver in Wine can only be used by programs running in the same prefix, so improving driver support in Wine has considerably less value.
I wrote a wiki page recently that describes some of the considerations: https://wiki.winehq.org/Hardware