Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
acpi event screen rotation under kde wayland problem
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Screenager
n00b
n00b


Joined: 26 Nov 2023
Posts: 37

PostPosted: Mon Jan 15, 2024 12:49 am    Post subject: acpi event screen rotation under kde wayland problem Reply with quote

Hello,

I want to auto rotate the screen on my convertible thinkpad, the events trigger and KDE even switches to touchmode (bigger icons) by itself. So I wrote a script like on this wiki page, I guess I need to run kscreen-doctor from a root shell context in this script and I can't get it to work: It only works when run as the user that is logged in the desktop.

Code:
su -c "kscreen-doctor output.1.rotation.left" screenager
produces
Code:
Authorization required, but no authorization protocol specified

qt.qpa.xcb: could not connect to display :1
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: minimal, offscreen, wayland-egl, wayland, xcb.

Aborted


trying to run it as root produces an error of missing XDG_RUNTIME_DIR and if I specify it:
Code:
XDG_RUNTIME_DIR="/run/user/1000" kscreen-doctor output.LVDS-1.rotation.left
I only get:
Code:
QStandardPaths: runtime directory '/run/user/1000' is not owned by UID 0, but a directory permissions 0700 owned by UID 1000 GID 1000
kscreen.doctor: setop exec returned KScreen::Config(
KScreen::Output(33, "LVDS-1", connected enabled priority 1, pos: QPoint(0,0), res: QSize(1366, 768), modeId: "35", scale: 1, clone: no, rotation: KScreen::Output::Left, followPreferredMode: false) )

I can only find scripts and workarounds for X.org but nothing for wayland. I am probably only missing one or two extra env vars...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum