bluetooth installed but cant detect other bluetooth devices - linux

I have installed bluetooth driver but it is not able to pair with other devices. It cant search for other devices.
OUTPUT of lspci
00:00.0 Host bridge: Intel Corporation Ivy Bridge DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Ivy Bridge PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Ivy Bridge Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation Panther Point USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation Panther Point MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation Panther Point High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 1 (rev c4)
00:1c.4 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 5 (rev c4)
00:1d.0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation Panther Point LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation Panther Point 6 port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation Panther Point SMBus Controller (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation Device 0de9 (rev ff)
02:00.0 Network controller: Broadcom Corporation Device 4365 (rev 01)
03:00.0 Ethernet controller: Atheros Communications Inc. AR8162 Fast Ethernet (rev 10)
output of dmesg | grep Bluetooth
[ 15.744190] Bluetooth: Core ver 2.16
[ 15.744212] Bluetooth: HCI device and connection manager initialized
[ 15.744218] Bluetooth: HCI socket layer initialized
[ 15.744220] Bluetooth: L2CAP socket layer initialized
[ 15.744225] Bluetooth: SCO socket layer initialized
[ 15.744503] Bluetooth: Generic Bluetooth USB driver ver 0.6
[ 16.050311] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 16.050314] Bluetooth: BNEP filters: protocol multicast
[ 16.054600] Bluetooth: RFCOMM TTY layer initialized
[ 16.054605] Bluetooth: RFCOMM socket layer initialized
[ 16.054607] Bluetooth: RFCOMM ver 1.11
[ 16.750642] Bluetooth: hci0 command tx timeout
[ 17.156673] Bluetooth: can't load firmware, may not work correctly
i installed linux-firmware-nonfree but that doesnt help...I think the problem lies in the last two lines of the output of dmesg...Please help

Related

Lenovo Ideapad 320 touchpad drag and drop does not work on Linux Mint

On my Lenovo Ideapad 320 touchpad drag and drop does not work. Touch click and scroll with fingers works.
Please help me troubleshoot
This is my configuration (please let me know if anything more is required )
Thankyou:-)
$ cat /etc/*-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=18.2
DISTRIB_CODENAME=sonya
DISTRIB_DESCRIPTION="Linux Mint 18.2 Sonya"
NAME="Linux Mint"
VERSION="18.2 (Sonya)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 18.2"
VERSION_ID="18.2"
HOME_URL="http://www.linuxmint.com/"
SUPPORT_URL="http://forums.linuxmint.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/linuxmint/"
VERSION_CODENAME=sonya
UBUNTU_CODENAME=xenial
$ uname -a
Linux darling 4.8.0-53-generic #56~16.04.1-Ubuntu SMP Tue May 16 01:18:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ lspci
00:00.0 Host bridge: Intel Corporation Sky Lake Host Bridge/DRAM Registers (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Device 1921 (rev 0a)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI (rev 21)
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port (rev f1)
00:1c.5 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
02:00.0 Network controller: Intel Corporation Intel Dual Band Wireless-AC 3165 Plus Bluetooth (rev 99)
I had a similar problem with my touchpad. If you have synclient, try
synclient ClickPad=1
And see if that helps at all.

What is the difference between Display Controller and VGA Compatible Controller?

Following is the output of lscpci command on my Arch linux terminal. I am using Lenovo G 50-70 Laptop.
[code_master5#BitBox ~]$ lspci
00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 0b)
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b)
00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4)
00:1c.3 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev e4)
00:1c.4 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 5 (rev e4)
00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter
03:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun LE [Radeon HD 8550M / R5 M230]
I wanted to know why my VGA compatible controller and Display Conroller are showing different outputs?
When and why each of them is used?
Is there a way to check which application uses which graphics controller?
EDIT 1:
Here is the output for first command in #McGrady's answer:
[code_master5#BitBox node-express]$ grep LoadModule /var/log/Xorg.0.log
[ 17.105] (II) LoadModule: "glx"
[ 17.279] (II) LoadModule: "intel"
[ 17.343] (II) LoadModule: "modesetting"
[ 17.348] (II) LoadModule: "fbdev"
[ 17.349] (II) LoadModule: "vesa"
[ 17.374] (II) LoadModule: "dri3"
[ 17.374] (II) LoadModule: "dri2"
[ 17.374] (II) LoadModule: "present"
[ 17.895] (II) LoadModule: "libinput"
[ 18.144] (II) LoadModule: "synaptics"
But second is not working...
[code_master5#BitBox node-express]$ grep Driver /etc/X11/xorg.conf
grep: /etc/X11/xorg.conf: No such file or directory
It depends on the adapter firmware how it declares itself to PCI bus.
The reason for that is probably because in an Optimus dual graphics systems.
You can run this command to find out which graphics controller is currently used by the system:
grep LoadModule /var/log/Xorg.0.log
grep Driver /etc/X11/xorg.conf

How to install wireless driver on Debian7 wheezy for MSI GP60 2PE Leopard

I use dual boot for linux/windows.
I'm trying to install wireless driver on Debian_3.16-0.bpo.3-amd64 (bpo is for backport) Wheezy for my MSI laptop (MSI GP60 2PE Leopard).
I made lspci -nn to find reference about my network controller:
Network controller [0280]: Intel Corporation Device [8086:08b3] (rev 83)
So on the website of linux Wireless
My driver must be this one : iwlwifi
I installed it,
apt-get install firmware-iwlwifi
modprobe iwlwifi
but it doesn't work...
During the boot, there are some errors :
Intel(R) Wireless WiFi driver for Linux, in-tree:
[ 4.847284] Copyright(c) 2003- 2014 Intel Corporation
[ 4.847449] iwlwifi 0000:05:00.0: irq 50 for MSI/MSI-X
[ 4.877181] mei_me 0000:00:16.0: irq 51 for MSI/MSI-X
[ 4.923823] iwlwifi 0000:05:00.0: firmware: failed to load iwlwifi-3160-9.ucode (-2)
[ 4.923877] iwlwifi 0000:05:00.0: Direct firmware load failed with error -2
[ 4.923878] iwlwifi 0000:05:00.0: Falling back to user helper
[ 4.940971] Bluetooth: Core ver 2.19
[ 4.940987] NET: Registered protocol family 31
[ 4.940988] Bluetooth: HCI device and connection manager initialized
[ 4.940996] Bluetooth: HCI socket layer initialized
[ 4.940998] Bluetooth: L2CAP socket layer initialized
[ 4.941006] Bluetooth: SCO socket layer initialized
If this can help you, I made modinfo iwlwifi and this is the output :
http://pastebin.com/s8ycnBwu
To make sure that Aptitude package firmware-iwlwifi contains drivers for your device, lookup drivers from chip manufactor web sites...
I recommend to compare Kernel version and intel iwlwifi driver version, from: http://www.intel.com/support/wireless/wlan/sb/CS-034398.htm
and how to guides can be found on: http://wireless.kernel.org/en/users/Drivers/iwlwifi
With these links I hope you can find your own iwlwifi package, if it's supported.
You can check chipset via Windows Device Management...

Audio in Arch Linux

I have already some time a problem with audio in Arch Linux.
Here it goes:
When I plug my headphones in at boot Arch will play all audio through my headphones, when I plug them out there is just no sound. Arch will only play audio through my headphones.
When I do not plug them in at boot Arch will only play sound through my speakers.
Doeas anybody know how I can fix this so I don't have to reboot for changing my audio output device?
Thanks in advance and below some information about my Arch Linux on a Macbook Pro 7,1:
aplay -l:
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: CS4206 Analog [CS4206 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: CS4206 Digital [CS4206 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
lspci:
00:00.0 Host bridge: NVIDIA Corporation MCP89 HOST Bridge (rev a1)
00:00.1 RAM memory: NVIDIA Corporation MCP89 Memory Controller (rev a1)
00:01.0 RAM memory: NVIDIA Corporation Device 0d6d (rev a1)
00:01.1 RAM memory: NVIDIA Corporation Device 0d6e (rev a1)
00:01.2 RAM memory: NVIDIA Corporation Device 0d6f (rev a1)
00:01.3 RAM memory: NVIDIA Corporation Device 0d70 (rev a1)
00:02.0 RAM memory: NVIDIA Corporation Device 0d71 (rev a1)
00:02.1 RAM memory: NVIDIA Corporation Device 0d72 (rev a1)
00:03.0 ISA bridge: NVIDIA Corporation MCP89 LPC Bridge (rev a2)
00:03.1 RAM memory: NVIDIA Corporation MCP89 Memory Controller (rev a1)
00:03.2 SMBus: NVIDIA Corporation MCP89 SMBus (rev a1)
00:03.3 RAM memory: NVIDIA Corporation MCP89 Memory Controller (rev a1)
00:03.4 Co-processor: NVIDIA Corporation MCP89 Co-Processor (rev a1)
00:04.0 USB controller: NVIDIA Corporation MCP89 OHCI USB 1.1 Controller (rev a1)
00:04.1 USB controller: NVIDIA Corporation MCP89 EHCI USB 2.0 Controller (rev a2)
00:06.0 USB controller: NVIDIA Corporation MCP89 OHCI USB 1.1 Controller (rev a1)
00:06.1 USB controller: NVIDIA Corporation MCP89 EHCI USB 2.0 Controller (rev a2)
00:08.0 Audio device: NVIDIA Corporation MCP89 High Definition Audio (rev a2)
00:0a.0 IDE interface: NVIDIA Corporation MCP89 SATA Controller (rev a2)
00:0b.0 RAM memory: NVIDIA Corporation Device 0d75 (rev a1)
00:0e.0 PCI bridge: NVIDIA Corporation Device 0d9a (rev a1)
00:15.0 PCI bridge: NVIDIA Corporation Device 0d9b (rev a1)
00:16.0 PCI bridge: NVIDIA Corporation Device 0d9b (rev a1)
00:17.0 PCI bridge: NVIDIA Corporation MCP89 PCI Express Bridge (rev a1)
01:00.0 FireWire (IEEE 1394): LSI Corporation FW643 [TrueFire] PCIe 1394b Controller (rev 08)
02:00.0 Network controller: Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller (rev 01)
03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5764M Gigabit Ethernet PCIe (rev 10)
04:00.0 VGA compatible controller: NVIDIA Corporation Device 08a0 (rev a2)
cat /etc/modprobe.d/alsa-base.conf :
options snd-hda-intel model=mbp55
options snd slots=snd-hda-intel
# RE4e._ECyo4j5hZB:nVidia Corporation
alias snd-card-0 snd-hda-intel
EDIT:
I forgot to say: I have Xfce4 as a desktop environment.
First of all, check if you have a sound system installed. Open your favorite terminal and type :
$ pacman -Qs | grep "alsa"
It should be the default installed.
If the commmand output is blank, it means that you have no sound system. You can then install the one you want.
Pulseaudio :
# pacman -Syu && pacman -S pulseaudio pavucontrol
use
$ pavucontrol
To change all the audio ouput and input. You can even redirect ouput stream into a microphone and some other cool stuff based on the principle of client/server.
Alsa :
# pacman -Syu && pacman -S alsa-utils alsa-plugins
Alsa is very simple (but lack some features) and is really easy to use. Its modules are directly included in the kernel which means it can perform out of the box on about every sound hardware. You can changes audio ouput by issuing the following command :
$ alsamixer
Which will prompt a nice terminal-based interface. From there, I'll suggest you to boost all the flux to 100% (to the very top of each one).
The xfce4 sound applet should work just fine. If not, you can download a simple volume control :
# pacman -Syu && pacman -S volumeicon
You may will have to do some changes to your Xstartup file to add the volumeicon applet.
Let me know if you run into any troubles.
I dont know what kind of Desktop environments which you use. But you can do that:
Try not to plug your headphones when boot
if you use gnome, you can open Setting-> Sound-> Output -> Choose a device for sound output, then choose the right device.
Have you installed the correct xfce-mixer (32 or 64 bit?)
Check this one you may have to manually compile the gstreamer0.10-good-plugins
I have always had trouble with sound in Arch Linux...
If you would be willing to try an alternative, there is Antergos (http://antergos.com/). It is a varient of Arch which comes with a desktop environment of your choice installed and I have never had trouble with the sound.
Besides that, it still provides the same benefits as normal Arch.

How to know if there is a (compiled in/kernel module) device driver controlling a device on a running linux?

How can I know if a device is supported on a running Linux and if so, which device driver controls it?
For instance, lspci on a server (PowerEdge 2900) gives:
00:00.0 Host bridge: Intel Corporation 5000X Chipset Memory Controller Hub (rev 12)
00:02.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 2 (rev 12)
00:03.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 3 (rev 12)
00:04.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 4 (rev 12)
00:05.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 5 (rev 12)
00:06.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x8 Port 6-7 (rev 12)
00:07.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 7 (rev 12)
00:08.0 System peripheral: Intel Corporation 5000 Series Chipset DMA Engine (rev 12)
00:10.0 Host bridge: Intel Corporation 5000 Series Chipset FSB Registers (rev 12)
00:10.1 Host bridge: Intel Corporation 5000 Series Chipset FSB Registers (rev 12)
00:10.2 Host bridge: Intel Corporation 5000 Series Chipset FSB Registers (rev 12)
00:11.0 Host bridge: Intel Corporation 5000 Series Chipset Reserved Registers (rev 12)
00:13.0 Host bridge: Intel Corporation 5000 Series Chipset Reserved Registers (rev 12)
00:15.0 Host bridge: Intel Corporation 5000 Series Chipset FBD Registers (rev 12)
00:16.0 Host bridge: Intel Corporation 5000 Series Chipset FBD Registers (rev 12)
00:1c.0 PCI bridge: Intel Corporation 631xESB/632xESB/3100 Chipset PCI Express Root Port 1 (rev 09)
00:1d.0 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #1 (rev 09)
00:1d.1 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #2 (rev 09)
00:1d.2 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #3 (rev 09)
00:1d.3 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #4 (rev 09)
00:1d.7 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset EHCI USB2 Controller (rev 09)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d9)
00:1f.0 ISA bridge: Intel Corporation 631xESB/632xESB/3100 Chipset LPC Interface Controller (rev 09)
00:1f.1 IDE interface: Intel Corporation 631xESB/632xESB IDE Controller (rev 09)
00:1f.2 IDE interface: Intel Corporation 631xESB/632xESB/3100 Chipset SATA IDE Controller (rev 09)
01:00.0 PCI bridge: Intel Corporation 80333 Segment-A PCI Express-to-PCI Express Bridge
01:00.2 PCI bridge: Intel Corporation 80333 Segment-B PCI Express-to-PCI Express Bridge
02:0e.0 RAID bus controller: Dell PowerEdge Expandable RAID controller 5
04:00.0 PCI bridge: Broadcom EPB PCI-Express to PCI-X Bridge (rev c3)
05:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet (rev 12)
06:00.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Upstream Port (rev 01)
06:00.3 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express to PCI-X Bridge (rev 01)
07:00.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Downstream Port E1 (rev 01)
07:01.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Downstream Port E2 (rev 01)
08:00.0 PCI bridge: Broadcom EPB PCI-Express to PCI-X Bridge (rev c3)
09:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet (rev 12)
0b:02.0 Multimedia audio controller: Creative Labs SB Audigy (rev 03)
0b:02.1 Input device controller: Creative Labs SB Audigy Game Port (rev 03)
0b:02.2 FireWire (IEEE 1394): Creative Labs SB Audigy FireWire Port
10:0d.0 VGA compatible controller: ATI Technologies Inc ES1000 (rev 02)
How can I find:
which device driver (kernel module) controls each device?
which device is controlled by a device driver compiled in the kernel (and not as a module)
which device doesn't have a device driver (compiled in or as a module)?
This script (adapted from another in "Linux Kernel in a Nutshell") partially resolves #1:
#!/bin/bash
for i in $(find /sys/ -name modalias); do
echo "----------------------------------"
modalias=$(cat $i)
echo "$(dirname $i) --> $modalias"
/sbin/modprobe --config /dev/null --show-depends $(cat $i) 2>&1
done
But there are some problems with it:
I don't know of an automated way to convert
/sys/devices/pci0000:00/0000:00:1e.0/0000:10:0d.0 --> pci:v00001002d0000515Esv00001028sd000001B1bc03sc00i00
to
10:0d.0 VGA compatible controller: ATI Technologies Inc ES1000 (rev 02)
In some cases the devices are internal to the MB and I don't even know a way to find the real name of the device. For example:
/sys/devices/platform/dcdbas --> platform:dcdbas
/sys/devices/platform/iTCO_wdt --> platform:iTCO_wdt
/sys/devices/LNXSYSTM:00 --> acpi:LNXSYSTM:
/sys/devices/LNXSYSTM:00/device:00/PNP0C33:00 --> acpi:PNP0C33:PNP0C01:
/sys/devices/LNXSYSTM:00/device:00/PNP0A08:00 --> acpi:PNP0A08:PNP0A03:
/sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:0d/PNP0200:00 --> acpi:PNP0200:
and many others.
When the device driver is compiled in (or doesn't exist) the response is FATAL: Module _XXXX_ not found. Indicating there is no module for the device.
In some cases the driver is compiled in (e.g.)
/sys/devices/platform/serial8250 --> platform:serial8250
FATAL: Module platform:serial8250 not found.
/sys/devices/platform/i8042 --> platform:i8042
FATAL: Module platform:i8042 not found.
In other cases, the driver just doesn't exist. But I don't know a way to tell the difference.
Does anyone know?
I don't think you can get a 100% clear-cut answer that you can get in Windows device manager.
A device may be controlled by several kernel modules (say nvidia + agpgart).
A kernel module may control more than one device (usbhid).
You can also have many-to-many relationship (usbcore + usbhid).
Try HAL device manager, which is also available as "KDE HAL device manager" and "gnome-device-manager". Basically, these are frontends to the Hardware Abstraction Layer (HAL), which reads /sysfs/ et al.
It gives information like "info.linux.driver", see the screenshot below:
I'm sorry I don't know how to fiddle out this information yourself in sysfs, but it must be somewhere if HAL is able to find it :-)
lspci -n will give you PCI ids that you can search for on the linux kernel driver database. This will tell you which kernel options to enable.
Well this is a little late, and maybe at that time (2008) didn't even exists, but lspci -n or better lspci -k should fix the problem; for instance:
04:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)
Kernel driver in use: wl
Kernel modules: wl, ssb
The following script will tell you which dynamically loaded drivers are running, although I would also like an automated way of figuring out which compiled in modules are actually in use also so I could de-bloat my kernel some more.
#!/bin/bash
/sbin/lsmod | tail -n+2 | cut -d" " -f1 | xargs /sbin/modinfo -n | sort ;
I'm not sure how relevent the rest of this is to your question but thought you or others might find it useful.
The following code will figure out which .config options control each of the dynamically loaded kernel modules, although I haven't figured out a way to do the same for dynamic modules in the ubuntu lum package yet ( this script is still a work in progress ):
#!/usr/bin/perl -w
use strict;
use Getopt::Long;
my ($kernConfigIn, $kernConfigOut, $kernSourceDir, $lumSourceDir, $lumConfigIn, $lumConfigOut, $help);
GetOptions(
'ksd=s' => \$kernSourceDir,
'lsd=s' => \$lumSourceDir,
'kci=s' => \$kernConfigIn,
'lci=s' => \$lumConfigIn,
'kco=s' => \$kernConfigOut,
'lco=s' => \$lumConfigOut,
'help' => \$help);
if ($help || !$kernSourceDir || !$lumSourceDir ) { Usage($0); }
sub Usage { print "usage error\n"; exit; };
my #modules = `/sbin/lsmod | tail -n+2 | cut -d" " -f1 | xargs /sbin/modinfo -n | sort ;`;
my #kconfig;
foreach my $module (#modules) {
my ($package, $path, $modName) = ( $module =~ m/\/((?:kernel)|(?:ubuntu))\/(.*)\/(.*)\.ko/) ;
$package eq 'kernel' ? push #kconfig, kernel($package, $path, $modName) : ubuntu($package, $path, $modName);
}
# kernel package
sub kernel {
my ($package, $path, $modName) = #_;
my $makefile = $kernSourceDir.$path."/Makefile";
# print "$package, $path, $modName\n";
# print "$makefile\n";
my $option;
chomp($option = `cat $makefile | sed -n "s/^obj-\\\$(CONFIG_\\([A-Z0-9_]*\\))\\W*+=.*"$modName"\\.o.*/CONFIG_\\1/p"`);
print "$option\n";
return $option;
}
# deal with lum configs
sub ubuntu {
}
There is a script by Andreas Goelzer which with slight modification will turn off all unused kernel modules in your .config which significantly speeds up your compiles.
You can find it here:
http://andreas.goelzer.de/kernel-config-based-on-lsmod-output

Resources