我刚刚在联想 Yoga X390 可转换笔记本电脑上安装了 Ubuntu 19.04。自动旋转在 Gnome 桌面中不起作用,但令人惊讶的是,在显示登录提示时,在 GDM 期间运行良好。iio-sensor-proxy 服务似乎没问题,
systemctl status iio-sensor-proxy.service
iio-sensor-proxy.service - IIO Sensor Proxy service
Loaded: loaded (/lib/systemd/system/iio-sensor-proxy.service; static;
vendor
Active: active (running) since Sun 2019-08-25 09:16:17 CEST; 12min ago
Main PID: 1437 (iio-sensor-prox)
Tasks: 3 (limit: 4915)
Memory: 2.0M
CGroup: /system.slice/iio-sensor-proxy.service
└─1437 /usr/sbin/iio-sensor-proxy
sie 25 09:16:17 N317-PC10 systemd[1]: Starting IIO Sensor Proxy service...
sie 25 09:16:17 N317-PC10 systemd[1]: Started IIO Sensor Proxy service.
monitor-sensor 可以很好地识别屏幕旋转:
monitor-sensor
Waiting for iio-sensor-proxy to appear
+++ iio-sensor-proxy appeared
=== Has accelerometer (orientation: normal)
=== No ambient light sensor
Accelerometer orientation changed: right-up
Accelerometer orientation changed: normal
Accelerometer orientation changed: left-up
Accelerometer orientation changed: normal
但是 Gnome 桌面不会旋转。我相信它应该自动完成,但它不起作用。有什么提示吗?当然,我可以编写一个在后台运行的脚本,监控监控传感器并对报告的旋转做出适当的反应,但在我之前的 Yoga S1 上,它开箱即用,无需任何额外设置。
2019.12.4 更新:加速度计似乎没有发送服务更新。我可以通过 ie 手动触发它
cat /sys/bus/iio/devices/iio:device0/in_accel_x_raw
它仍然可以工作,但自从最新更新后就停止了,最终随机失败。