From: Bastien N. <ha...@ha...> - 2013-10-09 14:12:41
|
On Tue, 2013-10-08 at 11:36 -0700, Jason Gerecke wrote: > On Tue, Oct 8, 2013 at 11:18 AM, Bastien Nocera <ha...@ha...> wrote: > > On Tue, 2013-10-08 at 11:08 -0700, Ping Cheng wrote: > >> On Tue, Oct 8, 2013 at 12:07 AM, Bastien Nocera <ha...@ha...> wrote: > >> > Hey, > >> > > >> > We're having some problems in GNOME with the calibration UI, especially > >> > after a calibration has been done because the factory values for "Wacom > >> > Tablet Area" have been modified, and we cannot use those (especially if > >> > a previous erroneous calibration has been made) to calibrate the device > >> > again. > > > > My apologies, I should have followed up on this. I've spent the day > > looking into the problem, and found the very many bugs. > > > >> > Is there a way to reset those values to the factory settings? > >> > >> "xsetwacom set dev_id Area -1 -1 -1 -1" will set the area back to > >> factory values. But I don't think we want to run xsetwacom when Gnome > >> Control Center is running. So, another way is to set it through "area" > >> property directly from X server. Refer to > >> xf86-input-wacom/tools/xsetwacom.c for example. > > > > The -1 special value isn't handled in the driver though, is it? If it > > is, I've just wasted quite a bit of time implementing our own reset in > > GNOME :/ > > > Yes, that's a magic value that the driver interprets. If it's not > working, then we've got a problem on our end. I like the thought > behind `gsd_wacom_device_get_area` though :) It was at least useful to get those values to the calibration tool, as it needs real values to do the calculations, and "-1, -1, -1, -1" won't cut it. > >> > Are the default values available anywhere but in the driver? If the values > >> > aren't computed, could we move those to libwacom so we can fix > >> > calibration? > >> > >> To provide Gnome with factory tablet area, we can add the values to > >> libwacom. However, I wonder if retrieving the values from X server, or > >> even better directly from the kernel, is feasible for Gnome. This > >> approach avoids the extra middle-ware, which leads to less maintenance > >> issue. > >> > >> To retrieve the factory values directly from kernel, you can use > >> "ioctl(fd, EVIOCGABS(ABS_X), &absinfo)", ABS_Y would be used for Y > >> value. Details can be found at xf86-input-wacom/src/wcmUSB.c. > >> > >> Let me know if I've missed your point. > > > > I've poked at the valuators directly, as they include the default > > values. > > > > The good news is though, that after spending 12 hours on it, we have a > > working calibration again. > > > > Cheers > > > > As a side-effect, by resetting the area to default, you've also > probably bandaged bug 703783 as well. The calibrator should *not* > require you to reset the area to work properly; the math is supposed > to take it into account, but for some reason fails when the > calibration is particularly bad... Which happened quite a bit as I was testing :) For example, it was possible to get the cursor stuck in a corner. So if you can't click the targets, you can do all the maths you want ;) I'll mark 703783 as fixed for GNOME 3.10 then. Cheers |