All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
@ 2021-01-16 20:14 ` bugzilla-daemon
  2021-01-17  9:02 ` bugzilla-daemon
                   ` (39 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-16 20:14 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #24 from Luya Tshimbalanga (luya@fedoraproject.org) ---
Testing the latest kernel 5.11.0-0.rc3.20210114git65f0d2414b70 snapshot with
amd_sfh module enabled:

lspci -knn
03:00.7 Non-VGA unclassified device [0000]: Advanced Micro Devices, Inc. [AMD]
Raven/Raven2/Renoir Sensor Fusion Hub [1022:15e4]
        Subsystem: Hewlett-Packard Company Device [103c:8497]
        Kernel driver in use: pcie_mp2_amd
        Kernel modules: amd_sfh

lsmod | grep amd
edac_mce_amd           90112  0
kvm_amd               380928  0
kvm                  2207744  1 kvm_amd
amdgpu              19922944  16
drm_ttm_helper         16384  1 amdgpu
ttm                   188416  2 amdgpu,drm_ttm_helper
iommu_v2               36864  1 amdgpu
gpu_sched              86016  1 amdgpu
i2c_algo_bit           28672  1 amdgpu
drm_kms_helper        638976  1 amdgpu
drm                  1359872  19
gpu_sched,drm_kms_helper,amdgpu,drm_ttm_helper,ttm
ccp                   274432  1 kvm_amd
amd_sfh                36864  0
pinctrl_amd            73728  1

modinfo amd_sfh
filename:      
/lib/modules/5.11.0-0.rc3.20210114git65f0d2414b70.125.amdsfh.fc33.x86_64/kernel/drivers/hid/amd-sfh-hid/amd_sfh.ko.xz
author:         Sandeep Singh <Sandeep.singh@amd.com>
author:         Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
license:        Dual BSD/GPL
description:    AMD(R) PCIe MP2 Communication Driver
rhelversion:    8.99
alias:          pci:v00001022d000015E4sv*sd*bc*sc*i*
depends:        
retpoline:      Y
intree:         Y
name:           amd_sfh
vermagic:       5.11.0-0.rc3.20210114git65f0d2414b70.125.amdsfh.fc33.x86_64 SMP
mod_unload 


monitor-sensors failed to detect sensor fusion

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
  2021-01-16 20:14 ` [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360) bugzilla-daemon
@ 2021-01-17  9:02 ` bugzilla-daemon
  2021-01-17 10:57 ` bugzilla-daemon
                   ` (38 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-17  9:02 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #25 from Richard Neumann (mail@richard-neumann.de) ---
@Luya This is due to the fact that you, like me, use a laptop (HP Enxy x360
13-ag00xxx) which ships with an AMD SFH that has no sensor mask written to its
P2C registers. I discussed this on the mailing lists and proposed and provided
a solution by introducing a kernel module parameter [1]. However this was not
adopted in the upstream version for kernel 5.11. So I submitted my refactored
version, which I am using for nearly a year now, which incorporates such a
parameter [2]. I have not yet received any feedback on this one or the first
submission, which I sent two weeks ago and which seemingly directly went into
/dev/null. Anybody interested to review and possibly use my refactored version,
can obtain it from my github repo [3].

[1]
https://patchwork.kernel.org/project/linux-iio/patch/1582779537-25662-3-git-send-email-Sandeep.Singh@amd.com/#23253155
[2]https://patchwork.kernel.org/project/linux-iio/patch/efa4524cd07abe0a7773b24d33b64f09e0bf1f82.camel@richard-neumann.de/
[3] https://github.com/conqp/linux/tree/amd-sfh-hid/drivers/hid/amd-sfh-hid

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
  2021-01-16 20:14 ` [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360) bugzilla-daemon
  2021-01-17  9:02 ` bugzilla-daemon
@ 2021-01-17 10:57 ` bugzilla-daemon
  2021-01-17 10:57 ` bugzilla-daemon
                   ` (37 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-17 10:57 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

Hans de Goede (jwrdegoede@fedoraproject.org) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jwrdegoede@fedoraproject.or
                   |                            |g

--- Comment #26 from Hans de Goede (jwrdegoede@fedoraproject.org) ---
Hi Richard,

Thank you for your work on this.

I took a look at your patch-series from 2:
https://patchwork.kernel.org/project/linux-iio/patch/efa4524cd07abe0a7773b24d33b64f09e0bf1f82.camel@richard-neumann.de/

And there are several big issues with it:

1) It seems to have only been send to the linux-iio mailing-list, while it
mostly touches files under drivers/hid. So the HID maintainers did not see it
and the iio maintainers are likely ignore it because it is not an IIO patch

2) You seem to have build an top of an older version of the amd-sfh driver and
instead of porting your changes to the new version, your series seems to
completely replace the currently upstream version with your version. A patch
series like this will never be accepted upstream. You need to submit a patch
upstream with a small incremental change on top of the upstream version of the
driver. E.g. submit a patch just adding the module parameter.

I've prepared a patch-set which adds a module parameter for the sensor-mask on
top of the current upstream version of the amd-sfh code, without making any
further changes. I'll attach that here, please test.

2 questions:

1. may I ask what sensor_mask_override value you are using? That will be useful
for Luya to test this on his device, as well as for adding a DMI quirk to
automatically do the right thing in the future.

2. Can you please run (as normal user):

grep . /sys/class/dmi/id/* 2> /dev/null

and copy and paste the output here?  We will need to come up with some way to
make this "just work" for end-users without needing to set the module-parameter
and it is likely that this will be based on a DMI quirk table, so it would be
good to have the DMI strings for your model.

Luya, I will build a Fedora kernel for you with the patches added. I will post
a link to that in the Fedora bug you filed for this; and Luya, can you also
provide the output of 'grep . /sys/class/dmi/id/* 2> /dev/null' please?

Regards,

Hans

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (2 preceding siblings ...)
  2021-01-17 10:57 ` bugzilla-daemon
@ 2021-01-17 10:57 ` bugzilla-daemon
  2021-01-17 10:58 ` bugzilla-daemon
                   ` (36 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-17 10:57 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #27 from Hans de Goede (jwrdegoede@fedoraproject.org) ---
Created attachment 294691
  --> https://bugzilla.kernel.org/attachment.cgi?id=294691&action=edit
[PATCH 1/2] AMD_SFH: Removed unused activecontrolstatus member from the
amd_mp2_dev struct

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (3 preceding siblings ...)
  2021-01-17 10:57 ` bugzilla-daemon
@ 2021-01-17 10:58 ` bugzilla-daemon
  2021-01-17 11:09 ` bugzilla-daemon
                   ` (35 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-17 10:58 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #28 from Hans de Goede (jwrdegoede@fedoraproject.org) ---
Created attachment 294693
  --> https://bugzilla.kernel.org/attachment.cgi?id=294693&action=edit
[PATCH 2/2] AMD_SFH: Add sensor_mask module parameter

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (4 preceding siblings ...)
  2021-01-17 10:58 ` bugzilla-daemon
@ 2021-01-17 11:09 ` bugzilla-daemon
  2021-01-17 11:13 ` bugzilla-daemon
                   ` (34 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-17 11:09 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #29 from Luya Tshimbalanga (luya@fedoraproject.org) ---
(In reply to Hans de Goede from comment #26)
... 
> Luya, I will build a Fedora kernel for you with the patches added. I will
> post a link to that in the Fedora bug you filed for this; and Luya, can you
> also provide the output of 'grep . /sys/class/dmi/id/* 2> /dev/null' please?
> 

Certainly. Here is the requested output:

grep . /sys/class/dmi/id/* 2> /dev/null

/sys/class/dmi/id/bios_date:07/03/2020
/sys/class/dmi/id/bios_release:15.47
/sys/class/dmi/id/bios_vendor:AMI
/sys/class/dmi/id/bios_version:F.47
/sys/class/dmi/id/board_asset_tag:Base Board Asset Tag
/sys/class/dmi/id/board_name:8497
/sys/class/dmi/id/board_vendor:HP
/sys/class/dmi/id/board_version:92.48
/sys/class/dmi/id/chassis_type:31
/sys/class/dmi/id/chassis_vendor:HP
/sys/class/dmi/id/chassis_version:Chassis Version
/sys/class/dmi/id/ec_firmware_release:92.48
/sys/class/dmi/id/modalias:dmi:bvnAMI:bvrF.47:bd07/03/2020:br15.47:efr92.48:svnHP:pnHPENVYx360Convertible15-cp0xxx:pvr:rvnHP:rn8497:rvr92.48:cvnHP:ct31:cvrChassisVersion:
/sys/class/dmi/id/product_family:103C_5335KV HP Envy
/sys/class/dmi/id/product_name:HP ENVY x360 Convertible 15-cp0xxx
/sys/class/dmi/id/product_sku:4BQ00UA#ABL
/sys/class/dmi/id/sys_vendor:HP
/sys/class/dmi/id/uevent:MODALIAS=dmi:bvnAMI:bvrF.47:bd07/03/2020:br15.47:efr92.48:svnHP:pnHPENVYx360Convertible15-cp0xxx:pvr:rvnHP:rn8497:rvr92.48:cvnHP:ct31:cvrChassisVersion:

Thank you for addressing the bug report, Hans!

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (5 preceding siblings ...)
  2021-01-17 11:09 ` bugzilla-daemon
@ 2021-01-17 11:13 ` bugzilla-daemon
  2021-01-17 11:34 ` bugzilla-daemon
                   ` (33 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-17 11:13 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #30 from Richard Neumann (mail@richard-neumann.de) ---
@Hans Thank you for your input.

First, here is the requested output:

$ cat /etc/modprobe.d/amd_sfh.conf 
options amd_sfh_hid sensor_mask=524295

$ grep . /sys/class/dmi/id/* 2> /dev/null
/sys/class/dmi/id/bios_date:11/15/2019
/sys/class/dmi/id/bios_release:15.46
/sys/class/dmi/id/bios_vendor:AMI
/sys/class/dmi/id/bios_version:F.46
/sys/class/dmi/id/board_asset_tag:Base Board Asset Tag
/sys/class/dmi/id/board_name:8496
/sys/class/dmi/id/board_vendor:HP
/sys/class/dmi/id/board_version:92.48
/sys/class/dmi/id/chassis_type:31
/sys/class/dmi/id/chassis_vendor:HP
/sys/class/dmi/id/chassis_version:Chassis Version
/sys/class/dmi/id/ec_firmware_release:92.48
/sys/class/dmi/id/modalias:dmi:bvnAMI:bvrF.46:bd11/15/2019:br15.46:efr92.48:svnHP:pnHPENVYx360Convertible13-ag0xxx:pvr:rvnHP:rn8496:rvr92.48:cvnHP:ct31:cvrChassisVersion:
/sys/class/dmi/id/product_family:103C_5335KV HP Envy
/sys/class/dmi/id/product_name:HP ENVY x360 Convertible 13-ag0xxx
/sys/class/dmi/id/product_sku:4JS64EA#ABD
/sys/class/dmi/id/sys_vendor:HP
/sys/class/dmi/id/uevent:MODALIAS=dmi:bvnAMI:bvrF.46:bd11/15/2019:br15.46:efr92.48:svnHP:pnHPENVYx360Convertible13-ag0xxx:pvr:rvnHP:rn8496:rvr92.48:cvnHP:ct31:cvrChassisVersion:

Regarding the driver. Yes, it is completely refactored version that is close to
a re-write. I posted it to the IIO mailing list, since this is where the
original driver was also posted and discussed.
I realize that I made a lot of changes, but I am confident, that my code base
has a cleaner approach, since it utilizes the respective start, stop, open and
close functions of the HID LL API and contains less (if even any) unused code
and data structures. It is up to the maintainers whether they accept it,
request changes or whatnot. I've done my part and am happy using my clean and
stable implementation, that btw. is also used by other Arch Linux users with my
DKMS package in the AUR. I unsuccessfully tried to make changes to the upstream
driver during its development, which were ignored by both the devs and the
maintainers. Refactoring the driver to clean it up, make it integrate
seamlessly with the kernel APIs and providing the params to make it
configurable on devices where the manufacturers screwed up was challenging,
interesting and mostly a fun experience. Getting my work upstream, frankly, not
so much.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (6 preceding siblings ...)
  2021-01-17 11:13 ` bugzilla-daemon
@ 2021-01-17 11:34 ` bugzilla-daemon
  2021-01-17 11:36 ` bugzilla-daemon
                   ` (32 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-17 11:34 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #31 from Hans de Goede (jwrdegoede@fedoraproject.org) ---
(In reply to Richard Neumann from comment #30)
> $ cat /etc/modprobe.d/amd_sfh.conf 
> options amd_sfh_hid sensor_mask=524295

Ok, so that translates to:

options amd_sfh_hid sensor_mask=0x80007

So you are enabling all 4 sensors:

#define ACEL_EN         BIT(0)
#define GYRO_EN         BIT(1)
#define MAGNO_EN        BIT(2)
#define ALS_EN          BIT(19)

I assume that you have verified that all 4 work?

Note that you can actually use hex-values (prefixed with 0x) when setting
integer module parameters, that typically make things easier to parse in cases
where the integer is a bitmask like this case.

> Refactoring the driver to clean it up, make it integrate seamlessly with the
> kernel APIs and providing the params to make it configurable on devices where
> the manufacturers screwed up was challenging, interesting and mostly a fun
> experience. Getting my work upstream, frankly, not so much.

May I ask you to at least consider re-posting the series as is with the email
going to the right people:

[hans@x1 linux]$ scripts/get_maintainer.pl -f
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
Nehal Shah <nehal-bakulchandra.shah@amd.com> (maintainer:AMD SENSOR FUSION HUB
DRIVER)
Sandeep Singh <sandeep.singh@amd.com> (maintainer:AMD SENSOR FUSION HUB DRIVER)
Jiri Kosina <jikos@kernel.org> (maintainer:HID CORE LAYER)
Benjamin Tissoires <benjamin.tissoires@redhat.com> (maintainer:HID CORE LAYER)
linux-input@vger.kernel.org (open list:AMD SENSOR FUSION HUB DRIVER)

With a cover letter why you believe that your version is better / cleaner ?

Note you will very probably still be asked to refactor your work so that it
will consist of incremental patches which slowly moves the existing driver to
your version. But this way at least the maintainers will be aware that there is
room for improvement, because I'm pretty sure that they will not have seen the
posting to the linux-iio list.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (7 preceding siblings ...)
  2021-01-17 11:34 ` bugzilla-daemon
@ 2021-01-17 11:36 ` bugzilla-daemon
  2021-01-17 12:15 ` bugzilla-daemon
                   ` (31 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-17 11:36 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #32 from Hans de Goede (jwrdegoede@fedoraproject.org) ---
p.s.

Richard any tips for Luya to test the GYRO and MAGNO sensors ?

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (8 preceding siblings ...)
  2021-01-17 11:36 ` bugzilla-daemon
@ 2021-01-17 12:15 ` bugzilla-daemon
  2021-01-17 14:23 ` bugzilla-daemon
                   ` (30 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-17 12:15 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #33 from Richard Neumann (mail@richard-neumann.de) ---
@Hans "work" is a relative term here. They are all recognized and started.
Going into details would go beyond the scope of this thread, I think.
dmesg excerpt:

[   10.855774] amd-sfh-pci 0000:04:00.7: Sensor mask: 0x80007
[   10.856054] hid-generic 0018:03FE:0001.0002: hidraw1: I2C HID v0.01 Device
[accelerometer] on AMD Sensor Fusion Hub (PCIe)
[   10.856325] hid-generic 0018:03FE:0001.0003: hidraw2: I2C HID v0.01 Device
[gyroscope] on AMD Sensor Fusion Hub (PCIe)
[   10.856614] hid-generic 0018:03FE:0001.0004: hidraw3: I2C HID v0.01 Device
[magnetometer] on AMD Sensor Fusion Hub (PCIe)
[   10.856893] hid-generic 0018:03FE:0001.0005: hidraw4: I2C HID v0.01 Device
[ambient light sensor] on AMD Sensor Fusion Hub (PCIe)

I am only *using* the accelerometer, so a mask of "1" or "0x1" respectively
would suffice.

Testing the other sensors is non-trivial. I branched my refactored version of
the driver to extend it with an API to allow for reverse-engineering the PCI
device to detect other sensors. But again, this maybe something to discuss in
another place (or write a paper about :p).

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (9 preceding siblings ...)
  2021-01-17 12:15 ` bugzilla-daemon
@ 2021-01-17 14:23 ` bugzilla-daemon
  2021-01-17 14:46 ` bugzilla-daemon
                   ` (29 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-17 14:23 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #34 from Hans de Goede (jwrdegoede@fedoraproject.org) ---
(In reply to Richard Neumann from comment #33)
> They are all recognized

That does not mean anything since the HID descriptors are provided by the
amd_fsh driver itself, so of course they describe a valid gyroscope and
magnetometer.

> Testing the other sensors is non-trivial.

Testing the ALS sensor actually should be easy, I assume that you have
iio-sensor-proxy installed (that is what is typically used to do accelerometer
based auto-display-rotation) ? Then you can just run monitor-sensor and it will
print the ALS readings and then moving the laptop from a dark environment (say
inside in a room with the blinds closed) to a light environment (say outside)
should lead to significant different readings, with the outside readings being
significantly higher.

As you indicate there are not really any userspace consumers of the gyroscope
and 
magnetometer so testing those might be harder, although I think that
monitor-sensor probably also prints magnetometer readings. And that should
behave as a compass so if you stand upright, holding the laptop and then spin
around the axis from your head to your feet, then those should change.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (10 preceding siblings ...)
  2021-01-17 14:23 ` bugzilla-daemon
@ 2021-01-17 14:46 ` bugzilla-daemon
  2021-01-17 14:49 ` bugzilla-daemon
                   ` (28 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-17 14:46 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #35 from Richard Neumann (mail@richard-neumann.de) ---
Okay, given this context, I can say, that the ALS does *not* work, as it always
returns 0.0 on my machine. That is with my refactored version and all driver
versions up until v8 from the upstream version. Maybe Luya can confirm that.
The magnetometer and gyroscope produce varying input data with my debug
version, but as you correctly stated, there is nothing in the userspace that I
am aware of, that can make use of this data.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (11 preceding siblings ...)
  2021-01-17 14:46 ` bugzilla-daemon
@ 2021-01-17 14:49 ` bugzilla-daemon
  2021-01-17 14:51 ` bugzilla-daemon
                   ` (27 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-17 14:49 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #36 from Dimitris (dmaroulidis@dimitrismaroulidis.com) ---
I've just tested Richard's Arch Linux DKMS package on my Envy x360 13-ag0xxx,
with the module options in comment #31 and monitor-sensor displays only
accelerometer data correctly. It states that the ALS is recognized but reports
0 lux ambience in a sun-lit room, and that value doesn't change when I change
rooms. 

I'm available to test sensors and modules on my laptop.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (12 preceding siblings ...)
  2021-01-17 14:49 ` bugzilla-daemon
@ 2021-01-17 14:51 ` bugzilla-daemon
  2021-01-17 16:01 ` bugzilla-daemon
                   ` (26 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-17 14:51 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #37 from Richard Neumann (mail@richard-neumann.de) ---
@Dimitris, @Luya can you test the ALS with the latest upstream version stages
for kernel 5.11, so we can rule out that this is a bug in my refactored
version? I currently have no time to build and test the upstream driver.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (13 preceding siblings ...)
  2021-01-17 14:51 ` bugzilla-daemon
@ 2021-01-17 16:01 ` bugzilla-daemon
  2021-01-19 13:38 ` bugzilla-daemon
                   ` (25 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-17 16:01 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #39 from Richard Neumann (mail@richard-neumann.de) ---
I just tried to test the latest staged upstream version, but it does not even
build:

make: Entering directory '/usr/lib/modules/5.10.7-zen1-1-zen/build'
  CC [M]  /var/lib/dkms/amd-sfh-hid/1.0.3/build/amd_sfh_hid.o
  CC [M]  /var/lib/dkms/amd-sfh-hid/1.0.3/build/amd_sfh_client.o
  CC [M]  /var/lib/dkms/amd-sfh-hid/1.0.3/build/amd_sfh_pcie.o
  CC [M] 
/var/lib/dkms/amd-sfh-hid/1.0.3/build/hid_descriptor/amd_sfh_hid_desc.o
/var/lib/dkms/amd-sfh-hid/1.0.3/build/hid_descriptor/amd_sfh_hid_desc.c:12:10:
fatal error: amd_sfh_pcie.h: No such file or directory
   12 | #include "amd_sfh_pcie.h"
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:279:
/var/lib/dkms/amd-sfh-hid/1.0.3/build/hid_descriptor/amd_sfh_hid_desc.o] Error
1
make: *** [Makefile:1805: /var/lib/dkms/amd-sfh-hid/1.0.3/build] Error 2
make: Leaving directory '/usr/lib/modules/5.10.7-zen1-1-zen/build'

I never understood why they put the hid descriptors in a subdir anyway.
I already spent far too much time on this driver. I have my working refactored
version. I'll leave the rest for somebody else.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (14 preceding siblings ...)
  2021-01-17 16:01 ` bugzilla-daemon
@ 2021-01-19 13:38 ` bugzilla-daemon
  2021-01-19 18:56 ` bugzilla-daemon
                   ` (24 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-19 13:38 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #42 from Dimitris (dmaroulidis@dimitrismaroulidis.com) ---
After updating to kernel v5.10.8.arch1-1 (on Archlinux), and building the
latest module from AUR, I got an error during module loading on startup that
the bitmask was out of bounds. So I set the bitmask to 0x8007 instead of
0x80007 as in comment #31.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (15 preceding siblings ...)
  2021-01-19 13:38 ` bugzilla-daemon
@ 2021-01-19 18:56 ` bugzilla-daemon
  2021-01-19 20:20 ` bugzilla-daemon
                   ` (23 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-19 18:56 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #43 from Richard Neumann (mail@richard-neumann.de) ---
@Luya: That would suggest that this is either a problem with the upstream code,
or that our models simply do not have an ALS on the hub.
@Dimitris: Sorry about that. I refactored the package yesterday and introduced
a bug. I migrated the sensor_mask to an usigned int and thought that a short
would suffice, which it didn't. v. 2.8.7 should have this fixed.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (16 preceding siblings ...)
  2021-01-19 18:56 ` bugzilla-daemon
@ 2021-01-19 20:20 ` bugzilla-daemon
  2021-01-19 20:24 ` bugzilla-daemon
                   ` (22 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-19 20:20 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #44 from Dimitris (dmaroulidis@dimitrismaroulidis.com) ---
@Richard I just upgraded to v2.8.7, corrected the module's options and now the
accelerometer functions correctly, like before. 

Today I noticed that monitor-sensors stated that no ambient light sensor was
present. If I understand correctly a bitmask of 0x80007 activates all sensors
on the hub. So that means that the light sensor would be active too. That would
suggest the ag0xxx doesn't have an ALS. I couldn't find any information about
whether that line has an ALS on HP support or PartSurfer.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (17 preceding siblings ...)
  2021-01-19 20:20 ` bugzilla-daemon
@ 2021-01-19 20:24 ` bugzilla-daemon
  2021-01-19 20:36 ` bugzilla-daemon
                   ` (21 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-19 20:24 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #45 from Hans de Goede (jwrdegoede@fedoraproject.org) ---
I believe that your models simply do not have an ALS sensor.

Luya did also test the magnetometer and gyro bits and reported his results in
the Fedora bug about this:
https://bugzilla.redhat.com/show_bug.cgi?id=1651886

"""
Gyroscope
---------
ls /sys/bus/iio/devices/iio\:device0/
buffer/                        in_anglvel_z_raw
dev                            name
in_anglvel_hysteresis          power/
in_anglvel_offset              scan_elements/
in_anglvel_sampling_frequency  subsystem/
in_anglvel_scale               trigger/
in_anglvel_x_raw               uevent
in_anglvel_y_raw    

cat /sys/bus/iio/devices/iio\:device0/name 
gyro_3d

cat /sys/bus/iio/devices/trigger0/name 
gyro_3d-dev0

Gyroscope value returned 0.0.0 (x.y.z)


Magnetometer
------------
ls /sys/bus/iio/devices/iio\:device3/
buffer              in_magn_sampling_frequency  in_magn_z_raw  subsystem
dev                 in_magn_scale               name           trigger
in_magn_hysteresis  in_magn_x_raw               power          uevent
in_magn_offset      in_magn_y_raw               scan_elements

cat /sys/bus/iio/devices/iio\:device3/name 
magn_3d

cat /sys/bus/iio/devices/trigger2/name 
magn_3d-dev3

Test with cat /sys/bus/iio/devices/iio:device3/in_magn_x_raw successful.
Test with cat /sys/bus/iio/devices/iio:device3/in_magn_y_raw successful.
Test with cat /sys/bus/iio/devices/iio:device3/in_magn_z_raw successful.
"""

Where I assume successful for the magn device means that the values changed
when doing the following: "For the magneto values (compass) you expect the x
and y values to change if you sit the laptop on the desk and then rotate it
while keeping it sitting on the desk, while the values should stat more or less
the same when you do not move the laptop."

@Richard, can you confirm that your model behaves the same, so working
accelerometer and magnetometer, with the gyro and als always reading all 0 ?

I would like to know, so that I can use the right sensor_mask for the DMI quirk
for the upstream driver for this.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (18 preceding siblings ...)
  2021-01-19 20:24 ` bugzilla-daemon
@ 2021-01-19 20:36 ` bugzilla-daemon
  2021-01-19 20:45 ` bugzilla-daemon
                   ` (20 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-19 20:36 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #46 from Dimitris (dmaroulidis@dimitrismaroulidis.com) ---
@Hans I get 0 on the gyro, the magneto functions correctly (tested with Luya
method in comment #45) and the accelerometer also. I have no ALS detected.

My laptop model is Envy x360 13-ag0011nv (P/N: 5VZ54EA).

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (19 preceding siblings ...)
  2021-01-19 20:36 ` bugzilla-daemon
@ 2021-01-19 20:45 ` bugzilla-daemon
  2021-01-19 22:25 ` bugzilla-daemon
                   ` (19 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-19 20:45 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #47 from Hans de Goede (jwrdegoede@fedoraproject.org) ---
(In reply to Dimitris from comment #46)
> @Hans I get 0 on the gyro, the magneto functions correctly (tested with Luya
> method in comment #45) and the accelerometer also. I have no ALS detected.
> 
> My laptop model is Envy x360 13-ag0011nv (P/N: 5VZ54EA).

Thanks, so that would be a "HP ENVY x360 Convertible 13-ag0xxx" like the one
from Richard. Can you confirm that:

cat /sys/class/dmi/id/product_name

Outputs "HP ENVY x360 Convertible 13-ag0xxx" ?



@Richard, no need for you to also test this then.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (20 preceding siblings ...)
  2021-01-19 20:45 ` bugzilla-daemon
@ 2021-01-19 22:25 ` bugzilla-daemon
  2021-01-20  9:24 ` bugzilla-daemon
                   ` (18 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-19 22:25 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #48 from Richard Neumann (mail@richard-neumann.de) ---
$ cat /sys/class/dmi/id/product_name
HP ENVY x360 Convertible 13-ag0xxx

$ for file in /sys/bus/iio/devices/iio\:device0/in_anglvel_*; do echo
"$(basename "${file}"): $(cat "${file}")"; done
in_anglvel_hysteresis: 1.270000
in_anglvel_offset: 0
in_anglvel_sampling_frequency: 12.500000
in_anglvel_scale: 0.000174532
in_anglvel_x_raw: 0
in_anglvel_y_raw: 0
in_anglvel_z_raw: 0

$ for file in /sys/bus/iio/devices/iio\:device1/in_magn_*; do echo "$(basename
"${file}"): $(cat "${file}")"; done
in_magn_hysteresis: 1.270000
in_magn_offset: 0
in_magn_sampling_frequency: 12.500000
in_magn_scale: 0.000001000
in_magn_x_raw: 40
in_magn_y_raw: -14
in_magn_z_raw: -16

$ for file in /sys/bus/iio/devices/iio\:device2/in_accel_*; do echo "$(basename
"${file}"): $(cat "${file}")"; done
in_accel_hysteresis: 1.270000
in_accel_offset: 0
in_accel_sampling_frequency: 12.500000
in_accel_scale: 0.098066500
in_accel_x_raw: 0
in_accel_y_raw: -9
in_accel_z_raw: -5

$ for file in /sys/bus/iio/devices/iio\:device3/in_i*; do echo "$(basename
"${file}"): $(cat "${file}")"; done
cat: '/sys/bus/iio/devices/iio:device3/in_illuminance_hysteresis': Invalid
argument
in_illuminance_hysteresis: 
in_illuminance_offset: 0
in_illuminance_raw: 0
in_illuminance_sampling_frequency: 12.500000
in_illuminance_scale: 0.100000000
in_intensity_both_raw: 0
cat: '/sys/bus/iio/devices/iio:device3/in_intensity_hysteresis': Invalid
argument
in_intensity_hysteresis: 
in_intensity_offset: 0
in_intensity_sampling_frequency: 12.500000
in_intensity_scale: 0.100000000

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (21 preceding siblings ...)
  2021-01-19 22:25 ` bugzilla-daemon
@ 2021-01-20  9:24 ` bugzilla-daemon
  2021-01-20 11:09 ` bugzilla-daemon
                   ` (17 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-20  9:24 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #49 from Bastien Nocera (bugzilla@hadess.net) ---
You might want to use "iio_generic_buffer -A -N 0" for testing instead.

This makes sure that all the triggers are enabled, so that there's hopefully
some data coming out of the devices. Substitute the "0" with the IIO device
number, the command live in kernel-tools in Fedora.

If you get all zeroes out of the light sensor, it might also be the same
problem I've recently reported to the IIO list, which would point to a problem
in the common IIO code, rather than a problem with the light sensor in the
hid-sensor-hub code.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (22 preceding siblings ...)
  2021-01-20  9:24 ` bugzilla-daemon
@ 2021-01-20 11:09 ` bugzilla-daemon
  2021-01-20 11:45 ` bugzilla-daemon
                   ` (16 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-20 11:09 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #50 from Dimitris (dmaroulidis@dimitrismaroulidis.com) ---
@Hans yes it's the same product_name.

$ cat /sys/class/dmi/id/product_name 
HP ENVY x360 Convertible 13-ag0xxx

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (23 preceding siblings ...)
  2021-01-20 11:09 ` bugzilla-daemon
@ 2021-01-20 11:45 ` bugzilla-daemon
  2021-01-21 16:58 ` bugzilla-daemon
                   ` (15 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-20 11:45 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #51 from Dimitris (dmaroulidis@dimitrismaroulidis.com) ---
One thing I'm noticing, is that after waking up from sleep the accelerometer
disappears.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (24 preceding siblings ...)
  2021-01-20 11:45 ` bugzilla-daemon
@ 2021-01-21 16:58 ` bugzilla-daemon
  2021-01-23 14:15 ` bugzilla-daemon
                   ` (14 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-21 16:58 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

Andy Shevchenko (andy.shevchenko@gmail.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andy.shevchenko@gmail.com

--- Comment #52 from Andy Shevchenko (andy.shevchenko@gmail.com) ---
(In reply to Richard Neumann from comment #48)

> $ for file in /sys/bus/iio/devices/iio\:device0/in_anglvel_*; do echo
> "$(basename "${file}"): $(cat "${file}")"; done

Just a side note: The above can be much simplified, compare:

  grep -H . /sys/bus/iio/devices/iio\:device0/in_anglvel_*

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (25 preceding siblings ...)
  2021-01-21 16:58 ` bugzilla-daemon
@ 2021-01-23 14:15 ` bugzilla-daemon
  2021-01-23 20:58 ` bugzilla-daemon
                   ` (13 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-23 14:15 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #53 from Richard Neumann (mail@richard-neumann.de) ---
@Dimitris: The latest version (2.9.0-1) should have this resolved.
I tested it successfully on my laptop and all workds as expected.
I submitted my refactored version upstream - this time using the correct
process:
https://patchwork.kernel.org/project/linux-input/list/?series=420493
Thanks you Any for the hints about the correct submission process.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (26 preceding siblings ...)
  2021-01-23 14:15 ` bugzilla-daemon
@ 2021-01-23 20:58 ` bugzilla-daemon
  2021-01-23 22:08 ` bugzilla-daemon
                   ` (12 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-23 20:58 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #54 from Dimitris (dmaroulidis@dimitrismaroulidis.com) ---
(In reply to Richard Neumann from comment #53)

So if I understand correctly, and excuse me but I'm not very familiar with the
submission/acceptance of patches from upstream, if your patches get accepted
and integrated into the kernel tree, we will be able to get the amd_sfh_hid
module on downstream distributions of the kernel? What I mean is, as an
end-user, will we be able to just modprobe that module to our running kernel
as-is (without rebuilding the kernel) p.ex. in Archlinux, or will we need to
recompile the kernel with the relevant driver selected in menuconfig to be
built into the kernel?

I think the handling of the issue in the last question lies with the
distributions.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (27 preceding siblings ...)
  2021-01-23 20:58 ` bugzilla-daemon
@ 2021-01-23 22:08 ` bugzilla-daemon
  2021-01-24 12:04 ` bugzilla-daemon
                   ` (11 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-23 22:08 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #55 from Richard Neumann (mail@richard-neumann.de) ---
@Dimitris. The submitted v8 Version of AMD is already merged into the mainline
kernel for v5.11, afaik. So we will definitely get a driver with kernel 5.11.
The only problem is, that it does not include an option to override the sensor
mask if the manufacturer of the system did not write it into the P2C register
as is the case on our HP Envy 13-ag0xxx models.
So the upstream driver is pretty useless to us.

My refactored patch series is a side-project I developed after the initial
driver version of AMD was submitted upstream. I repeatedly asked for adding a
kernel parameter to be able to override the sensor mask, which was confirmed as
a good idea, but was never implemented. So I took a look at the code myself and
added it. While I was at it, I encountered some more problems regarding the
code structure and DMA handling, that I also reported upstream [1]. I also saw
some unused code. So, to challenge myself to improve the driver, I read into
the Linux kernel API documentation for the HID subsystem, PCI drivers and
platform drivers and re-wrote the patch to what eventually became the patch
series that I now submitted upstream.

I understand Hans' concern about the rewrite, but I think that it would benefit
the Kernel to share my work on the driver. If the maintainers are reluctant to
replace the driver with my changes, that's okay. They can still cherry pick
what they regard as improvements on the code.

[1] https://lkml.org/lkml/2020/3/30/157

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (28 preceding siblings ...)
  2021-01-23 22:08 ` bugzilla-daemon
@ 2021-01-24 12:04 ` bugzilla-daemon
  2021-01-24 16:11 ` bugzilla-daemon
                   ` (10 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-24 12:04 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #56 from Richard Neumann (mail@richard-neumann.de) ---
@Dimitris, @Luya
I have added DMI-based model detection to my driver [1] (v. 2.9.8 in the AUR).
I successfully tested it on my system.
Please make sure that you disable i.e. comment out any sensor override if you
want to test whether it works on your systems. The quirk should enable only the
accelerometer and magnetometer for the devices that Luya and I posted above.

[1] https://github.com/conqp/amd-sfh-hid-dkms/blob/master/amd-sfh-quirks.c

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (29 preceding siblings ...)
  2021-01-24 12:04 ` bugzilla-daemon
@ 2021-01-24 16:11 ` bugzilla-daemon
  2021-01-27  1:57 ` bugzilla-daemon
                   ` (9 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-24 16:11 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #57 from Dimitris (dmaroulidis@dimitrismaroulidis.com) ---
(In reply to Richard Neumann from comment #56)
> @Dimitris, @Luya
> I have added DMI-based model detection to my driver [1] (v. 2.9.8 in the
> AUR).

@Richard works beautifully (I removed the bitmask override)!

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (30 preceding siblings ...)
  2021-01-24 16:11 ` bugzilla-daemon
@ 2021-01-27  1:57 ` bugzilla-daemon
  2021-10-12 10:44 ` bugzilla-daemon
                   ` (8 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-01-27  1:57 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #58 from Luya Tshimbalanga (luya@fedoraproject.org) ---
(In reply to Richard Neumann from comment #56)
> @Dimitris, @Luya
> I have added DMI-based model detection to my driver [1] (v. 2.9.8 in the
> AUR).
> I successfully tested it on my system.
> Please make sure that you disable i.e. comment out any sensor override if
> you want to test whether it works on your systems. The quirk should enable
> only the accelerometer and magnetometer for the devices that Luya and I
> posted above.
> 
> [1] https://github.com/conqp/amd-sfh-hid-dkms/blob/master/amd-sfh-quirks.c

Thanks, I will try it on my Fedora system.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (31 preceding siblings ...)
  2021-01-27  1:57 ` bugzilla-daemon
@ 2021-10-12 10:44 ` bugzilla-daemon
  2021-12-04 11:00 ` bugzilla-daemon
                   ` (7 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-10-12 10:44 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

Marco (rodomar705@protonmail.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rodomar705@protonmail.com

--- Comment #60 from Marco (rodomar705@protonmail.com) ---
(In reply to kernelbugzilla from comment #59)
> FYI, I unsuccessfully tested both the upstream driver and Richard's version
> on a Renoir device (Ryzen 3 4300U on a Asus Vivobook Flip 14 TM420IA). An
> accelerometer device is detected, but it returns no data.
> 
> Apparently, both drivers are missing a report descriptor for the newer
> Renoir hardware.
> 
> Reference: https://github.com/conqp/amd-sfh-hid-dkms/issues/1 (thanks
> Richard for the prompt reply there)

On the exact same device, but with a 4500U as of 5.14.11, I do get
accelerometer data. 

The issues with sensors however is that I do not have an event for the lid flip
on this device in order to disable automatically keyboard and trackpad in
tablet mode and no way to use an apparently present ALS for automatic
brightness (I'm not sure even if this device has one, but I've seen quite a lot
of reference to a Capella Micro cm32181 in the DSDT under i2c, and the kernel
even load the mentioned driver. No iio data anywhere, though). 

If the position of the hinges are derived from two accelerometers (one in the
base, the other in the display) I would like to write an implementation around
that, but the sensor reports only the one in the display panel and nothing
else, so that's really not useful anyway.

However at least I can use display rotation with that.

I really hope that AMD will provide documentation around that or at least will
properly support his sensor hub to Ryzen 4/5 devices themselves.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (32 preceding siblings ...)
  2021-10-12 10:44 ` bugzilla-daemon
@ 2021-12-04 11:00 ` bugzilla-daemon
  2021-12-04 11:06 ` bugzilla-daemon
                   ` (6 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-12-04 11:00 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

Stuart Morgan (stuart@tase.co.uk) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stuart@tase.co.uk

--- Comment #61 from Stuart Morgan (stuart@tase.co.uk) ---
@Richard - it's been nearly a year since any updates to this ticket and zero
activity on your github repo since Feb. Are you still fighting to get your
fixes upstream, or is this effectively a dead effort?

Even with AMD's own official updates to 5.14 mid-year, the official SFH driver
still doesn't work with the AMD 4000 series HP x360 laptops. I'm currently on
5.15.

I personally have an AY007NA (note AY not AG). I'm assuming this to be similar
if not identical in behaviour to the AGxxx models and would therefore benefit
from the same fixes.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (33 preceding siblings ...)
  2021-12-04 11:00 ` bugzilla-daemon
@ 2021-12-04 11:06 ` bugzilla-daemon
  2021-12-04 14:48 ` bugzilla-daemon
                   ` (5 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-12-04 11:06 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

Andy Shevchenko (andy.shevchenko@gmail.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |superm1@gmail.com

--- Comment #62 from Andy Shevchenko (andy.shevchenko@gmail.com) ---
Add Mario. Mario, can you pull the strings to unstale this efforts?

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (34 preceding siblings ...)
  2021-12-04 11:06 ` bugzilla-daemon
@ 2021-12-04 14:48 ` bugzilla-daemon
  2021-12-04 16:12 ` bugzilla-daemon
                   ` (4 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-12-04 14:48 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #63 from Richard Neumann (mail@richard-neumann.de) ---
@Stuart
I am no longer interested in getting my refactored version upstream.
I tried to follow the upstream development of the driver by AMD to my best
abilities, but I've not yet seen further development on "interesting" parts,
such as the accelerometer support for the newest-generation sensor hubs or a
lid switch driver. So yes, this is basically a dead effort.
If I should have overlooked upstream commits regarding above features, please
let me know. I'm still interested in incorporating those into my refactored
driver version.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (35 preceding siblings ...)
  2021-12-04 14:48 ` bugzilla-daemon
@ 2021-12-04 16:12 ` bugzilla-daemon
  2022-02-02 19:04 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2021-12-04 16:12 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

Nikos Fytilis (n-fit@live.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |n-fit@live.com

--- Comment #64 from Nikos Fytilis (n-fit@live.com) ---
Hi, i stumbled across this report through the dkms sfh github issues.

I have a flex 5 with a 4500U and have not installed the dkms module. I am
getting in_accel_[xyz]_raw in the sysfs directory of the iio device and they
work (i can move the laptop and they change consistantly)

however the buffer0/* files do not change at all. is this the same issue with
all of you?

if so, a userland solution could be very easy - basically a edited iio proxy
capable of using the raw values.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (36 preceding siblings ...)
  2021-12-04 16:12 ` bugzilla-daemon
@ 2022-02-02 19:04 ` bugzilla-daemon
  2022-02-09 17:52 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2022-02-02 19:04 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #65 from Marco (rodomar705@protonmail.com) ---
(In reply to Richard Neumann from comment #63)
> @Stuart
> I am no longer interested in getting my refactored version upstream.
> I tried to follow the upstream development of the driver by AMD to my best
> abilities, but I've not yet seen further development on "interesting" parts,
> such as the accelerometer support for the newest-generation sensor hubs or a
> lid switch driver. So yes, this is basically a dead effort.
> If I should have overlooked upstream commits regarding above features,
> please let me know. I'm still interested in incorporating those into my
> refactored driver version.

When I saw recently that you added lid switch support and I've got my hopes up
in believing that at least that piece was fixed. Then I remembered that it
unfortunately doesn't work under Ryzen 4000+ devices. I thought that the issue
was on asus_nb_wmi driver, but there is no data for the lid sensor, I've just
recently confirmed when I had a copy of Windows and removed the AMD UMDF Sensor
driver. The automatic keyboard disabler was gone.

Essentially with the upstream kernel driver I have accelerometer data, but no
lid switch. With yours unfortunately I haven't both.

I don't really get why they can't release documentation on this device if they
do not want to support in Linux properly, frankly.

Hope that someone will be able to fix it,

Marco.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (37 preceding siblings ...)
  2022-02-02 19:04 ` bugzilla-daemon
@ 2022-02-09 17:52 ` bugzilla-daemon
  2022-02-23 20:30 ` bugzilla-daemon
  2022-02-24  6:22 ` bugzilla-daemon
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2022-02-09 17:52 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #66 from Alex Deucher (alexdeucher@gmail.com) ---
Several fixes to the SFH driver from the last month:

https://lore.kernel.org/linux-input/578673a3-920f-25f3-c9f7-7f1812c3e731@amd.com/T/#mfbe03bd36befb510c347417aab9fecb911dec946

https://lore.kernel.org/linux-input/20220208122112.942471-1-Basavaraj.Natikar@amd.com/

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (38 preceding siblings ...)
  2022-02-09 17:52 ` bugzilla-daemon
@ 2022-02-23 20:30 ` bugzilla-daemon
  2022-02-24  6:22 ` bugzilla-daemon
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2022-02-23 20:30 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #67 from Alex Deucher (alexdeucher@gmail.com) ---
Support for newer platforms was added last year:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0aad9c95eb9a2b086322e28ae2e58ad25598604e

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360)
       [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
                   ` (39 preceding siblings ...)
  2022-02-23 20:30 ` bugzilla-daemon
@ 2022-02-24  6:22 ` bugzilla-daemon
  40 siblings, 0 replies; 41+ messages in thread
From: bugzilla-daemon @ 2022-02-24  6:22 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=199715

--- Comment #68 from Marco (rodomar705@protonmail.com) ---
(In reply to Alex Deucher from comment #67)
> Support for newer platforms was added last year:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/
> ?id=0aad9c95eb9a2b086322e28ae2e58ad25598604e

As said above, this is correct. The issue is that the LID sensor coming from
the SFH (the way that Windows tell if the system has switched into tablet mode,
verified by myself after disabling the driver and losing that functionality) is
still missing, and the older driver forked above had added support recently.
Unfortunately that driver doesn't support Ryzen APU platforms after 3000
series.

Both options for me aren't unfortunately usable, and I still hope that someone
from AMD will fix this issue.

Marco.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2022-02-24  6:22 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-199715-215701@https.bugzilla.kernel.org/>
2021-01-16 20:14 ` [Bug 199715] hp_accel: probe of HPQ6007:00 failed with error -22 (HP Envy x360) bugzilla-daemon
2021-01-17  9:02 ` bugzilla-daemon
2021-01-17 10:57 ` bugzilla-daemon
2021-01-17 10:57 ` bugzilla-daemon
2021-01-17 10:58 ` bugzilla-daemon
2021-01-17 11:09 ` bugzilla-daemon
2021-01-17 11:13 ` bugzilla-daemon
2021-01-17 11:34 ` bugzilla-daemon
2021-01-17 11:36 ` bugzilla-daemon
2021-01-17 12:15 ` bugzilla-daemon
2021-01-17 14:23 ` bugzilla-daemon
2021-01-17 14:46 ` bugzilla-daemon
2021-01-17 14:49 ` bugzilla-daemon
2021-01-17 14:51 ` bugzilla-daemon
2021-01-17 16:01 ` bugzilla-daemon
2021-01-19 13:38 ` bugzilla-daemon
2021-01-19 18:56 ` bugzilla-daemon
2021-01-19 20:20 ` bugzilla-daemon
2021-01-19 20:24 ` bugzilla-daemon
2021-01-19 20:36 ` bugzilla-daemon
2021-01-19 20:45 ` bugzilla-daemon
2021-01-19 22:25 ` bugzilla-daemon
2021-01-20  9:24 ` bugzilla-daemon
2021-01-20 11:09 ` bugzilla-daemon
2021-01-20 11:45 ` bugzilla-daemon
2021-01-21 16:58 ` bugzilla-daemon
2021-01-23 14:15 ` bugzilla-daemon
2021-01-23 20:58 ` bugzilla-daemon
2021-01-23 22:08 ` bugzilla-daemon
2021-01-24 12:04 ` bugzilla-daemon
2021-01-24 16:11 ` bugzilla-daemon
2021-01-27  1:57 ` bugzilla-daemon
2021-10-12 10:44 ` bugzilla-daemon
2021-12-04 11:00 ` bugzilla-daemon
2021-12-04 11:06 ` bugzilla-daemon
2021-12-04 14:48 ` bugzilla-daemon
2021-12-04 16:12 ` bugzilla-daemon
2022-02-02 19:04 ` bugzilla-daemon
2022-02-09 17:52 ` bugzilla-daemon
2022-02-23 20:30 ` bugzilla-daemon
2022-02-24  6:22 ` bugzilla-daemon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.