NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/46524: ubt prevents computer from shutting down.

>Number:         46524
>Category:       kern
>Synopsis:       ubt prevents computer from shutting down.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 02 17:00:00 +0000 2012
>Originator:     Nat Sloss
>Release:        NetBSD Current 6.99.6
NetBSD beast 6.99.6 NetBSD 6.99.6 (LOCKDEBUG) #54: Sat Jun  2 17:32:26 EST 2012 
 build@beast:/usr/src/sys/arch/i386/compile/obj/LOCKDEBUG i386
I have a laptop with built in bluetooth.  I seldom turn off my computer or I 
would have found this earlier.

Bluetooth is supported via ubt and is attached to uhci.
I power down via acpi which works great in NetBSD 5.0.1 but not in current and 
I assume NetBSD 6.

When shutting down the screen stays on (nothing written on the screen) and I 
have to shutdown by holding down the power button.

If i disabled bluetooth before shutting down it worked.
I don't know if this is reproducible by anyone else it maybe a BIOS/acpi 
controller problem.

Try to poweroff (ACPI) on a computer with embedded bluetooth supported by 
To fix the problem I patched ubt to detach at shutdown I am unaware if this was 
the default behavior in NetBSD 5.0.

RCS file: /cvsroot/src/sys/dev/usb/ubt.c,v
retrieving revision 1.47
diff -u -r1.47 ubt.c
--- sys/dev/usb/ubt.c   24 Apr 2012 20:04:49 -0000      1.47
+++ sys/dev/usb/ubt.c   2 Jun 2012 16:52:20 -0000
@@ -298,7 +298,8 @@
 int             ubt_detach(device_t, int);
 int             ubt_activate(device_t, enum devact);
 extern struct cfdriver ubt_cd;
-CFATTACH_DECL_NEW(ubt, sizeof(struct ubt_softc), ubt_match, ubt_attach, 
ubt_detach, ubt_activate);
+CFATTACH_DECL3_NEW(ubt, sizeof(struct ubt_softc), ubt_match, ubt_attach, 
ubt_detach, ubt_activate,

 static int ubt_set_isoc_config(struct ubt_softc *);
 static int ubt_sysctl_config(SYSCTLFN_PROTO);

Now shutdown and poweroff work as before, but sysctl -w hw.acpi.sleep.state=5 
does not and it didn't work in NetBSD 5 unless I called pmf_system_shutdown 
first but this is probably not related.



Home | Main Index | Thread Index | Old Index