導航:首頁 > 編程系統 > linux查看已有的驅動

linux查看已有的驅動

發布時間:2023-06-30 16:06:19

linux怎麼查看已裝好硬體驅動

linux系統中的設備驅動是否安裝好一般檢查幾個方面:1、系統日誌。嵌入式系統多是直接dmesg一下,看有沒有設備關鍵字相關的出錯信息(通用系統可檢查/var/log/messages文件)。
2、已載入的模塊。檢查模塊載入列表中有沒有相關設備的模塊。
lsmod
3、設備列表。檢查已載入的設備中有沒有相關設備
cat /proc/devices
4、設備入口。如果以上檢查都正常,還需要檢查設備目錄下設備入口是否已經創建
ls /dev/xxxx

如果以上檢查都正常(驅動模塊已經正常載入、設備入口存在且沒有錯誤),而設備還不能正常工作,就需要檢查設備驅動是否與晶元匹配或者驅動中的硬體資源配置是否與硬體對應了。

㈡ 怎麼查看linux usb設備驅動

下面的信息都是在VMware中運行Ubuntu12-04系統上執行的。同樣該命令也支持在嵌入式系統中進行USB調試。
一、cat設備節點獲取信息
在一些嵌入式開發中需要調試USB功能,經常會cat /sys 下的相關設備節點來查看某些信息,比如說我們可以看到 /sys/bus/usb/devices 目錄有多個子目錄。進入到某個子目錄可以看到usb設備更加詳細的信息(可以理解為設備描述符)。
1、usb設備在匯流排上的信息
// usb設備在匯流排上的信息
root@ubuntu:/sys/kernel/debug# cd /sys/bus/usb/devices
root@ubuntu:/sys/bus/usb/devices# ll
total 0
drwxr-xr-x 2 root root 0 Nov 26 21:21 ./
drwxr-xr-x 4 root root 0 Nov 26 21:21 ../
lrwxrwxrwx 1 root root 0 Nov 26 21:21 1-0:1.0 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-0:1.0/
lrwxrwxrwx 1 root root 0 Dec 15 23:10 1-1 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/
lrwxrwxrwx 1 root root 0 Dec 15 23:18 1-1:1.0 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/
lrwxrwxrwx 1 root root 0 Nov 26 21:21 2-0:1.0 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-0:1.0/
lrwxrwxrwx 1 root root 0 Nov 26 21:21 2-1 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-1/
lrwxrwxrwx 1 root root 0 Nov 26 21:21 2-1:1.0 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-1/2-1:1.0/
lrwxrwxrwx 1 root root 0 Nov 26 21:21 2-2 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/
lrwxrwxrwx 1 root root 0 Nov 26 21:21 2-2:1.0 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2:1.0/
lrwxrwxrwx 1 root root 0 Nov 26 21:21 usb1 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/
lrwxrwxrwx 1 root root 0 Nov 26 21:21 usb2 -> ../../../devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/
其中 usbx/第x個匯流排,x-y:a.b/的目錄格式,x表示匯流排號,y表示埠,a表示配置,b表示介面。
具體解釋可以參照如下:
The names that begin with "usb" refer to USB controllers. More accurately, they refer to the "root hub" associated with each controller. The number is the USB bus number. In the example there is only one controller, so its bus is number 1. Hence the name "usb1".
"1-0:1.0" is a special case. It refers to the root hub's interface. This acts just like the interface in an actual hub an almost every respect; see below.
All the other entries refer to genuine USB devices and their interfaces. The devices are named by a scheme like this:
bus-port.port.port ...
In other words, the name starts with the bus number followed by a '-'. Then comes the sequence of port numbers for each of the intermediate hubs along the path to the device.
For example, "1-1" is a device plugged into bus 1, port 1. It happens to be a hub, and "1-1.3" is the device plugged into port 3 of that hub. That device is another hub, and "1-1.3.1" is the device plugged into its port 1.
The interfaces are indicated by suffixes having this form:
:config.interface
That is, a ':' followed by the configuration number followed by '.' followed by the interface number. In the above example, each of the devices is using configuration 1 and this configuration has only a single interface, number 0. So the interfaces show up as;
1-1:1.0 1-1.3:1.0 1-1.3.1:1.0
A hub will never have more than a single interface; that's part of the USB spec. But other devices can and do have multiple interfaces (and sometimes multiple configurations). Each interface gets its own entry in sysfs and can have its own driver.
2、特定設備的詳細信息
進入到某個目錄中去,可以看到該設備的詳細信息,可用cat命令獲取信息。
// usb設備的詳細信息
root@ubuntu:/sys/bus/usb/devices/usb1# ll
total 0
drwxr-xr-x 6 root root 0 Nov 26 21:21 ./
drwxr-xr-x 4 root root 0 Nov 26 21:21 ../
drwxr-xr-x 10 root root 0 Nov 26 21:21 1-0:1.0/
drwxr-xr-x 5 root root 0 Dec 15 23:10 1-1/
-rw-r--r-- 1 root root 4096 Dec 15 23:40 authorized
-rw-r--r-- 1 root root 4096 Dec 15 23:40 authorized_default
-rw-r--r-- 1 root root 4096 Dec 15 23:40 avoid_reset_quirk
-r--r--r-- 1 root root 4096 Nov 26 21:21 bcdDevice
-rw-r--r-- 1 root root 4096 Nov 26 21:21 bConfigurationValue
-r--r--r-- 1 root root 4096 Nov 26 21:21 bDeviceClass
-r--r--r-- 1 root root 4096 Nov 26 21:21 bDeviceProtocol
-r--r--r-- 1 root root 4096 Nov 26 21:21 bDeviceSubClass
-r--r--r-- 1 root root 4096 Dec 15 23:40 bmAttributes
-r--r--r-- 1 root root 4096 Dec 15 23:40 bMaxPacketSize0
-r--r--r-- 1 root root 4096 Dec 15 23:40 bMaxPower
-r--r--r-- 1 root root 4096 Dec 15 23:40 bNumConfigurations
-r--r--r-- 1 root root 4096 Dec 15 23:40 bNumInterfaces
-r--r--r-- 1 root root 4096 Nov 26 21:21 busnum
-r--r--r-- 1 root root 4096 Dec 15 23:40 configuration
-r--r--r-- 1 root root 65553 Nov 26 21:21 descriptors
-r--r--r-- 1 root root 4096 Dec 15 23:40 dev
-r--r--r-- 1 root root 4096 Nov 26 21:21 devnum
-r--r--r-- 1 root root 4096 Dec 15 23:40 devpath
lrwxrwxrwx 1 root root 0 Nov 27 20:06 driver -> ../../../../../bus/usb/drivers/usb/
drwxr-xr-x 3 root root 0 Dec 15 23:40 ep_00/
-r--r--r-- 1 root root 4096 Nov 26 21:21 idProct
-r--r--r-- 1 root root 4096 Nov 26 21:21 idVendor
-r--r--r-- 1 root root 4096 Dec 15 23:40 ltm_capable
-r--r--r-- 1 root root 4096 Nov 26 21:21 manufacturer
-r--r--r-- 1 root root 4096 Dec 15 23:40 maxchild
drwxr-xr-x 2 root root 0 Nov 26 21:21 power/
-r--r--r-- 1 root root 4096 Nov 26 21:21 proct
-r--r--r-- 1 root root 4096 Dec 15 23:40 quirks
-r--r--r-- 1 root root 4096 Nov 26 21:21 removable
--w------- 1 root root 4096 Dec 15 23:40 remove
-r--r--r-- 1 root root 4096 Nov 26 21:21 serial
-r--r--r-- 1 root root 4096 Nov 26 21:21 speed
lrwxrwxrwx 1 root root 0 Nov 26 21:21 subsystem -> ../../../../../bus/usb/
-rw-r--r-- 1 root root 4096 Nov 26 21:21 uevent
-r--r--r-- 1 root root 4096 Dec 15 23:40 urbnum
-r--r--r-- 1 root root 4096 Dec 15 23:40 version
二、使用debugfs
1、掛載 debugfs 到 /sys/kernel/debug 路徑下
root@ubuntu:mount -t debugfs none /sys/kernel/debug
2、執行上述步驟之後,在 /sys/kernel/debug 就會生成如下的文件
root@ubuntu:/sys/bus/usb/devices# cd /sys/kernel/debug/
root@ubuntu:/sys/kernel/debug# ll
total 0
drwx------ 22 root root 0 Nov 26 21:21 ./
drwxr-xr-x 7 root root 0 Nov 26 21:21 ../
drwxr-xr-x 2 root root 0 Nov 26 21:21 acpi/
drwxr-xr-x 32 root root 0 Dec 4 16:30 bdi/
drwxr-xr-x 2 root root 0 Nov 26 21:21 bluetooth/
drwxr-xr-x 2 root root 0 Nov 26 21:21 cleancache/
drwxr-xr-x 2 root root 0 Nov 26 21:21 dma_buf/
drwxr-xr-x 4 root root 0 Nov 26 21:21 dri/
drwxr-xr-x 2 root root 0 Nov 26 21:21 dynamic_debug/
drwxr-xr-x 2 root root 0 Nov 26 21:21 extfrag/
drwxr-xr-x 2 root root 0 Nov 26 21:21 frontswap/
-r--r--r-- 1 root root 0 Nov 26 21:21 gpio
drwxr-xr-x 3 root root 0 Nov 26 21:21 hid/
drwxr-xr-x 2 root root 0 Nov 26 21:21 kprobes/
drwxr-xr-x 3 root root 0 Nov 26 21:21 kvm-guest/
drwxr-xr-x 2 root root 0 Nov 26 21:21 mce/
drwxr-xr-x 2 root root 0 Nov 26 21:21 pinctrl/
-r--r--r-- 1 root root 0 Nov 26 21:21 pwm
drwxr-xr-x 2 root root 0 Nov 26 21:21 regmap/
drwxr-xr-x 3 root root 0 Nov 26 21:21 regulator/
-rw-r--r-- 1 root root 0 Nov 26 21:21 sched_features
-r--r--r-- 1 root root 0 Nov 26 21:21 sleep_time
-r--r--r-- 1 root root 0 Nov 26 21:21 suspend_stats
drwxr-xr-x 7 root root 0 Nov 26 21:21 tracing/
drwxr-xr-x 3 root root 0 Nov 26 21:21 usb/
drwxr-xr-x 2 root root 0 Nov 26 21:21 virtio-ports/
-r--r--r-- 1 root root 0 Nov 26 21:21 vmmemctl
-r--r--r-- 1 root root 0 Nov 26 21:21 wakeup_sources
drwxr-xr-x 2 root root 0 Nov 26 21:21 x86/
3、cat 設備節點
執行下述命令之後會以特定格式列印目前USB匯流排上所有USB設備的信息如下:
root@ubuntu:/sys/kernel/debug# cat usb/devices
T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 17/900 us ( 2%), #Int= 1, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0001 Rev= 3.13
S: Manufacturer=Linux 3.13.0-32-generic uhci_hcd
S: Proct=UHCI Host Controller
S: SerialNumber=0000:02:00.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms
T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0e0f ProdID=0003 Rev= 1.03
S: Manufacturer=VMware
S: Proct=VMware Virtual USB Mouse
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=1ms
T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 3 Spd=12 MxCh= 7
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0e0f ProdID=0002 Rev= 1.00
S: Proct=VMware Virtual USB Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=255ms
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 6
B: Alloc= 0/800 us ( 0%), #Int= 1, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev= 3.13
S: Manufacturer=Linux 3.13.0-32-generic ehci_hcd
S: Proct=EHCI Host Controller
S: SerialNumber=0000:02:03.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 7 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs= 1
P: Vendor=0bda ProdID=0129 Rev=39.60
S: Manufacturer=Generic
S: Proct=USB2.0-CRW
S: SerialNumber=20100201396000000
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=06 Prot=50 Driver=rts5139
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=83(I) Atr=03(Int.) MxPS= 3 Ivl=64ms
至於信息的詳細解析可以參照 Linux源代碼中 Documentation/usb/proc_usb_info.txt 文件。現摘錄其中對該格式的詳細解釋:

| | |__Proct ID code
| |__Vendor ID code
|__Device info tag #2

String descriptor info:
S: Manufacturer=ssss
| |__Manufacturer of this device as read from the device.
| For USB host controller drivers (virtual root hubs) this may
| be omitted, or (for newer drivers) will identify the kernel
| version and the driver which provi

㈢ Linux怎麼查看網卡驅動

lsusb這個命令是查看無線網卡型號,結果中的AtherosCommunications,Inc.AR9271802.11n就是已經插上的無線網卡;下面mkdir,cd是建立並進入工作目錄;gitclone,wget是獲得相關的文件;tar-jxvf解壓wget下載的驅動壓縮包;下面是安裝驅動具體命令參數看你自己安裝的無線網卡型號和需要下載的驅動包.

㈣ 如何查看linux網卡驅動是否安裝

你得先用lspci檢查到你的網路設備,然後再使用modprobe來偵測是否已經插入了你的網路卡驅動程序。一般來說,現在的發行版都解決得很好,傳統的連線網卡不會有什麼問題。如果是無線網卡,那麼要使用iwconfig

㈤ 怎麼查看linux下的千兆網卡驅動是否安裝成功

你在命令行下輸入ifconfig ,如出現eth0或eth1的話,就表示網卡安裝成功了。

㈥ Linux操作系統中如何查看當前內存中的驅動程序

lsmod顯示當前載入驅動及模塊大小及使用者
cat
/proc/moles
顯示模塊大小及地址
cat
/proc/devices
顯示當前內存中設備的編號

㈦ 怎麼查看linux安裝的驅動模塊

在linux可以查看當前已經安裝的驅動的命令 lsmod 使用lsmod命令就可以查看當前已經安裝專的驅動。屬 如果模塊安裝的太多,可以在輸出的驅動列表中使用grep命令查找是否有需要查詢的命令 如 lsmod|grep "helllo" 查詢hello驅動是否安裝,若安裝過了就...

㈧ linux下如何查看網卡驅動版本信息

Linux下查看網卡驅動和版本信息
查看網卡生產廠商和信號
查看基本信息:lspci
查看詳細信息:lspci -vvv # 3個小寫的v
查看網卡信息:lspci | grep Ethernet
查看網卡驅動
查看網卡驅動信息:lspci -vvv # 找到網卡設備的詳細信息,包括網卡驅動
# lsmod 列出載入的所有驅動,包括網卡驅動

查看網卡驅動版本
查看模塊信息:modifo<mole name> # 其中包含version信息
或 # ethtool-i <device name>
RHEL 6.3中的網卡驅動版本:
# modinfo igb
filename: /lib/moles/2.6.32-279.el6.x86_64/kernel/drivers/net/igb/igb.ko
version: 3.2.10-k
license: GPL
description: Intel(R) Gigabit Ethernet Network Driver
# modinfo e1000e
filename: /lib/moles/2.6.32-279.el6.x86_64/kernel/drivers/net/e1000e/e1000e.ko
version: 1.9.5-k
license: GPL
description: Intel(R) PRO/1000 Network Driver
author: Intel Corporation,<[email protected]>
# modinfo e1000
filename: /lib/moles/2.6.32-279.el6.x86_64/kernel/drivers/net/e1000/e1000.ko
version: 8.0.35-NAPI
license: GPL
description: Intel(R) PRO/1000 Network Driver
# modinfo ixgbe
filename: /lib/moles/2.6.32-279.el6.x86_64/kernel/drivers/net/ixgbe/ixgbe.ko
version: 3.6.7-k
license: GPL
description: Intel(R) 10 Gigabit PCI Express NetworkDriver
# modinfo r8169
filename: /lib/moles/2.6.32-279.el6.x86_64/kernel/drivers/net/r8169.ko
version: 2.3LK-NAPI
license: GPL
description: RealTek RTL-8169 Gigabit Ethernet driver
查看網路介面隊列數
查看網卡介面的中斷信息:#cat /proc/interrupts | grep eth0
或 # ethtool-S eth0
查看網卡驅動源碼的版本號
解壓Intel網卡驅動源碼,打開解壓縮目錄下的*.spec文件查看驅動的版本。
例如:解壓e1000-8.0.35.tar.gz網卡驅動後,查看e1000.spec文件。
Name:e1000
Summary:Intel(R) Gigabit Ethernet Connection
Version: 8.0.35
Release:1
Source:%{name}-%{version}.tar.gz
Vendor:Intel Corporation
License:GPL
ExclusiveOS:linux
Group:System Environment/Kernel
在驅動源碼src目錄中查找:
#grep DRV_VERSION * # forLinux
#findstr DRV_VERSION * # for Windows
在e1000_main.c中也能找到定義驅動版本的一行:
#define DRV_VERSION"8.0.35" DRV_NAPI DRV_DEBUG DRV_HW_PERF
在e1000e中src目錄下netdev.c文件:
#define DRV_VERSION"3.0.4.1" DRV_EXTRAVERSION
igb_main.c:
#define MAJ 5
#define MIN 2
#define BUILD 9.4
#define DRV_VERSION__stringify(MAJ) "." __stringify(MIN) "."\
ixgbe_main.c:
#define DRV_VERSION __stringify(3.22.3) DRIVERIOVDRV_HW_PERF FP GA \

㈨ 如何查看linux中已有的驅動程序

顯卡安裝:
一、下載驅動程序
首先要找到顯卡for Linux的驅動程序。現在絕大多數的3D顯卡都已有了for Linux的驅動程序,可到各顯卡廠商的主頁或Linux的相關站點上去尋找。在安裝顯卡時,伺服器根據顯卡的情況來載入不同的顯示模塊,如果顯示模塊載入不正確,顯卡就不能正常顯示。
二、裝載磁碟驅動器
Linux需要裝載磁碟驅動器才能讀取文件。啟動Linux後,在字元界面下輸入「mount -t vfat /dev/hda1 /mnt/winc」命令,將C盤裝載到Linux下。需要注意的是,如果下載的是壓縮文件,選擇的是在Linux下解壓,就得先進行裝載磁碟驅動器這一步,再進行文件的解壓縮。
三、拷貝文件
將XF86_SVGA文件拷貝到/usr/X11R6/bin目錄下。注意,這是針對Red Hat版本來說,其它版本的路徑不一定相同。「cp /mnt/winc/win98/TEMP/XF86_SVGA /usr/X11R6/bin」(根據自己的情況靈活掌握,關鍵是路徑一定要正確,還要分清字母的大小寫)。如果系統提示有同名文件,問是否覆蓋,一定要選擇「y」。這些舊文件可能是以前安裝顯卡時載入的,沒有實際用處。在輸入文件名的時候,輸完XF86後按一下Tab鍵,再接著輸SVGA,下劃線_就可以出來了,按鍵盤上的下劃線鍵是沒用的,切記。
四、配置顯卡
文件拷貝完成後,輸入Xconfigurator,啟動顯卡配置程序。我在顯卡列表中仍然沒有找到Trident Blade 3D,於是選最後一個選項「Unlist」,然後選擇載入的顯示模塊為SVGA,再選擇顯示器型號、顯存大小、刷新頻率
總結:在Linux下安裝顯卡驅動程序,首先要下載顯卡支持Linux的驅動程序,再將其拷貝到/usr/X11R6/bin目錄下,然後啟動顯卡配置程序進行配置即可。

網卡、音效卡等驅動安裝可以依此類推

閱讀全文

與linux查看已有的驅動相關的資料

熱點內容
還有哪些少兒編程培訓機構 瀏覽:508
ps怎麼去掉文件中不需要的部分 瀏覽:793
微信信用度在哪兒看 瀏覽:72
java監聽器延時 瀏覽:726
itunes備份包含微信聊天記錄 瀏覽:20
怎麼向虛擬機傳文件 瀏覽:677
win10怎麼用軟體激活不了 瀏覽:816
美版a1453是什麼版本 瀏覽:517
電腦里的文件夾按照拼音歸類 瀏覽:996
文件管理器怎麼把視頻壓縮成文件 瀏覽:477
標准化文件名稱包括哪些 瀏覽:85
win10不能讀取dll文件 瀏覽:882
雲騎士重裝系統找不到usb字樣文件 瀏覽:42
皖事通app社保年限在哪裡看 瀏覽:65
為什麼快影顯示沒網路 瀏覽:356
華為如何讓手機升級提醒紅1消失 瀏覽:345
我愛九九商城app 瀏覽:587
劍靈蒼穹武器升級 瀏覽:248
微信錢包微粒貸 瀏覽:654
滾動字幕屏找不到文件 瀏覽:990

友情鏈接