X server and xinit works excellent....almost.

Samuel Magnusson samuel.magnusson5 at bredband.net
Wed Nov 9 11:06:52 UTC 2011


Thanks guys, that was really helpful!

I now also installed the nVidia driver and it works well. The reason I 
didn't use it in the first place was that I had read that the old 
Geforce 2-card wasn't supported by the nVidia rivers anymore. And that 
nouveau (as replacement for nv) should be used instead. (But that was on 
a Gentoo Linux page when I tried that OS shortly before FreeBSD and 
thought it was the same with the drivers.  Apparently I was wrong... I 
made a minimal install of Xorg and only downloaded nouveau. )

The zoom works just fine now for all resolutions supported. So I guess 
my driver issue is solved.

I got the zap to work also, but first only by using the setxkbmap 
command in .xinitrc.  Which made me remember that I had the exact same 
problem with my swedish keyboardmappings the very first time I started 
X. I just couldn't get it to work and nearly gave up before I tried the 
setxkbmap method and put them into .xinitrc, which saved me. Although I 
had put the exact same "rules" and "layout" options in xorg.conf and 
double checked the format and spelling hundreds of times. The problem 
was still there now: when I commented it out in .xinitrc I got the US 
keyboard in xterm in spite of the xorg.conf settings. It seemed like the 
X server just ignored all my keyboard options in xorg.config. Which it 
also did!  (As I also colud confirm from the logfile)

The thing that really made it was the  Option  "AutoAddDevice" "off", 
which I had failed to notice. I realize that it was too long since I 
looked into the handbook, because it is in clear text there. Sorry for 
that!

But since this autodetection seems to be the standard for Xorg now and 
it is so important issue to get things working, maybe it should be put 
in a highlighted box with "Important!" written on it. The thing is that 
I was also using other documentation and guides, like the manpages or 
books of maybe a couple of years old. This issue is not mentioned and 
the InputDevices sections in xorg.conf is just supposed to work. A not 
outdated example of unclarity: the man page  xorg.conf(5) freshly 
installed with my system says:

      Option "AutoAddDevices" "boolean"
              If this option is disabled, then no devices will be added 
from HAL events. Enabled by default.

It doesn't warn that if it is NOT disabled the InputDevice sections 
won't work at all. And "no devices will be added" sounds like a bad 
thing, so you rather leave this option enabled...
And then in the INPUTDEVICE SECTION:

      Recent X servers employ input hotplugging to add input devices, 
with the HAL backend being the default backend for X       servers since 
1.4. It is usually not necessary to provide InputDevice sections in the 
xorg.conf if hotplugging is enabled.

I smile when I read such things, because "usually not neceesary to 
provide" is a funny way to express "not able to provide". :) It should 
be clearly stated that theese are two conflicting options and that 
autoconfiguration overrides manual entries. I think it always should be 
the reverse, but thats no big deal as long as it is very clear how to 
enforce the manual choices on the system. Of course it is logical that 
you can't have both, but I can assure you as a newbie with all that you 
have to learn that this detail is easy to miss.  And when 
autoconfiguration overrides then you are lost without knowing why , 
because everything seems correctly configured except it doesn't work.

Now I'm curious:

Is it then so that in the "new style" Xorg the XML-method will override 
HAL, and this is the new default way of providing opitons that formerly 
were in the InputDevice sections in xorg.conf?

And should HAL have discovered my swedish keyboard automatically in the 
first place, so there was something going wrong there?

Thanks again for the help!




More information about the freebsd-questions mailing list