ubuntu / ubuntu-report

Report hardware and other collected metrics like installer or upgrade information
GNU General Public License v3.0
68 stars 29 forks source link

[Feature Request] get a list of the drivers used #30

Closed theLOICofFRANCE closed 2 years ago

theLOICofFRANCE commented 4 years ago

Hi @didrocks,

It would be very interesting to know the drivers of the most used hardware, this could help to optimize the kernel. It would thus be necessary to take into account simply this: lspci -vvnn | egrep "Kernel driver|Kernel modules" | cut -d: -f2 | uniq

This would be very interesting for Linux kernel developers and people who compile custom kernels.

Thanks. Best regards,

didrocks commented 4 years ago

Hey @HacKurx,

It’s indeed an interesting idea and should be easy to do as a first contribution for anyone interested. Just out of interest, are you going to use those data yourself?

theLOICofFRANCE commented 4 years ago

I'm going to use his data to disable drivers that are no longer in use. This has several advantages such as reducing the kernel size and reducing the attack surface (old drivers are sometimes bad maintained).

Currently, I maintain a driver list on my side to compile custom small kernels that offer maximum hardware compatibility.

And I'm not the only one who needs his data. 2 examples:

  1. Base pour connaitre le matériel qui marche sous Linux
  2. src_platform_clip-hardware

For example, I got the most used modules from the 2nd link, here is the result:

     82 ehci-pci
     75 ahci
     71 uhci-hcd
     67 snd-hda-codec
     67 snd-hda-intel
     62 battery
     61 ac
     57 hso
     49 i915
     47 ata_piix
     47 intel-agp
     40 e1000e
     37 snd-hda-codec-hdmi
     35 mac80211
     34 mmc_block
     32 sdhci-pci
     32 snd-hda-codec-realtek
     31 iwlwifi
     30 xhci-hcd
     26 snd-hda-codec-idt
     17 uvesafb
     15 iwldvm [noload]
     15 iwlmvm [noload]
     15 rtsx_pci_sdmmc
     15 tg3
     15 xhci-pci
     12 thinkpad_acpi
      9 r8169
      7 bnx2
      7 megaraid_sas
      7 ohci-hcd
      6 igb
      6 iwl3945
      6 uvcvideointel-agp
      5 brcmsmac
      5 drm_kms_helper
      5 hp-wmi
      5 i915 preliminary_hw_support=1 semaphores=1
      5 snd-hda-codec-conexant
      5 toshiba_acpi
      4 ath5k
      4 ath9k
      4 cirrus
      4 e1000
      4 RAID
      4 raid1
      4 rtl8192ce
      4 scsi_wait_scan
      4 snd-hda-codec-analog
      4 virtio
      4 virtio_blk
      4 virtio_net
      4 virtio_pci
      4 virtio_ring
      3 b43
      3 hid-ntrig
      3 ioatdma
      3 mptsas
      3 radeon
      3 rtl8723be
      3 sky2
      3 snd-hda-codec-si3054
      3 thinkpad_acpi force_load=1
      3 uvcvideo
      2 8139cp
      2 ath6kl_sdio
      2 ehci-hcd
      2 ehci-orion
      2 ehci-platform
      2 hpsa
      2 marvell
      2 mmc_core
      2 mvmdio
      2 mvneta
      2 mvsdio
      2 mwifiex
      2 pcmcia_core
      2 qcserial
      2 sdhci
      2 sdhci debug_quirks=0x20
      2 sdhci-pltfm
      2 snd-intel8x0
      2 uvcvideoac
      2 uvcvideoi915
      2 yenta_socket
      1 8139too
      1 8250_pnp
      1 apple_bl
      1 applesmc
      1 ath10k_pci
      1 atl1c
      1 b44
      1 bcm5974
      1 bna
      1 et131x
      1 forcedeth
      1 hid-apple
      1 hid-multitouch
      1 i2c_i801
      1 iwl4965
      1 iwlmvm
      1 leds-gpio
      1 lpc_ich
      1 mwifiex_pcie
      1 mwifiex_sdio
      1 nouveau
      1 nouveau noaccel=1
      1 ohci-pci
      1 pcieport
      1 qxl
      1 rt2800pci
      1 rtl8192se
      1 rtsx_pci
      1 serport
      1 sony-laptop
      1 via-rhine
      1 wacom_w8001
      1 xhci_hcd

Thanks to this feedback, I also know which driver I shouldn't disable and also where I have to be reactive to fix bugs because a lot of equipment is concerned.

It’s indeed an interesting idea and should be easy to do as a first contribution for anyone interested.

My free time and my English are limited but if my changes are merged upstream then I'm willing to go for it.

didrocks commented 4 years ago

My free time and my English are limited but if my changes are merged upstream then I'm willing to go for it.

Sure. please give it a try! Instead of egrep and uniq. Please try to use go functions to do this. I’m sure you find a lot of code in ubuntu-report helping you with that. Please think about adapating the tests, but that shouldn’t be too much to do.

theLOICofFRANCE commented 4 years ago

Sure. please give it a try!

I quickly started on fb581db. I need to see how to compile and test the code. I've never touched the Go programming language ^^

theLOICofFRANCE commented 2 years ago

@singhvarun9641 Do you take us for fools? Noob

theLOICofFRANCE commented 2 years ago

@didrocks I joined the HardenedBSD team, therefore I lost the interest of this request. Sorry and thanks for everything.