How to figure out the exact driver needed for the WiFi card to install it on Linux?

I apologize if this seems like a trivial matter, but I have a laptop (a Lenovo Ideapad 3 to be exact) and I can’t get WiFi (or Bluetooth) to work on anything other than Ubuntu 23.04 and its flavors. I tried OpenSUSE Leap and Debian 12, both couldn’t detect the built-in WiFi card. I also tried Ubuntu-based distros such as Linux Mint, KDE Neon, and Zorin OS, same problem. I tried Kubuntu 22.04 LTS and even that couldn’t detect the WiFi card! So for the mean time, I’m stuck with using Ubuntu 23.04. Any ideas to get around this? Can I use Ubuntu to figure the exact WiFi card that’s being used then download its driver? If so, how can I do that exactly? Note that my Laptop doesn’t have a built-in Ethernet port, and I don’t want to buy a USB Ethernet adapter only for it not work out of the box either! Any help would be appreciated!

undualies,

You could also check the symlinks for the device in the sysfs. The word after “drivers” below for a given network interface (eth0 below) is usually the name of the driver (cpsw below):


<span style="color:#323232;">$ ls -l /sys/class/net/eth0/device/driver   
</span><span style="color:#323232;">lrwxrwxrwx 1 root root 0 Aug  9 10:41 /sys/class/net/eth0/device/driver -> ../../../../bus/platform/drivers/cpsw
</span>

Or run lsmod and see if anything jumps out.

Either way, once you find the driver name, run modinfo to get version and other information about specific drivers.

Edit: formatting

ChojinDSL,
@ChojinDSL@discuss.tchncs.de avatar

You’re probably just missing the corresponding firmware package.

lspci -v should show you which hardware chips your system has. Then just search the packages for any firmware packages that contain that chip’s name. E.g. realtek.

macallik,

Great timing w/ the thread. Scheduled to get my Lenovo Slim 7i tomorrow and plan on installing Debian 12 🤞🏾. I will troubleshoot w/ this thread if I run into issues.

frankfurt_schoolgirl,
iod,
@iod@lemmy.ml avatar

lspci -k might help

Nibodhika,

Unlike Windows Linux has almost all drivers already embedded onto the kernel, meaning that 99% of the time you shouldn’t even have to worry about drivers. There are a couple of exceptions to this, most notably NVIDIA GPUs which do require a proprietary driver to be installed for most usecases, and unfortunately some wireless cards as well.

The command lspci like many suggested here will let you know what your computer detects as being plugged in, which would allow you to ask the better question of “what driver do I need for this wireless card”. But here’s the thing, if it works on Ubuntu 23.04 it’s likely the driver is integrated in the kernel already, so it’s highly likely that any other distro with the same kernel version would work as well, you can check the kernel version running uname -a, and you can also try any bleeding edge distro such as Manjaro (so you have a GUI to check the wifi works) to check that other distro a with the same kernel do support it.

In the unlikely scenario Ubuntu 23 is loading an extra driver you can list all kernel modules using lsmod this should tell you exactly what Ubuntu 23 has loaded for it. Then you could see if a package for that module is available for older Ubuntus.

However I have a possibly dumb question, why not use Ubuntu 23.04 if that one works? Why do you want to downgrade the version?

josephsh5,

Thank you for the clarification. I already know that most drivers are loaded with the kernel, and it looks like Ubuntu 23.04 is using a slightly newer kernel than other mainstream distros.

What you do once you’re on the 24.04 LTS release is up to you. By that time, other distros will probably also work out of the box too.

That’s a very good question. It is because I was using Kubuntu 23.04, and I was mostly happy with it, except for one small gripe I was facing related to KDE, and I figured if I try a different distro with KDE, I might actually solve it.

Nibodhika,

You know you can install KDE/Plasma on Ubuntu, right? There’s no need to reinstall the whole thing just to change the DE.

marmarama, (edited )

The WiFi card is probably a Realtek 8852AE, which has become very common in laptops since 2021. Unfortunately Realtek driver support tends to lag quite a bit.

If you want to run Ubuntu Desktop 22.04, then you’re probably best off waiting a few weeks for the Ubuntu Desktop 22.04.4 point release. It’s due sometime this month. It will boot and install an “HWE” (Hardware Enablement) kernel and drivers, that are based on the kernel from Ubuntu 23.04, and therefore should work out of the box with your WiFi card.

While it’s possible to upgrade an existing Ubuntu 22.04 installation with the latest HWE kernel, doing it by downloading the relevant packages on another machine and moving them across using a USB stick is going to be somewhat frustrating if you’ve not done it before. You’ll certainly learn a few things, but it may not be an enjoyable experience. I’m a grizzled Linux veteran, and I’m pretty sure I’d end up forgetting to download one or more packages and having to swap back and forth between machines.

In the meantime, I would just continue to use Ubuntu 23.04. In fact, if it was me, I would probably just stick with 23.04, upgrade to 23.10 and then subsequently 24.04 when they become available. What you do once you’re on the 24.04 LTS release is up to you. By that time, other distros will probably also work out of the box too.

sunbeam60,

If you wish to run Ubuntu 22.04 you should be able to upgrade to kernel 6.2 (by default its on 5.14 IIRC).

omgubuntu.co.uk/…/ubuntu-22-04-linux-kernel-6-2

I’m not sure if this is known to you; apologies in advance if I’m stating the bleeding obvious: In Linux drivers come with the kernel. There shouldn’t be any reason, except a few exceptions, to install drivers separately to your kernel. So when Linux folks talk about “the kernel”, they mean “the scheduler, core operating system AND all up-to-date drivers”.

So most likely your HW isn’t supported in older kernels.

When I first installed 22.04 LTS for a 12700T-based micro server, several things didn’t work out of the box. After upgrading to 5.19 everything was in working order though.

Dotdev,
@Dotdev@programming.dev avatar

In mint have you tried the latest kernel through update manager ?

Diplomjodler,

Real question: if your WiFi doesn’t work and you don’t have a wired connection available, what do you do to update the kernel? Can you just download it on another machine and then update with a USB drive?

sylana,

You can connect it to your phone via USB (which should be available usually) and then activate USB tethering. That way the PC can be connected to internet, with the help of the phone

skankhunt42,
@skankhunt42@lemmy.ca avatar

Yeah, you’ll slso need all the dependencies but it’ll work.

noddy,

Drivers are usually there in the kernel and usually works out of the box. You shouldn’t need to manually install drivers with linux generally (except for proprietary drivers cough nvidia cough). But if your laptop is quite new, you need to have a new enough kernel. That would explain why ubuntu 23.04 works but not not 22.04. The kernel in 22.04 is probably too old to have the drivers for your network interface. Check what kernel version is shipped with ubuntu 23.04 and make sure that whatever distro you try have at least that version. Stable LTS distros often don’t work on brand new hardware.

josephsh5,

I understand that. But what’s making me scratch my head is that I tried running Linux Mint 21.2 and Debian 12, both of which to my knowledge were released very recently, and yet both failed to detect my WiFi card. Are they running an older linux kernel?

djsaskdja,

Yeah they’re running an LTS kernel. Debian 12 is on 6.1 when we’re on about 6.48. I’m not sure about Linux Mint, but I know it uses LTS too so it must be 6.1 or older. Not sure if upgrading the kernel would help you, but just throwing that out there.

noddy,

Mint is based om LTS ubuntu, so same as 22.04.

Successful_Try543,

You can try searching (google) for the output of lspci or lsusb: like “1234:5678 firmware”. Alternatively, search for your chip in the Linux Wireless data base.

axzxc1236,

Try posting output of lspci command here, gives us more information about your laptop hardware.

axzxc1236,

On Ubuntu 22.04 based distro, you can try install HWE (hardware enablement) kernels but you need a phone that can share WIFI/mobile connection through USB cable.

sudo apt update; sudo apt install linux-generic-hwe-22.04

0v0,

and lshw -C network. On ubuntu 23.04 (where it works) it will show the driver and driver version.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • DreamBathrooms
  • magazineikmin
  • ethstaker
  • khanakhh
  • rosin
  • Youngstown
  • everett
  • slotface
  • ngwrru68w68
  • mdbf
  • GTA5RPClips
  • kavyap
  • thenastyranch
  • cisconetworking
  • JUstTest
  • cubers
  • Leos
  • InstantRegret
  • Durango
  • tacticalgear
  • tester
  • osvaldo12
  • normalnudes
  • anitta
  • modclub
  • megavids
  • provamag3
  • lostlight
  • All magazines