Skip to main content

Thread: Unwanted module loads automatically at boot !


ubuntu 12.04 lts , 3.5.0-23-generic kernel, x86_64

have been developing modules system, , reason 1 of them re-loads automatically @ boot-time.

symptoms :

1) modprobe mesa_5i23 # that's module
2) shutdown -h 0
3) (power off)
4) (power on)
5) lsmod | grep mesa_5i23 # yes there !

module *not* listed in /etc/modules.

i've been coding kernel modules many years, , understanding should *not* happen ! what's going on ?

possible contributing factors :

module installs pci driver (a first me)
i'm brand new ubuntu.

dmesg after reboot shows following. (the bold part produced module)

code:
[    2.634910] [drm] supports vblank timestamp caching rev 1 (10.10.2010).[    2.634916] [drm] driver supports precise vblank timestamp query. [    2.666967] vgaarb: device changed decodes: pci:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem [    2.674737] usbcore: registered new interface driver usbhid [    2.674747] usbhid: usb hid core driver [    2.681249] type=1400 audit(1362945120.877:2): apparmor="status" operation="profile_load" name="/sbin/dhclient" pid=382 comm="appa\ rmor_parser" [    2.682910] type=1400 audit(1362945120.877:3): apparmor="status" operation="profile_load" name="/usr/lib/networkmanager/nm-dhcp-cl\ ient.action" pid=382 comm="apparmor_parser" [    2.683868] type=1400 audit(1362945120.877:4): apparmor="status" operation="profile_load" name="/usr/lib/connman/scripts/dhclient-\ script" pid=382 comm="apparmor_parser" [    2.716152] usb 5-2: new full-speed usb device number 2 using uhci_hcd [    2.724929] [drm] gmbus [i915 gmbus panel] timed out, falling bit banging on pin 3 [    2.740864] i915: fixme: max pwm 0 [    2.741652] lp0: using parport0 (interrupt-driven).  [    2.745952] mesa i/o driver installed [    2.746018] mesa_5i23 0000:05:00.0: enabling device (0010 -> 0013) [    2.746088] error: invalid fpga config id : 0x00000104 [    2.746102] mesa 5i23 not probed [    2.746116] mesa_5i23: probe of 0000:05:00.0 failed error -5  [    2.752328] [drm] initialized overlay support [    2.826338] microcode: cpu0 sig=0x106ca, pf=0x8, revision=0x107 [    2.899639] usb 5-2: new usb device found, idvendor=046d, idproduct=c52b [    2.899652] usb 5-2: new usb device strings: mfr=1, product=2, serialnumber=0 [    2.899660] usb 5-2: product: usb receiver [    2.899667] usb 5-2: manufacturer: logitech [    3.019272] fbcon: inteldrmfb (fb0) primary device [    3.021266] console: switching colour frame buffer device 160x50 [    3.021359] fb0: inteldrmfb frame buffer device [    3.021366] drm: registered panic notifier [    3.021406] i915: no acpi video bus found [    3.021653] [drm] initialized i915 1.6.0 20080730 0000:00:02.0 on minor 0 [    3.022501] acpi warning: 0x0000000000000460-0x000000000000047f systemio conflicts region \_sb_.pci0.gfx0.tcoi 1 (20120320/ut\ address-251) [    3.022526] acpi: if acpi driver available device, should use instead of native driver [    3.022533] lpc_ich: resource conflict(s) found affecting itco_wdt [    3.022543] acpi warning: 0x0000000000000428-0x000000000000042f systemio conflicts region \gpe0 1 (20120320/utaddress-251)
as far installation, copy module :

/lib/modules-3.5.0-23-generic/extras/

add dir depmod search path ( add file : depmod.d/extra.conf) , run depmod.

set modprobe rules in /etc/modprobe.d/mesa.conf ( install mesa_5i23 ...)



note module loads correctly when run modprobe mesa_5i23 command line. (unwanted !) auto-load @ boot time fails; indicates me being loaded insmod command , not modprobe : modprobe rules being ignored.

okay, got figured out.

module being loaded hotplug mechanism.

because module registers pci driver, when depmod runs keeps record of in /lib/modules/xxx/modules.alias . anytime system detects new (unknown) hardware, udev daemon checks file find module provides driver.

suppose thing, sure nuisance when *not* behavior want/expect.

perhaps of kernel module programming documentation out there stand corrected :

1) if want module load @ boot-time, list in /etc/modules or register driver.

2) function pci_register_driver() tells system ready handle particular device, system knows before code executed.

sorry sounding grumpy. it's i'm feeling pretty grumpy. have nice day.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk Unwanted module loads automatically at boot !


Ubuntu

Comments

Popular posts from this blog

Some mp4 files not displaying correctly (CS6)

Thread: Samba is not authenticating with LDAP