You are not logged in.
Hi all,
I have here two Ryzen 8840 devices, a Lenovo Yoga 7 (convertible, auto-screen rotation works) and a Minisforum V3 (amd64-tablett, auto-screen rotation does not work).
I installed iio-sensor-proxy as well as iio_info. iio_infos shows, that the acceleration sensor in the V3 seems not to be detected properly. I hope, that I do not have missed anything stupidly(?).
Does anybody here has an idea, how to drill down the problem and how to contribute to a solution?
Thanks and kind regards,
Peer
Technical Details
$inxi -aG #Lenovo YOGA7, working
Graphics:
Device-1: AMD Phoenix3 vendor: Lenovo driver: amdgpu v: kernel arch: RDNA-3
code: Phoenix process: TSMC n4 (4nm) built: 2023+ pcie: gen: 4
speed: 16 GT/s lanes: 16 ports: active: eDP-1 empty: DP-1, DP-2, DP-3,
DP-4, DP-5, DP-6, DP-7, HDMI-A-1, Writeback-1 bus-ID: 65:00.0
chip-ID: 1002:1900 class-ID: 0300 temp: 30.0 C
Device-2: Bison Integrated RGB Camera driver: uvcvideo type: USB rev: 2.0
speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-1:2 chip-ID: 5986:2169
class-ID: fe01 serial: 01.00.00
Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.0
compositor: kwin_wayland driver: X: loaded: modesetting unloaded: vesa
alternate: fbdev dri: radeonsi gpu: amdgpu display-ID: 0
Monitor-1: eDP-1 res: 1920x1200 size: N/A modes: N/A
API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
device: 1 drv: swrast surfaceless: drv: radeonsi wayland: drv: radeonsi x11:
drv: radeonsi inactive: gbm
API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.1.2-arch1.1
glx-v: 1.4 direct-render: yes renderer: AMD Radeon Graphics (radeonsi
gfx1103_r1 LLVM 17.0.6 DRM 3.57 6.9.7-arch1-1) device-ID: 1002:1900
memory: 1.95 GiB unified: no display-ID: :1.0
API: Vulkan Message: No Vulkan data available.
$ iio_info #Lenovo YOGA7, rotating automatically
iio_info version: 0.25 (git tag:v0.25)
Libiio version: 0.25 (git tag: v0.25) backends: local xml ip usb serial
IIO context created with local backend.
Backend version: 0.25 (git tag: v0.25)
Backend description string: Linux hog5 6.9.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 28 Jun 2024 04:32:50 +0000 x86_64
IIO context has 2 attributes:
local,kernel: 6.9.7-arch1-1
uri: local:
IIO context has 9 devices:
..
iio:device0: accel_3d (buffer capable)
4 channels found:
accel_x: (input, index: 0, format: le:S32/32>>0)
5 channel-specific attributes found:
attr 0: hysteresis value: 0.000000
attr 1: offset value: 0
attr 2: raw value: 0
attr 3: sampling_frequency value: 10.000000
attr 4: scale value: 0.098066500
accel_y: (input, index: 1, format: le:S32/32>>0)
5 channel-specific attributes found:
attr 0: hysteresis value: 0.000000
attr 1: offset value: 0
attr 2: raw value: -9
attr 3: sampling_frequency value: 10.000000
attr 4: scale value: 0.098066500
accel_z: (input, index: 2, format: le:S32/32>>0)
5 channel-specific attributes found:
attr 0: hysteresis value: 0.000000
attr 1: offset value: 0
attr 2: raw value: -1
attr 3: sampling_frequency value: 10.000000
attr 4: scale value: 0.098066500
timestamp: (input, index: 3, format: le:S64/64>>0)
1 device-specific attributes found:
attr 0: current_timestamp_clock value: realtime
2 buffer-specific attributes found:
attr 0: data_available value: 11
attr 1: direction value: in
Current trigger: trigger0(accel_3d-dev0)
trigger0: accel_3d-dev0
0 channels found:
No trigger on this device
$inxi -aG #Minisforum V3, not rotationg
Graphics:
Device-1: AMD Phoenix3 driver: amdgpu v: kernel arch: RDNA-3 code: Phoenix
process: TSMC n4 (4nm) built: 2023+ pcie: gen: 4 speed: 16 GT/s lanes: 16 ports: active: eDP-1
empty: DP-1, DP-2, DP-3, DP-4, DP-5, DP-6, DP-7, DP-8, Writeback-1 bus-ID: c4:00.0
chip-ID: 1002:1900 class-ID: 0300 temp: 29.0 C
Device-2: Sunplus Innovation Hy-Usb2.0-1 MIC driver: uvcvideo type: USB rev: 2.0
speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-1:2 chip-ID: 1bcf:2ce4 class-ID: 0e02
serial: 01.00.00
Device-3: Kingcome USB2.0 FHD UVC WebCam driver: uvcvideo type: USB rev: 2.0 speed: 480 Mb/s
lanes: 1 mode: 2.0 bus-ID: 3-1:2 chip-ID: 2b7e:c705 class-ID: fe01 serial: 200901010001
Display: unspecified server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.0
compositor: kwin_wayland driver: X: loaded: modesetting unloaded: vesa alternate: fbdev
dri: radeonsi gpu: amdgpu tty: 125x30
Monitor-1: eDP-1 model: BOE Display 0x0b7b built: 2022 res: 2560x1600 dpi: 215 gamma: 1.2
size: 302x188mm (11.89x7.4") diag: 356mm (14") ratio: 16:10 modes: max: 2560x1600 min: 640x480
API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi device: 1 drv: swrast
surfaceless: drv: radeonsi wayland: drv: radeonsi inactive: gbm,x11
API: OpenGL v: 4.6 compat-v: 4.5 vendor: mesa v: 24.1.2-arch1.1 note: console (EGL sourced)
renderer: AMD Radeon Graphics (radeonsi gfx1103_r1 LLVM 17.0.6 DRM 3.57 6.9.7-arch1-1),
llvmpipe (LLVM 17.0.6 256 bits)
API: Vulkan Message: No Vulkan data available.
$ iio_info #Minisforum V3, not rotationg
iio_info version: 0.25 (git tag:v0.25)
Libiio version: 0.25 (git tag: v0.25) backends: local xml ip usb serial
IIO context created with local backend.
Backend version: 0.25 (git tag: v0.25)
Backend description string: Linux hog6 6.9.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 28 Jun 2024 04:32:50 +0000 x86_64
IIO context has 2 attributes:
local,kernel: 6.9.7-arch1-1
uri: local:
IIO context has 10 devices:
..
iio:device0: als (buffer capable)
6 channels found:
intensity_both: (input, index: 0, format: le:S32/32>>0)
6 channel-specific attributes found:
attr 0: hysteresis ERROR: Invalid argument (22)
attr 1: hysteresis_relative value: 0.000000
attr 2: offset value: 0
attr 3: raw value: 47
attr 4: sampling_frequency value: 10.000000
attr 5: scale value: 0.100000000
illuminance: (input, index: 1, format: le:S32/32>>0)
6 channel-specific attributes found:
attr 0: hysteresis ERROR: Invalid argument (22)
attr 1: hysteresis_relative value: 0.000000
attr 2: offset value: 0
attr 3: raw value: 47
attr 4: sampling_frequency value: 10.000000
attr 5: scale value: 0.100000000
colortemp: (input, WARN:iio_channel_get_type()=UNKNOWN, index: 2, format: le:S32/32>>0)
6 channel-specific attributes found:
attr 0: hysteresis ERROR: Invalid argument (22)
attr 1: hysteresis_relative value: 0.000000
attr 2: offset value: 0
attr 3: raw value: 0
attr 4: sampling_frequency value: 10.000000
attr 5: scale value: 0.100000000
chromaticity_x: (input, WARN:iio_channel_get_type()=UNKNOWN, index: 3, format: le:S32/32>>0)
6 channel-specific attributes found:
attr 0: hysteresis ERROR: Invalid argument (22)
attr 1: hysteresis_relative value: 0.000000
attr 2: offset value: 0
attr 3: raw value: 0
attr 4: sampling_frequency value: 10.000000
attr 5: scale value: 0.100000000
chromaticity_y: (input, WARN:iio_channel_get_type()=UNKNOWN, index: 4, format: le:S32/32>>0)
6 channel-specific attributes found:
attr 0: hysteresis ERROR: Invalid argument (22)
attr 1: hysteresis_relative value: 0.000000
attr 2: offset value: 0
attr 3: raw value: 0
attr 4: sampling_frequency value: 10.000000
attr 5: scale value: 0.100000000
timestamp: (input, index: 5, format: le:S64/64>>0)
1 device-specific attributes found:
attr 0: current_timestamp_clock value: realtime
2 buffer-specific attributes found:
attr 0: data_available value: 128
attr 1: direction value: in
Current trigger: trigger0(als-dev0)
trigger0: als-dev0
0 channels found:
No trigger on this device
Last edited by PeerK (2024-12-02 20:53:33)
Offline
While looking around, I found, that I do not have these /sys/bus/iio/devices/iio:device0/in_accel_* files on the Minisforum tablet. So I wonder, if there might a driver for the accelerator be missing at all?
-> Contact the manufacturer? Since they offer support for ubuntu, there might be a solution.
$ ls -la /sys/bus/iio/devices/iio:device0/ #Minisforum V3
total 0
drwxr-xr-x 7 root root 0 1. Jul 00:29 .
drwxr-xr-x 5 root root 0 1. Jul 00:29 ..
drwxr-xr-x 2 root root 0 1. Jul 00:29 buffer
drwxr-xr-x 2 root root 0 1. Jul 00:29 buffer0
-rw-r--r-- 1 root root 4096 1. Jul 00:29 current_timestamp_clock
-r--r--r-- 1 root root 4096 1. Jul 00:29 dev
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_chromaticity_hysteresis
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_chromaticity_hysteresis_relative
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_chromaticity_offset
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_chromaticity_sampling_frequency
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_chromaticity_scale
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_chromaticity_x_raw
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_chromaticity_y_raw
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_colortemp_hysteresis
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_colortemp_hysteresis_relative
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_colortemp_offset
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_colortemp_raw
-rw-r--r-- 1 root root 4096 30. Jun 13:10 in_colortemp_sampling_frequency
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_colortemp_scale
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_illuminance_hysteresis
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_illuminance_hysteresis_relative
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_illuminance_offset
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_illuminance_raw
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_illuminance_sampling_frequency
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_illuminance_scale
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_intensity_both_raw
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_intensity_hysteresis
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_intensity_hysteresis_relative
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_intensity_offset
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_intensity_sampling_frequency
-rw-r--r-- 1 root root 4096 1. Jul 00:29 in_intensity_scale
-r--r--r-- 1 root root 4096 1. Jul 00:29 name
drwxr-xr-x 2 root root 0 1. Jul 00:29 power
drwxr-xr-x 2 root root 0 1. Jul 00:29 scan_elements
lrwxrwxrwx 1 root root 0 30. Jun 13:10 subsystem -> ../../../../bus/iio
drwxr-xr-x 2 root root 0 1. Jul 00:29 trigger
-rw-r--r-- 1 root root 4096 1. Jul 00:29 uevent
Offline
Moved, by request.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
I stumbled upon this post, hope it's not too late to help out here but there is a repository containing workarounds and fixes for the Minisforum v3.
There a solution was shared (by eplightning) to get the accelerometer working properly. https://github.com/mudkipme/awesome-min … 2279282784
I've created several AUR packages to help apply this solution:
1. https://aur.archlinux.org/packages/minisforum-v3-dsdt - for patching the DSDT so that the kernel "recognizes" the accelerometer sensor
2. https://aur.archlinux.org/packages/mini … elerometer - for applying the correct mount matrix to the accelerometer sensor (otherwise the values are incorrect)
3. https://aur.archlinux.org/packages/auto-brightness - a systemd service to automatically adjust brightness based on the ambient light sensor
For #3 there are other, more featured solutions for this as well, such as wluma but I personally prefer the `auto-brightness` service as to how it integrates with my `tuned` profiles, and how I can explicitly limit auto brightness range per power profile using the conf files.
Hope this helps you or other Minisforum V3 users stumbling upon this thread.
Last edited by fourlights-tr (2024-09-02 06:33:35)
Offline
I stumbled upon this post, hope it's not too late to help out here but there is a repository containing workarounds and fixes for the Minisforum v3.
There a solution was shared (by eplightning) to get the accelerometer working properly. https://github.com/mudkipme/awesome-min … 2279282784
I've created several AUR packages to help apply this solution:
1. https://aur.archlinux.org/packages/minisforum-v3-dsdt - for patching the DSDT so that the kernel "recognizes" the accelerometer sensor
2. https://aur.archlinux.org/packages/mini … elerometer - for applying the correct mount matrix to the accelerometer sensor (otherwise the values are incorrect)
3. https://aur.archlinux.org/packages/auto-brightness - a systemd service to automatically adjust brightness based on the ambient light sensorFor #3 there are other, more featured solutions for this as well, such as wluma but I personally prefer the `auto-brightness` service as to how it integrates with my `tuned` profiles, and how I can explicitly limit auto brightness range per power profile using the conf files.
Hope this helps you or other Minisforum V3 users stumbling upon this thread.
Wow, great, thank you very much!
Probably due to updates in the meantime, https://aur.archlinux.org/packages/minisforum-v3-dsdt does not build anymore: The sha256sum of "/sys/firmware/acpi/tables/DSDT" aka "dsdt.dat" does not match.
So I manually created dsdt.dat (="c8877b6990d04889d50e22362e7b274cf08d3a6126d85c5403aa2b13e9b7a532") and changed PKGBUILD.
Then building the package worked as expected, changing /etc/mkinitcpio.conf, followed by mkinitcpio -P also seemd good.
But after restarting, I find the following line in the journal:
[..]
Dez 01 17:00:03 xxxx iio-sensor-prox[1185]: Could not find trigger name associated with /sys/devices/platform/AMDI0010:03/i2c-1/i2c-SMO8B30:00/iio:device1
[..]
greping the name:
cat /sys/devices/platform/AMDI0010:03/i2c-1/i2c-SMO8B30:00/iio:device1/name
lsm6ds3tr-c_accel
seems quite good. Since also iio_sensor leads to a meaningful output, I think there is only some small issue missing that prevents the tablet to rotate correctly:
Do you have a hint, what is going wrong?
iio:device0: lsm6ds3tr-c_gyro (buffer capable)
4 channels found:
anglvel_x: (input, index: 0, format: le:S16/16>>0)
3 channel-specific attributes found:
attr 0: raw value: 183
attr 1: scale value: 0.000152716
attr 2: scale_available value: 0.000152716 0.000305432 0.000610865 0.001221729
anglvel_y: (input, index: 1, format: le:S16/16>>0)
3 channel-specific attributes found:
attr 0: raw value: -441
attr 1: scale value: 0.000152716
attr 2: scale_available value: 0.000152716 0.000305432 0.000610865 0.001221729
anglvel_z: (input, index: 2, format: le:S16/16>>0)
3 channel-specific attributes found:
attr 0: raw value: 92
attr 1: scale value: 0.000152716
attr 2: scale_available value: 0.000152716 0.000305432 0.000610865 0.001221729
timestamp: (input, index: 3, format: le:S64/64>>0)
5 device-specific attributes found:
attr 0: current_timestamp_clock value: realtime
attr 1: mount_matrix value: 1, 0, 0; 0, 1, 0; 0, 0, 1
attr 2: sampling_frequency value: 12.500000
attr 3: sampling_frequency_available value: 12.500 26.000 52.000 104.000 208.000 416.000
attr 4: waiting_for_supplier value: 0
2 buffer-specific attributes found:
attr 0: data_available value: 0
attr 1: direction value: in
No trigger on this device
iio:device1: lsm6ds3tr-c_accel (buffer capable)
4 channels found:
accel_x: (input, index: 0, format: le:S16/16>>0)
3 channel-specific attributes found:
attr 0: raw value: -126
attr 1: scale value: 0.000598205
attr 2: scale_available value: 0.000598205 0.001196411 0.002392822 0.004785645
accel_y: (input, index: 1, format: le:S16/16>>0)
3 channel-specific attributes found:
attr 0: raw value: 1564
attr 1: scale value: 0.000598205
attr 2: scale_available value: 0.000598205 0.001196411 0.002392822 0.004785645
accel_z: (input, index: 2, format: le:S16/16>>0)
3 channel-specific attributes found:
attr 0: raw value: 16662
attr 1: scale value: 0.000598205
attr 2: scale_available value: 0.000598205 0.001196411 0.002392822 0.004785645
timestamp: (input, index: 3, format: le:S64/64>>0)
5 device-specific attributes found:
attr 0: current_timestamp_clock value: realtime
attr 1: mount_matrix value: 1, 0, 0; 0, 1, 0; 0, 0, 1
attr 2: sampling_frequency value: 12.500000
attr 3: sampling_frequency_available value: 12.500 26.000 52.000 104.000 208.000 416.000
attr 4: waiting_for_supplier value: 0
2 buffer-specific attributes found:
attr 0: data_available value: 0
attr 1: direction value: in
No trigger on this device
iio:device2: als (buffer capable)
6 channels found:
intensity_both: (input, index: 0, format: le:S32/32>>0)
6 channel-specific attributes found:
attr 0: hysteresis ERROR: Invalid argument (22)
attr 1: hysteresis_relative value: 0.000000
attr 2: offset value: 0
attr 3: raw value: 136
attr 4: sampling_frequency value: 10.000000
attr 5: scale value: 0.100000000
illuminance: (input, index: 1, format: le:S32/32>>0)
6 channel-specific attributes found:
attr 0: hysteresis ERROR: Invalid argument (22)
attr 1: hysteresis_relative value: 0.000000
attr 2: offset value: 0
attr 3: raw value: 136
attr 4: sampling_frequency value: 10.000000
attr 5: scale value: 0.100000000
colortemp: (input, WARN:iio_channel_get_type()=UNKNOWN, index: 2, format: le:S32/32>>0)
6 channel-specific attributes found:
attr 0: hysteresis ERROR: Invalid argument (22)
attr 1: hysteresis_relative value: 0.000000
attr 2: offset value: 0
attr 3: raw value: 0
attr 4: sampling_frequency value: 10.000000
attr 5: scale value: 0.100000000
chromaticity_x: (input, WARN:iio_channel_get_type()=UNKNOWN, index: 3, format: le:S32/32>>0)
6 channel-specific attributes found:
attr 0: hysteresis ERROR: Invalid argument (22)
attr 1: hysteresis_relative value: 0.000000
attr 2: offset value: 0
attr 3: raw value: 0
attr 4: sampling_frequency value: 10.000000
attr 5: scale value: 0.100000000
chromaticity_y: (input, WARN:iio_channel_get_type()=UNKNOWN, index: 4, format: le:S32/32>>0)
6 channel-specific attributes found:
attr 0: hysteresis ERROR: Invalid argument (22)
attr 1: hysteresis_relative value: 0.000000
attr 2: offset value: 0
attr 3: raw value: 0
attr 4: sampling_frequency value: 10.000000
attr 5: scale value: 0.100000000
timestamp: (input, index: 5, format: le:S64/64>>0)
1 device-specific attributes found:
attr 0: current_timestamp_clock value: realtime
2 buffer-specific attributes found:
attr 0: data_available value: 128
attr 1: direction value: in
Current trigger: trigger0(als-dev2)
trigger0: als-dev2
0 channels found:
No trigger on this device
Offline
As far as I can tell your output looks good. What problem are you experiencing?
Can you try out running `monitor-sensor` and rotating your device?
Should be similar to
$ monitor-sensor
Waiting for iio-sensor-proxy to appear
+++ iio-sensor-proxy appeared
=== Has accelerometer (orientation: normal)
=== Has ambient light sensor (value: 0,000000, unit: lux)
=== No proximity sensor
Accelerometer orientation changed: normal
Light changed: 9,300000 (lux)
Light changed: 0,700000 (lux)
Accelerometer orientation changed: right-up
Light changed: 1,200000 (lux)
Light changed: 0,600000 (lux)
Light changed: 0,400000 (lux)
Accelerometer orientation changed: normal
Light changed: 0,600000 (lux)
Light changed: 0,700000 (lux)
If you haven't applied the accelerometer udev rule the mount matrix will be incorrect and it will report inverted orientation.
If the output is similar to the above, the sensor is working and it's just a matter of configuring your DE. I'm using KDE and there you control the setting from Display Configuration (I have `orientation: automatic` and optionally "Only in tablet mode" enabled).
Offline
As far as I can tell your output looks good. What problem are you experiencing?
Can you try out running `monitor-sensor` and rotating your device?
I don't know, why it did not work last time. When I switched the tablet now on, monitor-sensor worked and the button for autorotation appeared in the KDE screen settings. I only had to turn off the option "only in tablet mode".
Then the screen rotated automaticalls as expected.
Thank you very much, Issue is solved now
Offline