How to remove all unnecessary drivers from a Linux Mint install [solved]



  • @mott555 said in WTF Bites:

    Round 2 with my 11" Dell running Mint. Previously, it would lock up at the login screen unless there was something plugged into its HDMI port. Uninstalling the Intel graphics driver (this is an AMD laptop :wtf:) fixed it. Now, it locks up if it doesn't have an Internet connection so I can't use it without WiFi, and if there's WiFi in range that it isn't connected to, I have to rush to connect it before it freezes.

    I discovered this at my grandmother's house. She is 95 and doesn't have Internet. I had to tether the laptop to my phone just to use it locally (I was working on stuff that didn't need Internet) and keep it from locking up.

    I hate computers.

    This laptop acts exactly like it did with the HDMI issue, but this time it locks up if I start it up and there's no known Wi Fi in range. If there is Wi Fi in range, it works just fine. The similarity to the Intel Driver HDMI issue makes me think I have more unnecessary drivers that are screwing with the system. How can I uninstall every unnecessary driver? I looked through everything in Synaptic that had "driver" in the name and took out a couple obvious ones (VMware drivers, NVIDIA drivers, Intel chipset drivers) but I'm sure there are more.

    Laptop is a Dell Inspiron 3000 11" with an AMD A9-9420e and 8 GB RAM, running Linux Mint 19.2 "Tina" with kernel 4.15.0-54-generic and the Cinnamon desktop. (I suppose I could upgrade my kernel to 5.0.0 and see what happens.)

    I still have access to the console if I hit CTRL + ALT + F1 before it locks up. But it's not very interesting to use without an X server running.

    Issue resolved. Solution here:

    @mott555 said in How to remove all unnecessary drivers from a Linux Mint install:

    Solved. I re-installed kernel 5.0.0-31-generic, and this time I made sure to install linux-modules-extra for that kernel. I guess nothing important lives in linux-modules and you need linux-modules-extra if you actually expect your hardware to work. Now I have 5.0 with networking, USB, GPU, and most importantly no lockups.



  • Definitely something to do with Wi Fi/networking. It instantly locks up if I put it in airplane mode.



  • So, no lockup if I use Linux 5.0.0. But I also have no hardware accelerated desktop (not that important) and no networking (very important). So that's not an option unless I can find 5.0-compatible drivers first.



  • @mott555 Wireless drivers either are in the kernel, or they are not, end of story. The exceptions are few and far between, say if you have a rare specimen of Broadcom.

    The procedures for Linux hardware troubleshooting are way different than those for Windows. It's harmless to have a driver for hardware you don't have just to sit there. You don't run around "removing unneeded drivers". I highly doubt it you removing the intel graphics drivers suddenly made it all work, a more likely thing was that removing it pulled even more packages which depended on it (don't ask how they package stuff, I use Fedora).

    Your wifi troubles sound much like the WLAN card is an abomination from Realtek. I remember having to specify, via module parameter, which output had an antenna plugged in to it. Yes, that was a Lenovo laptop (not a *-pad) with a Realtek wifi to which only a single antenna was attached.



  • Nothing Realtek in this system. (lspci seems pretty bare, maybe there's stuff on a bridge chip that it isn't traversing? Or maybe there really isn't much in this laptop...)

    Looks like it's Qualcomm. I don't know if it's soldered in or if it's a mini PCIe card and I didn't pay that much attention when I took it apart to upgrade RAM.

    01:00.0 Network controller: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)



  • @mott555 said in How to remove all unnecessary drivers from a Linux Mint install:

    So, no lockup if I use Linux 5.0.0. But I also have no hardware accelerated desktop (not that important) and no networking (very important). So that's not an option unless I can find 5.0-compatible drivers first.

    I suppose I can do this in TDWTF fashion. Leave Linux 4.15 and 5.0 installed side-by-side. Boot 4.15 when I know I'll need (and have access to) networking, and boot 5.0 when I'm offline. 🔥



  • @mott555 Look here

    It boils down to disabling hardware crypto on that wifi card, because its firmware is shit.

    I just want to say that any wifi card except Intel or Broadcom is shit. There are a few and far between Atheros chips which are not shit, the one you have is not it.

    Also, can you give full lspci? Wonder why the APU wouldn’t work. That machine has an AMD APU, hasn’t it?



  • @wft Here's the full lspci output. And I'm going to look into the think you just linked.

    lspci.png



  • @mott555

    modprobe -r ath9k causes an instant system freeze, so I'd say it's the culprit. I don't think I like that driver.



  • It's just a little mini-PCIe or M.2 card, so I removed it and I intend to buy a better one. But now I gotta figure out how to blacklist that driver, because it locks the system up at the login screen if the driver is present but the hardware is not.

    @Polygeekery, can you add Qualcomm's Wi Fi division to your list? 🔥



  • For graphics, go check if you have the "modesetting" driver still left in your system, and have lsmod tell you if you have amdgpu or radeonsi module loaded.



  • @mott555 as root, do

    echo "blacklist ath9k >> /etc/modprobe.d/qualcomm-wifi-is-shit.conf"
    update-initramfs -u -k all
    

    That should take care of it.



  • Yikes. Freezes at the login screen with ath9k blacklisted. Now I wonder if this isn't a driver bug, but something with X or Cinnamon (this seems so similar to the previous issue that disappeared when I uninstalled the xorg intel graphics stuff).


  • Grade A Premium Asshole

    @mott555 said in How to remove all unnecessary drivers from a Linux Mint install:

    @Polygeekery, can you add Qualcomm's Wi Fi division to your list?

    Done. Should they be before or after @Luhmann in the queue?



  • @wft Looks like it's loading the amdgpu module. I have no idea what "modesetting" is.



  • @mott555 I'm blaming X/Cinnamon/GNOME. I can modprobe ath9k all day long with no problems if I boot to the shell and don't start a GUI session, so the desktop environment is not happy when something changes in the Wi Fi status.



  • @mott555 I think changing the wifi state triggers a firmware bug which causes your system to lock up. I've had this with Realtek shit. ath10k was better in that it simply didn't work sometimes, but it wouldn't freeze the machine. Ditched that for a used Intel card (pro tip: if hunting on eBay or similar sites, order two of them if you can afford it: sometimes the card comes DOA even if sold in good faith), never looked back.

    Usually the way to deal with these cards is to turn off all their advertised "smarts", like in this case, hardware cryptography, and sometimes power management. The thing is, we call a laptop a laptop because the peripherals don't draw power when not in use, so if you need to do that, you're better off replacing the whole thing anyway.



  • @mott555 "modesetting" is a X11 driver which doesn't give a damn about which graphical card you're using, and uses unified kernel interfaces to talk to it, push OpenGL commands, etc. It's the current way to go with most hardware, except for old quirky stuff for which a X11 DDX driver could have a workaround.

    So, the kernel loads the amdgpu module, initializes the framebuffer, and the X server simply piggybacks on that, instead of talking to PCI bus from user space on its own.

    The best way to work with it is to remove all x11-xorg-driver-* packages except for modesetting (or look at /var/log/Xorg.0.log and see what driver got selected, if it's "modesetting", you don't need to do anything). This way, the X server will not even try to probe for the best driver itself. I think the stock installs are only including the legacy DDX drivers for the cases when people try to install things onto older hardware, for which kernel modesetting wasn't implemented or was buggy.


  • BINNED

    @Polygeekery
    Whatever journey requires the most planes and lay-overs :trollface:



  • @mott555 Sorry about your problems. Sometimes Linux really is plug-and-pray.

    That said, can you try to catch the kernel crash (assuming it's a kernel crash) using wired Ethernet and netconsole? Or fish the crash log out of EFI pstore, assuming it is there?

    Do the crashes persist with kernel 5.x and wi-fi card blacklisted?



  • Mint looks better but was always more unstable than vanilla Ubuntu when I was using it


  • Grade A Premium Asshole

    @Luhmann said in How to remove all unnecessary drivers from a Linux Mint install:

    @Polygeekery
    Whatever journey requires the most planes and lay-overs :trollface:

    So you also just want to watch the world burn, eh?


  • BINNED

    @Polygeekery
    Only if there are drinks and front row seats



  • @aitap I see some stuff about modesetting in /var/log/Xorg.0.log so I guess it's doing that?

    Here are the things that make it crash. This is kernel 4.15 with X running, it does not crash if I drop to a shell before it crashes.

    • Booting normally with no known Wi Fi network in range (freezes 5 - 10 seconds after the login screen shows)
    • Turning on airplane mode while connected to Wi Fi
    • modprobe -r ath9k causes instant lockup
    • Booting with ath9k driver blacklisted
    • Booting with Wi Fi adapter physically removed and ath9k driver blacklisted. This one makes me think the Wi Fi thing is incidental and not the real problem.

    Kernel 5.0 boots just fine with no crash, but I have no networking, Bluetooth, or hardware graphics. I still get a desktop environment but with warnings that it's using software rendering.

    I'm going to try kernel 5.0 again now that I'm at home and have my USB Ethernet dongle available. Maybe I can upgrade the kernel and get it to update drivers via USB. Or I might try a few different 4.X kernels and see if I find something that works.



  • Solved. I re-installed kernel 5.0.0-31-generic, and this time I made sure to install linux-modules-extra for that kernel. I guess nothing important lives in linux-modules and you need linux-modules-extra if you actually expect your hardware to work. Now I have 5.0 with networking, USB, GPU, and most importantly no lockups.


Log in to reply