On Wed, Oct 9, 2013 at 7:12 AM, Bastien Nocera <had...@hadess.net> wrote: > On Tue, 2013-10-08 at 11:36 -0700, Jason Gerecke wrote: >> On Tue, Oct 8, 2013 at 11:18 AM, Bastien Nocera <had...@hadess.net> wrote: >> > On Tue, 2013-10-08 at 11:08 -0700, Ping Cheng wrote: >> >> On Tue, Oct 8, 2013 at 12:07 AM, Bastien Nocera <had...@hadess.net> 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.
If you meant to get the actual tablet area values, after "xsetwacom set dev_id area -1 -1 -1 -1", the "xsetwacom get dev_id area" returns factory default to you. Again, you can retrieve them through Area property directly from X server if you do not want to rely on xsetwacom. A `gsd_wacom_device_get_default_area` could combine the reset and retrieve calls together. However, you'll need to keep in mind of the side-effect: the call resets the existing mapping area. If you only want to get the default without changing the existing mapping area, no property supports that. We used to have "xsetwacom get" and "xsetwacom get default" for all configurable options though.... Ping >> >> > 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 > ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel