For a given device, sometimes one linux distro perfectly supports a hardware component. Then if I switch distros, the same component no longer functions at all, or is very buggy.

How do I find out what the difference is?

  • @bloodfart@lemmy.ml
    hexbear
    10
    2 months ago

    How to fix shit that doesn’t work:

    Use lspci/lsusb and lsmod to show you what devices are attached to the computer and what kernel modules are loaded presently.

    Use the modinfo command to show information about kernel modules.

    Use ls /lib/modules/kernel_version/drivers to see what modules are available.

    Use your distributions package manager to install more optional modules.

    How to figure out if something will work:

    Use lspci/lsusb, look for those components and their kernel modules, see if they’re available in the distribution you’re investigating.

    To give an example: I use an hp stream 11 for some stuff. It’s a little laptop with a relatively obscure Broadcom wireless card. Rhel removes support for old and unpopular hardware pretty frequently and doesn’t support that network card. To get it working on that little pc I ended up building the module from source (available in the el9 third party repositories) and doing Broadcom-wl manually every time the kernel updates. If I didn’t want to keep my wits about me, I’d make a script to run when uhh yum? upgrades the kernel to run a reinstall of the driver.

  • PaX [comrade/them, they/them]
    hexbear
    6
    edit-2
    2 months ago

    The vast majority of drivers are included with the Linux kernel now (in tree) so the difference usually comes down to kernel version (newer kernels have more drivers, of course) or kernel configuration set at compile-time (this can be anything from including or not including drivers, to turning driver features on and off, or more fundamental changes beyond drivers)

    You can get kernel version info from uname -a and a lot of the time, probably most of the time (this is also down to configuration), you can get kernel configuration info from /proc/config.gz (use gzip -d to decompress) or something like /boot/config

    Then you can run diff on configurations of 2 different distro kernels you're interested in to see how the 2 distribution's kernels were set up differently

    This could also be caused by different setups of userspace tools or UI that interact with these drivers in different, sometimes worse ways but this is usually much less likely in my experience (most Linux distros do things like this the same way these days tbh)

    Oh, also, there are a lot of drivers that require vendor-supplied firmware or binary blobs to function and most of the time distros don't bake these into the kernel (although it is possible) and different distros might have more or less of these blobs available or installed by default or they might be packaged differently. The kernel should print an error message if it can't find blobs it needs though

    I guess there's kinda a lot to consider lol. Sorry if all of this is obvious

    What hardware are you talking about specifically?

  • Katlah@lemmy.dbzer0.com
    hexbear
    6
    2 months ago

    I feel like 99% of the time it's just "does this distro have drivers for this hardware". If yes it works, if no it doesn't.

      • Katlah@lemmy.dbzer0.com
        hexbear
        3
        edit-2
        2 months ago

        I mean it depends on the hardware. (if we knew what hardware youre talking about it would make this much easier)

      • PaX [comrade/them, they/them]
        hexbear
        1
        edit-2
        2 months ago

        You can check to see what drivers were compiled as modules or into your kernel by reading the kernel configuration at /proc/config.gz or /boot/*config*

        There might also be out-of-tree (not included with the kernel) drivers installed as packages on your system but this is very rare outside of like... having an NVIDIA card and running the closed-source vendor driver

  • Eugenia@lemmy.ml
    hexbear
    5
    2 months ago

    Three things:

    1. The kernel version they got. I have had hardware that didn't work in one distro but it did on another, but their difference really was that one had kernel 5.11 and then other one 6.5. Big difference in terms of support.

    2. Might not be a matter of driver, but a matter of firmware. If a distro allows the download/usage of third party non-free firmware code or not, a lot more hardware is supported. Not all distros do that.

    3. If it's ubuntu or ubuntu-based. Ubuntu has incorporated a lot of additional drivers/firmwares/support in their kernel versions than most others.