适用于联想 Yoga 的 Ubuntu 平板模式

适用于联想 Yoga 的 Ubuntu 平板模式

我刚刚购买了装有 Windows 10 的联想 Yoga 500。我尝试用 Ubuntu 16.04 替换它,但后来我意识到 Ubuntu 不支持平板电脑模式。

对此有什么可行的解决方案吗?

答案1

注意:这个答案很旧。对于 18.04 来说,这无关紧要。“开箱即用”

我会尽快添加如何获取触摸键盘。但作为冲浪板,这已经很好了。

我刚刚购买了这款((联想 yoga 710 (I7))并且遇到了一些问题,以下是我发现的问题。

更新您的 BIOS(粉丝会很感激的!相信我) 有些可能需要特殊的 BIOS:https://forums.lenovo.com/t5/Lenovo-Yoga-Series-Notebooks/Yoga-900-and-Ideapad-710S-Linux-Only-BIOS/ta-p/3466850

我用的是 2016 年末的普通版(或更新版)

如果您遇到启动问题:

不要禁用 ACPI”

如果您添加内核参数,Linux 将启动:modprobe.blacklist=hid_sensor_hub 如果您不需要陀螺仪,只需将其添加到内核参数中/etc/default/grub"modprobe.blacklist=hid_sensor_hub quiet splash"

或者E在第一个启动菜单上按 进行安装并执行相同操作。退出并启动Ctrl-X

但是,如果你想让陀螺仪工作,你需要做一些额外的工作。我目前正在运行具有此配置的 Ubuntu 16.04(我想它可以独立于你的发行版运行,只需进行一些小修改以适应发行版):

您需要从Ubuntu 主线 您不再需要传递内核参数。增加了几秒钟的启动时间,但有了翻转屏幕,谁会在乎呢

安装内核后你需要可以监控你的传感器的东西

该项目已在 Ubuntu 存储库中:

sudo apt install iio-sensor-proxy inotify-tools

注意:您可能需要让计算机进入睡眠状态,然后再将其唤醒,传感器才能工作。之后,它将继续工作。

然后,如果您运行的是 Gnome 3.18 或更新版本,那么一切就绪了。Gnome 应该会检测到您的倾斜并相应地移动。

如果你正在运行 Unity,则需要添加一个脚本。请按照此处的指南操作,但有一个例外。使用我修改后的脚本作为原版翻转屏幕错误

修改的:

#!/bin/sh
# Auto rotate screen based on device orientation

# Receives input from monitor-sensor (part of iio-sensor-proxy package)
# Screen orientation and launcher location is set based upon accelerometer position
# Launcher will be on the left in a landscape orientation and on the bottom in a portrait orientation
# This script should be added to startup applications for the user

# Clear sensor.log so it doesn't get too long over time
> sensor.log

# Launch monitor-sensor and store the output in a variable that can be parsed by the rest of the script
monitor-sensor >> sensor.log 2>&1 &

# Parse output or monitor sensor to get the new orientation whenever the log file is updated
# Possibles are: normal, bottom-up, right-up, left-up
# Light data will be ignored
while inotifywait -e modify sensor.log; do
# Read the last line that was added to the file and get the orientation
ORIENTATION=$(tail -n 1 sensor.log | grep 'orientation' | grep -oE '[^ ]+$')

# Set the actions to be taken for each possible orientation
case "$ORIENTATION" in
normal)
xrandr --output eDP1 --rotate right && gsettings set com.canonical.Unity.Launcher launcher-position Bottom ;;
bottom-up)
xrandr --output eDP1 --rotate left && gsettings set com.canonical.Unity.Launcher launcher-position Bottom ;;
right-up)
xrandr --output eDP1 --rotate normal && gsettings set com.canonical.Unity.Launcher launcher-position Left ;;
left-up)
xrandr --output eDP1 --rotate inverted && gsettings set com.canonical.Unity.Launcher launcher-position Left ;;
esac
done

答案2

目前,Linux 中没有与平板电脑模式完全等效的模式,除了Ubuntu 平板电脑,您无法安装,只能通过购买平板电脑才能使用。有些发行版确实支持触摸屏功能,但不支持旋转和其他完整的平板电脑功能。请注意,Ubuntu支持触摸屏。查看更多详情这里.Linux Mint 还支持触摸屏。

总之,目前 Linux 在平板电脑兼容性方面存在缺口。希望开源、免费软件能尽快填补这一缺口。

相关内容