From nobody@FreeBSD.org  Thu Feb 14 21:07:22 2002
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id CACB137B405
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 14 Feb 2002 21:07:07 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.6/8.11.6) id g1F577U05553;
	Thu, 14 Feb 2002 21:07:07 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200202150507.g1F577U05553@freefall.freebsd.org>
Date: Thu, 14 Feb 2002 21:07:07 -0800 (PST)
From: Jeremy Chadwick <yoshi@parodius.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Mouse cursor invisible with USB mice and usbd
X-Send-Pr-Version: www-1.0

>Number:         34952
>Category:       kern
>Synopsis:       Mouse cursor invisible with USB mice and usbd
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    joe
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 14 21:10:00 PST 2002
>Closed-Date:    Thu Nov 04 02:29:19 GMT 2004
>Last-Modified:  Thu Nov 04 02:29:19 GMT 2004
>Originator:     Jeremy Chadwick
>Release:        4.5-STABLE
>Organization:
>Environment:
Not applicable.
>Description:
When using a USB mouse on console, the mouse cursor is not present.
>How-To-Repeat:
Use usbd_enable="yes" in rc.conf, reboot.  Note the lack-of mouse cursor.
>Fix:
The problem is because "vidcontrol -m on" is not being called anywhere in the rc scripts.

Two probable solutions:

1.  Modify the usbd source (or usbd.conf, if it supports something like "&&" when passing the string to the shell) to do "vidcontrol -m on" when plugging in/unplugging a mouse.

2.  Modify the rc files to support something like vidcontrol_init="yes" and vidcontrol_flags="-m on" in rc.conf.

I'm very surprised no one's noticed this by now.  :-)
>Release-Note:
>Audit-Trail:

From: Josef Karthauser <joe@tao.org.uk>
To: Jeremy Chadwick <yoshi@parodius.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/34952: Mouse cursor invisible with USB mice and usbd
Date: Fri, 15 Feb 2002 05:49:00 +0000

 --lEGEL1/lMxI0MVQ2
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Thu, Feb 14, 2002 at 09:07:07PM -0800, Jeremy Chadwick wrote:
 >=20
 > 2.  Modify the rc files to support something like vidcontrol_init=3D"yes"=
  and vidcontrol_flags=3D"-m on" in rc.conf.
 >=20
 
 Can't you just add the following to /etc/rc.conf?
 
     allscreens_flags=3D"-m on"
 
 Joe
 
 --lEGEL1/lMxI0MVQ2
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.6 (FreeBSD)
 Comment: For info see http://www.gnupg.org
 
 iEYEARECAAYFAjxsoUsACgkQXVIcjOaxUBZkpQCg1XzYMt0WgUCIFTyTzynQ4G7i
 HloAn0PiOtNWzlsZnuB+XEJcWqDDXlRF
 =g5Ga
 -----END PGP SIGNATURE-----
 
 --lEGEL1/lMxI0MVQ2--

From: Jeremy Chadwick <yoshi@parodius.com>
To: Josef Karthauser <joe@tao.org.uk>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/34952: Mouse cursor invisible with USB mice and usbd
Date: Fri, 15 Feb 2002 00:33:41 -0800

 On Fri, Feb 15, 2002 at 05:49:00AM +0000, Josef Karthauser wrote:
 > On Thu, Feb 14, 2002 at 09:07:07PM -0800, Jeremy Chadwick wrote:
 > > 
 > > 2.  Modify the rc files to support something like vidcontrol_init="yes" and vidcontrol_flags="-m on" in rc.conf.
 > > 
 > 
 > Can't you just add the following to /etc/rc.conf?
 > 
 >     allscreens_flags="-m on"
 > 
 > Joe
 
         Fairly odd solution (I would call it more of a "hack"), for two
         reasons:
 
 1.  usbd, since it relies upon spawning external applications to enable
 features (i.e. moused), should also permit the user to run something
 like "vidcontrol -m off" when detaching a device; presently, usbd already
 calls moused on attach and "killall moused" on detach -- so why not also
 do vidcontrol?  Generally this is considered a "clean" way of doing things,
 since usbd seems to already be doing this already... :-)  Regardless, this
 might cut down on some of the PRs, like "USB mouse doesn't work in STABLE!".
 
 2.  allscreens_flags is used in a very peculiar manner:
 
 if [ -n "${allscreens_flags}" ]; then
         echo -n ' allscreens'
         for ttyv in /dev/ttyv*; do
                 vidcontrol ${allscreens_flags} < ${ttyv} > ${ttyv} 2>&1
         done
 fi
 
         In reference to my bug report, I'm curious how redirecting
         stdin and stdout to the actual console ttys would affect
         vidcontrol when using "-m on".  Would this have any consequences?
 
         I'd rather put faith into Option #1.  :-)
 

From: Peter Pentchev <roam@ringlet.net>
To: Jeremy Chadwick <yoshi@parodius.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/34952: Mouse cursor invisible with USB mice and usbd
Date: Mon, 18 Feb 2002 10:23:33 +0200

 On Fri, Feb 15, 2002 at 12:40:03AM -0800, Jeremy Chadwick wrote:
 > The following reply was made to PR kern/34952; it has been noted by GNATS.
 > 
 > From: Jeremy Chadwick <yoshi@parodius.com>
 > To: Josef Karthauser <joe@tao.org.uk>
 > Cc: freebsd-gnats-submit@FreeBSD.org
 > Subject: Re: kern/34952: Mouse cursor invisible with USB mice and usbd
 > Date: Fri, 15 Feb 2002 00:33:41 -0800
 > 
 >  On Fri, Feb 15, 2002 at 05:49:00AM +0000, Josef Karthauser wrote:
 >  > On Thu, Feb 14, 2002 at 09:07:07PM -0800, Jeremy Chadwick wrote:
 >  > > 
 >  > > 2.  Modify the rc files to support something like vidcontrol_init="yes" and vidcontrol_flags="-m on" in rc.conf.
 >  > > 
 >  > 
 >  > Can't you just add the following to /etc/rc.conf?
 >  > 
 >  >     allscreens_flags="-m on"
 >  
 >          Fairly odd solution (I would call it more of a "hack"), for two
 >          reasons:
 >  
 [snip]
 >  2.  allscreens_flags is used in a very peculiar manner:
 >  
 >  if [ -n "${allscreens_flags}" ]; then
 >          echo -n ' allscreens'
 >          for ttyv in /dev/ttyv*; do
 >                  vidcontrol ${allscreens_flags} < ${ttyv} > ${ttyv} 2>&1
 >          done
 >  fi
 >  
 >          In reference to my bug report, I'm curious how redirecting
 >          stdin and stdout to the actual console ttys would affect
 >          vidcontrol when using "-m on".  Would this have any consequences?
 
 Yes, it would simply work :)
 
 Redirecting stdin and stdout is done for the benefit of the ioctl(2)
 interface that vidcontrol(8) uses, so it can actually modify the settings
 of the tty in question (in this loop, all virtual consoles).
 
 Since the '-m on' only notes that the cursor should be shown when needed,
 not always, IMHO it would be a good solution.  It would do no harm -
 the mouse cursor is only drawn on mouse movement, and hidden on a keypress -
 so there would be no mouse cursor when the mouse is not attached.
 When the mouse is attached, the persistent 'mouse cursor on' state would
 make sure that the cursor is displayed.
 
 Again, this is just my opinion, YMMV.
 
 G'luck,
 Peter
 
 -- 
 Peter Pentchev	roam@ringlet.net	roam@FreeBSD.org
 PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
 Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
 I am jealous of the first word in this sentence.
Responsible-Changed-From-To: freebsd-bugs->joe 
Responsible-Changed-By: kris 
Responsible-Changed-When: Thu Jul 17 17:34:39 PDT 2003 
Responsible-Changed-Why:  
Assign to USB maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=34952 
State-Changed-From-To: open->closed 
State-Changed-By: iedowse 
State-Changed-When: Thu Nov 4 02:17:00 GMT 2004 
State-Changed-Why:  

This has been improved in FreeBSD 5.x and 6.x and setting 
allscreens_flags="-m on" should function as a workaround. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=34952 
>Unformatted:
