From owner-freebsd-questions@FreeBSD.ORG Mon Apr 12 19:34:17 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F3B216A4CE for ; Mon, 12 Apr 2004 19:34:17 -0700 (PDT) Received: from mail3.panix.com (mail3.panix.com [166.84.1.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id F19DD43D58 for ; Mon, 12 Apr 2004 19:34:16 -0700 (PDT) (envelope-from jester@panix.com) Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mail3.panix.com (Postfix) with ESMTP id E0246983AE for ; Mon, 12 Apr 2004 22:34:13 -0400 (EDT) Received: (from jester@localhost) by panix2.panix.com (8.11.6p2-a/8.8.8/PanixN1.1) id i3D2YD603145 for freebsd-questions@freebsd.org; Mon, 12 Apr 2004 22:34:13 -0400 (EDT) Date: Mon, 12 Apr 2004 22:34:13 -0400 From: Jesse Sheidlower To: freebsd-questions@freebsd.org Message-ID: <20040413023413.GA2071@panix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: USB via module instead of kernel? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2004 02:34:17 -0000 I'm new to this kernel-module thing, so I hope this isn't a silly question. I'm using FreeBSD 5.2 on a laptop running ACPI, and like many others have had suspend/resume problems with the USB dying on resume. I saw a suggestion somewhere that you could remove USB support from the kernel, and add it in via a .ko file at boot time; this way, you could have an rc.suspend and rc.resume that unloads/loads the USB module appropriately and perhaps avoid the problems. I'm not entirely sure how to do this. First, I note that the "device usb" line in the kernel configuration file has a "Required" note in it, and I'm nervous about removing something that says "Required". Second, while I have a usb.ko file under /boot/kernel/, if I type "kldload usb", I get a "can't load usb: File exists" message, but if I try "kldunload usb", I get "can't find file usb: No such file or directory". I might have expected a different message if usb is loaded as part of the kernel. If I want to enable it at boot, do I just add "usb_load="YES"" to /boot/loader.conf ? So to summarize, I guess my questions are: 1) Can I comment out "device usb" from my kernel config and then rebuild the kernel, without causing some big problem? 2) To load at boot, do I just add "usb_load="YES"" to /boot/loader.conf ? 3) Will doing what I described help with the USB problems on suspend/resume? Thanks very much. Jesse Sheidlower