You are not logged in.

#1 2020-04-18 18:25:52

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 875
Website

amd-sfh-hid-dkms - DKMS version of the experimental AMD SFH driver

As maybe many of you, just like me, got annoyed by having to re-build the entire kernel when testing updates on the linux-sfh package, I took the time to write a DKMS package that ships the driver:
https://aur.archlinux.org/packages/amd-sfh-hid-dkms/
I tested it successfully with the stable kernel.
Please let me know if you encounter any bugs or errors.

Note on [Firmware Bug]: No sensors marked active!
If you do not get screen rotation to work with the driver and encouter the error message

[Firmware Bug]: No sensors marked active!

in your dmesg output, your laptop manufacturer probably missed to write information about sensors connected to the sensor hub into its corresponding P2C register.
Try loading the amd_sfh_hid module with an explicitely enabled primary accelerometer:

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

Be sure to have the modconf hook enabled in your /etc/mkinitcpio.conf for this to take effect.

Last edited by schard (2020-05-23 13:43:51)

Offline

#2 2020-07-05 13:58:47

Zamundaaa
Member
Registered: 2020-07-05
Posts: 3

Re: amd-sfh-hid-dkms - DKMS version of the experimental AMD SFH driver

Thank you for doing this! It looks like the driver will still take quite some time to be mainlined...

So, this doesn't seem to work properly on my HP Envy x360 13-ay0779ng (with a Ryzen 4700U). At first I had the "No sensors marked active!" problem, and creating amd_sfh.conf did solve that.
KDE Plasma also now recognizes the sensor in the settings, but it doesn't actually do anything. monitor-sensor shows this:

$ monitor-sensor
    Waiting for iio-sensor-proxy to appear
+++ iio-sensor-proxy appeared
=== Has accelerometer (orientation: undefined)
=== No ambient light sensor
=== No proximity sensor

I tried with kernel 5.7.6 and 5.8rc3, same results.

Do note that I'm on Manjaro (unstable)... I know this forum is exclusively for Arch x86_64, but this seems like the sole place for support on this.

Offline

#3 2020-07-06 15:06:51

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 875
Website

Re: amd-sfh-hid-dkms - DKMS version of the experimental AMD SFH driver

Please provide a full dmesg log with the driver loaded.

Offline

#4 2020-07-06 15:32:20

Zamundaaa
Member
Registered: 2020-07-05
Posts: 3

Re: amd-sfh-hid-dkms - DKMS version of the experimental AMD SFH driver

Offline

#5 2020-07-07 07:07:44

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 875
Website

Re: amd-sfh-hid-dkms - DKMS version of the experimental AMD SFH driver

This looks okay, as far as I can tell.
It is possible that the accelerometer is connected to another port of the SFH on your device or that the accelerometer returns different data. You'll need to tinker with the driver yourself on your specific laptop model to find out (aka. reverse engineer it). Unfortunately AMD has not disclosed too much information on the inner workings of the SFH yet so that I don't know if there's a possibility to generically retrieve information about the connected sensor types and locations from the device apart from reading a certain P2C register as AMD does.

Last edited by schard (2020-07-07 07:08:35)

Offline

#6 2020-07-08 20:47:52

Zamundaaa
Member
Registered: 2020-07-05
Posts: 3

Re: amd-sfh-hid-dkms - DKMS version of the experimental AMD SFH driver

Well, I'll definitely try, after my exams. I'll post again if I need help (or if I made it work). Thanks so far!

Offline

Board footer

Powered by FluxBB