Z
Z
zerokana2020-09-07 09:31:41
linux
zerokana, 2020-09-07 09:31:41

How to fix screen orientation issue on Lenovo Ideapad D330-10IGM under Ubuntu 20.04 LTS?

Device: Lenovo Ideapad D330-10IGM
OS: Ubuntu 20.04 LTS (the problem was also present in version 19.10)
Level of familiarity with Linux: two semesters at the VTU

Problem:
When turning on/rebooting the tablet, the screen always takes portrait orientation, even if it was set to landscape before and auto-rotate is off. When auto-rotate in landscape mode is enabled, the screen remains in portrait orientation, and in order to set the landscape orientation, you have to turn the tablet to a vertical position counterclockwise and turn off auto-rotate.

How they tried to solve:
There were no options in the usual settings, so it was decided to try writing a script / task with the commandxrandr -o right

1) This instruction was used - Creating your own autorun script when loading to ... (complicated method not yet tested)
rc.local works and does what is required if you run it manually from the terminal. But it doesn't start automatically. Tested by outputting text to a text file (via echo).

2) Running the script with cron
The following options were used:

# v.1
@reboot xrandr -o right

# v.2
@reboot /home/zerokana/Документы/scripts/rotation.sh
# где rotation.sh – скрипт, выполняющий команду xrandr -o right
# и вывод текста в текстовый файл для проверки

In v.2, in the same folder where the script is located, a correct text file is created when the script is turned on/rebooted, but the screen does not rotate.

Where did such a problem with the screen orientation come from and how to fix it so that you do not rotate the tablet every time before starting work? And why xrandr -o rightdoes it only work when calling a command or script with this command manually?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SOTVM, 2020-09-07
@sotvm

add to ~/.profile file
xrandr -o right

Z
zersh, 2020-09-10
@zersh

1.Maybe rc.local is not enabled
systemctl enable rc-local.service
2. In @reboot
try to add a delay (sleep), for example:

@reboot sleep 3; xrandr -o right

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question