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
    link
    fedilink
    arrow-up
    25
    ·
    7 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.

  • Eugenia
    link
    fedilink
    English
    arrow-up
    18
    ·
    7 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.

  • mumblerfish@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    7 months ago

    A lot of the answers here are mentioning the kernel. The version of it and what not. Look, the distro compiles the kernel for you, they are not gonna support literally everything but they have to make a choice. That choice is stored in the “kernel config”. If you have one distro working and another one not, compare the two configs. It’s gonna take a lot of work to parse through, there are many config settings. But where do you start to look? Most distros have their config published in two places: /boot/config-<kernel version>, for any installed kernel, or /proc/config.gz (cat /proc/config.gz | gunzip to read), for your running kernel. Get the two files from the distros, compare, find what seems relevant, make the changes (I only know how to do this in gentoo), and test.

    • linuxPIPEpower@discuss.tchncs.deOP
      link
      fedilink
      arrow-up
      4
      ·
      7 months ago

      But where do you start to look? Most distros have their config published in two places: /boot/config-<kernel version>, for any installed kernel, or /proc/config.gz (cat /proc/config.gz | gunzip to read), for your running kernel.

      Thanks for understanding the question and providing a concrete answer of a place to look! I will do this. :)

  • PaX [comrade/them, they/them]@hexbear.net
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    7 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?

  • CaptDust@sh.itjust.works
    link
    fedilink
    arrow-up
    7
    ·
    edit-2
    7 months ago

    I don’t think you’re going to find an explicit list of drivers in a distro, at least that I’ve found. I think a better approach will be to lookup your hardware and try to find what kernel version support was added. If the distro is shipping that version or newer, you’ll probably be good to go.

    There’s exceptions however like proprietary drivers. While those drivers are becoming exceedingly rare, some distros will only ship with FOSS software, don’t expect debian to ever work out of the box with nvidia. This is usually a principles/morals decision by the maintainers. That said distros that ship closed source software usually advertise it, they might offer an Nvidia build or the distro include software like steam pre-installed.

    You didn’t mentioned your component specifically but if your hardware doesn’t have mainline kernel support, is pretty good assumption it’s proprietary and will need to be handled separately with something like dkms. Check the distros documentation for their recommended approach.

    Edit: to clarify on my debian example, Nvidia cards will work with open source nouveau out of the box on debian, but you will definitely want to install proprietary driver if you’re using the card for CUDA or gaming.

    • linuxPIPEpower@discuss.tchncs.deOP
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      7 months ago

      try to find what kernel version support was added.

      how to do this?

      There’s exceptions however like proprietary drivers. While those drivers are becoming exceedingly rare, some distros will only ship with FOSS software,

      don’t expect debian to ever work out of the box with nvidia

      good news is I don’t think I have ever in my life owned anything nvidia.

      You didn’t mentioned your component specifically but if your hardware doesn’t have mainline kernel support, is pretty good assumption it’s proprietary and will need to be handled separately with something like dkms. Check the distros documentation for their recommended approach.

      thanks, I never heard of dkms before. I read the arch wiki, wikipedia, and made an attempt at the github repo (very long and over my head). The arch wiki only mentions nvidia. Is this something I need if I am certain nvidia is not the problem? Or is it a general thing?

      Off the top of my head some components I’ve had problems with: touchpads, touch screens, wifi, ethernet, bluetooth, audio in, audio out, media keys. I have suspected others also like (onboard intel) GPUs but it’s a little harder for me to even pin those problems down to the hardware.

      • CaptDust@sh.itjust.works
        link
        fedilink
        arrow-up
        6
        ·
        edit-2
        7 months ago

        try to find what kernel version support was added.

        how to do this?

        There’s no centralized database I’m aware of, it’s just googling hardware + “linux kernel” and hoping to come across something in a mail list. Admittedly, not ideal or always fruitful.

        thanks, I never heard of dkms before. I read the arch wiki, wikipedia, and made an attempt at the github repo (very long and over my head). The arch wiki only mentions nvidia. Is this something I need if I am certain nvidia is not the problem? Or is it a general thing?

        It’s a general thing, it was created to load kernel modules (drivers) without having to recompile the kernel entirely. Again without specifics of distro and hardware it’s hard to generalize an answer. With arch there’s probably a package in the AUR that could be used. (And the package will setup dkms for you). Doing it manually is a bit more involved but shouldn’t be much harder than cloning the repository and running a command inside the folder.

        Off the top of my head some components I’ve had problems with: touchpads, touch screens, wifi, ethernet, bluetooth, audio in, audio out, media keys. I have suspected others also like (onboard intel) GPUs but it’s a little harder for me to even pin those problems down to the hardware.

        So basically everything… Lol. Still hard to diagnose without specifics, vendor support varies wildly. A newer Intel wifi card is likely mainlined, while a realtek card is going to be living in hell. Ethernet is a weird one, I don’t think I’ve come across any vendors entirely not working but perhaps something like a Killer NIC (built with a proprietary protocol) could fail.

        Many of these examples sound like a laptop, the arch wiki may have more information they cover a lot of popular models and note hardware capabilities. Usually if putting Linux on a laptop it’s about buying one with that intention in mind because it can be very uncertain. Laptop vendors do crazy things… use non compliant bios, proprietary media keys and finger readers, custom audio stacks to make them sound better, the list goes on.

        • linuxPIPEpower@discuss.tchncs.deOP
          link
          fedilink
          arrow-up
          1
          arrow-down
          1
          ·
          7 months ago

          I’ve had the issue on laptops and desktops but I have more experience with laptops. Also you are correct that arch-based tend to work pretty well. But I don’t want to run arch on some devices because I do not plan update them regularly enough. I want a longer-term support distro. So in many cases I want to see what arch is doing that another isn’t.

          Only noting to be fair: in some cases arch-type does worse. I have an old HP desktop which is the case that arch couldn’t see the ethernet connection. I could only use a USB-to-ethernet converter as PC doesn’t even have wifi. But then I installed Debian and the ethernet works fine through the card. I do not need to solve this specifically as I plan to keep debian. Just one of the many mysteries.

          I could find a specific issue that I do want to solve but it’s such an ongoing thing I am hoping to learn the general principals rather than being spoon fed the answer. I’ll only be back next week with another one.

      • lemmyreader
        link
        fedilink
        English
        arrow-up
        5
        ·
        7 months ago

        Off the top of my head some components I’ve had problems with: touchpads, touch screens, wifi, ethernet, bluetooth, audio in, audio out, media keys. I have suspected others also like (onboard intel) GPUs but it’s a little harder for me to even pin those problems down to the hardware.

        That is a long list. I would have expected no problems with Ethernet cards, and not so much with WiFi but that is just a thought. Is this is pretty new computer ? Can you share which Linux distributions you tried ?

        • linuxPIPEpower@discuss.tchncs.deOP
          link
          fedilink
          arrow-up
          2
          ·
          7 months ago

          Linux distros I have tried include: ubuntus, debians, fedoras, opensuse, manjaro, endeavour, mint. No slackware, redhat, centos, gentoo, nix, kali, steam.

          Every device I currently own is a refurb originally manufactured 5-15 years ago. It’s based on some combination of cheapness and hoping that things will be supported by them time I get my hands on them. I don’t have any requirement for blazing hardware.

          Some of them are unsurprisingly annoying, like netbooks I picked up only because they were cheap and were reported to have linux successfully installed by people online. With these things, it seems that most of the features work just not all at the same time. I can choose between a smoothly-functioning trackpad in one distribution and bluetooth in another. But why? How do I compare them.

          • lemmyreader
            link
            fedilink
            English
            arrow-up
            2
            ·
            7 months ago

            Linux distros I have tried include: ubuntus, debians, fedoras, opensuse, manjaro, endeavour, mint. No slackware, redhat, centos, gentoo, nix, kali, steam.

            Good. Some light weight suggestions for your devices to try :

            like netbooks I picked up only because they were cheap

            Netbooks as in for example Asus EEE models ? I think some of these models had really slow hard disks and also needed some tweaks for some part of the hardware. The difference in your hardware success / failure is perhaps mainly because of the different kernels and the hardware support of a Linux distribution release (btw, Debian 12 aka Bookworm had for the first time non-free firmware bundled with the installer). In general I think refurbished old Thinkpads should be fine with Linux. Here’s two dedicated wikis for that :

      • bobs_monkey@lemm.ee
        link
        fedilink
        arrow-up
        3
        ·
        7 months ago

        Are you running Wayland on your Arch setup? There could be an extra layer of compatibility issue there as opposed to X11.

          • bobs_monkey@lemm.ee
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            7 months ago

            I think you may be mistaking what I meant? Wayland is a display server protocol, like Xorg, which is independent of the Arch base system. Depending on your hardware, kernel level support may be available and installed, while your display server software may be the component having problems and not the kernel or other system configurations. Just an idea to poke at, some setups and hardware support can break at different points based on the way you’ve set up your system with associated packages/dependencies.

  • Katlah@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    2
    ·
    7 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.

    • Bogasse
      link
      fedilink
      arrow-up
      8
      ·
      7 months ago

      But on Linux aren’t most drivers part of the kernel?

      • Katlah@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        6
        ·
        edit-2
        7 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.net
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        7 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

  • lurch (he/him)@sh.itjust.works
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    7 months ago

    apart from license issues of propietary drivers, it can be the kernel or modules being slightly older and the driver is only in the newest kernel / modules bundle that didn’t make it into all distros yet

    • linuxPIPEpower@discuss.tchncs.deOP
      link
      fedilink
      arrow-up
      2
      ·
      7 months ago

      license issues of propietary drivers,

      kernel or modules being slightly older and the driver is only in the newest kernel / modules bundle that didn’t make it into all distros yet

      how do I find out about both of these?

      • lurch (he/him)@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        7 months ago

        compare the versions of the packages. there is a big button on kernel.org that has the latest release version plus a list on the left. if you use modules that aren’t part of this, they have their own versions somewhere depending on module.

  • LeFantome@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    7 months ago

    I find Arch based distros have pretty solid hardware coverage. Lots of older hardware support baked in, plus newer kernels ( newer drivers ), and up-to-date device firmware.

    The older the kernel, the less hardware is supported ( generally ). That is going to be a big reason for the disparity between distros. But device firmware makes a difference, especially for distros that do not support non-free binaries. Debian has gotten a lot better since they changed that policy for example.

    The more desktop centric a distro is, the more likely they are to bundle a broad selection of hardware drivers.

  • Quantum Cog@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    7 months ago

    Could be varoius reasons. Some common ones:

    • distros can have different kernel parameters
    • unloaded kernel modules
    • different kernel parameters
    • older kernel/packages
    • missing packages

    You can narrow down which distros work and which hardware support is missing. Also look at archwiki for that specific piece of hardware. You can find a lot of useful information even if you don’t use Arch.

    • linuxPIPEpower@discuss.tchncs.deOP
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      edit-2
      7 months ago
      • distros can have different kernel parameters

      • unloaded kernel modules

      • different kernel parameters

      • older kernel/packages

      • missing packages

      how do I find out about these?

      Are they specific to my system? Some kind of decision the installer makes? So I would investigate locally on the device?

      Or will it be a general distro thing? Am I looking on their website to find out?

      • Quantum Cog@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        7 months ago

        No, look up what drivers/modules/packages your hardware need and load them/upgrade/install on the buggy distro