Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Slow eudev on boot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3257
Location: Illinois, USA

PostPosted: Wed Nov 26, 2014 12:06 am    Post subject: Slow eudev on boot Reply with quote

eudev is taking 27 seconds at boot up. it looks like everything is up in seven seconds except the TV card.

See the udevadm.log http://pastebin.com/9AesH9Ud

The relevant excerpt is
Quote:
UDEV [5.883006] add /devices/pci0000:00/0000:00:13.0/usb5/5-1/5-1:1.2/0003:046D:C52B.0003/0003:046D:C52B.0004 (hid)
UDEV [5.883874] add /devices/pci0000:00/0000:00:13.0/usb5/5-1/5-1:1.2/0003:046D:C52B.0003/0003:046D:C52B.0004/hidraw/hidraw1 (hidraw)
UDEV [5.885120] add /devices/pci0000:00/0000:00:13.0/usb5/5-1/5-1:1.2/0003:046D:C52B.0003/0003:046D:C52B.0004/input/input3 (input)
UDEV [5.887582] add /devices/pci0000:00/0000:00:13.0/usb5/5-1/5-1:1.2/0003:046D:C52B.0003/0003:046D:C52B.0004/input/input3/mouse0 (input)
UDEV [5.887865] add /devices/pci0000:00/0000:00:13.0/usb5/5-1/5-1:1.2/0003:046D:C52B.0003/0003:046D:C52B.0004/input/input3/event3 (input)
KERNEL[26.733064] add /devices/pci0000:00/0000:00:14.4/0000:04:03.0/video4linux/video0 (video4linux)
KERNEL[26.733355] add /devices/pci0000:00/0000:00:14.4/0000:04:03.0/dvb/dvb0.demux0 (dvb)
KERNEL[26.733480] add /devices/pci0000:00/0000:00:14.4/0000:04:03.0/dvb/dvb0.dvr0 (dvb)
KERNEL[26.743380] add /module/s5h1411 (module)
UDEV [26.743850] add /module/s5h1411 (module)
KERNEL[27.176470] add /devices/pci0000:00/0000:00:14.4/0000:04:03.0/dvb/dvb0.frontend0 (dvb)
KERNEL[27.176689] add /devices/pci0000:00/0000:00:14.4/0000:04:03.0/dvb/dvb0.net0 (dvb)
KERNEL[27.176822] add /devices/pci0000:00/0000:00:14.4/0000:04:03.0/video4linux/video32 (video4linux)
KERNEL[27.176907] add /devices/pci0000:00/0000:00:14.4/0000:04:03.0/video4linux/vbi0 (video4linux)
KERNEL[27.176994] add /devices/pci0000:00/0000:00:14.4/0000:04:03.0/video4linux/video24 (video4linux)


Can I speed this up with a custom rule or something? If I execute "/etc/init.d/udev restart" after logging in, it only takes seven seconds. What's happening in that 21 second interval?

Hoping a udev guru can help me here. Kernel is gentoo-sources-3.17.4 and eudev version is 1.10-r2
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3257
Location: Illinois, USA

PostPosted: Fri Nov 28, 2014 11:51 pm    Post subject: Reply with quote

Well, I found out what's happening in that interval. The TV card driver module 'cx18' is loading firmware. If I blacklist cx-18, eudev only takes 6 seconds. But then I have to unblacklist it and run /etc/init.d/udev over again, udevadm trigger doesn't work.

Why does firmware need to be loaded on every boot? It seems like it's really software not firmware else loading it once would suffice.

I tried making /etc/modprobe.d/blacklist.conf a symlink and swapping the symlink in /etc/init.d/local. That works in that it creates the devices but it also triggers a kernel oops.

Still looking for suggestions. Creation of the TV nodes could easier wait until after login or at least run in parallel to the later rc tasks.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3257
Location: Illinois, USA

PostPosted: Sat Jan 03, 2015 11:23 pm    Post subject: Reply with quote

Learned a bit more in the last month. For one thing 'firmware' is a misnomer. We are really talking about software that needs to be loaded into the card's onboard RAM at each boot. The ivtv driver tries to load this 'firmware` three times. When I changed that to once by patching the kernel driver code, boot time dropped to seven seconds.

Further investigation reveals that there are two cards in the system using the ivtv driver, Hauppauge PVR-150 analog TV card at PCI address 04:02.0 and a Hauppauge HVR-1600 dual analog/digital card at PCI address 04:03.0 it is the later chip that needs firmware v4l-cx2341x-enc.fw. It appears that the driver tries to load the firmware into the analog card and fails triggering the three retries.

So the problem is explained but the solution is not obvious. Do I need to modify the driver? Or should I shut off loading firmware in the driver and use a udev rule to load firmware based on card ID? If so, how do I do this?

relevant kernel options are:
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_EXTRA_FIRMWARE="v41-cx23418-enc.fw"
CONFIG_EXTRA_FIRMWARE_DIR="/lib64/firmware"
CONFIG_FW_LOADER=y
# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set
CONFIG_UEVENT_HELPER=y
CONFIG_UEVENT_HELPER_PATH="/sbin/udevadm"
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5972

PostPosted: Sun Jan 04, 2015 4:05 am    Post subject: Reply with quote

Tony0945 wrote:
relevant kernel options are:
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_EXTRA_FIRMWARE="v41-cx23418-enc.fw"
CONFIG_EXTRA_FIRMWARE_DIR="/lib64/firmware"
CONFIG_FW_LOADER=y
# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set
CONFIG_UEVENT_HELPER=y
CONFIG_UEVENT_HELPER_PATH="/sbin/udevadm"

Have you verified that file actually exists?
Code:
ls -l /lib64/firmware/v41-cx23418-enc.fw
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3257
Location: Illinois, USA

PostPosted: Sun Jan 04, 2015 9:45 pm    Post subject: Reply with quote

Quote:
Have you verified that file actually exists?
Code:
ls -l /lib64/firmware/v41-cx23418-enc.fw


Yes, I placed it there myself.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum