Automatic screen rotation is 90 degrees wrong

Hi, I’ve been having this weird problem since updating to plasma 6.

I have a Lenovo IdeaPad D330-10IGM, basically is a small laptop with a detachable screen.

When the screen is docked, rotation is fine (landscape, in settings is shown as a greyed out 90° counter clockwise, maybe this is relevant), but when I detach the screen, it gets rotated 90 degrees and stays with that offset even when autorotating.

Has anyone experienced this? I don’t know if it’s device specific, that’s why I’m posting here and not filing a bug.

I’m on Plasma 6.0.4, Arch. I’ve also tried Fedora 40 and the issue is still there.

Any help will be appreciated, thank you

Hi! I’m having the same issue with my Pinetab2 using plasma 6. It worked fine under plasma 5.

I am also using arch linux.

Hey, same for me, I also have the Lenovo D330-10IGM. Unfortunately I have no solution, but I tried some things that could help finding one: It worked correctly with the gnome desktop, because there is a hwdb-entry:

sensor:modalias:acpi:BOSC0200*:dmi:*:svnLENOVO:*:pvrLenovoideapadD330-10IGM:*
 ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1

But that seems to have no effect in plasma 6, as well as in plasma mobile 6. When trying it with X11, screen rotation is 90 degrees wrong in the opposite direction and auto rotation does not work at all.

For the time being, I disabled auto rotation and set it manually to 90 degrees rotated. That locks the screen rotation, but at least it is correct.