[Pkg-utopia-maintainers] Bug#586751: Bug#586751: upowerd grab my USB-Serial adapter due to udev rule

Jean-Luc Coulon jean-luc.coulon at wanadoo.fr
Fri Sep 17 16:37:38 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Michael,

Le 17/09/2010 17:15, Michael Biebl a écrit :
> On 22.06.2010 10:33, Jean-Luc Coulon (f5ibh) wrote:
> 
> 
> Hi Jean-Luc,
> 
> I had a short discussion with the upstream developer of upower, Richard Hughes,
> on IRC. I'll copy it here for reference. You can see that the problem apparently
> is, that the watts up pro device uses a generic usb->serial dongle.
> 
[ ...]
> 
> 
> You can get the daemon log, by switching to root, killing the running upowerd
> process and then starting it manually via
> "/usr/lib/upower/upowerd -v"

I can admit Watt-thing uses a generic device. The problem is that this
"generic device" is not the property by Watt-thing...

I've done the following:
1 - start minicom and try to use my serial-USB adapter.
I get:
[jean-luc at tangerine] % minicom
minicom: cannot open
/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A800c7v9-if00-port0: Device
or resource busy

2 - I looked what is the real device related to the indicated id:
[jean-luc at tangerine] % ls -l
/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A800c7v9-if00-port0
lrwxrwxrwx 1 root root 13 17 sept. 17:37
/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A800c7v9-if00-port0 ->
../../ttyUSB0

3 - And who "owns" the device to render it "busy":
jean-luc at tangerine] % sudo lsof | grep ttyUSB0
upowerd   2514        root   11u      CHR              188,0       0t0
4703 /dev/ttyUSB0

This is why I said upowerd was the "culprit".

As you asked, I've killed upowerd.
- --> this way, I can normally access my device via minicom as usual.

Then I've startd upowerd -v and replugged the USB line. Here is the
related part of the log:

TI:18:29:54 FI:up-device-list.c  FN:up_device_list_insert,94
 - added
/sys/devices/pci0000:00/0000:00:12.1/usb4/4-1/4-1:1.0/ttyUSB0/tty/ttyUSB0
TI:18:29:54 FI:up-daemon.c FN:up_daemon_device_added_cb,900
 - emitting added: /org/freedesktop/UPower/devices/monitor_ttyUSB0
(during coldplug 0)
TI:18:30:04 FI:up-device-wup.c   FN:up_device_wup_poll_cb,90
 - Polling: /org/freedesktop/UPower/devices/monitor_ttyUSB0
TI:18:30:04 FI:up-device-wup.c   FN:up_device_wup_parse_command,211
 - no start char in ^^3<86><CE><F8><86><98>f<F0>^N<C0>^X<F3>^X
TI:18:30:04 FI:up-device-wup.c   FN:up_device_wup_refresh,411
 - failed to parse ^^3<86><CE><F8><86><98>f<F0>^N<C0>^X<F3>^X
TI:18:30:15 FI:up-device-wup.c   FN:up_device_wup_poll_cb,90
 - Polling: /org/freedesktop/UPower/devices/monitor_ttyUSB0
TI:18:30:15 FI:up-device-wup.c   FN:up_device_wup_parse_command,211
 - no start char in ^X<CF>3<98><86><98>
TI:18:30:15 FI:up-device-wup.c   FN:up_device_wup_refresh,411
 - failed to parse ^X<CF>3<98><86><98>
TI:18:30:25 FI:up-device-wup.c   FN:up_device_wup_poll_cb,90
 - Polling: /org/freedesktop/UPower/devices/monitor_ttyUSB0

But once I've killed upowerd, then the device is free again. I tried to
restart dbus, but it is not really kind with the system...

Regards

Jean-Luc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFMk5lSUdGGXzzGnNARAonCAJ93tXagGZEvGiIHdVjfqeWbeE+SlQCgmXNN
YzwZttTmLAXOIoGAD3CrCiQ=
=/EgR
-----END PGP SIGNATURE-----







More information about the Pkg-utopia-maintainers mailing list