Giter Site home page Giter Site logo

kded_rotation's Introduction

kded_rotation

KDED module for handling automatic screen rotation on X11, with visual feedback before orientation change happens. Some assembly might be required.

Installation

Run ./install_kded_rotation.sh and install missing dependencies as needed.

You'll most likely need qt5-qtbase-devel, cmake-utils, extra-cmake-modules, iio-sensor-proxy, xrandr, qt5-qtsensors and kf5-kded-devel. Depending on your distribution, these packages might have different names. CMake will tell you which packages it is missing.

Usage

orientation-helper is where the actual screen rotation happens. This is achieved by calling xrandr --rotation $value, which works in most circumstances. You can adjust orientation-helper to fit your setup and reinstall to apply.

To reduce or increase the timer before the rotation happens, adjust timer.start(25); in screenrotator.cpp:

void ScreenRotator::startProgress() {
	if (progress == -1) {
		timer.start(25);
		progress = 0;
	}
}

kded_rotation's People

Contributors

c-mauderer avatar danielzgtg avatar david-webber avatar dos1 avatar mingcongbai avatar sikreuz avatar skoam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kded_rotation's Issues

Timer works, but nothing else

I'm trying to set this up on a brand new install of Manjaro KDE Plasma on a Lenovo X1 Yoga Gen 4, since this seemed to be the most recommended screen rotator for this laptop. I've gotten it installed and running, however although the timer shows up properly when the rotation is changed, the screen remains in the same position and never turns. I'd appreciate any advice?

screen rotation broken on resume from suspend

Is there a way to make kded_rotation work after suspend? I'm on a Surface Pro 4 running KDE Neon 18.04, Plasma 5.18.0. KDED_Rotation works fine on startup, but breaks on suspend. The only way I have found to get it to work again is to reboot. I need this to work with suspend..

Add Wayland support

So it seems like screen rotation can be done under both X11 and Wayland like so:

kscreen-doctor output.1.rotation.left
kscreen-doctor output.1.rotation.normal

I'm not sure about how one would rotate the input matrix for a touchscreen under Wayland though (although I'm sure there's a way).

touchscreen is not following the orientation change

using manjaro with kde and iio-sensor-proxy installed on a Dell 9365. The screen auto rotates properly but the touchscreen does not get changed accordingly. Touch input is not usable. Is there any configuration missing on my part, or is my laptop unsupported? I had no rotation problems under gnome (neither with the screen not touchscreen)

KDE 6 support?

What it says on the tin, I'm wondering if there's a way to get screen rotation working on KDE6 X11. I know wayland supports these things way better, but I'm interested in knowing if it's possible. I know GNOME supports screen rotation under X11.

Setup Rotation orientation

i am using a Chuwi hi 10 Pro and the orientation works partly.
with partly i mean that the screen rotation when i rotate the tablet but the orientation is completly off like when i have the tablet in landscpe the orientation is in portrait and vice versa wher do i find the config to edit the orientations

Feature request for further actions on rotation

It would be nice if this tool could also call an external command on rotation (even different ones per direction) or integrate the following features:

I use this on a 2-1 tablet so when I fold my screen (and rotate) I manually call a script to disable the keyboard and mouse using

xinput float 16
xinput float 11

I also start onboard

When rotating back I close onboard and reattach the input devices.

What would be also very handy is if this rotate script would also automatically change the font subhinting in the right direction

How to disable this in laptop mode?

Do you have an idea how to easily disable and enable the rotation? I tried disabling iio:device0 with tablet-mode, but that doesn't work. If you stop the iio-sensor-proxy, you have to reboot to enable it again.

Rotation goes crazy when open some sites in Chrome

I installed KDE Rotation in a Kubuntu 22.04 in a Lenovo Yoga 510 computer. Everything are running fine, but something very strange happens. When I tried to access the Levono's web site with Google Chrome, the screen turns it self upsidown (LOL). The exacty link is

https://www.lenovo.com/br/pt/d/promocoes/para-empresas

After closing the Chrome tab, the screen turn to the correct position. What I miss here?

May be there is some configuration that I miss or this can be a weird bug.

Thank you by rotation utility!

Issue when switching between 16:9 and 16:10 resolutions

I open an issue here (and close this one in the KDE bugtracker) because I thought it was a Plasma bug, but today I realized that without kded_rotation, everything works just fine. Also, with Wayland I don't have issues.

If I change the resolution from 1920x1200 (16:10) to 1920x1080 (16:9), when I change it back to the 16:10 one, there is a black region on the bottom. It is not just a render issue, because the mouse cannot move to it. It's hard to explain, but I hope you get the idea. Maybe I can add a video if it's not clear.

I realized this by connecting my laptop to an external TV with HDMI, unifying output (then resolution changed automatically to a 16:9), and then removing the HDMI. First thing I noticed, is that laptop didn't revert to its native 16:10 resolution, which is a thing I would expect, but then I saw the main bug that I described above when I tried to select the right resolution manually.

In any case, I can reproduce the main issue without attaching the laptop to an external monitor.

Steps to reproduce

(I guess a laptop with a 16:10 aspect ratio screen is needed)

  1. Go to System Settings -> Display and Monitor -> Display Configuration, select 1920x1980 (16:9) and apply.
  2. Change back to 1920x1200 (16:10) and apply

Observed result

There is a black region on the bottom of the screen that shows nothing. Mouse also cannot pass to that region.

Expected result

Resolution changes successfully.

Rotation is broken

The rotation doesn't work anymore. No idea what caused it. Let me know what info you need!

Rotation is off by 90 degrees on Yoga 11e

Operating System: Kubuntu 19.10
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.12.4
Kernel Version: 5.3.0-40-generic
OS Type: 64-bit

Awesome to see this module existing, however I'm having some issues with it on my Lenovo Yoga 11e. The autorotation kicks in on login as expected, and does rotate the screen, but always rotates it 90 degrees anticlockwise from what is expected. For example, when I am in the traditional laptop configuration, the "bottom" of the KDE screen is the screen's physical right edge. If I physically rotate the screen to match, the KDE screen rotates so that the "bottom" is on the screen's physical top edge, and so on.

If I use /usr/bin/orientation-helper --rotation normal to override the listener, the KDE screen rotates back to a standard laptop configuration, so the orientation helper script is clearly setting the rotation correctly. It seems that the data coming from the rotation sensor does not match what exists - possibly down to the orientation of the sensor?

Looking at the code, this may be a bug in QOrientationSensor but I can't be 100% certain. For now I'll write a little hack into the code myself and recompile, should work around the issue.

Kded stops suspend

If i close the lid and while the notebook around (use the screen upside-down) the suspend doesn't work/stops and notebook stays awake.

OSD display

Hi
I'm on Plasma 5 and I've disabled the timer.start value to 0 so it feels a bit more natural when screen rotating.
My question is: is there a way to disable the OSD notification?
Plasma shows me a OSD notification similar to the one when changing volume or screen brightness.
Is kded_rotation sending that notification or is it the system?

Thanks

Black screen for a second

The black screen duration during the screen orientation change is a bit long.

When I physically rotate my device and let kded_rotation auto-rotate, I see a black screen for ~1 second. This is long in comparison to the ½ second black screen when I change the rotation in KDE system settings.

This is a problem because seeing the black screen for that long is a worse user experience than Android and Windows, which do something about it like showing an animation in the middle.

taskbar widget to lock/force rotation

It would be really handy to have a way to lock the screen rotation and a way to force a specific rotation in the task bar.

When I am working in painting something, sometimes I need to rotate my laptop to a different angle to help me get straight lines, but then the auto rotate wants to kick in and change the orientation.

External screens on startup

If the screen is pluged-in it will start in correct setup (kde) and keded will filp the external screen (primary) and turn of the notebook screen. (looks like restore of old kscreen works)

If i unplug the screen, start the system and plugin in the screen it works.

Problem with plasmoids

I don't know if it is an issue with your script or with plasma, but after a rotation my plasmoid are messied up.

"wrting" screen doesn't follow rotation

I'm using archlinux on surface pro 2017. kded_rotation works well for the display and touchscreen.
but when I use a pen, the handwriting will not follow the the pen, I can touch the right place with my finger, but not with the pen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.