Subject: Re: and yet more weirdness with XFree86-4.5.0 on NetBSD/sparc
To: NetBSD/sparc Discussion List <port-sparc@NetBSD.org>
From: Greg A. Woods <woods@planix.ca>
List: port-sparc
Date: 12/02/2006 16:31:43
--pgp-sign-Multipart_Sat_Dec__2_16:31:37_2006-1
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

At Tue, 14 Nov 2006 15:08:57 -0500,
Me-planix.com wrote:
>=20
> For the record you'll find the detailed xdpyinfo output below from my
> first use of XFree86-4.5.0 on NetBSD/sparc (1.6.2_STABLE).

(Note that's with XsunMono running, of course, as it's a bwtwo(4)
framebuffer that I have)

One thing's been worked around it seems -- the key repeat rate now seems
to take effect if I do the following operations in the following order:

	# new XFree86 server doesn't autorepeat without this
	xset r rate 500 60
	xset r

I've also discovered the cause of the misbehaving keyboard lights was
due to this diskless machine not being able to write to
/usr/X11R6/lib/X11/xkb/compiled, which it insists on using despite the
warnings in the README there.  Oddly it doesn't leave anything in that
directory after startup.  How STUPID to use a shared directory as a
temporary directory.  The first clue was in /var/log/xdm-errors where
there were warnings about not being able to open the crypticly located
"compiled/server-0.xkm" file, then "falling back to pre-XKB keymap".

Since I don't actually have multiple diskless clients sharing this
server very often I relented and gave this one write access to the
server's files and magically the complaint disappeared. The broken code
that assumes it can write to /usr/X11R6/lib/X11/xkb/compiled if the
effective UID is zero should simply be removed and it should just use
mkdtemp() or some such.  I'm not even sure why it needs any temporary
files as the example in setxkbmap(1) shows it can be done easily with a
pipeline.


However something just got even more weird with this setup.

I had a power outage here yesterday and I had to shut down this machine
as my UPS battery was running low.

When I next rebooted the first thing I noticed was that CTWM, my window
manager, wasn't displaying the "Occupy" chooser -- or rather it did, but
it showed up as a huge, empty, window.  This had worked fine before the
reboot, as did all of the following things too.

The next thing I noticed was that the keyboard focus wasn't following
the mouse cursor as it normally should with ctwm.  Eventually I
discovered that I had to do somehting to "activate" the window,
including de-iconize it, or click on the window decorations.  Most
confusingly the mouse focus does follow (and sometimes things are
half-way, such as sometimes Emacs gets some (most?) key events even
without having its cursor turn black and blink as it should when it
knows it has the keyboard focus).

Just now I noticed that I can't cut&paste between an Xterm and Emacs
(running in its own X window).  I can cut&paste to another Xterm, and I
can cut&paste from Emacs to an Xterm.  I can also cut&paste into
xclipboard from both Emacs and an Xterm.  It only seems to be Emacs
that's not seeing the paste operations.

I've now determined that this (mis)behaviour is somewhat random since
sometimes it works and sometimes it doesn't.

These issues have nothing to do with any application, including CTWM as
I can run the Xserver directly with "-query my_file_server" and login to
the same machine I normally use with my NCD Xterm and the same problems
still occur whereas things on the NCD work fine.  It also sometimes,
though curiously less often, occurs with TWM.  The same things happen
with the Xsun server too.

I've also noticed that if I don't start any window manager, e.g. if I do
a failsafe login, then run several non-overlapping xterms, the keyboard
focus always follows the mouse.  I can usually start TWM at least once
and have it still work too, though if I kill and restart TWM a few times
then it stops working.  Starting CTWM seems to break things immediately
all of the time.

--=20
						Greg A. Woods
						Planix, Inc.

<woods@planix.com>     +1 416 489-5852 x122     http://www.planix.com/

--pgp-sign-Multipart_Sat_Dec__2_16:31:37_2006-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
MessageID: IkcIPIvcQ8E0rgpGEKjLSpYXxSnQHpvB

iQA/AwUBRXHwv2Z9cbd4v/R/EQI4bACfT3Y4daT9wJxKuGTlYpiz/5MYzgMAoPh9
EDaPr5gfMhSdm/BxfLNInTao
=unzY
-----END PGP SIGNATURE-----

--pgp-sign-Multipart_Sat_Dec__2_16:31:37_2006-1--