No announcement yet.

AMD Ryzen 5 4500U Benchmarks - Previously Unimaginable Performance For Sub-$600 Laptops

  • Filter
  • Time
  • Show
Clear All
new posts

  • #61
    I have the Ideapad Flex 5 14" and I'm trying to get the accelerometer working. I'm running the recent Mainline kernel 5.11.0-051100rc2-generic via the Ubuntu kernel team. It can see the AMD Sensor Hub. udevadm info --export-db shows the sensor hub, the accelerometer, and its ACCEL_LOCATION and ACCEL_MOUNT_MATRIX updates from my small hwdb update:

    P: /devices/0020:1022:0001.0001
    L: 0
    E: DEVPATH=/devices/0020:1022:0001.0001
    E: SUBSYSTEM=hid
    E: DRIVER=hid-sensor-hub
    E: HID_ID=0020:00001022:00000001
    E: HID_NAME=hid-amdtp 1022:0001
    E: HID_PHYS=
    E: HID_UNIQ=
    E: MODALIAS=hid:b0020g0003v00001022p00000001

    P: /devices/0020:1022:0001.0001/
    L: 0
    E: DEVPATH=/devices/0020:1022:0001.0001/
    E: SUBSYSTEM=platform
    E: DEVTYPE=mfd_device
    E: DRIVER=hid_sensor_accel_3d
    E: MODALIAS=platform:HID-SENSOR-200073
    E: USEC_INITIALIZED=255450936
    E: ID_PATH_TAG=platform-HID-SENSOR-200073_1_auto

    P: /devices/0020:1022:0001.0001/
    N: iio:device0
    L: 0
    E: DEVPATH=/devices/0020:1022:0001.0001/
    E: SUBSYSTEM=iio
    E: DEVNAME=/dev/iio:device0
    E: DEVTYPE=iio_device
    E: MAJOR=510
    E: MINOR=0
    E: USEC_INITIALIZED=255714512
    E: ACCEL_LOCATION=display
    E: ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
    E: IIO_SENSOR_PROXY_TYPE=iio-buffer-accel
    E: SYSTEMD_WANTS=iio-sensor-proxy.service
    E: TAGS=:systemd:

    P: /devices/0020:1022:0001.0001/
    L: 0
    E: DEVPATH=/devices/0020:1022:0001.0001/
    E: SUBSYSTEM=iio
    Here is my /etc/udev/hwdb.d/61-sensor-local.hwdb:

    ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
    The catch is, monitor-sensor still just says:

    +++ iio-sensor-proxy appeared
    === Has accelerometer (orientation: undefined)
    === No ambient light sensor
    But its undefined orientation never changes, and there are no updates from the accelerometer (flipping the laptop, bending the screen, etc, all produce no further output from monitor-sensor). So the display does not change orientation when I flip it around. I have tested xrandr and it can rotate the screen (I added amdgpu.exp_hw_support=1 to the Grub linux boot command line -- it was necessary in an earlier kernel, I don't know if it is needed in this kernel).

    Any suggestions? It would be a shame if after the kernel driver finally got merged in 2.11, the accel and screen flip STILL don't work under Linux.