fbdev fails to resume if screen is rotated
Submitted by Michael Tretter
Assigned to Xorg Project Team
Created attachment 136176 0001-fbdev-do-not-update-virtual-size-of-pScrn-when-rotat.patch
I am using the fbdev driver for a rotated display with the following device section:
Option "Rotate" "CCW" EndSection
The screen is properly rotated after a normal boot, but after hibernating and resuming the system, X fails with the following error message:
(EE) FBDEV(0): FBIOPUT_VSCREENINFO: Invalid argument (EE) Fatal server error: (EE) EnterVT failed for screen 0 (EE) (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information. (EE) (EE) Server terminated with error (1). Closing log file.
The error happens during EnterVT() in the fbdevHWSetMode() function, which reads the virtual size from the ScrnInfo, but the fbdev driver updated the virtualX and virtualY after the initial modeset with the X and Y for the rotated screen.
The attached patch removes the update of these fields and switches to temporary variables for width and height as it was done before commit 43236f5b ("Fix shadow framebuffer, and by extension rotation.").
Patch 136176, "0001-fbdev-do-not-update-virtual-size-of-pScrn-when-rotat.patch":