2

I have a Lenovo Flex 2 15 and it has a 300° so it can flip into "tent" mode. I would like to know if the screenwould automatically rotate to match it like in windows.

Or if it would be possible let if I can set it somehow?

Apad121
  • 443
  • 2
  • 7
  • 19

2 Answers2

2

I have lenovo to, but i don use the flip mode. At screen options you can also turn your screen, but it also can automaticly, everything can with Linux, but sometimes is difficult to find the best solution. Maybe this can help>> Touchscreen Input Doesn't Rotate: Lenovo Yoga 13 / Yoga 2 Pro

2

After waste my sunday afternoon trying to make iio-sensor-proxy work, I made this little trick:

/opt/auto-rotate:

#!/bin/bash
MODEL="Lenovo Yoga 510"
DEBUG=false # DEBUG=true or DEBUG=false

while true
do

    if [ -f $X_FILE -a -f $Y_FILE -a -f $Z_FILE ];then
        X_AXIS=$(cat $X_FILE)
        Y_AXIS=$(cat $Y_FILE)
        Z_AXIS=$(cat $Z_FILE)
    else
        echo "Modules seems not loaded. To activate:"
        echo "To activate:"
        echo "sudo modprobe iio-hwmon"
        echo "sudo modprobe hid-sensor-iio-common"
        echo "sudo modprobe iio_dummy"
        echo "If not, sorry this is WIP..."
        exit 1
    fi

    $DEBUG && echo "X: $X_AXIS, Y: $Y_AXIS, Z: $Z_AXIS"

    if [ $X_AXIS -gt 80 -a  $X_AXIS -lt 110 ];then
        ORIENTATION="right-up"
    elif [ $X_AXIS -gt 150 -a  $X_AXIS -lt 190 ];then
        ORIENTATION="left-up"
    else
        if [ $Y_AXIS -gt 10 -a  $Y_AXIS -lt 120 ];then
            ORIENTATION="normal"
        else
            ORIENTATION="bottom-up"
        fi

    fi

    case "$ORIENTATION" in
        right-up)
            xrandr --output eDP1 --rotate right && gsettings set com.canonical.Unity.Launcher launcher-position Bottom
        ;;
        left-up)
            xrandr --output eDP1 --rotate left && gsettings set com.canonical.Unity.Launcher launcher-position Bottom
        ;;
        normal)
            xrandr --output eDP1 --rotate normal && gsettings set com.canonical.Unity.Launcher launcher-position Left
        ;;
        bottom-up)
            xrandr --output eDP1 --rotate inverted && gsettings set com.canonical.Unity.Launcher launcher-position Left
        ;;
    esac
    sleep 1
done

To start up at login: How do I start applications automatically on login?