Bug 675453

Summary: radeon [HD 3200] Xorg crashes on screen rotation due to undefined symbol: exaMoveInPixmap (Gnome Live CD)
Product: [openSUSE] openSUSE 11.4 Reporter: Ryan May <ryan>
Component: X.OrgAssignee: Stefan Dirsch <sndirsch>
Status: RESOLVED FIXED QA Contact: E-mail List <xorg-maintainer-bugs>
Severity: Major    
Priority: P3 - Medium CC: badshah400, coolo, eich, greg, ms, wstephenson
Version: RC 2   
Target Milestone: ---   
Hardware: x86   
OS: SUSE Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Xorg log
Xorg log for default resolution (1024x768) crash on LVDS
Xorg log for default resolution (1024x768) crash on HDMI-0
GDM Log from /var/log/gdm/:0.log.1
dmesg output from GNOME live CD showing failure

Description Ryan May 2011-02-27 23:52:39 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101206 Firefox/3.6.13

I'm using the Gnome live CD on an HP laptop with Radeon 3200HD integrated graphics.

This is the first distribution I've tried that has recognized my HDMI monitor by default, Ubuntu and Fedora require the Catalyst drivers.

Unfortunately, both my monitor and laptop screen's resolutions were not recognized and defaulted to 1024x768. I was able to use Gnome's Monitor Preferences to properly set the resolutions, but when I tried to rotate my monitor both screens went blank and I was kicked back to GDM. 

I tried using xrandr from the terminal, but any commands to either display resulted in an error stating that the display was inaccessible.

Reproducible: Always

Steps to Reproduce:
1. Open Gnome Monitor Preferences
2. Select a different orientation from Rotation drop-down
3. Click apply
Actual Results:  
The screens go blank and I am returned to GDM.

Expected Results:  
The selected screen's content should be rotated to reflect the new orientation.
Comment 1 Stefan Dirsch 2011-02-28 03:34:10 UTC
Could you attach /var/log/Xorg.0.log.old right after the Xserver crash? What are the error messages exactly when using xrandr for rotation?
Comment 2 Ryan May 2011-02-28 03:52:59 UTC
Created attachment 416443 [details]
Xorg log

Here is the log file.

I was using the wrong flag with xrandr (-display instead of --output), but the corrected command results in the same crash and return to GDM as using Monitor Preferences.
Comment 3 Stefan Dirsch 2011-02-28 04:05:10 UTC
Hmm. I don't see any Xserver crash in the logfile. Maybe only the Xsession terminates. You can verify that by starting a failsafe Xsession in gdm and run there the xrandr commands manually.
Comment 4 Ryan May 2011-02-28 04:44:38 UTC
How do I start a failsafe Xsession? There are no options on the GDM login for selecting the session type.
Comment 5 Stefan Dirsch 2011-02-28 07:34:31 UTC
(In reply to comment #4)
> How do I start a failsafe Xsession? There are no options on the GDM login for
> selecting the session type.

Sounds bad. Probably a limitation of the LiveCD. It's always the same. Once there
are issues a LiveCD becomes uselss, since you can't investigate anything. :-(
Comment 6 Stefan Dirsch 2011-02-28 11:23:32 UTC
> (II) RADEON(0): Allocate new frame buffer 3360x1080 stride 3392
> (II) RADEON(0): VRAM usage limit set to 215528K

That one sounds suspicious to me. What exactly are you trying? I mean what's the output of 'xrandr' before rotating and what is/are the xrandr command(s) for rotating?
Comment 7 Ryan May 2011-02-28 15:48:19 UTC
This is the xrandr output immediately after boot:

linux@linux:~> xrandr
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
VGA-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080      60.0 +   60.0  
   1680x1050      60.0  
   1600x900       60.0  
   1280x1024      75.0     60.0  
   1280x960       60.0  
   1280x800       59.8  
   1152x864       75.0  
   1280x720       60.0  
   1024x768       75.1     60.0* 
   1024x576       60.0  
   832x624        74.6  
   800x600        75.0     60.3  
   640x480        75.0     60.0  
   720x400        70.1  
LVDS connected 1024x768+0+0 (normal left inverted right x axis y axis) 367mm x 230mm
   1440x900       60.0 +
   1280x854       59.9  
   1280x800       59.8  
   1280x720       59.9  
   1152x768       59.8  
   1024x768       59.9* 
   800x600        59.9  
   848x480        59.7  
   720x480        59.7  
   640x480        59.4  

I then use this command to set the position of my monitor:

linux@linux:~> xrandr --output HDMI-0 --left-of LVDS
linux@linux:~> xrandr
Screen 0: minimum 320 x 200, current 2048 x 768, maximum 8192 x 8192
VGA-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080      60.0 +   60.0  
   1680x1050      60.0  
   1600x900       60.0  
   1280x1024      75.0     60.0  
   1280x960       60.0  
   1280x800       59.8  
   1152x864       75.0  
   1280x720       60.0  
   1024x768       75.1     60.0* 
   1024x576       60.0  
   832x624        74.6  
   800x600        75.0     60.3  
   640x480        75.0     60.0  
   720x400        70.1  
LVDS connected 1024x768+1024+0 (normal left inverted right x axis y axis) 367mm x 230mm
   1440x900       60.0 +
   1280x854       59.9  
   1280x800       59.8  
   1280x720       59.9  
   1152x768       59.8  
   1024x768       59.9* 
   800x600        59.9  
   848x480        59.7  
   720x480        59.7  
   640x480        59.4  


Then these to set the resolution of each output:

linux@linux:~> xrandr --output HDMI-0 --mode 1920x1080
linux@linux:~> xrandr --output LVDS --mode 1440x900
linux@linux:~> xrandr
Screen 0: minimum 320 x 200, current 2464 x 1080, maximum 8192 x 8192
VGA-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080      60.0*+   60.0  
   1680x1050      60.0  
   1600x900       60.0  
   1280x1024      75.0     60.0  
   1280x960       60.0  
   1280x800       59.8  
   1152x864       75.0  
   1280x720       60.0  
   1024x768       75.1     60.0  
   1024x576       60.0  
   832x624        74.6  
   800x600        75.0     60.3  
   640x480        75.0     60.0  
   720x400        70.1  
LVDS connected 1440x900+1024+0 (normal left inverted right x axis y axis) 367mm x 230mm
   1440x900       60.0*+
   1280x854       59.9  
   1280x800       59.8  
   1280x720       59.9  
   1152x768       59.8  
   1024x768       59.9  
   800x600        59.9  
   848x480        59.7  
   720x480        59.7  
   640x480        59.4  

This sets the correct resolution, but leaves the screens partially overlapped:

linux@linux:~> xrandr --output LVDS --pos 1920x0
linux@linux:~> xrandr
Screen 0: minimum 320 x 200, current 3360 x 1080, maximum 8192 x 8192
VGA-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080      60.0*+   60.0  
   1680x1050      60.0  
   1600x900       60.0  
   1280x1024      75.0     60.0  
   1280x960       60.0  
   1280x800       59.8  
   1152x864       75.0  
   1280x720       60.0  
   1024x768       75.1     60.0  
   1024x576       60.0  
   832x624        74.6  
   800x600        75.0     60.3  
   640x480        75.0     60.0  
   720x400        70.1  
LVDS connected 1440x900+1920+0 (normal left inverted right x axis y axis) 367mm x 230mm
   1440x900       60.0*+
   1280x854       59.9  
   1280x800       59.8  
   1280x720       59.9  
   1152x768       59.8  
   1024x768       59.9  
   800x600        59.9  
   848x480        59.7  
   720x480        59.7  
   640x480        59.4  

Both screens are now properly configured except for the rotation:

linux@linux:~> xrandr --output HDMI-0 --rotate left

Which is the command that causes the crash.
Comment 8 Stefan Dirsch 2011-02-28 16:59:06 UTC
Ok. So you're left-rotating the left-handed monitor of a side-by-side dualhead configuration (left: 1920x1080+0+0, right: 1440x900+1902+0)
Comment 9 Ryan May 2011-02-28 17:06:35 UTC
(In reply to comment #8)
> Ok. So you're left-rotating the left-handed monitor of a side-by-side dualhead
> configuration (left: 1920x1080+0+0, right: 1440x900+1902+0)

Yes, but any rotation (left, right or upside-down) on either output causes the crash.
Comment 10 Stefan Dirsch 2011-02-28 17:09:54 UTC
Ok. I'm afraid the driver can't access enough memory for your setup. 3360*1920 is just not enough. Maybe it does work if you move the right monitor to +1080+0
position before, so a much smaller framebuffer is required.

  xrandr --output HDMI-0 --mode 1920x1080
  xrandr --output LVDS --mode 1440x900
  xrandr --output LVDS --pos 1080x0
  xrandr --output HDMI-0 --rotate left

Let me know, whether that helps.
Comment 11 Ryan May 2011-02-28 23:59:06 UTC
This still results in a crash.

In fact, any rotation command at either native or default (1024x768) resolution causes a crash.
Comment 12 Ryan May 2011-03-01 00:00:09 UTC
(In reply to comment #11)
> This still results in a crash.
> 
> In fact, any rotation command at either native or default (1024x768) resolution
> causes a crash.

I should clarify, by any rotation command I mean left, right or inverted on either HDMI-0 or LVDS.
Comment 13 Ryan May 2011-03-01 00:02:47 UTC
Created attachment 416661 [details]
Xorg log for default resolution (1024x768) crash on LVDS

Here is the Xorg log from my attempt to rotate the LVDS output left at 1024x768.
Comment 14 Ryan May 2011-03-01 00:05:57 UTC
Created attachment 416662 [details]
Xorg log for default resolution (1024x768) crash on HDMI-0

Here is the Xorg log from my attempt to rotate the HDMI-0 output left at 1024x768. The first command run after login was:

linux@linux:~> xrandr --output HDMI-0 --rotate left

This immediately resulted in a crash.
Comment 15 Stefan Dirsch 2011-03-01 06:16:49 UTC
Ok. Even crashing in single head mode. That can't be framebuffer size related. What worries me is that we still don't see a crash here. Could you attach /var/log/gdm.log? I hope gdm writes such a logfile.
Comment 16 Ryan May 2011-03-01 16:52:19 UTC
Created attachment 416844 [details]
GDM Log from /var/log/gdm/:0.log.1

Here is the file I think you want. The other option are :0-slave.log and :0.greeter.log.
Comment 17 Stefan Dirsch 2011-03-01 16:59:47 UTC
> /usr/bin/Xorg: symbol lookup error: /usr/lib/xorg/modules/driver/radeon_drv.so: 
> undefined symbol: exaMoveInPixmap

OMFG ! Matthias, Egbert, could you have a look into this one?
Comment 18 Greg Smith 2011-03-11 23:26:00 UTC
I just reported that the same problem occurs on Debian Squeeze:  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617864

So whatever is missing here sure isn't unique to SUSE.  I'm also on HDMI, not sure yet if this still happens on my video card's other interfaces.
Comment 19 Stefan Dirsch 2011-03-12 00:02:21 UTC
Ok. Seems to be this commit in xf86-video-ati

commit 88304fe9c0ce69012d44a77a5368c35236511dac
Author: Alex Deucher <alexdeucher@gmail.com>
Date:   Mon Feb 28 11:29:19 2011 -0500

    kms: don't rotate if acceleration is not enabled
    
    Signed-off-by: Alex Deucher <alexdeucher@gmail.com>

Makes sense when looking at your logfile.

  (II) RADEON(1): GPU accel disabled or not working, using shadowfb for KMS
Comment 20 Greg Smith 2011-03-12 00:54:28 UTC
That seems to be it.  If you don't have ATI's firmware blob installed, which is probably the case on your live CD, rotation will not work.  But instead of giving a warning that it won't work--which the upstream fix adds--it just crashes with this exaMoveInPixmap error instead.

I was able to resolve this on my Debian system by loading the non-free firmware they provide, so a similar procedure may resolve this under openSUSE.  And if you merge that upstream commit, you'll at least give people a note about the problem rather than the quite mysterious crash that happens right now.
Comment 21 Stefan Dirsch 2011-03-12 02:50:45 UTC
RADEON firmware files are supposed to be included in our LiveCD's initrd, but we might have a bug in creation of initrd, so the required firmware is indeed missing.

To confirm this the output of dmesg or /var/log/messages of a LiveCD would be required here. Ryan (or Greg), could you please attach that?

But that would also mean that the issue is limited to the LiveCD.
Comment 22 Greg Smith 2011-03-12 03:55:53 UTC
Created attachment 418962 [details]
dmesg output from GNOME live CD showing failure
Comment 23 Greg Smith 2011-03-12 04:02:21 UTC
I just grabbed a GNOME LiveCD from your site, booted, and attached the resulting dmesg file.  I confirmed it has the same crash on rotate issue originally reported by Ryan.  The error message it's showing is:

[    6.443252] [drm] Loading RV710 Microcode
[    6.446154] r600_cp: Failed to load firmware "radeon/R700_rlc.bin"
[    6.446159] [drm:rv770_startup] *ERROR* Failed to load firmware!

So it sure looks like some/all of the firmware files are missing from the initrd.  When in the live CD environment, /boot/initrd didn't point to a file I could look at, so I stopped there.

I'm not normally an openSUSE user so I don't expect I'll be able to run further tests.  Chasing after this bug is at least two steps removed from what I'm supposed to be working on here.  Hope this much helps.
Comment 24 Stefan Dirsch 2011-03-12 10:09:24 UTC
Thanks, Greg. That already helped a lot. That's apparently a bug during
creation of initrd for our LiveCD (kernel-firmware package not available).
Comment 30 Stefan Dirsch 2011-03-14 17:48:39 UTC
initrd creation of LiveCD will get fixed for next openSUSE release. I'm going to add the radeon driver patch as well.
Comment 31 Stefan Dirsch 2011-03-17 18:03:12 UTC
(In reply to comment #30)
> initrd creation of LiveCD will get fixed for next openSUSE release. I'm going
> to add the radeon driver patch as well.

Fixed in obs://X11:XOrg/xorg-x11-driver-video and submitrequested for openSUSE:Factory (SR #64445).
Comment 32 Stefan Dirsch 2011-03-18 22:08:45 UTC
*** Bug 675147 has been marked as a duplicate of this bug. ***