Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1585050

Summary: portrait rotation seems to be broken
Product: Red Hat Enterprise Linux 7 Reporter: Tomas Pelka <tpelka>
Component: xorg-x11-serverAssignee: Adam Jackson <ajax>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.6CC: adam.winberg, mboisver, ofourdan
Target Milestone: rc   
Target Release: 7.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-15 07:39:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1738389    
Attachments:
Description Flags
xorg log
none
dmesg.txt
none
another dmesg log none

Description Tomas Pelka 2018-06-01 08:22:48 UTC
Created attachment 1446566 [details]
xorg log

Description of problem:
when I rotate one of mine external monitor to portrait left/right the background turn to black and only I can see is cursor. 

Version-Release number of selected component (if applicable):
xorg-x11-server-Xorg-1.20.0-0.1.el7
kernel-3.10.0-874.el7.rhel76drm.volta.06

How reproducible:
100%

Steps to Reproduce:
1. rotate external monitor 
2.
3.

Actual results:
only mouse cursor is visible on the screen not background no windows etc. Just black screen with cursor.

Expected results:
it should work

Additional info:

Comment 2 Tomas Pelka 2018-06-01 08:24:42 UTC
I would appreciate any kind of advice how to debug.

Comment 3 Olivier Fourdan 2018-06-01 08:28:30 UTC
From attachment 1446566 [details]:

[  8590.904] (II) modeset(0): Allocate new frame buffer 5760x2160 stride
[  8590.977] failed to add rotate fb

Possibly https://bugs.freedesktop.org/show_bug.cgi?id=106715

Comment 4 Tomas Pelka 2018-06-01 08:39:58 UTC
Oh an I forgot to mention

00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 620 [8086:5916] (rev 02)

Comment 5 Olivier Fourdan 2018-06-01 10:01:56 UTC
You may want to capture the kernel drm debug logs at the time the framebuffer allocation fails, that would give some indication as to why it fails, which limit we hit there.

To do so:

 1. Increase the kernel log buffer so we don't fill it up too quickly,
    reboot and add"log_buf_len=1M" to the kernel command line

 2. As root, increase drm debug loglevel to the max (that's overkill but we
    won't miss anything this way...)

   # echo 255 > /sys/module/drm/parameters/debug

 3. Rotate external monitor (what fails)

 4. Post dmesg

    dmesg > dmesg.txt

Hopefully the drm.debug logs will tell why it fails to allocate the framebuffer.

Comment 6 Tomas Pelka 2018-06-05 15:05:16 UTC
Created attachment 1447885 [details]
dmesg.txt

Comment 7 Olivier Fourdan 2018-06-06 12:34:08 UTC
From Xorg.log (attachment 1446566 [details]):

  “Allocate new frame buffer 5760x2160 stride” → drmmode_xf86crtc_resize()
  “failed to add rotate fb” → drmmode_shadow_allocate()

So drmmode_shadow_allocate() calls drmModeAddFB() which translates as drm_mode_addfb() in the kernel, and that call fails (hence the error message)

drm_mode_addfb() → drm_mode_addfb2() → drm_internal_framebuffer_create()
                                    
drm_internal_framebuffer_create() would log with DRM_DEBUG loglevel, in case of error, one of the following messages:

 · “bad framebuffer flags ...”
 · “bad framebuffer width ..., should be >= ... && <= ...”
 · “bad framebuffer height ..., should be >= ... && <= ...”
 · “driver does not support fb modifiers”
 · “could not create framebuffer”

But I don't see any of those in the DRM logs from dmesg (attachment 1447885 [details]) - Are we sure we got the complete drm logs?

(Also, oddly enough, drmmode_shadow_allocate() hasn't changed in xserver 1.20)

Comment 8 Tomas Pelka 2018-06-06 15:26:46 UTC
Created attachment 1448362 [details]
another dmesg log

Generated new dmseg.log with drm.debug=0xe log_buf_len=1M on kernel cmdline and maxed drm verbosity.

Comment 14 adam winberg 2018-08-31 10:14:18 UTC
After update to 7.6 beta I'm also affected by this. 

Dual external monitors, when setting to portrait mode in gnome-control-center the monitor shuts down due to not receiving any video signal (which is different from OP, who still had a visible cursor on screen).

Comment 15 adam winberg 2018-09-24 10:30:52 UTC
In my case this seems to be related to X choosing to wrong driver for my graphics card. Instead of loading 'intel_drv.so' it loaded 'fbdev'. After setting an explicit xorg.conf snippet to instruct X to use the Intel driver, portrait mode works as it should.

Comment 18 RHEL Program Management 2021-02-15 07:39:15 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.