Bug 57405

Summary: update to XFree86-4.3.0 renders keyboard unusable
Product: Ports & Packages Reporter: Fernan Aguero <fernan>
Component: Individual Port(s)Assignee: Eric Anholt <anholt>
Status: Closed FIXED    
Severity: Affects Only Me CC: anholt
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
xfree86.log none

Description Fernan Aguero 2003-09-30 15:40:23 UTC
	I have downloaded all the latest XFree86-4.3.0 packages from
	FreeBSD's ftp server, and updated my XFree86-4.2.0 installation
	using portupgrade:

	portupgrade -R -PP XFree86-4\*

	Everything went fine, but now when starting the X server (I use
	xdm) I cannot type anything on the login prompt. Every key press
	results in the X server switching its resolution (like using
	Ctrl-Alt-+ in the past).

	I've attached the output of the session, with the reported
	errors. From the output, and from what I could get at Google, it
	seems to be a problem common to many people upgrading to 4.3.0.
	The problem does not seem to be with xdm, but with xkbcomp.

	However I haven't found a reasonable explanation or solution to
	the problem. There are also two unanswered questions related to
	this topic on @freebsd-questions from May 2003.

	One workaround suggested renaming /usr/X11R6/lib/X11/xkb/compat
	so that it wouldn't be found. The user said this fixed the
	problem (he could start X and use the keyboard). 
	
	However I'm looking for a definitive answer/patch/solution. Thus
	the PR.

	Thanks in advance for any reply or followup,

	Fernan
Comment 1 Kirill Ponomarev freebsd_committer freebsd_triage 2003-09-30 15:43:06 UTC
Responsible Changed
From-To: freebsd-ports-bugs->anholt

Over to XFree Guru
Comment 2 Fernan Aguero 2003-09-30 16:06:17 UTC
Just to clarify a bit more,

renaming /usr/X11R6/lib/X11/xkb/compat to anything else
makes X startup fine. However, certain keys are no longer usable (they produce no output or give the wrong symbol).

From my XF86Config:
Option      "XkbRules" "xfree86"
Option      "XkbModel" "pc105"
Option      "XkbLayout" "es"
      
I can no longer type the vertical bar (pipe, Alt Gr + 1), nor square
brackets, curly braces, or the spanish n with a tilde over
it, as some examples.

So, this is not a reasonable solution.

Fernan,

hoping someone has a clue about what's going on :)

-- 
F e r n a n   A g u e r o
http://genoma.unsam.edu.ar/~fernan
Comment 3 Fernan Aguero 2003-09-30 19:05:46 UTC
and now for a solution?

I've found this thread in linuxquestions.org:
http://www.linuxquestions.org/questions/archive/1/2003/07/2/59778
that suggested updating XKeysymDB to its latest version.

I've also seen XKeysymDB mentioned while googling around. So
I went to the URL posted in the last message of the thread,
which pointed to cvsweb.xfree86.org, and got the latest
XKeysymDB (which BTW is from 2000!).

Surprisingly, I found no such file in my XFree86
installation ... all messages I've found suggested _updating_
this file, and they clearly suggested making a backup copy
of the original. But there was none there to update!

So I've put XKeysymDB in /usr/X11R6/lib/X11/, restarted X
and voilá, everything is working fine again (AFAICT). No
need to rename /usr/X11R6/lib/X11/xkb/compat, which was an
ugly workaround.

So, it all comes to a missing file ... my research found
XKeysymDB packaged in XFree86-libraries-4.3.0_6.tgz. So, my
guess was that it should have been installed. Luckily I
still have the output of the portupgrade session, so I guess
I now see what happened:
...
--->  Checking the availability of the latest package of 'x11/XFree86-4-clients'
--->  Found a package of 'x11/XFree86-4-clients': /usr/ports/packages/All/XFree86-clients-4.3.0_3.tgz
--->  Upgrading 'XFree86-clients-4.2.0_2' to 'XFree86-clients-4.3.0_3' (x11/XFree86-4-clients) using a package
--->  Backing up the old version
--->  Uninstalling the old version
--->  Deinstalling 'XFree86-clients-4.2.0_2'
pkg_delete: package 'XFree86-clients-4.2.0_2' is required by these other packages
and may not be deinstalled (but I'll delete it anyway):
XFree86-4.3.0,1
pkg_delete: '/usr/X11R6/lib/X11/XErrorDB' fails original MD5 checksum - deleted anyway.
pkg_delete: '/usr/X11R6/lib/X11/XKeysymDB' fails original MD5 checksum - deleted anyway.
pkg_delete: '/usr/X11R6/lib/X11/xdm/Xaccess' fails original MD5 checksum - deleted anyway.
pkg_delete: '/usr/X11R6/lib/X11/xdm/Xsession' fails original MD5 checksum - deleted anyway.
...

So it seems to me, that the deinstallation of the
XFree86-clients port blew away these four files: not only I
had a missing XKeysymDB, I also have missing XErrorDB.

Now, is this a portupgrade problem? Or the problem was with
the way I invoked portupgrade (portupgrade -R -PP XFree86-4\*)?
Or perhaps these files were previously packaged in -clients
and now they are in -libraries?

Reinstalling the XFree86-libraries again did got me the
missing XErrorDB and XKeysymDB files (portupgrade -f -PP XFree86-libraries)

I guess that the PR can be closed now. At least there is a
record of what happened, in case someone else steps on the
same stone.

For me, it was a great monolog. Thanks.

Fernan

-- 
F e r n a n   A g u e r o
http://genoma.unsam.edu.ar/~fernan
Comment 4 Eric Anholt freebsd_committer freebsd_triage 2003-09-30 19:43:56 UTC
State Changed
From-To: open->closed

This was a problem in using portupgrade, as had been announced on ports@. 
Submitter fixed it.