9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Invisible cursor
@ 2008-11-07 22:22 David du Colombier
  2008-11-07 22:57 ` Venkatesh Srinivas
  0 siblings, 1 reply; 8+ messages in thread
From: David du Colombier @ 2008-11-07 22:22 UTC (permalink / raw)
  To: 9fans

Hello,

I tried to use my IBM ThinkCentre S50 as a Plan 9 terminal,
but I discovered a really strange problem.

When I boot my terminal using PXE, rio is running fine, but the
cursor does not appear. The mouse is useable, but with an invisible
cursor and I cannot type anything with the keyboard.

This problem does not appear before launching aux/vga.
When I launch aux/vga manually, I cannot type anything after.

I don't have this problem if I boot locally on this terminal,
using the Plan 9 cdrom.
And I don't have this problem on my other terminals booting PXE
on the same cpuserver, like my IBM PC300PL.

I tried things like "echo -n hwaccel off > '#'v/mousectl", but
it does not seem to change anything.

How can I solve this problem?

Thank you.

--
David du Colombier



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Invisible cursor
  2008-11-07 22:22 [9fans] Invisible cursor David du Colombier
@ 2008-11-07 22:57 ` Venkatesh Srinivas
  2008-11-08  0:10   ` David du Colombier
  0 siblings, 1 reply; 8+ messages in thread
From: Venkatesh Srinivas @ 2008-11-07 22:57 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, Nov 07, 2008 at 11:22:49PM +0100, David du Colombier wrote:
>Hello,
>
>I tried to use my IBM ThinkCentre S50 as a Plan 9 terminal,
>but I discovered a really strange problem.
>
>When I boot my terminal using PXE, rio is running fine, but the
>cursor does not appear. The mouse is useable, but with an invisible
>cursor and I cannot type anything with the keyboard.
>
>This problem does not appear before launching aux/vga.
>When I launch aux/vga manually, I cannot type anything after.
>
>I don't have this problem if I boot locally on this terminal,
>using the Plan 9 cdrom.
>And I don't have this problem on my other terminals booting PXE
>on the same cpuserver, like my IBM PC300PL.
>
>I tried things like "echo -n hwaccel off > '#'v/mousectl", but
>it does not seem to change anything.
>
>How can I solve this problem?
>

We've had the same problem here when turning on Hyperthreading...

iirc, David Eckhardt has posted here about this a few years ago; I don't
remember if there was fix in that thread or not.

-- vs



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Invisible cursor
  2008-11-07 22:57 ` Venkatesh Srinivas
@ 2008-11-08  0:10   ` David du Colombier
  2008-11-08  0:26     ` David du Colombier
  0 siblings, 1 reply; 8+ messages in thread
From: David du Colombier @ 2008-11-08  0:10 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> We've had the same problem here when turning on Hyperthreading...
>
> iirc, David Eckhardt has posted here about this a few years ago; I don't
> remember if there was fix in that thread or not.

I found David Eckhardt's post on 9fans archive [1]. It was helpful.

I firstly tried to disable HyperThreading support in the BIOS,
but it did not work.

Then I tried to put "*nomp=1" in the plan9.ini of my terminal
and it works. The cursor now appears on the screen and the keyboard
is working.

However, the mouse cursor leave some little garbage on the screen when
clicking on the screen.

Thank you for your help.

[1] http://9fans.net/archive/2007/08/288

--
David du Colombier



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Invisible cursor
  2008-11-08  0:10   ` David du Colombier
@ 2008-11-08  0:26     ` David du Colombier
  0 siblings, 0 replies; 8+ messages in thread
From: David du Colombier @ 2008-11-08  0:26 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> However, the mouse cursor leave some little garbage on the screen when
> clicking on the screen.

In fact, I just forgot to re-enable hwaccel. It works perfectly now.

--
David du Colombier



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Invisible cursor
@ 2005-11-12  2:37 YAMANASHI Takeshi
  0 siblings, 0 replies; 8+ messages in thread
From: YAMANASHI Takeshi @ 2005-11-12  2:37 UTC (permalink / raw)
  To: 9fans

> I do like it, now that I have installed it on my main workstation.

I do like it too.
Here is my cursor hiding fileserver too, which has
been rewrote to catch up modern lib9p.
	http://p9c.cc.titech.ac.jp/plan9/cursehide.tgz

The outlined cursor has been borrowed from lucio's patch.
Thanks.
-- 
"on travel, off the network ... and a fossil in my pocket"




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Invisible cursor
  2005-11-05 14:18 ` lucio
@ 2005-11-11  9:07   ` YAMANASHI Takeshi
  0 siblings, 0 replies; 8+ messages in thread
From: YAMANASHI Takeshi @ 2005-11-11  9:07 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I finished rewriting the cursor hiding fileserver to get compiled on
modern lib9p.
Tthe outline only cursor was borrowed from lucio's work. :)  Thanks.

http://p9c.cc.titech.ac.jp/plan9/cursehide.tgz

hope you enjoy
--
YAMANASHI Takeshi


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Invisible cursor
  2005-11-05 11:35 lucio
@ 2005-11-05 14:18 ` lucio
  2005-11-11  9:07   ` YAMANASHI Takeshi
  0 siblings, 1 reply; 8+ messages in thread
From: lucio @ 2005-11-05 14:18 UTC (permalink / raw)
  To: 9fans

> I have not submitted a patch, as the task is quite incomplete.  I will
> mail the detail, if somebody wants to try it all out.  In fact, I'll
> hang them out on my web site and post the URL here when it's done.

The URL is <http://treacle.proxima.alt.za:8080/src/draw.patch.txt>.  I
made it compatible with Larry Wall's "patch" and I have not tried it
myself.  The three files involved are, in /sys/src/9: pc/screen.h,
pc/screen.c and port/devdraw.c.

I do like it, now that I have installed it on my main workstation.

Enjoy.  Lucio.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [9fans] Invisible cursor
@ 2005-11-05 11:35 lucio
  2005-11-05 14:18 ` lucio
  0 siblings, 1 reply; 8+ messages in thread
From: lucio @ 2005-11-05 11:35 UTC (permalink / raw)
  To: 9fans

Prompted by the "Plan 9 True Way" discussion, I made small adjustments
to the draw/vga code in the kernel to make the cursor (almost)
disappear after a few seconds of inactivity.

This is very much "request for comment" stuff, so (a) I replaced
(only?) the black arrow cursor with its outline, which casts just a
hint of its presence on the screen that allows one to locate it if one
is really determined unless it's against a white background.  I'm not
sure why, but I felt that making the cursor disappear altogether would
be a bit aggressive at this point.  Perhaps there is an ideal cursor
shape I ought to have used.

(b) I took a simplistic route to restoring the original cursor: I save
the last pattern - unmindful of its cost in static storage - used to
set the cursor and use a zero pointer to request that it be restored.
This has the drawback that the static storage isn't necessarily
initialised by the time it may be required.  There's a very small risk
in this.

(c) As mentioned, I have not removed the cursor off the screen, I
don't know enough about video handling to switch the cursor off and
on.  I do note that the cursoroff() function is empty, although
invoked in a very few places, whereas cursoron() is invoked more
often.  I think there's some bad thinking in there, now may be the
time to rename these functions if their role doesn't match the name.
So I duplicated the "arrow" cursor, but removed all the black bits,
leaving the white outline.  I made "empty" global and announced it in
"screen.h", but this may also benefit from a bit of tidying up.

I was pleasantly surprised as to how effective the black arrow with
its outline is, on both dark and light backgrounds.  Colour cursors
have been mentioned on this list, but I have yet to see any
documentation that would suggest they are available.  I'm curious as
to how useful they'd be, although the Plan 9 VNC server (or maybe the
NetBSD tight-vnc viewer) offers a transparent, red arrow that is very
nifty.  Being transparent, it makes me think that Plan 9's Porter-Duff
model is likely to be responsible, rather than some weird X feature.
I have yet to look under that bonnet.

(d) I added a global status variable that contains the number of
seconds before turning the cursor off.  Until the community approves
the change, it seems wasteful to add the code to process the related
"vgactl" command to set its value.  I used seconds rather than
minutes as the unit, I think my choice of thirty seconds is already
way too long a delay.

(e) It all adds computing time in a rather tight polling loop.  Not
much, but I'm no fan of throwing cpu cycles away.  Unfortunately, I
have nowhere near the expertise to convert the screen- and now cursor
blanking poll into a triggered event.  But if someone wants to show me
how, I'll galdly learn.

I think the change deserves trying out as much as it ought to be
considered critically.  Feel free to discuss it with me privately, if
you so wish (my connectivity isn't great, at best) and to recommend
improvements.  But be warned that it takes a bit of getting used to.
Especially as keyboard action, necessarily, does not restore the mouse
pointer.

I have not submitted a patch, as the task is quite incomplete.  I will
mail the detail, if somebody wants to try it all out.  In fact, I'll
hang them out on my web site and post the URL here when it's done.

++L



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-11-08  0:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-07 22:22 [9fans] Invisible cursor David du Colombier
2008-11-07 22:57 ` Venkatesh Srinivas
2008-11-08  0:10   ` David du Colombier
2008-11-08  0:26     ` David du Colombier
  -- strict thread matches above, loose matches on Subject: below --
2005-11-12  2:37 YAMANASHI Takeshi
2005-11-05 11:35 lucio
2005-11-05 14:18 ` lucio
2005-11-11  9:07   ` YAMANASHI Takeshi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).