USB device appears late, driver does not start on boot

Bug #1253861 reported by Hontvári József Levente on 2013-11-22
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
nut (Ubuntu)
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(NETDEV_CHANGE): eth0: link becomes ready
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/whoopsie/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:0000.0001: hiddev0,hidraw0: USB HID v1.00 Device [STD UPS MON V1.0] on usb-0000:00:12.1-3/input0
Nov 21 21:41:53 munka whoopsie[983]: Could not get the Network Manager state:

Here is the "fix" from my /etc/init.d/nut-server script:

start_stop_server () {
  case "$MODE" in
    standalone|netserver)
      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/rules.d/52-nut-usbups.rules]
ProcVersionSignature: Ubuntu 3.11.0-13.20-generic 3.11.6
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.conffile..etc.nut.ups.conf: [modified]
modified.conffile..etc.nut.upsd.users: [modified]
mtime.conffile..etc.init.d.nut.server: 2013-11-22T02:46:40.856595
mtime.conffile..etc.nut.ups.conf: 2013-11-22T00:25:01.224512
mtime.conffile..etc.nut.upsd.users: 2013-11-21T05:59:13.640552

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nut (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers