Ah, I see now that there are several points at which it could return early and not reach the ABS_TOOL_WIDTH code.
I tried out your little patch to force the width to be reported and captured evtest output during a session of normal computer use. First, I noticed that still the width was not always reported, though it seemed to be reported most often when I brushed my palm against the pad. Secondly, I wanted to test the claim that it is not meaningful to report pressure and width simultaneously so I parsed out the (width, pressure) pairs from evtest and plotted them. While there is a positive correlation between the two, it is definitely possible to have low pressure/high width touches and vice versa.
From what I've read about the kernel multitouch protocol, the claim from your previous link that "ABS_MT_PRESSURE and ABS_MT_TOUCH_MAJOR are normally mutually exclusive" only makes sense if the tool width (i.e. ABS_MT_WIDTH_MAJOR) is being reported. In that case the pressure should be equivalent to the ratio of TOUCH_MAJOR to WIDTH_MAJOR and it would not make sense for a device to report both. Thus there are two acceptable situations for a device that claims to report tool width: report tool width and pressure or report tool width and touch width.
The second problem - the palm detection code not working without width - seems like it could be more generally useful if there are touchpads that only report pressure. However I don't see that as the issue here since it seems clear that my touchpad *can* report width.
Ah, I see now that there are several points at which it could return early and not reach the ABS_TOOL_WIDTH code.
I tried out your little patch to force the width to be reported and captured evtest output during a session of normal computer use. First, I noticed that still the width was not always reported, though it seemed to be reported most often when I brushed my palm against the pad. Secondly, I wanted to test the claim that it is not meaningful to report pressure and width simultaneously so I parsed out the (width, pressure) pairs from evtest and plotted them. While there is a positive correlation between the two, it is definitely possible to have low pressure/high width touches and vice versa.
Here are my data if you are curious: /gist.github. com/silverhamme rmba/43abb0fde7 b17d557d2b
https:/
From what I've read about the kernel multitouch protocol, the claim from your previous link that "ABS_MT_PRESSURE and ABS_MT_TOUCH_MAJOR are normally mutually exclusive" only makes sense if the tool width (i.e. ABS_MT_WIDTH_MAJOR) is being reported. In that case the pressure should be equivalent to the ratio of TOUCH_MAJOR to WIDTH_MAJOR and it would not make sense for a device to report both. Thus there are two acceptable situations for a device that claims to report tool width: report tool width and pressure or report tool width and touch width.
The second problem - the palm detection code not working without width - seems like it could be more generally useful if there are touchpads that only report pressure. However I don't see that as the issue here since it seems clear that my touchpad *can* report width.