Bug #693
closedRotation doesn't work with display
50%
Description
Setting display_rotate=1 rotates the screen and X.org but the display only uses about half the screen space.
Setting lcd_display_rotate=1 rotates the screen but not X.org.
xrandr also doesn't seem to work but it's possible it won't work without the VC4 driver loaded. This driver can break some things. There is an alternative driver, vc4-fkms-v3d available that may work better.
Also:- Try rotating the framebuffer console but this probably won't help with X.org.
- Try X.org rotation in xorg.conf, or as described for the DisplayLink
Related issues
Updated by Hammel over 5 years ago
- % Done changed from 0 to 10
xorg.conf can rotate and does fill the screen:
Section "Device" Identifier "Builtin Default fbdev Device 0" Driver "fbturbo" Option "Rotate" "CW" EndSection
But this needs to also have tslib rotated. Doing that requires adding "rot=1" to the linear filter in /etc/ts.conf. However, that didn't seem to work when I tried it. I still get the wrong coordinates passed in. I may need to tell the launcher that we're in rotated mode, or maybe tell the touchProcessor API that we're rotated.
Updated by Hammel over 5 years ago
- Status changed from New to In Progress
- % Done changed from 10 to 30
I found a solution for rotation but it feels a bit like a hack. First, X.org can be rotated by adding the following line to the Devices section for fbturbo.
Option "Rotate" "CCW"
Next, the launcher now has an -r option to enable rotation. If enabled, we swap the x and y coordinates and convert the new X to be the display height - the touch point. This means it only supports CCW rotations. That's the hack. It looks like this.
if ( isCLIFlagSet( CLI_ROTATE) ) { piboxLogger(LOG_INFO, "Rotation is enabled.\n"); posY = region->x; posX = piboxGetDisplayHeight() - region->y; } else { posX = region->x; posY = region->y; }
I didn't get the values I wanted from tslib when I told it to rotate. I still think using tslib's rotation option is the right solution so I'm going to keep working on that for a bit before committing the hack.
Updated by Hammel over 5 years ago
So I played with it a bit more and realized that I not only have to rotate but invert axis configurations, but the latter requires knowing the display size when the config is created. It's not really programmatic or generic (rotation is generic - it doesn't need to know display size). So using tslib configuration isn't really useful.
So for now, even though it's a hack, I'm going with my earlier fix. There's probably a better way to do this, like by adding a config file for libpibox's tslib support that knows to rotate properly. That's something I'll need to do for all apps eventually. For now it just needs to be available for the launcher.
Still need to commit and push.
Updated by Hammel over 5 years ago
- Project changed from Xeon to libpibox
- Target version deleted (
v0.1) - % Done changed from 30 to 50
Committed and pushed.
Keeping it open (and moving to libpibox) till I migrate the solution to libpibox.
Updated by Hammel about 5 years ago
- Project changed from libpibox to Xeon
- Target version deleted (
1.1.0 - Upgrades)
Moving to Xeon since none of the other systems based on PiBox require this feature.
Updated by Hammel over 1 year ago
- Status changed from In Progress to Rejected
Rejecting issue due to migration from custom hardware to PinePhone Pro.