glxinfo crashes X with SiS661GX graphics

Asked by Roman Polach

I want to setup a direct rendering on notebook
with integrated graphics adapter SiS 661 GX with 64MB memory.

when I tried run "glxinfo" it crashes X and restart the gdm session,
"glxinfo 2>log" shows this error message:

  X connection to :0.0 broken (explicit kill or server shutdown).

Also other application crashes I saw could be connected with this problem:
googleearth and some games...

lspci found:
01:00.0 VGA compatible controller: Silicon Integrated Systems [SiS] 661/741/760 PCI/AGP or 662/761Gx PCIE VGA Display Adapter

relevant sections in xorg.conf:
Section "Module"
 Load "i2c"
 Load "bitmap"
 Load "ddc"
 Load "dri"
 Load "extmod"
 Load "freetype"
 Load "glx"
 Load "int10"
 Load "vbe"
EndSection
Section "Device"
 Identifier "Silicon Integrated Systems [SiS] 661/741/760 PCI/AGP or 662/761Gx PCIE VGA Display Adapter"
 Driver "sis"
 BusID "PCI:1:0:0"
EndSection
Section "DRI"
 Mode 0666
EndSection

---
How do I avoid those crashes and setup direct rendering?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Roman Polach
Solved:
Last query:
Last reply:
Revision history for this message
Cesare Tirabassi (norsetto) said :
#1

Anything interesting that shows up in Xorg.0.log or .xsession-errors?
Have you tried with an strace to pinpoint if there is any common syscall which causes the server to crash?

Perhaps it is a memory management problem, it could help adding MaxXFBMem (and maybe AGPsize too) as options (with suitable parameters) to the Driver section.

Revision history for this message
Roman Polach (rpolach) said :
#2

some parts of Xorg.0.log which may be intristing:
---------------------------------

(II) LoadModule: "dri"
(II) Loading /usr/lib/xorg/modules/extensions//libdri.so
(II) Module dri: vendor="X.Org Foundation"
 compiled for 7.2.0, module version = 1.0.0
 ABI class: X.Org Server Extension, version 0.3
(II) Loading extension XFree86-DRI

...

(II) LoadModule: "glx"
(II) Loading /usr/lib/xorg/modules/extensions//libglx.so
(II) Module glx: vendor="X.Org Foundation"
 compiled for 7.2.0, module version = 1.0.0
 ABI class: X.Org Server Extension, version 0.3
(==) AIGLX enabled
(II) Loading extension GLX

...

(==) SIS(0): DRI disabled

(--) SIS(0): DIMM0 is DDR SDRAM
(--) SIS(0): DIMM1 is not installed
(--) SIS(0): DIMM2 is not installed
(--) SIS(0): DRAM type: DDR SDRAM
(--) SIS(0): Memory clock: 332.892 MHz
(--) SIS(0): DRAM bus width: 64 bit
(--) SIS(0): Linear framebuffer at 0xD0000000
(--) SIS(0): MMIO registers at 0xDFEE0000 (size 64K)
(--) SIS(0): VideoRAM: 32768 KB
(II) SIS(0): Using 32192K of framebuffer memory at offset 0K
(--) SIS(0): Hardware supports two video overlays

...

(EE) AIGLX: Screen 0 is not DRI capable

(II) Loading local sub module "GLcore"
(II) LoadModule: "GLcore"
(II) Loading /usr/lib/xorg/modules/extensions//libGLcore.so
(II) Module GLcore: vendor="X.Org Foundation"
 compiled for 7.2.0, module version = 1.0.0
 ABI class: X.Org Server Extension, version 0.3
(II) GLX: Initialized MESA-PROXY GL provider for screen 0

...

ProcXCloseDevice to close or not ?

--------------------------------
especially:
* AIGLX seems not to found DRI capable screen,
* I am not sure if X correctly detect 64KB of gr. memory,
* I do not understand last line..

There is no intristing content in .xsession-errors...

I will try also strace...

Revision history for this message
Roman Polach (rpolach) said :
#3

strace output ends with this:

fstat64(6, {st_mode=S_IFREG|0600, st_size=125, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f8e000
read(6, "\1\0\0\16danca-notebook\0\0010\0\22MIT-MAGIC"..., 4096) = 125
read(6, "", 4096) = 0
close(6) = 0
munmap(0xb7f8e000, 4096) = 0
writev(4, [{"l\0\v\0\0\0\22\0\20\0\0\0", 12}, {"MIT-MAGIC-COOKIE-1", 18}, {"\0\0", 2}, {"T\20\240\0\20\10\200_\343\222o\244\307\231\340f", 16}], 4) = 48
fcntl64(4, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0
read(4, "\1\0\v\0\0\0Q\0", 8) = 8
read(4, "\300*/\4\0\0`\2\377\377\37\0\0\1\0\0\24\0\377\377\1\7\0"..., 324) = 324
write(4, "7\0\5\0\0\0`\2P\0\0\0\10\0\0\0\377\377\377\0b\0\5\0\f\0"..., 64) = 64
read(4, "\1\"\2\0\0\0\0\0\1\203\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 32) = 32
read(4, "\1\10\3\0\250\6\0\0\37\0\0\0\0\0\0\0\240\32\0\0\0\0\0\0"..., 32) = 32
readv(4, [{"*Box.background:\t#efebe7\n*Box.fo"..., 6816}, {"", 0}], 2) = 6816
write(4, "\203\0\1\0", 4) = 4
read(4, "\1\373\4\0\0\0\0\0\377\377?\0\0\0\0\0\0\0\0\0\0\0\0\0\254"..., 32) = 32
writev(4, [{"b\0\5\0\t\0`\2", 8}, {"XKEYBOARD", 9}, {"\0\0\0", 3}], 3) = 20
read(4, "\1\"\5\0\0\0\0\0\1\223o\254\0\20\0\0\0\0\0\0\0\0\0\0\0"..., 32) = 32
write(4, "\223\0\2\0\1\0\0\0", 8) = 8
read(4, "\1\1\6\0\0\0\0\0\1\0\0\0\270\331\226\277g\"\24\10\360\373"..., 32) = 32
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f8e000
write(1, "name of display: :0.0\n", 22) = 22
writev(4, [{"b\0\3\0\3\0\0\0", 8}, {"GLX", 3}, {"\0", 1}], 3) = 12
read(4, "\1\"\7\0\0\0\0\0\1\217M\231\0\20\0\0\0\0\0\0\0\0\0\0\0"..., 32) = 32
write(4, "\217\7\3\0\1\0\0\0\4\0\0\0", 12) = 12
read(4, "\1K\10\0\0\0\0\0\1\0\0\0\2\0\0\0\0c\375\267h\331\226\277"..., 32) = 32
writev(4, [{"b\7\5\0\v\0\0\0", 8}, {"XFree86-DRI", 11}, {"\0", 1}], 3) = 20
read(4, "\1\"\t\0\0\0\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 32) = 32
write(4, "\217\23\3\0\0\0\0\0\2\0\0\0", 12) = 12
read(4, "\1\4\n\0\1\0\0\0\360\377\377\377\4\0\0\0\200\212\307\267"..., 32) = 32
read(4, "1.2\0", 4) = 4
write(4, "\217\23\3\0\0\0\0\0\3\0\0\0", 12) = 12
read(4, "\1\4\v\0C\0\0\0\360\377\377\377\t\1\0\0\200\212\307\267"..., 32) = 32
read(4, "GLX_ARB_multisample GLX_EXT_visu"..., 265) = 265
read(4, "\1\0\0", 3) = 3
write(4, "\217\21\4\0\4\0\1\0\3\0\0\0\0\0\0\0", 16) = 16
read(4, "\1\375\f\0\30\1\0\0\5\0\0\0\34\0\0\0p\346A\10H\331\226"..., 32) = 32
read(4, "\v\200\0\0N\0\0\0\23\200\0\0N\0\0\0\22\200\0\0\1\0\0\0"..., 224) = 224
read(4, "\v\200\0\0\"\0\0\0\23\200\0\0\"\0\0\0\22\200\0\0\1\0\0"..., 224) = 224
read(4, "\v\200\0\0#\0\0\0\23\200\0\0#\0\0\0\22\200\0\0\1\0\0\0"..., 224) = 224
read(4, "\v\200\0\0$\0\0\0\23\200\0\0$\0\0\0\22\200\0\0\1\0\0\0"..., 224) = 224
read(4, "\v\200\0\0%\0\0\0\23\200\0\0%\0\0\0\22\200\0\0\1\0\0\0"..., 224) = 224
futex(0xb7f80144, FUTEX_WAKE, 2147483647) = 0
mmap2(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7c46000
write(4, "\217\24\f\3\1\0\0\0\4\0\0\0\36\f\0\0GL_ARB_depth_tex"..., 3224) = 3224
read(4, 0xbfa0c31c, 32) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN, revents=POLLIN|POLLHUP}], 1, -1) = 1
read(4, "", 32) = 0
write(2, "X connection to :0.0 broken (exp"..., 65) = 65
exit_group(1) = ?

Revision history for this message
Cesare Tirabassi (norsetto) said :
#4

(==) SIS(0): DRI disabled

Is this telling us that the driver refuses to enable dri?
Do you have by any chance any reference that it is indeed possible to have dri on a 315 series chipset?
I'm asking since I unfortunately only find references that it is not supported.

Revision history for this message
Roman Polach (rpolach) said :
#5

It really seems that DRI is not supported SIS 661.
The question is: when DRI is disabled in X.org start, why glxinfo (and other apps) crashed...
Anyway I will try set
  Option "DRI" "off"
in the Device section.

Revision history for this message
Cesare Tirabassi (norsetto) said :
#6

Good question. It is however loading the module:

(II) Loading /usr/lib/xorg/modules/extensions//libdri.so

and setting the mode with:

Section "DRI"
  Mode 0666
EndSection

this perhaps affects some interface/flag.

Revision history for this message
Roman Polach (rpolach) said :
#7

Commenting out whole Section "DRI" or only Mode 006 did not help.
Setting Option "DRI" "off" also did not help.
Commenting out Load "dri" results that glxinfo does not crash any more...
...instead it displays this message:

X Error of failed request: GLXBadContext
  Major opcode of failed request: 143 (GLX)
  Minor opcode of failed request: 5 (X_GLXMakeCurrent)
  Serial number of failed request: 17
  Current serial number in output stream: 17
name of display: :0.0

Revision history for this message
Roman Polach (rpolach) said :
#8

...and googleearth still crash X with these messages in Xorg.0.log:

(EE) DoSwapInterval: cx = 0x842ff58, GLX screen = 0x823b940

Backtrace:
0: /usr/X11R6/bin/X(xf86SigHandler+0x81) [0x80c5d91]
1: [0xffffe420]
2: /usr/lib/xorg/modules/extensions//libglx.so [0xb7bc02da]
3: /usr/lib/xorg/modules/extensions//libglx.so [0xb7bc4acc]
4: /usr/X11R6/bin/X [0x81424ce]
5: /usr/X11R6/bin/X(Dispatch+0x19f) [0x808c61f]
6: /usr/X11R6/bin/X(main+0x495) [0x8074785]
7: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc) [0xb7d36ebc]
8: /usr/X11R6/bin/X(FontFileCompleteXLFD+0x1e1) [0x8073ab1]

Fatal server error:
Caught signal 11. Server aborting

(II) SIS(0): Restoring by setting old mode 0x03

Revision history for this message
Cesare Tirabassi (norsetto) said :
#9

Well, commenting out the loading of the glx module should solve this, but then you won't get ANY 3d at all.

Revision history for this message
Roman Polach (rpolach) said :
#10

Not loading glx is not what I want.. if DRI is not working, it still can use Mesa.
It seems to be a bug in dri or sis driver. Should I report a bug then?

Revision history for this message
Cesare Tirabassi (norsetto) said :
#11

Have you tried installing the sis driver again (I wonder if the glx library was corrupted)?
Or try with the vesa driver first.
If all fails you can try to file a bug of course. Upstream too would be even better.

Revision history for this message
Roman Polach (rpolach) said :
#12

I reistalled xorg sis driver, but it didn't change anything.
When I switched to vesa driver with dri loading disabled, I saw the same error in glxinfo as with sis driver.
I checked Xorg.0.log that vesa driver is really used for sure.
When I used vesa driver and enabled dri load, then I saw a little bit different message in glxinfo output:

name of display: :0.0
X Error of failed request: BadAlloc (insufficient resources for operation)
  Major opcode of failed request: 142 (GLX)
  Minor opcode of failed request: 3 (X_GLXCreateContext)
  Serial number of failed request: 16
  Current serial number in output stream: 17

Revision history for this message
Roman Polach (rpolach) said :
#13

In all cases, googleearth crashes X in the same way.

Revision history for this message
Best Roman Polach (rpolach) said :
#14

I filled bugreport: https://bugs.launchpad.net/ubuntu/+bug/115609
so closing this question.