Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 May 2012 11:14:12 +0200
From:      "C. P. Ghost" <cpghost@cordula.ws>
To:        Polytropon <freebsd@edvax.de>
Cc:        freebsd-questions@freebsd.org, Bernt Hansson <bah@bananmonarki.se>
Subject:   Re: Mouse stopped working in X
Message-ID:  <CADGWnjXjP3E2dcnez5ZXWZSqp8gXH97w8pKQ0vHoV03sAc-HBQ@mail.gmail.com>
In-Reply-To: <20120522104441.f05a2f88.freebsd@edvax.de>
References:  <201205181149.q4IBndvU028665@hera.homer.att.com> <4FB64022.6010206@bananmonarki.se> <CADGWnjVMoamtrxBMGNheVy1CL%2BJjuXetDcq93SiVYn9vAChVnw@mail.gmail.com> <4FBB4B8C.3000806@bananmonarki.se> <20120522104441.f05a2f88.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 22, 2012 at 10:44 AM, Polytropon <freebsd@edvax.de> wrote:
> On Tue, 22 May 2012 10:17:16 +0200, Bernt Hansson wrote:
>> There is a second way of doing this stunt.
>>
>> Start X
>> When X is up and running press CTRL+ALT+F3 or any F* frpm F3 up to F8
>> then you get to the console
>> Su to root in the console and type in
>>
>> /usr/local/etc/rc.d/dbus restart&& =A0/usr/local/etc/rc.d/hald restart
>>
>> Then press ALT+F9 to get back to X
>
> So if that is the _solution_, why not try to automate it?
> Not tested, just a suggestion:
>
> Make this the last-1 line in ~/.xinitrc (or ~/.xsession depending
> on actual setup), before the "exec" call to the WM / DE, maybe
> like this:
>
> =A0 =A0 =A0 =A0#!/bin/sh
> =A0 =A0 =A0 =A0[ -f ~/.xmodmaprc ] && xmodmap ~/.xmodmaprc
> =A0 =A0 =A0 =A0xterm &
> =A0 =A0 =A0 =A0xsetroot -solid rgb:3b/4c/7a
> =A0 =A0 =A0 =A0xset b 100 1000 15 &
> =A0 =A0 =A0 =A0xset r rate 250 30 &
> =A0 =A0 =A0 =A0xset s off &
> =A0 =A0 =A0 =A0xset -dpms &
> =A0-> =A0 =A0 sudo /usr/local/etc/rc.d/dbus restart && sudo /usr/local/et=
c/rc.d/hald restart
> =A0 =A0 =A0 =A0exec wmaker
>
> It should "happen" when X is running, and it should be
> "back to normal" when the WM or DE is launched (and
> all background programs have fully started).

Yep, that's a good idea... as well as switching to a text console, issue
the commands there, and then go back to X.

But IMHO, the *real* solution is to fix hald (or its config), so that it
tries /dev/sysmouse, or whatever mouse is configured in Xorg.conf,
instead of automatically picking some wrong mouse device.

I guess the problem stems from the fact, that when moused is running,
it has already grabbed the real mouse device (e.g. /dev/psm0) and
provides the virtual device /dev/sysmouse. When hald starts the first
time, it tries to grab the real mouse device too... and fails because that
mouse is already used by moused, and is therefore locked. Only when
hald tries to load /dev/sysmouse the second time it is started, will it suc=
ceed.

Unfortunatly, hald config is pretty black magic to me. I wouldn't touch tha=
t
with a 10 ft. pole.

> --
> Polytropon
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...

Thanks,
-cpghost.

--=20
Cordula's Web. http://www.cordula.ws/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADGWnjXjP3E2dcnez5ZXWZSqp8gXH97w8pKQ0vHoV03sAc-HBQ>