USB device appears late, driver does not start on boot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nut (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I do not why, but the USB UPS device appears very late in the boot process. I would say, it appears only after the boot, even through it is plugged in continuously. The result is that the nut server, therefore the nut driver starts nearly at the same time, creating a race condition. I was able to fix it with a 10 second sleep in the init.d script (3 seconds was not enough). syslog extract:
Nov 21 21:41:46 munka kernel: [ 6.834055] EXT4-fs (dm-2): re-mounted. Opts: errors=remount-ro
Nov 21 21:41:46 munka acpid: starting up with proc fs
Nov 21 21:41:46 munka cron[794]: (CRON) INFO (pidfile fd = 3)
Nov 21 21:41:46 munka cron[878]: (CRON) STARTUP (fork ok)
Nov 21 21:41:46 munka acpid: 1 rule loaded
Nov 21 21:41:46 munka acpid: waiting for events: event logging is off
Nov 21 21:41:46 munka cron[878]: (CRON) INFO (Running @reboot jobs)
Nov 21 21:41:47 munka kernel: [ 8.940124] r8169 0000:03:00.0 eth0: link up
Nov 21 21:41:47 munka kernel: [ 8.940133] IPv6: ADDRCONF(
Nov 21 21:41:48 munka whoopsie[813]: whoopsie 0.2.24.1 starting up.
Nov 21 21:41:48 munka whoopsie[813]: Using lock path: /var/lock/
Nov 21 21:41:50 munka kernel: [ 11.323047] usb 4-3: New USB device found, idVendor=0001, idProduct=0000
Nov 21 21:41:50 munka kernel: [ 11.323051] usb 4-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Nov 21 21:41:50 munka kernel: [ 11.323053] usb 4-3: Product: STD UPS MON V1.0
Nov 21 21:41:50 munka kernel: [ 11.327943] hidraw: raw HID events driver (C) Jiri Kosina
Nov 21 21:41:50 munka kernel: [ 11.357172] usbcore: registered new interface driver usbhid
Nov 21 21:41:50 munka kernel: [ 11.357174] usbhid: USB HID core driver
Nov 21 21:41:50 munka kernel: [ 11.365323] hid-generic 0003:0001:
Nov 21 21:41:53 munka whoopsie[983]: Could not get the Network Manager state:
Here is the "fix" from my /etc/init.
start_stop_server () {
case "$MODE" in
standalone|
case "$1" in
start)
# First, start driver(s)
# USB UPS appears late in the boot as of 2013-11
sleep 10
! $upsdrvctl start > /var/log/ups-driver 2>&1 && \
ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: nut-server 2.6.4-2.3ubuntu2 [modified: lib/udev/
ProcVersionSign
Uname: Linux 3.11.0-13-generic x86_64
ApportVersion: 2.12.5-0ubuntu2.1
Architecture: amd64
Date: Fri Nov 22 02:46:46 2013
InstallationDate: Installed on 2013-11-20 (1 days ago)
InstallationMedia: Ubuntu-Server 13.10 "Saucy Salamander" - Release amd64 (20131016)
KernelVersion: Linux munka 3.11.0-13-generic #20-Ubuntu SMP Wed Oct 23 07:38:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
MarkForUpload: True
SourcePackage: nut
UpgradeStatus: No upgrade log present (probably fresh install)
modified.
modified.
mtime.conffile.
mtime.conffile.
mtime.conffile.
Status changed to 'Confirmed' because the bug affects multiple users.