FS#32575 - [mkinitcpio] re-enable autodetection of hid modules in usbinput?
Attached to Project:
Arch Linux
Opened by Ray (ataraxia) - Saturday, 10 November 2012, 04:00 GMT
Last edited by Dave Reisner (falconindy) - Monday, 10 December 2012, 15:45 GMT
Opened by Ray (ataraxia) - Saturday, 10 November 2012, 04:00 GMT
Last edited by Dave Reisner (falconindy) - Monday, 10 December 2012, 15:45 GMT
|
Details
Description:
I found this old commit: https://projects.archlinux.org/mkinitcpio.git/commit/install/usbinput?id=822a88700e3aeb7432c1a4dc0ede4c20494f6fcb which disabled autodetection for the hid-* modules in the usbinput install hook as it wasn't working at the time. I've tested locally on a few different machines and such autodetection works now. As there are rather a lot of hid modules, this saves quite a bit of space in the initramfs. Please consider changing "add_all_modules '/hid/hid-'" to "add_checked_modules '/hid/hid-'" in install/usbinput. Additional info: * package version(s) mkinitcpio 0.11.0-1 |
This task depends upon
Closed by Dave Reisner (falconindy)
Monday, 10 December 2012, 15:45 GMT
Reason for closing: Implemented
Additional comments about closing: mkinitcpio 0.12.0
Monday, 10 December 2012, 15:45 GMT
Reason for closing: Implemented
Additional comments about closing: mkinitcpio 0.12.0
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=4d53b8012f1f01ddb3f24db2031b042bb4cbd0d0
But, since I don't have the HW to test this, I'd like to see how it works in practice for a machine that's benefiting from it.
First machine:
$ mkinitcpio -M
==> Modules autodetected
ahci
amd64_edac_mod
ata_generic
btrfs
button
ehci_hcd
evdev
firewire_ohci
floppy
hid_generic
i2c_piix4
k10temp
kvm_amd
microcode
ohci_hcd
parport_pc
pata_acpi
pata_atiixp
pcspkr
powernow_k8
processor
r8169
radeon
sd_mod
serio_raw
shpchp
snd_hda_intel
sp5100_tco
sr_mod
usbcore
usbhid
wmi
$ find /sys/devices -name modalias -exec grep hid: {} +
/sys/devices/pci0000:00/0000:00:12.1/usb4/4-2/4-2:1.0/0003:046D:C312.0002/modalias:hid:b0003g0001v0000046Dp0000C312
/sys/devices/pci0000:00/0000:00:12.1/usb4/4-3/4-3:1.0/0003:046D:C018.0003/modalias:hid:b0003g0001v0000046Dp0000C018
$ ls -l /sys/devices/pci0000:00/0000:00:12.1/usb4/4-2/4-2:1.0/0003:046D:C312.0002
total 0
lrwxrwxrwx 1 root root 0 Nov 10 11:22 driver -> ../../../../../../../bus/hid/drivers/hid-generic/
drwxr-xr-x 3 root root 0 Nov 7 17:30 hidraw/
-r--r--r-- 1 root root 4096 Nov 9 18:53 modalias
drwxr-xr-x 2 root root 0 Nov 9 18:53 power/
-r--r--r-- 1 root root 4096 Nov 10 11:22 report_descriptor
lrwxrwxrwx 1 root root 0 Nov 10 11:22 subsystem -> ../../../../../../../bus/hid/
-rw-r--r-- 1 root root 4096 Nov 10 11:22 uevent
$ ls -l /sys/devices/pci0000:00/0000:00:12.1/usb4/4-3/4-3:1.0/0003:046D:C018.0003
total 0
lrwxrwxrwx 1 root root 0 Nov 10 11:22 driver -> ../../../../../../../bus/hid/drivers/hid-generic/
drwxr-xr-x 3 root root 0 Nov 7 17:30 hidraw/
-r--r--r-- 1 root root 4096 Nov 9 18:53 modalias
drwxr-xr-x 2 root root 0 Nov 9 18:53 power/
-r--r--r-- 1 root root 4096 Nov 10 11:22 report_descriptor
lrwxrwxrwx 1 root root 0 Nov 10 11:22 subsystem -> ../../../../../../../bus/hid/
-rw-r--r-- 1 root root 4096 Nov 10 11:22 uevent
$ lsusb
Bus 004 Device 002: ID 046d:c312 Logitech, Inc. DeLuxe 250 Keyboard
Bus 004 Device 003: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Second machine:
$ mkinitcpio -M
==> Modules autodetected
ahci
ata_generic
btrfs
button
coretemp
dcdbas
dell_wmi
e1000e
ehci_hcd
evdev
hid_generic
i2c_i801
iTCO_wdt
intel_agp
kvm_intel
lpc_ich
mei
microcode
parport_pc
pata_acpi
pcspkr
processor
psmouse
radeon
sd_mod
serio_raw
shpchp
snd_hda_intel
sr_mod
uhci_hcd
usbcore
usbhid
wmi
$ find /sys/devices -name modalias -exec grep hid: {} +
/sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0/0003:413C:2106.0001/modalias:hid:b0003g0001v0000413Cp00002106
/sys/devices/pci0000:00/0000:00:1a.1/usb4/4-2/4-2:1.0/0003:413C:3012.0002/modalias:hid:b0003g0001v0000413Cp00003012
$ ls -l /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0/0003:413C:2106.0001
total 0
lrwxrwxrwx 1 root root 0 Nov 10 11:23 driver -> ../../../../../../../bus/hid/drivers/hid-generic/
drwxr-xr-x 3 root root 0 Nov 9 16:41 hidraw/
-r--r--r-- 1 root root 4096 Nov 9 18:46 modalias
drwxr-xr-x 2 root root 0 Nov 9 18:46 power/
-r--r--r-- 1 root root 4096 Nov 10 11:23 report_descriptor
lrwxrwxrwx 1 root root 0 Nov 9 16:41 subsystem -> ../../../../../../../bus/hid/
-rw-r--r-- 1 root root 4096 Nov 9 16:41 uevent
$ ls -l /sys/devices/pci0000:00/0000:00:1a.1/usb4/4-2/4-2:1.0/0003:413C:3012.0002
total 0
lrwxrwxrwx 1 root root 0 Nov 10 11:23 driver -> ../../../../../../../bus/hid/drivers/hid-generic/
drwxr-xr-x 3 root root 0 Nov 9 16:41 hidraw/
-r--r--r-- 1 root root 4096 Nov 9 18:46 modalias
drwxr-xr-x 2 root root 0 Nov 9 18:46 power/
-r--r--r-- 1 root root 4096 Nov 10 11:23 report_descriptor
lrwxrwxrwx 1 root root 0 Nov 9 16:41 subsystem -> ../../../../../../../bus/hid/
-rw-r--r-- 1 root root 4096 Nov 9 16:41 uevent
$ lsusb
Bus 003 Device 002: ID 413c:2106 Dell Computer Corp. Dell QuietKey Keyboard
Bus 004 Device 002: ID 413c:3012 Dell Computer Corp. Optical Wheel Mouse
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub