From owner-freebsd-usb@FreeBSD.ORG Wed Sep 10 03:32:49 2014 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23F584EA for ; Wed, 10 Sep 2014 03:32:49 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 045F6AC3 for ; Wed, 10 Sep 2014 03:32:49 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A3WmpQ086417 for ; Wed, 10 Sep 2014 03:32:48 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 175731] detaching USB keyboard freezes other USB keyboards Date: Wed, 10 Sep 2014 03:32:49 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: henry.hu.sh@gmail.com X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 03:32:49 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=175731 Henry Hu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |henry.hu.sh@gmail.com --- Comment #8 from hselasky@c2i.net --- On Thursday 14 February 2013 10:20:02 Norbert Koch wrote: > The following reply was made to PR usb/175731; it has been noted by GNATS. > > From: Norbert Koch > To: hselasky@c2i.net > Cc: freebsd-usb@freebsd.org, bug-followup@freebsd.org, imp@freebsd.org > Subject: Re: usb/175731: detaching USB keyboard freezes other USB keyboards > Date: Thu, 14 Feb 2013 10:19:05 +0100 > > Am 07.02.2013 22:26, schrieb Hans Petter Selasky: > > On Thursday 07 February 2013 13:10:01 Norbert Koch wrote: > >> The following reply was made to PR usb/175731; it has been noted by > >> GNATS. > >> > >> From: Norbert Koch > >> To: bug-followup@FreeBSD.org > >> Cc: > >> Subject: Re: usb/175731: detaching USB keyboard freezes other USB > >> keyboards Date: Thu, 07 Feb 2013 13:01:01 +0100 > >> > >> Same problem with FreeBSD-9.1-RELEASE. > > > > Hi, > > > > In /etc/devd.conf there are a few lines of code: > > > > # When a USB keyboard arrives, attach it as the console keyboard. > > attach 100 { > > > > device-name "ukbd0"; > > action "/etc/rc.d/syscons setkeyboard /dev/ukbd0"; > > > > }; > > detach 100 { > > > > device-name "ukbd0"; > > action "/etc/rc.d/syscons setkeyboard /dev/kbd0"; > > > > }; > > > > Can you try to uncomment these? > > > > Then restart devd or reboot and try again and see what happens. > > > > I believe the devd.conf lines above should be removed. > > > > --HPS > > I already tried this. Commenting out does not help. > > Two choices work for me: > 1. devd_enable=NO and hald_enable=YES > 2. devd_enable=YES and option "AutoAddDevices" "NO" in xorg.conf > Can you edit this file: /usr/local/share/hal/fdi/policy/10osvendor/10-x11-input.fdi And change: kbd Into: kbd_dummy Then restart hal. Possibly you need a keyboard device entry in /etc/X11/xorg.conf after this change. --HPS -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@FreeBSD.ORG Wed Sep 10 06:57:38 2014 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08DA83DF for ; Wed, 10 Sep 2014 06:57:38 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E481B171 for ; Wed, 10 Sep 2014 06:57:37 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A6vbjd061184 for ; Wed, 10 Sep 2014 06:57:37 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 193279] Corsair K70 Gaming Keyboard will not function on boot Date: Wed, 10 Sep 2014 06:57:37 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 9.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: Needs MFC X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 06:57:38 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193279 --- Comment #4 from commit-hook@freebsd.org --- A commit references this bug: Author: hselasky Date: Wed Sep 10 06:57:25 UTC 2014 New revision: 271359 URL: http://svnweb.freebsd.org/changeset/base/271359 Log: MFC r271017 and r271018: Add new quirk. PR: 193279 Changes: _U stable/9/sys/ _U stable/9/sys/dev/ stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/usbdevs -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@FreeBSD.ORG Wed Sep 10 07:15:39 2014 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BEDAFAF5 for ; Wed, 10 Sep 2014 07:15:39 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6B0C380 for ; Wed, 10 Sep 2014 07:15:39 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A7FdHA039523 for ; Wed, 10 Sep 2014 07:15:39 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 193279] Corsair K70 Gaming Keyboard will not function on boot Date: Wed, 10 Sep 2014 07:15:39 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 9.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: Needs MFC X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 07:15:39 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193279 --- Comment #5 from commit-hook@freebsd.org --- A commit references this bug: Author: hselasky Date: Wed Sep 10 07:15:24 UTC 2014 New revision: 271361 URL: http://svnweb.freebsd.org/changeset/base/271361 Log: MFC r239298, r271017 and r271018: Add new quirk. PR: 193279 Changes: _U stable/8/sys/ _U stable/8/sys/dev/ _U stable/8/sys/dev/usb/ stable/8/sys/dev/usb/quirk/usb_quirk.c stable/8/sys/dev/usb/usbdevs -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@FreeBSD.ORG Wed Sep 10 09:41:47 2014 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDB588C1 for ; Wed, 10 Sep 2014 09:41:47 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4E271562 for ; Wed, 10 Sep 2014 09:41:47 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A9flHR024564 for ; Wed, 10 Sep 2014 09:41:47 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 193279] Corsair K70 Gaming Keyboard will not function on boot Date: Wed, 10 Sep 2014 09:41:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 9.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: Needs MFC X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 09:41:48 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193279 --- Comment #6 from commit-hook@freebsd.org --- A commit references this bug: Author: hselasky Date: Wed Sep 10 09:40:51 UTC 2014 New revision: 271370 URL: http://svnweb.freebsd.org/changeset/base/271370 Log: MFC r271017 and r271018: Add new quirk. PR: 193279 Approved by: re, marius Changes: _U stable/10/ stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/usbdevs -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@FreeBSD.ORG Fri Sep 12 17:54:45 2014 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 005A25CA for ; Fri, 12 Sep 2014 17:54:44 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 351F9211 for ; Fri, 12 Sep 2014 17:54:40 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id UAA28951 for ; Fri, 12 Sep 2014 20:54:38 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XSV3O-0005sv-6K for freebsd-usb@freebsd.org; Fri, 12 Sep 2014 20:54:38 +0300 Message-ID: <54133325.9070302@FreeBSD.org> Date: Fri, 12 Sep 2014 20:53:41 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: freebsd-usb@FreeBSD.org Subject: usb printer vs cups Content-Type: text/plain; charset=X-VIET-VPS Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 17:54:45 -0000 >From my experience I think that cupsd executes backend tools with all uids and gids set to cups and no supplementary groups. In the case of USB printers the backends need to access /dev/usbctl and /dev/usb/foobar that corresponds to a printer. That means that the access to those devices must be somehow granted to cups:cups. How do people solve this? What kind of permissions / configuration do you use? P.S. Maybe I over-generalized the issue to all USB printers. My personal experience is with an HP printer handled by hplip / hplip-plugin. -- Andriy Gapon From owner-freebsd-usb@FreeBSD.ORG Fri Sep 12 20:12:52 2014 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE9CEEEF; Fri, 12 Sep 2014 20:12:52 +0000 (UTC) Received: from mail-la0-x233.google.com (mail-la0-x233.google.com [IPv6:2a00:1450:4010:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A667217; Fri, 12 Sep 2014 20:12:51 +0000 (UTC) Received: by mail-la0-f51.google.com with SMTP id gi9so1618644lab.24 for ; Fri, 12 Sep 2014 13:12:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:message-id:date:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=KNZx2LJtxQgGUh6go/0NZ22yGrSnBzZ/yRSFZ+zM3pE=; b=XF8uefadYksXx6J7bTGZxH6RDH/OX5pHMbexW/h9aIknmlcIb7h0H8hXDr9wQajjes YIFR7by0jmjReAh3PnqRwxVXiiayOYZlcWk9fwkDUsb8Ye2f/wA+d+zcGdxUolljcedx 6pGHipHRZatayLdv1BmAFUqSolwk/iFd2ux/cZJawAq91QO+wPqKeA1HWAoVviDm41eK lOAVvqzYOS+LaUBDgslBzGPp4SzKp7NPlUx6pNV7RRPULN9YM6Fgja2/CGm/AjN8trRu QRKvjQsDWQ/GLJKJ7kROSI+ai331gN95ZzjO7taYSo3xzXBeUDqYtbK6AFKPj/OAPxv1 /gcg== X-Received: by 10.112.148.133 with SMTP id ts5mr10878874lbb.45.1410552769746; Fri, 12 Sep 2014 13:12:49 -0700 (PDT) Received: from limbo.b1t.lan (167.203-pool.nikopol.net. [213.111.203.167]) by mx.google.com with ESMTPSA id pr7sm1658133lbc.18.2014.09.12.13.12.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Sep 2014 13:12:49 -0700 (PDT) From: Volodymyr Kostyrko X-Google-Original-From: Volodymyr Kostyrko Message-ID: <541353BF.5080608@b1t.name> Date: Fri, 12 Sep 2014 23:12:47 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: Andriy Gapon , freebsd-usb@FreeBSD.org Subject: Re: usb printer vs cups References: <54133325.9070302@FreeBSD.org> In-Reply-To: <54133325.9070302@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 20:12:52 -0000 On 12.09.2014 20:53, Andriy Gapon wrote: > > From my experience I think that cupsd executes backend tools with all uids and > gids set to cups and no supplementary groups. In the case of USB printers the > backends need to access /dev/usbctl and /dev/usb/foobar that corresponds to a > printer. That means that the access to those devices must be somehow granted to > cups:cups. > How do people solve this? What kind of permissions / configuration do you use? devfs > P.S. > Maybe I over-generalized the issue to all USB printers. My personal experience > is with an HP printer handled by hplip / hplip-plugin. Personally I prefer using stock lpd for those, it can be easily integrated with foomatic hpijs. -- Sphinx of black quartz judge my vow. From owner-freebsd-usb@FreeBSD.ORG Sat Sep 13 12:04:40 2014 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9810EBB3 for ; Sat, 13 Sep 2014 12:04:40 +0000 (UTC) Received: from mail-ig0-f180.google.com (mail-ig0-f180.google.com [209.85.213.180]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66C9297 for ; Sat, 13 Sep 2014 12:04:39 +0000 (UTC) Received: by mail-ig0-f180.google.com with SMTP id hn15so1865593igb.1 for ; Sat, 13 Sep 2014 05:04:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=PqK8FHYxyF2ZGtYWXugBjIFRQJf/+O+yigALgGg3D1o=; b=S2HUDce482o/SAOVggc6j+Y68NjxRMHJ1mzYpt+YRW3h7gKoIlSps6IjagmLYm9SO2 ZGd5k7rXV80Tdu/rp8t2esGBViXCfJOO539ksFK3BJgEtoz73V7ajHlr5h1iPwmg9z77 V9aJbp/z2V2jAnT9Czqe4VodlVNWyfp1uPTxwj74Ao9mdyJdQckbjjjH3THVzvxqvrkU N2+BvqR14uSgrHzN16P1iIGm+MsWg/X5PZBbvBguOMHwD0QdT60K/pNN+D2uu7MhyhAJ qp3gN6wczqFLtHsUupFX4tUEv2qwrz6pkX7sYf9ng+UbaMTivp6gUS0Y3bU29ArVVqkt p7Rw== X-Gm-Message-State: ALoCoQk3VYb0UKgBlQMC53tVCPJRsDFDu+iox3hB7CBj1yXFDdMOVdPKY0S2NC3vhAC2Sml709k1iCO3E4Y/nK128Vo7eXLPzad+9lmfXv3/TlouPTOGVcowJ7pQLPtcjAOeIicrin/F X-Received: by 10.50.21.3 with SMTP id r3mr9476918ige.13.1410609873708; Sat, 13 Sep 2014 05:04:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.110.74 with HTTP; Sat, 13 Sep 2014 05:04:18 -0700 (PDT) From: "Lundberg, Johannes" Date: Sat, 13 Sep 2014 21:04:18 +0900 Message-ID: Subject: libusb and non-root access problem To: "freebsd-usb@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 12:04:40 -0000 SGkNCg0KSSB0cmllZCBub3cgZm9yIGhvdXJzIGJ1dCBubyBsdWNrIHdpdGggdGhpcy4uIEkgaGF2 ZSBhIHNwZWNpYWwgdXNiIGRldmljZQ0KdG8gd2hpY2ggSSBjb25uZWN0IHdpdGggbGlidXNiLiBF dmVyeXRoaW5nIHdvcmtzIGZpbmQgYXMgcm9vdCBidXQgSSBjYW4NCnNlZW0gdG8gYmUgYWJsZSB0 byBhY2Nlc3Mgd2l0aCBub3JtYWwgdXNlciBubyBtYXR0ZXIgaG93IEkgY29uZmlndXJlIGRldmZz Lg0KDQpJIGNoYW5nZWQgYm90aCBjb25mIGFuZCBydWxlcyBhbmQgZXZlbiBzZXQgbXlzZWxmIGFz IG93bmVyIGFuZCBncm91cCBhbmQNCjc3NyBwZXJtaXNzaW9uIHRvIC9kZXYvdWdlbiogL2Rldi91 c2IgYW5kIC9kZXYvdXNiLyogYnV0IG5vIGx1Y2suLi4NCg0KSSBjYW4gY29ubmVjdCB0byB0aGUg ZGV2aWNlIGFuZCBjbGFpbSBpbnRlcmZhY2UgYnV0IHRoZW4gaXQgZmFpbHMgYXQgdGhlDQpmaXJz dCBsaWJ1c2JfY29udHJvbF90cmFuc2ZlciB3aXRoIGVycm9yIC00DQoNCkkgaGF2ZSBkb25lIHRo aXMgYmVmb3JlIHdpdGhvdXQgcHJvYmxlbXMuIEkgYW0gcnVubmluZyB0aGUgbmV3ZXN0DQoxMS1D VVJSRU5UIHNuYXBzaG90IHNvIGNvdWxkIHRoZXJlIGJlIGFueSBidWcgdGhhdCBjYXVzZXMgdGhp cyBvciBoYXMNCmFueXRoaW5nIGNoYW5nZWQgaW4gY29uZmlndXJhdGlvbnM/DQoNCkdyYXRlZnVs IGZvciBhbnkgYWR2aWNlLi4uDQotLQ0KSm9oYW5uZXMgTHVuZGJlcmcNCgotLSAKPS09LT0tPS09 LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tCuenmOWvhuS/neaM geOBq+OBpOOBhOOBpu+8muOBk+OBrumbu+WtkOODoeODvOODq+OBr+OAgeWQjeWum+S6uuOBq+mA geS/oeOBl+OBn+OCguOBruOBp+OBguOCiuOAgeenmOWMv+eJueaoqeOBruWvvuixoeOBqOOBquOC i+aDheWgseOCkuWQq+OCk+OBp+OBhOOBvuOBmeOAggrjgoLjgZfjgIHlkI3lrpvkurrku6XlpJbj ga7mlrnjgYzlj5fkv6HjgZXjgozjgZ/loLTlkIjjgIHjgZPjga7jg6Hjg7zjg6vjga7noLTmo4Tj gIHjgYrjgojjgbPjgZPjga7jg6Hjg7zjg6vjgavplqLjgZnjgovkuIDliIfjga7plovnpLrjgIEK 6KSH5YaZ44CB6YWN5biD44CB44Gd44Gu5LuW44Gu5Yip55So44CB44G+44Gf44Gv6KiY6LyJ5YaF 5a6544Gr5Z+644Gl44GP44GE44GL44Gq44KL6KGM5YuV44KC44GV44KM44Gq44GE44KI44GG44GK 6aGY44GE55Sz44GX5LiK44GS44G+44GZ44CCCi0tLQpDT05GSURFTlRJQUxJVFkgTk9URTogVGhl IGluZm9ybWF0aW9uIGluIHRoaXMgZW1haWwgaXMgY29uZmlkZW50aWFsCmFuZCBpbnRlbmRlZCBz b2xlbHkgZm9yIHRoZSBhZGRyZXNzZWUuCkRpc2Nsb3N1cmUsIGNvcHlpbmcsIGRpc3RyaWJ1dGlv biBvciBhbnkgb3RoZXIgYWN0aW9uIG9mIHVzZSBvZiB0aGlzCmVtYWlsIGJ5IHBlcnNvbiBvdGhl ciB0aGFuIGludGVuZGVkIHJlY2lwaWVudCwgaXMgcHJvaGliaXRlZC4KSWYgeW91IGFyZSBub3Qg dGhlIGludGVuZGVkIHJlY2lwaWVudCBhbmQgaGF2ZSByZWNlaXZlZCB0aGlzIGVtYWlsIGluCmVy cm9yLCBwbGVhc2UgZGVzdHJveSB0aGUgb3JpZ2luYWwgbWVzc2FnZS4K From owner-freebsd-usb@FreeBSD.ORG Sat Sep 13 14:00:48 2014 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E46573E for ; Sat, 13 Sep 2014 14:00:48 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C32FBC4 for ; Sat, 13 Sep 2014 14:00:47 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 92F1F1FE027; Sat, 13 Sep 2014 16:00:44 +0200 (CEST) Message-ID: <54144E00.4080100@selasky.org> Date: Sat, 13 Sep 2014 16:00:32 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: "Lundberg, Johannes" , "freebsd-usb@freebsd.org" Subject: Re: libusb and non-root access problem References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 14:00:48 -0000 On 09/13/14 14:04, Lundberg, Johannes wrote: > Hi > > I tried now for hours but no luck with this.. I have a special usb device > to which I connect with libusb. Everything works find as root but I can > seem to be able to access with normal user no matter how I configure devfs. > > I changed both conf and rules and even set myself as owner and group and > 777 permission to /dev/ugen* /dev/usb and /dev/usb/* but no luck... > > I can connect to the device and claim interface but then it fails at the > first libusb_control_transfer with error -4 > > I have done this before without problems. I am running the newest > 11-CURRENT snapshot so could there be any bug that causes this or has > anything changed in configurations? > > Grateful for any advice... > -- > Johannes Lundberg > Hi, You only need to "chmod /dev/usb/X.Y.0" . Some control transfers are always restricted to root user: /* * Avoid requests that would damage the bus integrity: */ if (((req->bmRequestType == UT_WRITE_DEVICE) && (req->bRequest == UR_SET_ADDRESS)) || ((req->bmRequestType == UT_WRITE_DEVICE) && (req->bRequest == UR_SET_CONFIG)) || ((req->bmRequestType == UT_WRITE_INTERFACE) && (req->bRequest == UR_SET_INTERFACE))) { /* * These requests can be useful for testing USB drivers. */ error = priv_check(curthread, PRIV_DRIVER); if (error) { return (error); } } You need to use their libusb counterpart to avoid problems! --HPS