Re: Empty Intel ISH HID custom sensor feature attributes on Linux 6.6

From: Bagas Sanjaya
Date: Sat Nov 25 2023 - 19:40:10 EST


On Sun, Nov 26, 2023 at 12:51:36AM +0100, Philipp Jungkamp wrote:
> Hello,
>
> it seems like the query of custom sensor feature information is not
> working in for kernels in the 6.6 series. I've been using a simple
> shell script to see what custom sensors are present on my system.
>
> This is now failing to output any information. All bytes in the
> feature-*-value file of an HID-SENSOR-2000e1.* sensor in the sysfs are
> filled with zeroes. It seems like the underlying call to
> hid_sensor_hub_get_feature does only write zeroes into the given
> buffer.
>
> The hid-sensor-custom logic that checks for the presence of my ambient
> light sensor using that logic is also not working, the HID-SENSOR-LISS-
> * device is not showing up. The hid-sensor-hub in question is the Intel
> ISH of my Lenovo Yoga 9 14IAP7.
>
> Is this a known problem with the 6.6 series?
> Where there related changes in the modules in the stack? E.g.:
> - hid-sensor-custom
> - hid-sensor-hub
> - ishtp-hid
>
> I've not found anything immediatly obvious while checking the git logs.
> I'll try to bisect the issue between 6.5 and 6.6 and report back.
>
> Regards,
> Philipp Jungkamp
>
>
>
> This is the fish script to parse the sysfs feature attributes:
>
> set -a properties property-friendly-name:'Friendly Name'
> set -a properties property-sensor-model:'Sensor Model'
> set -a properties property-sensor-manufacturer:'Manufacturer'
> set -a properties property-sensor-serial-number:'Serial Number'
>
> function get_value -a file
> set_color blue
> for letter in (string split -n ' ' < $file)
> test ! $letter -eq 0
> and printf \\(printf %o $letter)
> end
> set_color normal
> end
>
> function check_property -a property feature
> if string match -q (string split -f1 ':' $property) -- (cat
> feature/*-name)
> echo \t(string split -f2 ':' $property): (get_value $feature/*-
> value)
> end
> end
>
> for sensor in /sys/bus/hid/devices/*/HID-SENSOR-2000e1*
> echo Sensor: (set_color green; realpath $sensor; set_color normal)
> for feature in $sensor/feature-*
> for property in $properties
> check_property $property $feature
> end
> end
> echo
> end
>
>
> Example output from Linux 6.5:
>
> Sensor: /sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-
> 9BD9-A04D34F0C226}/001F:8087:0AC2.0003/HID-SENSOR-2000e1.7.auto
> Serial Number: LUID:00E1001A270E0080
> Sensor Model: LENOVO_ST_HUMANSENSE S
> Manufacturer: LENOVO
> Friendly Name: Lenovo ST HPD v201 Sensor
>
>
> Example output from Linux 6.6:
>
> Sensor: /sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-
> 9BD9-A04D34F0C226}/001F:8087:0AC2.0003/HID-SENSOR-2000e1.7.auto
> Serial Number:
> Sensor Model:
> Manufacturer:
> Friendly Name:
>
>

AFAIK, this is somewhat related to regression on system76 devices [1].

Anyway, thanks for the regression report. I'm adding it to regzbot:

#regzbot ^introduced: v6.5..v6.6

[1]: https://lore.kernel.org/regressions/b5646db3-acff-45aa-baef-df3f660486fb@xxxxxxxxx/

--
An old man doll... just what I always wanted! - Clara

Attachment: signature.asc
Description: PGP signature