Bug#541235: xserver-xorg-video-ati: Random Lockups when DRI enabled

2009-08-21 Thread Alex Deucher
2009/8/17 Stefano :
> On Thu, 2009-08-13 at 11:01 +0200, Michel Dänzer wrote:
>> Hmm. One thing I notice is that there's almost no EXA offscreen memory,
>> due to your enormous Virtual directive. Normally this should only affect
>> performance, not correctness, but it might be worth trying a smaller
>> maximum desktop size just in case.
>>
>
> Hello,
>
> I tried different configurations for my Virtual screen. Here are the
> logs (hope I've picked the right lines!):
>
> Virtual: 2944x1848 (BIG)
> (II) EXA(0): Offscreen pixmap area of 786432 bytes
>
> VirtuaL: NONE
> (II) EXA(0): Offscreen pixmap area of 11436032 bytes
>
> Virtual: 1920x1848 (VERTICAL)
> (II) EXA(0): Offscreen pixmap area of 12255232 bytes
>
> VirtuaL: 2944x1080 (HORIZONTAL)
> (II) EXA(0): Offscreen pixmap area of 14352384 bytes
>
> I thought that the configuration with most free memory would have been
> the second one (no virtual screen) but surprisingly to me it is not the
> case.
>

By default xrandr 1.2 grabs a square framebuffer so rotation will work
(e.g., 1920x1920).

> Now I'm using the 2944x1080 (HORIZONTAL) Virtual screen with AGPMode 4
> (default) and DRI enabled. The issues I had seem to be gone. However I
> cannot activate Compositing when I use my external screen since X
> consumes almost the 80% of the CPU when I move the windows around the
> screen. If I use my laptop monitor (1024x768) Compositing works quite
> well, although I experienced some lock-ups when I tried to modify the
> options of gnome-do in order to activate the "Docky".
>

Your desktop is larger than the coordinate limits of the texture
engine so it's likely falling back to software.

> Can we consider this bug closed?
>

Yes.

> Can you do anything to prevent users to make the same mistakes I made?

radeon KMS (kernel modesetting) includes a unified memory manager that
will allow you to resize your desktop on the fly without needing to
add the virtual stuff.

Alex



--
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#541235: xserver-xorg-video-ati: Random Lockups when DRI enabled

2009-08-17 Thread Stefano
On Thu, 2009-08-13 at 11:01 +0200, Michel Dänzer wrote:
> Hmm. One thing I notice is that there's almost no EXA offscreen memory,
> due to your enormous Virtual directive. Normally this should only affect
> performance, not correctness, but it might be worth trying a smaller
> maximum desktop size just in case.
> 

Hello,

I tried different configurations for my Virtual screen. Here are the
logs (hope I've picked the right lines!):

Virtual: 2944x1848 (BIG)
(II) EXA(0): Offscreen pixmap area of 786432 bytes

VirtuaL: NONE
(II) EXA(0): Offscreen pixmap area of 11436032 bytes

Virtual: 1920x1848 (VERTICAL)
(II) EXA(0): Offscreen pixmap area of 12255232 bytes

VirtuaL: 2944x1080 (HORIZONTAL)
(II) EXA(0): Offscreen pixmap area of 14352384 bytes

I thought that the configuration with most free memory would have been
the second one (no virtual screen) but surprisingly to me it is not the
case.

Now I'm using the 2944x1080 (HORIZONTAL) Virtual screen with AGPMode 4
(default) and DRI enabled. The issues I had seem to be gone. However I
cannot activate Compositing when I use my external screen since X
consumes almost the 80% of the CPU when I move the windows around the
screen. If I use my laptop monitor (1024x768) Compositing works quite
well, although I experienced some lock-ups when I tried to modify the
options of gnome-do in order to activate the "Docky".

Can we consider this bug closed?

Can you do anything to prevent users to make the same mistakes I made?

Thank you,

Stefano




-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#541235: xserver-xorg-video-ati: Random Lockups when DRI enabled

2009-08-13 Thread Stefano
Hi Michel,

On Thu, 2009-08-13 at 11:01 +0200, Michel Dänzer wrote:
> On Wed, 2009-08-12 at 17:35 -0400, Stefano wrote:
> > 
> > AGPMode 4 was the default mode, thus it does not work
> > I tried AGPMode 2 but with no results,
> > at the time I'm writing this email I'm using AGPMode 1
> 
> Did that work better?

in fact, I did not have any improvement by changing the AGPMode, AGPMode
1 resulted in a system lockup as well.

At this moment I'm using 

Option  "BusType"   "PCI"

and it seems to work. However I've not yet "pushed" the graphics to see
if it really work and I still have some issues with the horizontal lines
displaying on screen (although it seems to me that now this problem is
less noticeable).


> > but still I have the display not behaving correctly (as the attached
> > image in my first email)
> 
> Hmm. One thing I notice is that there's almost no EXA offscreen memory,
> due to your enormous Virtual directive. Normally this should only affect
> performance, not correctness, but it might be worth trying a smaller
> maximum desktop size just in case.

I'm using the enormous Virtual screen you see in my xorg.conf because I
sometimes use a dual screen 1024x768 (laptop) + 1920x1080 (external
monitor). I suspected that this could cause problems but I'm not an
expert in this field and I wanted to test all the options with my
favorite configuration. I can try to reduce the Virtual size and post
the relevant part of the X log.

> At least for me, enabling XAA and XaaNoSolidFillRect seems to get
> decent performance without locking up.
> 
> -Dave

Dave, I'm using EXA because my X log said that the driver worked better
with it instead of XAA, but as I already said, I'm not an expert at
all ;-)
I can try these options as well and then report to Debian Bugs

> Install the xserver-xorg-dev package.
> 'apt-get build-dep xserver-xorg-video-ati' should get you the needed
> packages.
> 
> Cheers,
> Julien

Julien, thank you for the suggestion. Now I can run autogen.sh but the
(new) problem is when I run make. Here is the output:

$ make 
make  all-recursive
make[1]: Entering directory `/usr/src/xf86-video-ati-6.12.2'
Making all in src
make[2]: Entering directory `/usr/src/xf86-video-ati-6.12.2/src'
if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I..
-I./AtomBios/includes  -Wall -I/usr/include/xorg -I/usr/include/pixman-1
-I/usr/include/drm -I/usr/include/X11/dri-DDISABLE_EASF
-DENABLE_ALL_SERVICE_FUNCTIONS -DATOM_BIOS -DATOM_BIOS_PARSER
-DDRIVER_PARSER -g -O2 -MT ati.lo -MD -MP -MF ".deps/ati.Tpo" \
  -c -o ati.lo `test -f 'ati.c' || echo './'`ati.c; \
then mv -f ".deps/ati.Tpo" ".deps/ati.Plo"; \
else rm -f ".deps/ati.Tpo"; exit 1; \
fi
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I..
-I./AtomBios/includes -Wall -I/usr/include/xorg -I/usr/include/pixman-1
-I/usr/include/drm -I/usr/include/X11/dri -DDISABLE_EASF
-DENABLE_ALL_SERVICE_FUNCTIONS -DATOM_BIOS -DATOM_BIOS_PARSER
-DDRIVER_PARSER -g -O2 -MT ati.lo -MD -MP -MF .deps/ati.Tpo -c ati.c
-fPIC -DPIC -o .libs/ati.o
if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I..
-I./AtomBios/includes  -Wall -I/usr/include/xorg -I/usr/include/pixman-1
-I/usr/include/drm -I/usr/include/X11/dri-DDISABLE_EASF
-DENABLE_ALL_SERVICE_FUNCTIONS -DATOM_BIOS -DATOM_BIOS_PARSER
-DDRIVER_PARSER -g -O2 -MT atimodule.lo -MD -MP -MF
".deps/atimodule.Tpo" \
  -c -o atimodule.lo `test -f 'atimodule.c' || echo './'`atimodule.c; \
then mv -f ".deps/atimodule.Tpo" ".deps/atimodule.Plo"; \
else rm -f ".deps/atimodule.Tpo"; exit 1; \
fi
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I..
-I./AtomBios/includes -Wall -I/usr/include/xorg -I/usr/include/pixman-1
-I/usr/include/drm -I/usr/include/X11/dri -DDISABLE_EASF
-DENABLE_ALL_SERVICE_FUNCTIONS -DATOM_BIOS -DATOM_BIOS_PARSER
-DDRIVER_PARSER -g -O2 -MT atimodule.lo -MD -MP -MF .deps/atimodule.Tpo
-c atimodule.c  -fPIC -DPIC -o .libs/atimodule.o
atimodule.c:39: error: ‘PACKAGE_VERSION_MAJOR’ undeclared here (not in a
function)
atimodule.c:39: error: ‘PACKAGE_VERSION_MINOR’ undeclared here (not in a
function)
atimodule.c:39: error: ‘PACKAGE_VERSION_PATCHLEVEL’ undeclared here (not
in a function)
make[2]: *** [atimodule.lo] Error 1
make[2]: Leaving directory `/usr/src/xf86-video-ati-6.12.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/xf86-video-ati-6.12.2'
make: *** [all] Error 2

What do I miss now?

I'll update you about the situation.

Thank you guys,

Stefano




-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#541235: xserver-xorg-video-ati: Random Lockups when DRI enabled

2009-08-13 Thread Michel Dänzer
On Wed, 2009-08-12 at 17:35 -0400, Stefano wrote:
> 
> AGPMode 4 was the default mode, thus it does not work
> I tried AGPMode 2 but with no results,
> at the time I'm writing this email I'm using AGPMode 1

Did that work better?

> but still I have the display not behaving correctly (as the attached
> image in my first email)

Hmm. One thing I notice is that there's almost no EXA offscreen memory,
due to your enormous Virtual directive. Normally this should only affect
performance, not correctness, but it might be worth trying a smaller
maximum desktop size just in case.


-- 
Earthling Michel Dänzer   |http://www.vmware.com
Libre software enthusiast |  Debian, X and DRI developer



--
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#541235: xserver-xorg-video-ati: Random Lockups when DRI enabled

2009-08-13 Thread Michel Dänzer
On Wed, 2009-08-12 at 18:14 -0700, David Rees wrote:
> This bug sounds like a duplicate of these two upstream:
> 
> http://bugs.freedesktop.org/show_bug.cgi?id=20348
> http://bugs.freedesktop.org/show_bug.cgi?id=13176
> 
> At least for me, enabling XAA and XaaNoSolidFillRect seems to get
> decent performance without locking up.

That would make sense if you have an R420 GPU, this is a known erratum
of that core. Stefano has an RV350 though, which isn't affected by this.

Unfortunately there's a virtually unlimited number of problems that can
cause GPU lockups, and people tend to focus too much on the symptoms
(which tend to be similar) rather than the causes / triggers.


-- 
Earthling Michel Dänzer   |http://www.vmware.com
Libre software enthusiast |  Debian, X and DRI developer



--
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#541235: xserver-xorg-video-ati: Random Lockups when DRI enabled

2009-08-12 Thread David Rees
This bug sounds like a duplicate of these two upstream:

http://bugs.freedesktop.org/show_bug.cgi?id=20348
http://bugs.freedesktop.org/show_bug.cgi?id=13176

At least for me, enabling XAA and XaaNoSolidFillRect seems to get
decent performance without locking up.

-Dave



-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#541235: xserver-xorg-video-ati: Random Lockups when DRI enabled

2009-08-12 Thread Julien Cristau
On Wed, Aug 12, 2009 at 17:35:40 -0400, Stefano wrote:

> I also tried to compile the xf86-video-ati-6.12.2 driver but when
> running autogen.sh I have the following error:
> 
> ./configure: line 11076: syntax error near unexpected token `XINERAMA,'
> ./configure: line 11076: `XORG_DRIVER_CHECK_EXT(XINERAMA,
> xineramaproto)'
> 
> and the process quits. Any suggestion?
> 
Install the xserver-xorg-dev package.
'apt-get build-dep xserver-xorg-video-ati' should get you the needed
packages.

Cheers,
Julien



-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#541235: xserver-xorg-video-ati: Random Lockups when DRI enabled

2009-08-12 Thread Stefano
Hi,

AGPMode 8 is not supported by my video card
AGPMode 4 was the default mode, thus it does not work
I tried AGPMode 2 but with no results,
at the time I'm writing this email I'm using AGPMode 1 but still I have
the display not behaving correctly (as the attached image in my first
email) and likely the system will hang up sooner or later.

This is odd, because I've been playing a video game that benefits of DRI
with no problems and when I quit the system locked up in few minutes.

What I can add is that the lockup occurred when I was "playing" with the
windows with Alt+Tab.

I also tried to compile the xf86-video-ati-6.12.2 driver but when
running autogen.sh I have the following error:

./configure: line 11076: syntax error near unexpected token `XINERAMA,'
./configure: line 11076: `XORG_DRIVER_CHECK_EXT(XINERAMA,
xineramaproto)'

and the process quits. Any suggestion?

I will try the option "BusType" "PCI" later, and the xf86-video-ati
driver if I'll be able to compile it.

Thanks,

Stefano

On Wed, 2009-08-12 at 13:44 -0400, Alex Deucher wrote:
> Can you try the xf86-video-ati driver from git master?  Also does
> changing the AGPMode or forcing PCI mode help?
> Option "AGPMode" "X"
> where X = 1 or 2 or 4 or 8
> or
> Option "BusType" "PCI"
> Please try these options separately.
> 
> Alex
-- 
Stefano

 Un geco sul muro
  in paziente attesa
 della prossima falena




-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#541235: xserver-xorg-video-ati: Random Lockups when DRI enabled

2009-08-12 Thread Alex Deucher
On Wed, Aug 12, 2009 at 1:06 PM, Stefano wrote:
> Package: xserver-xorg-video-ati
> Version: 1:6.12.2-3
> Severity: important
>
> *** Please type your report below this line ***
>
> Hello,
>
> I've been hesitating a lot before posting this bug and still am not 100%
> sure if it's worth doing it, but whatever...
>
> Brief description:
>
> I use the "radeon" driver (automatically recognized).
> When I start X with the option DRI enabled - that is by default - the
> system randomly locks (sometimes I can only move the mouse pointer,
> sometimes I can't do anything) and I must shut it down manually using
> the shutdown button of my laptop.
>
> My video card:
> ATI MOBILITY RADEON 9700/64MB

Can you try the xf86-video-ati driver from git master?  Also does
changing the AGPMode or forcing PCI mode help?
Option "AGPMode" "X"
where X = 1 or 2 or 4 or 8
or
Option "BusType" "PCI"
Please try these options separately.

Alex



-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#541235: xserver-xorg-video-ati: Random Lockups when DRI enabled

2009-08-12 Thread Stefano
Package: xserver-xorg-video-ati
Version: 1:6.12.2-3
Severity: important

*** Please type your report below this line ***

Hello,

I've been hesitating a lot before posting this bug and still am not 100%
sure if it's worth doing it, but whatever...

Brief description:

I use the "radeon" driver (automatically recognized).
When I start X with the option DRI enabled - that is by default - the
system randomly locks (sometimes I can only move the mouse pointer,
sometimes I can't do anything) and I must shut it down manually using
the shutdown button of my laptop.

My video card:
ATI MOBILITY RADEON 9700/64MB

Some explanations:

I have had this bug since a long time ago but I read in Brice's blog
that this was an issue due to the 7.3 X.org version.
Since, I've upgraded my system to version 7.4 hoping that the issue
would be fixed. Surprisingly, it seemed that everything worked fine. I
used the direct rendering for a whole day without a problem even in a
dual screen configuration and with compiz.
Unfortunately, the next day the system unexpectedly locked up when gdm
was started. I tried to change my xorg.conf file many times without any
good result and finally I switched back to Option "DRI" "off" (and of
course I removed compiz!).

>From time to time (upon an update of the xserver-xorg packets) I check 
if the issue is fixed but the answer sadly is: no!
When DRI is enables, either the system locks up when gdm starts or it
locks up after a random amount of time while I'm logged in. Moreover,
when DRI is enabled I notice that the video displays horizontal black
lines (see the attached screenshot).

I also tried to upgrade the kernel, but I have the very same issue
either with the 2.6.26 or 2.6.30 kernels.

I have this issue when working with dual monitors in different
configurations (only the external monitor on, "big desktop", "same-as")
but also when I use the laptop monitor and the VGA cable is
disconnected.

I attach the relevant parts of my X log file that I recovered after the
last lock up (external monitor on, laptop monitor off).

I think that this issue is somehow serious (even if I post the bug as
"important") because the radeon driver is automatically loaded by X with
DRI enabled and can lock up the computer of freshly installed systems.

Thank you,

Stefano

-- Package-specific info:
/var/lib/x11/X.roster does not exist.

/var/lib/x11/X.md5sum does not exist.

X server symlink status:
lrwxrwxrwx 1 root root 13 2008-09-06 15:49 /etc/X11/X -> /usr/bin/Xorg
-rwxr-xr-x 1 root root 1689976 2009-08-06 12:55 /usr/bin/Xorg

/var/lib/x11/xorg.conf.roster does not exist.

VGA-compatible devices on PCI bus:
01:00.0 VGA compatible controller: ATI Technologies Inc RV350 [Mobility
Radeon 9600 M10]

/var/lib/x11/xorg.conf.md5sum does not exist.

Xorg X server configuration file status:
-rw-r--r-- 1 root root 3425 2009-08-12 09:53 /etc/X11/xorg.conf

Contents of /etc/X11/xorg.conf:
# /etc/X11/xorg.conf (xorg X Window System server configuration file)

Section "Device"
Identifier  "ATI MOBILITY RADEON 9700/64MB"
Option  "AccelMethod""EXA"
#   Option  "DRI"   "off"
EndSection

Section "Monitor"
Identifier  "Laptop LCD"
Option  "DPMS"  "on"
EndSection

Section "Screen"
Identifier  "Laptop Screen"
Device  "ATI MOBILITY RADEON 9700/64MB"
Monitor "Laptop LCD"
SubSection "Display"
Virtual 2944 1848 #for dual monitors
EndSubSection
EndSection

Section "ServerFlags"
Option  "DontZap"   "off" # kill X with ctrl+alt+backspace
EndSection

Section "Extensions"
Option"Composite" "Enable"
EndSection

Section "ServerLayout"
Identifier  "Default Layout"
EndSection

Relevant contents of Xorg X server log file
/var/log/Xorg.0.log.old:


X.Org X Server 1.6.3
Release Date: 2009-7-31
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.30.4-dsa-ia32 i686 Debian
Current Operating System: Linux pietranera 2.6.30-1-686 #1 SMP Mon Aug 3
16:18:30 UTC 2009 i686
Build Date: 06 August 2009  04:49:57PM
xorg-server 2:1.6.3-1+b1 (bui...@murphy.debian.org) 

(==) Log file: "/var/log/Xorg.0.log"
(==) Using config file: "/etc/X11/xorg.conf"
(==) ServerLayout "Default Layout"
(**) |-->Screen "Laptop Screen" (0)
(**) |   |-->Monitor "Laptop LCD"
(**) |   |-->Device "ATI MOBILITY RADEON 9700/64MB"
(**) |-->Input Device "Synaptics Touchpad"
(**) Option "DontZap" "off"
(==) Automatically adding devices
(==) Automatically enabling devices
(WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
Entry deleted from font path.
(==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/100dpi/:unscaled,
/usr/share/fonts/X11/75dpi/:unscaled,
/usr/share/fonts/X11/Type1,
/usr/share/fonts/X11/100dpi,
/usr/share/fonts/X11/75dpi,
/var/lib/defoma/x-ttcidfont-conf.d/dirs/True