@david_chisnall @profoundlynerdy

> The KBI is stable within a major release. If I build a kernel module, it will keep working for years even as I upgrade my kernel.

Unfortunately, this alone, I think it depends.

Simple modules seem to be OK with my experience on #FreeBSD, too.
But at least for modules depending on #LinuxKPI, especially GPU drivers, requires local rebuilds almost every time the kernel is updated (within, for example, 14.x).

@governa Disclaimer: I never tried #Wayland, because I never saw a need to do so.

From what I understand, the thing that makes Wayland "non-portable" is being "hard-wired" to the kms/drm GPU driver interface of #Linux. It's not impossible offering that on a different OS, #FreeBSD is doing exactly that. It even uses the original drivers from Linux, they aren't GPL'd. Of course, they expect Linux in-kernel interfaces, FreeBSD has #LinuxKPI to provide what's needed:
https://wiki.freebsd.org/LinuxKPI

From what I read (forums, mailinglists, etc), Wayland is working fine on FreeBSD. And other operating systems could most likely do similar if they want to support Wayland.

I still hope for #X11 (or maybe even X12?) to survive. Wayland's major design goal was to do "nothing but compositing" and do that perfectly (with frame-perfect rendering). Sounds good. In my very humble opinion, it's *too* minimalistic to provide a good foundation for GUI software. You need a huge set of libraries dealing with other aspects (like e.g. input devices). I'd prefer to keep the good stuff of X and "modernize" it somehow. Unfortunately, it seems a lot of "developer capacity" has already been drawn from X towards Wayland. 😞

LinuxKPI - FreeBSD Wiki

@puppygirlhornypost @stefano As far as I know (from what I read, from other contributors, from lots of users e.g. on the forums), #wayland works fine on #FreeBSD (as in, "production quality" as far as this is possible talking about wayland at all). DRM/KMS isn't really an issue, #FreeBSD uses the original drivers from #Linux (which are liberally licensed, not GPL ...). Sure, they require Linux-specific kernel interfaces, but there's #LinuxKPI in FreeBSD bridging that.

Still, I don't like the idea of wayland. It tosses out more or less everything, shifting it to either the compositor or the client application. I never tried it though, mostly because I'm perfectly fine with #X11. I even started programming for "raw" X11 very recently, which gives much more insight than just using it, and what I found basically boils down to: Yes, X11 core drawing is useless nowadays, but #XRender is pretty sane and it's a shame its development stalled ... IMHO, the way forward shouldn't be wayland, but something like #X12, tossing out the stuff that's *really* useless nowadays and instead declaring some extensions (XRender, XKB and a few others) mandatory ...

@thindil I was talking about maintenance pain for devs btw. I assume much of it stems from having *most* of #LinuxKPI in the base kernel (where it actually belongs), but GPL-parts in the port, and also some fixes even duplicated (because the port must work on systems that didn't receive the fix from the main branch of base yet). With everything in the base kernel, you could maintain it in one place, and MFC fixes as a whole (and, if needed create ENs to also update RELEASE versions).

Of course, everyone wants a "reasonable" small base, discussions often evolve around what "reasonable" exactly is 😎

@thindil Well, one of the devs who is most active in that area told mit it's his goal to get drm-kmod back into base kernel, because it would remove quite some maintenance pain. And the ongoing efforts to replace GPL-licensed stuff (what's left right now is really minimal) are probably done for exactly that goal. That of course doesn't guarantee it will happen any time soon.

But remember where we came from: #FreeBSD 11 *did* have drm-kmod in the base kernel. It was very aged. It couldn't be updated because we didn't have the necessary #LinuxKPI bits and pieces. So, the "solution" then was creating that port, which could include lots of GPL-licensed code without creating a licensing problem for base.

@thindil 1. yes, as I said, #FreeBSD base had (and probably still has? I don't always follow it that close...) GPL-licensed parts. But they can never be absolutely required, you can build a working base without them, so anyone *can* have a "BSD-style" licensed OS from FreeBSD and do with it whatever a BSD license permits.

2. This reasoning about DRM in a port is often cited, but not really proven in practice. These drivers *need* #LinuxKPI, which *should* be part of the kernel (and largely is, the separate module only has GPL-licensed parts and it's ongoing work to replace them). So, you have a dependency on the LinuxKPI in the FreeBSD kernel anyways, you can't just use DRM drivers from some newer #Linux version. Therefore, the drm-kmod port is already a metaport, selecting the specific port based on the FreeBSD version you're running.

@thindil Haha, that was just a gentle hint 😉. But I think it's really important to understand the difference between #Linuxulator and #LinuxKPI, although you're certainly right, *both* were further improved/extended in #FreeBSD 14.

BTW, I'm pretty sure there is *no* GPL-licensed code in the kernel. There is some GPL-licensed code in base, yes, but you can build base without it; the goal is always to provide a full BSD-licensed OS.

In fact, if I'm not mistaken, remains of GPL-licensed files in LinuxKPI are the main reason we still have drm-kmod drivers as a port (and not integrated with the base kernel), where this port includes these small parts of LinuxKPI. The drm drivers themselves are not GPL-licensed.

@thindil @emaste Please understand that a #syscall is something completely different than some other, in-kernel, call. A syscall is the special way userspace can call something in the kernel, which needs a context switch. Some architectures have special CPU instructions for syscalls available, on other architectures, software-interrupts (that the kernel can handle) are used, etc.

Nothing of that is done for in-kernel calls, they're "just" function calls.

#FreeBSD #Linuxulator provides a set of #Linux-compatible syscalls. The #LinuxKPI project on the other hand aims to provide in-kernel Linux compatibility for use by certain drivers. They're completely unrelated.

BTW, you're missing a syllable, it's spelled LinuxULator 😉