savage_drv fails drawpix glDrawPixels demo/test/benchmark

Bug #579071 reported by Dewey Garrett
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mesa
Fix Released
Medium
linux (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-savage

drawpix opens to a black window with no image
typing b for benchmark seems to work
typing f causes little blots to be scattered on screen (see attachment)

changing to vesa -- drawpix works displaying image in lower left
same laptop booting hardy lts -- drawpix works

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: xserver-xorg-video-savage 1:2.3.1-1ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic i686
Architecture: i386
Date: Tue May 11 18:42:08 2010
DkmsStatus:
 blcr, 0.8.2, 2.6.24-27-generic, i686: built
 blcr, 0.8.2, 2.6.32-22-generic, i686: installed
Lsusb:
 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: IBM 26474U2
PccardctlIdent:
 Socket 0:
   no product info available
 Socket 1:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
 Socket 1:
   3.3V 32-bit PC Card
ProcCmdLine: root=/dev/sda1
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: xserver-xorg-video-savage
dmi.bios.date: 07/06/2004
dmi.bios.vendor: IBM
dmi.bios.version: 1AET62WW (1.18 )
dmi.board.name: 26474U2
dmi.board.vendor: IBM
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: IBM
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnIBM:bvr1AET62WW(1.18):bd07/06/2004:svnIBM:pn26474U2:pvrNotAvailable:rvnIBM:rn26474U2:rvrNotAvailable:cvnIBM:ct10:cvrNotAvailable:
dmi.product.name: 26474U2
dmi.product.version: Not Available
dmi.sys.vendor: IBM
system:
 distro: Ubuntu
 codename: lucid
 architecture: i686
 kernel: 2.6.32-22-generic

Revision history for this message
Dewey Garrett (dgarrett) wrote :
Revision history for this message
Dewey Garrett (dgarrett) wrote :

ubuntu-bug sent wrong Xorg*log, correct log attached

Bryce Harrington (bryce)
Changed in xserver-xorg-video-savage (Ubuntu):
status: New → Confirmed
Revision history for this message
Dewey Garrett (dgarrett) wrote :

Some more tests:

Tested three example video files (.mov, .mp4, .avi) on the t23 laptop with the savage_drv
in ubuntu 10.04 with three applications (totem, vlc, mplayer) and none would display
video correctly (sound worked). Test same laptop using the vesa driver and the three applications worked with each of the three video files.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

I can confirm the same type of corruption when running the antspotlight screensaver on Savage Twister K.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

I have tried to look at this (also using drawpix). I can just say that the bad drawing happens in draw_rgba_pixels(). I also tried to disable fast_draw_rgba_pixels in gdb so that the normal "slow" path is taken, but the same corruption occured.

(gdb) where
#0 fast_draw_rgba_pixels (ctx=<value optimized out>,
    x=<value optimized out>, y=20, width=194, height=188, format=6407,
    type=5121, userUnpack=0x8072380, pixels=0x8198428)
    at swrast/s_drawpix.c:154
#1 0x00791273 in draw_rgba_pixels (ctx=0x8063558, x=<value optimized out>,
    y=20, width=194, height=188, format=6407, type=5121, unpack=0x8072380,
    pixels=0x8198428) at swrast/s_drawpix.c:477
#2 0x0079200a in _swrast_DrawPixels (ctx=0x8063558, x=20, y=20, width=194,
    height=188, format=6407, type=5121, unpack=0x8072380, pixels=0x8198428)
    at swrast/s_drawpix.c:809
#3 0x00698307 in savageDrawPixels (ctx=0x8063558, x=20, y=20, width=194,
    height=188, format=6407, type=5121, packing=0x8072380, pixels=0x8198428)
    at savagespan.c:211
#4 0x006ceef0 in _mesa_DrawPixels (width=194, height=188, format=6407,
    type=5121, pixels=0x8198428) at main/drawpix.c:119
#5 0x0804a401 in Display () at drawpix.c:70
#6 0x00144820 in ?? () from /usr/lib/libglut.so.3
#7 0x00148660 in fgEnumWindows () from /usr/lib/libglut.so.3
#8 0x00144cdb in glutMainLoopEvent () from /usr/lib/libglut.so.3
#9 0x00145605 in glutMainLoop () from /usr/lib/libglut.so.3
#10 0x0804aea8 in main (argc=1, argv=0xbffff494) at drawpix.c:357

affects: xserver-xorg-video-savage (Ubuntu) → mesa (Ubuntu)
Revision history for this message
Tormod Volden (tormodvolden) wrote :

Dewey, I have applied a fix to the maverick mesa packages in https://launchpad.net/~xorg-edgers/+archive/radeon/+packages. Can you please verify it works fine for you also?

Revision history for this message
Dewey Garrett (dgarrett) wrote : Re: [Bug 579071] Re: savage_drv fails drawpix glDrawPixels demo/test/benchmark

Hi,

> Dewey, I have applied a fix to the maverick mesa packages in
> https://launchpad.net/~xorg-edgers/+archive/radeon/+packages. Can you
> please verify it works fine for you also?
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/579071
>
> Title:
> savage_drv fails drawpix glDrawPixels demo/test/benchmark

I tried but failed on dependencies (I'm no expert at this stuff):
 libgl1-mesa-dri depends on libdrm-intel1 (>= 2.4.21); however:
  Version of libdrm-intel1 on system is 2.4.18-1ubuntu3.

If you have a link to a compatible ubuntu-lucid-deb for libdrm-intel1,
I could try again

dewey

-----------------------------------------------------------------
history follows:

# wget https://launchpad.net/~xorg-edgers/+archive/radeon/+build/2137518/+files/libgl1-mesa-glx_7.11.0%7Egit20110108%2Bgallium.90e29afc-0ubuntu0tormod_i386.deb

# wget https://launchpad.net/~xorg-edgers/+archive/radeon/+build/2137518/+files/libgl1-mesa-dri_7.11.0%7Egit20110108%2Bgallium.90e29afc-0ubuntu0tormod_i386.deb

# dpkg -i *.deb

Unpacking replacement libgl1-mesa-glx ...
dpkg: dependency problems prevent configuration of libgl1-mesa-dri:
 libgl1-mesa-dri depends on libdrm-intel1 (>= 2.4.21); however:
  Version of libdrm-intel1 on system is 2.4.18-1ubuntu3.
dpkg: error processing libgl1-mesa-dri (--install):
 dependency problems - leaving unconfigured
Setting up libgl1-mesa-glx (7.11.0~git20110108+gallium.90e29afc-0ubuntu0tormod) ...

Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 libgl1-mesa-dri

so i tried to force:

# dpkg -i --force depends-version *dri*deb

(Reading database ... 277937 files and directories currently installed.)
Preparing to replace libgl1-mesa-dri 7.11.0~git20110108+gallium.90e29afc-0ubuntu0tormod (using libgl1-mesa-dri_7.11.0~git20110108+gallium.90e29afc-0ubuntu0tormod_i386.deb) ...
Unpacking replacement libgl1-mesa-dri ...

dpkg: libgl1-mesa-dri: dependency problems, but configuring anyway as you requested:

 libgl1-mesa-dri depends on libdrm-intel1 (>= 2.4.21); however:
  Version of libdrm-intel1 on system is 2.4.18-1ubuntu3.
Setting up libgl1-mesa-dri (7.11.0~git20110108+gallium.90e29afc-0ubuntu0tormod) ...

(drawpix didn't work)
---------------------------------------------------------------------------------

Revision history for this message
Tormod Volden (tormodvolden) wrote :

I was hoping you had upgraded to Maverick :) I think the old libdrm still should work (for radeon) so you can try force upgrading with dpkg --force-depends, or --ignore-depends=libdrm-intel1 if I am guessing right. Alternatively you can install just the libdrm packages from the main xorg-edgers PPA.

Next time I spin Lucid packages in the radeon PPA I will add the patched savage driver, but that is not often...

Revision history for this message
Tormod Volden (tormodvolden) wrote :

I have a uploaded a Lucid mesa package with the same fix to my PPA: https://edge.launchpad.net/~tormodvolden/+archive/ppa

Revision history for this message
Dewey Garrett (dgarrett) wrote :

 # 110119:18.05 so i got libdrm-intel1 updated and tested with these:

    $ dpkg -l 'libgl1-mesa-dri'
    ii libgl1-mesa-dri 7.11.0~git20110108+gall A free imple...
    ii libgl1-mesa-glx 7.11.0~git20110108+gall A free imple...
    ii libdrm-intel1 2.4.21-1~squeeze3 Userspace in...

same problem, drawpix opens to black window, noimage

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Well, since I uploaded the lucid packages to my PPA (I added maverick also), you could just have installed those instead of the "gallium" and libdrm packages from the radeon PPA.

However I have seen that this fix is not enough, after sleep/resume the back buffer is wrong again. You can switch between front and back buffer with the 'f' key in drawpix. When everything works, they should give the same result, just that drawing to the front buffer may give you some flicker if you for instance keep the picture moving by holding the up or down button.

You mentioned that it worked fine in 8.04, I will try that out also.

Changed in mesa:
status: Unknown → Confirmed
Changed in mesa:
importance: Unknown → Medium
Revision history for this message
Tormod Volden (tormodvolden) wrote :

This got broken in Karmic already, with a kernel drm change in 2.6.30. I will be working on an upstream fix.

Changed in mesa (Ubuntu):
assignee: nobody → Tormod Volden (tormodvolden)
Revision history for this message
Tormod Volden (tormodvolden) wrote :

Can you please test this package? Use it with the standard, unpatched mesa.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

In addition to drawpix, /usr/lib/xscreensaver/antspotlight and /usr/lib/xscreensaver/glblur are good for testing.

Revision history for this message
Dewey Garrett (dgarrett) wrote :

> Can you please test this package? Use it with the standard, unpatched
> mesa.

I couldn't get the deb to install on my t23 with lucid (too many
dependencies) so i installed maverick, and updated all packages:

# uname -a
Linux travel 2.6.35-25-generic #44-Ubuntu SMP Fri Jan 21 17:40:48 UTC 2011 i686 GNU/Linux

then installed the deb:

# dpkg -l 'xserver-xorg-video-savage*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=========================-=========================-==================================================================
ii xserver-xorg-video-savage 1:2.3.2~git20110122.cdfbd X.Org X server -- Savage display driver

drawpix does not work (no image appears) and the problem i originally
saw in an application still exists.

dewey

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Can you please attach the new Xorg.0.log?

Revision history for this message
Dewey Garrett (dgarrett) wrote :

> Can you please attach the new Xorg.0.log?
attached

some system info:
$ uname -a
Linux travel 2.6.35-25-generic #44-Ubuntu SMP Fri Jan 21 17:40:48 UTC 2011 i686 GNU/Linux

$ dpkg -s xserver-xorg-video-savage
Package: xserver-xorg-video-savage
Status: install ok installed
Priority: optional
Section: x11
Installed-Size: 240
Maintainer: Ubuntu Core Developers <email address hidden>
Architecture: i386
Version: 1:2.3.2~git20110122.cdfbd967-0ubuntu0tormod4
Replaces: xserver-xorg (<< 6.8.2-35), xserver-xorg-driver-savage
Provides: xorg-driver-video, xserver-xorg-video-8
Depends: libc6 (>= 2.3.4), xorg-video-abi-8.0, xserver-xorg-core (>= 2:1.8.99.905-1ubuntu3)
Conflicts: xserver-xorg-driver-savage
Description: X.Org X server -- Savage display driver
...

$ dpkg -l *mesa*|grep ^ii
ii libgl1-mesa-dev 7.9~git20100924-0ubuntu2 A free implementation of the OpenGL API -- GLX development files
ii libgl1-mesa-dri 7.9~git20100924-0ubuntu2 A free implementation of the OpenGL API -- DRI modules
ii libgl1-mesa-glx 7.9~git20100924-0ubuntu2 A free implementation of the OpenGL API -- GLX runtime
ii libglu1-mesa 7.9~git20100924-0ubuntu2 The OpenGL utility library (GLU)
ii libglu1-mesa-dev 7.9~git20100924-0ubuntu2 The OpenGL utility library -- development files
ii mesa-common-dev 7.9~git20100924-0ubuntu2 Developer documentation for Mesa

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Thanks. Can you please install the libdrm packages from http://alioth.debian.org/~tormod-guest/libdrm/ and after restarting X attach your /var/log/gdm/\:0.log file? It seems like this was relatively easy to fix on my Twister card, but more difficult on your "Paramont" card.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Also, are you using an xorg.conf file? It seems you are running AGP bus mode in spite of the default being PCI bus.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Scratch that :) I think the savage package I attached uses AGP by default. Please make an /etc/X11/xorg.conf with this:

Section "Device"
  Identifier "mysavage"
  Option "BusType" "PCI"
EndSection

Revision history for this message
Tormod Volden (tormodvolden) wrote :

In comment 15 you said no image appear, but do you see the corruption other places on the screen? If you press 'f' to render to the front buffer, do you see the image? It seems from your log that the front buffer is correctly set up for tiling but the back buffer is not.

Revision history for this message
kurt belgrave (trinikrono) wrote :

I am affected the same
Cheers

Revision history for this message
kurt belgrave (trinikrono) wrote :

installed xserver-xorg-video-savage from
https://launchpad.net/~tormodvolden/+archive/ppa
attaching xorg.

Result: Still see distortion as in screenshot from original reporter

Cheers

Revision history for this message
Dewey Garrett (dgarrett) wrote :
  • :0.log Edit (12.7 KiB, text/plain; charset=us-ascii)
Download full text (4.1 KiB)

> Thanks. Can you please install the libdrm packages from
> http://alioth.debian.org/~tormod-guest/libdrm/ and after restarting X
> attach your /var/log/gdm/\:0.log file? It seems like this was relatively
> easy to fix on my Twister card, but more difficult on your "Paramont"
> card.

I installed these libdrm packages but the savage_drv didn't load
so it is using vesa (i think)

(drawpix works with vesa)

# grep savage_drv :0.log
(II) Loading /usr/lib/xorg/modules/drivers/savage_drv.so
dlopen: /usr/lib/xorg/modules/drivers/savage_drv.so: undefined symbol: RegionEmptyData
(EE) Failed to load /usr/lib/xorg/modules/drivers/savage_drv.so

---------------------------------------------------------------------------
pkg Summary:

$ dpkg -l '*xorg*'|grep ^ii

ii xorg 1:7.5+5ubuntu1 X.Org X Window System
ii xorg-docs-core 1:1.5-1 Core documentation for the X.org X Window Sy
ii xserver-xorg 1:7.5+5ubuntu1 the X.Org X server
ii xserver-xorg-core 2:1.7.6-2ubuntu7.5 Xorg X server - core server
ii xserver-xorg-input-all 1:7.5+5ubuntu1 the X.Org X server -- input driver metapacka
ii xserver-xorg-input-evdev 1:2.3.2-5ubuntu1 X.Org X server -- evdev input driver
ii xserver-xorg-input-mouse 1:1.5.0-1 X.Org X server -- mouse input driver
ii xserver-xorg-input-synaptics 1.2.2-1ubuntu4 Synaptics TouchPad driver for X.Org server
ii xserver-xorg-input-vmmouse 1:12.6.5-4ubuntu2 X.Org X server -- VMMouse input driver to us
ii xserver-xorg-input-wacom 1:0.10.5-0ubuntu4 X.Org X server -- Wacom input driver
ii xserver-xorg-video-dummy 1:0.3.2-1 X.Org X server -- dummy display driver
ii xserver-xorg-video-fbdev 1:0.4.1-1ubuntu1 X.Org X server -- fbdev display driver
ii xserver-xorg-video-intel 2:2.9.1-3ubuntu5 X.Org X server -- Intel i8xx, i9xx display d
ii xserver-xorg-video-openchrome 1:0.2.904+svn827-1 X.Org X server -- VIA display driver
ii xserver-xorg-video-savage 1:2.3.2~git20110122.cdfbd967-0ubuntu0tormod4 X.Org X server -- Savage display driver
ii xserver-xorg-video-vesa 1:2.3.0-1ubuntu1 X.Org X server -- VESA display driver
ii xserver-xorg-video-via 1:0.2.904+svn827-1 X.Org X server -- VIA display driver (dummy
ii xserver-xorg-video-vmware 1:10.16.9-1 X.Org X server -- VMware display driver

$ dpkg -l 'libdrm*'|grep ^ii
ii libdrm-dev 2.4.18-1ubuntu3 Userspace interface to kernel DRM services -- development files
ii libdrm-intel1 2.4.21-1ubuntu2.1debug Userspace interface to intel-specific kernel DRM services -- ru
ii libdrm-nouveau1 2.4.21-1ubuntu2.1debug Userspace interface to nouveau-specific kernel DRM services --
ii libdrm-radeon1 2.4.21-1ubuntu2.1debug Userspace interface to radeon-specific kernel DRM services -- r
ii libdrm2 2.4.21-1ubuntu2.1debug Userspace interface to kernel DRM services -- runtime

-----------------------------------------------------------------------------
> Also, are you using an xorg.conf file? It seems you are running AGP bus
> mode in spite of the ...

Read more...

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Thanks Dewey. But are you not on maverick, as per comment 15? The libdrm packages are for maverick, although they may work fine in lucid as well. I think the RegionEmptyData error indicates that the X server is too old for the driver, which will also be the case if you are running the maverick -savage on the lucid X server.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

I think I have a decent patch going upstream soon: https://patchwork.kernel.org/patch/830832/

Dewey, can you please test this kernel http://alioth.debian.org/~tormod-guest/linux-image-2.6.39-3-generic_2.6.39-3.10tormod_i386.deb together with standard packages of all the rest? The kernel should work in anything from Lucid to Oneiric.

Revision history for this message
Dewey Garrett (dgarrett) wrote :

Test of:
http://alioth.debian.org/~tormod-guest/linux-image-2.6.39-3-generic_2.6.39-3.10tormod_i386.deb

Success!

I had to update a number of things since I don't use this
old laptop (ibm t23) much anymor and I had been running vesa
on it.

So for reference, configuration for my testing of this kernel is:

ii xserver-xorg-video-savage 1:2.3.1-1ubuntu1 X.Org X server -- Savage display driver

ii libgl1-mesa-dev 7.7.1-1ubuntu3 A free implementation of the OpenGL API -- GLX development files
ii libgl1-mesa-dri 7.7.1-1ubuntu3 A free implementation of the OpenGL API -- DRI modules
ii libgl1-mesa-glx 7.7.1-1ubuntu3 A free implementation of the OpenGL API -- GLX runtime
ii libglu1-mesa 7.7.1-1ubuntu3 The OpenGL utility library (GLU)
ii libglu1-mesa-dev 7.7.1-1ubuntu3 The OpenGL utility library -- development files
ii libosmesa6 7.7.1-1ubuntu3 Mesa Off-screen rendering extension
ii mesa-common-dev 7.7.1-1ubuntu3 Developer documentation for Mesa
ii mesa-utils 7.7.1-1ubuntu3 Miscellaneous Mesa GL utilities

ii libdrm-dev 2.4.18-1ubuntu3 Userspace interface to kernel DRM services -- development files
ii libdrm-intel1 2.4.18-1ubuntu3 Userspace interface to intel-specific kernel DRM services -- ru
ii libdrm-nouveau1 2.4.18-1ubuntu3 Userspace interface to nouveau-specific kernel DRM services --
ii libdrm-radeon1 2.4.18-1ubuntu3 Userspace interface to radeon-specific kernel DRM services -- r
ii libdrm2 2.4.18-1ubuntu3 Userspace interface to kernel DRM services -- runtime

$ uname -a
Linux u23 2.6.39-3-generic #10 SMP Mon May 30 13:49:29 CEST 2011 i686 GNU/Linux

excerpt from Xorg.0.log
(II) Loading /usr/lib/xorg/modules/drivers/savage_drv.so
(II) Module savage: vendor="X.Org Foundation"
    compiled for 1.7.2, module version = 2.3.1
    Module class: X.Org Video Driver
    ABI class: X.Org Video Driver, version 6.0

drawpix seems to work
application where i noticed problem (emc2) working correctly

Thanks for fixing -- the problem I noticed and reported seems fixed.

Good work!
dewey

Revision history for this message
Tormod Volden (tormodvolden) wrote :
affects: mesa (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
assignee: Tormod Volden (tormodvolden) → nobody
status: Confirmed → Fix Committed
Changed in mesa:
status: Confirmed → Fix Released
Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.