linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.4k stars 722 forks source link

Auto rotating screen does stretch background image #12150

Open weewoo-meow opened 1 month ago

weewoo-meow commented 1 month ago

Distribution

Mint 21.3

Package version

6.0.4

Graphics hardware in use

Intel HD Graphics 620

Frequency

Always

Bug description

When I rotate the screen fast and multiple times, especially flipping my Yoga X1 from normal landscape to upside-down and in the middle resizing to potrait mode because I was too slow, the background image zooms in. This can be performed multiple times to even zoom it more.

Steps to reproduce

Expected behavior

No zoomed in background image

Additional information

Screenshot from 2024-04-07 08-02-02

weewoo-meow commented 1 month ago

I found a fix for myself, the solution is to prevent any rotation to portrait mode. As Cinnamon does not support this, I scripted my own desktop flip script and deactivated that Cinnamon flips the screen for me (first checkbox at window in screenshot must be true).

#!/bin/bash
monitor-sensor --accel | while IFS= read -r line; do
    if [[ $line == *"Accelerometer orientation changed: normal"* ]]; then
        xrandr -o normal
    fi
    if [[ $line == *"Accelerometer orientation changed: bottom-up"* ]]; then
        xrandr -o inverted
    fi
done

Run this in background and it does the job plus it is way more convenient. This script was written by me and I publish it under the WTFPL.