Results 1 to 4 of 4
After a few weeks of Googling, forum searching, and a little source code reading, I finally decided to post a thread on this fine forum.
My problem concerns Xorg freezing ...
- 05-28-2006 #1
Xorg Unichrome DRI Freezes
After a few weeks of Googling, forum searching, and a little source code reading, I finally decided to post a thread on this fine forum.
My problem concerns Xorg freezing when running OpenGL applications using hardware acceleration, specifically direct rendering.
Current configuration:
Gentoo with Xorg7
Code:# emerge xorg-x11 [ebuild R ] x11-base/xorg-x11-7.0-r1 INPUT_DEVICES="joystick keyboard mouse -acecad -aiptek -calcomp -citron -digitaledge -dmc -dynapro -elo2300 -elographics -evdev -fpit -hyperpen -jamstudio -magellan -magictouch -microtouch -mutouch -palmax -penmount -spaceorb -summa -synaptics -tek4957 -ur98 -vmmouse -void -wacom" VIDEO_CARDS="fbdev vesa vga via -apm -ark -chips -cirrus -cyrix -dummy -fglrx -glint -i128 -i810 -mach64 -mga -neomagic -nv -nvidia -r128 -radeon -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb -tdfx -tga -trident -tseng -v4l -vmware -voodoo" 0 kB
Code:# uname -a Linux my_hostname 2.6.14-hardened-r8 #8 Fri May 26 22:07:20 CDT 2006 x86_64 AMD Athlon(tm) 64 Processor 3000+ GNU/Linux
Originally, I left DRI disabled. The system was stable, but the framerate from glxgears (default dimension, uncovered) averaged 90 FPS; in addition, it consumed 100% of the CPU. I then compiled DRM with Unichrome from the kernel source as modules. Running glxgears resulted in an oops:Code:# lspci -v 00:00.0 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge Subsystem: VIA Technologies, Inc. K8M800 Host Bridge Flags: bus master, 66MHz, medium devsel, latency 8 Memory at e8000000 (32-bit, prefetchable) [size=128M] Capabilities: [80] AGP version 3.0 Capabilities: [50] Power Management version 2 Capabilities: [60] HyperTransport: Slave or Primary Interface Capabilities: [58] HyperTransport: Interrupt Discovery and Configuration 00:00.1 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge Flags: bus master, medium devsel, latency 0 00:00.2 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge Flags: bus master, medium devsel, latency 0 00:00.3 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge Flags: bus master, medium devsel, latency 0 00:00.4 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge Flags: bus master, medium devsel, latency 0 00:00.7 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge Flags: bus master, medium devsel, latency 0 00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI bridge [K8T800/K8T890 South] (prog-if 00 [Normal decode]) Flags: bus master, 66MHz, medium devsel, latency 0 Bus: primary=00, secondary=01, subordinate=01, sec-latency=0 Memory behind bridge: f4000000-f5ffffff Prefetchable memory behind bridge: f0000000-f3ffffff Capabilities: [80] Power Management version 2 00:08.0 Ethernet controller: 3Com Corporation 3c905B 100BaseTX [Cyclone] (rev 24) Subsystem: 3Com Corporation 3C905B Fast Etherlink XL 10/100 Flags: bus master, medium devsel, latency 32, IRQ 20 I/O ports at e200 [size=128] Memory at f6022000 (32-bit, non-prefetchable) [size=128] [virtual] Expansion ROM at 80000000 [disabled] [size=128K] Capabilities: [dc] Power Management version 1 00:0f.0 IDE interface: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller (rev 80) (prog-if 8f [Master SecP SecO PriP PriO]) Subsystem: Biostar Microtech Int'l Corp Unknown device 5300 Flags: bus master, medium devsel, latency 32, IRQ 17 I/O ports at e800 [size=8] I/O ports at e900 [size=4] I/O ports at ea00 [size=8] I/O ports at e000 [size=4] I/O ports at e100 [size=16] I/O ports at d000 [size=256] Capabilities: [c0] Power Management version 2 00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06) (prog-if 8a [Master SecP PriP]) Subsystem: Biostar Microtech Int'l Corp Unknown device 3206 Flags: bus master, medium devsel, latency 32, IRQ 17 I/O ports at e300 [size=16] Capabilities: [c0] Power Management version 2 00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI]) Subsystem: Biostar Microtech Int'l Corp Unknown device 3206 Flags: bus master, medium devsel, latency 32, IRQ 16 I/O ports at e400 [size=32] Capabilities: [80] Power Management version 2 00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI]) Subsystem: Biostar Microtech Int'l Corp Unknown device 3206 Flags: bus master, medium devsel, latency 32, IRQ 16 I/O ports at e500 [size=32] Capabilities: [80] Power Management version 2 00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI]) Subsystem: Biostar Microtech Int'l Corp Unknown device 3206 Flags: bus master, medium devsel, latency 32, IRQ 16 I/O ports at e600 [size=32] Capabilities: [80] Power Management version 2 00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI]) Subsystem: Biostar Microtech Int'l Corp Unknown device 3206 Flags: bus master, medium devsel, latency 32, IRQ 16 I/O ports at e700 [size=32] Capabilities: [80] Power Management version 2 00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86) (prog-if 20 [EHCI]) Subsystem: Biostar Microtech Int'l Corp Unknown device 3206 Flags: bus master, medium devsel, latency 32, IRQ 16 Memory at f6020000 (32-bit, non-prefetchable) [size=256] Capabilities: [80] Power Management version 2 00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [KT600/K8T800/K8T890 South] Subsystem: Biostar Microtech Int'l Corp Unknown device 3206 Flags: bus master, stepping, medium devsel, latency 0 Capabilities: [c0] Power Management version 2 00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60) Subsystem: Biostar Microtech Int'l Corp Unknown device 8212 Flags: medium devsel, IRQ 18 I/O ports at d400 [size=256] Capabilities: [c0] Power Management version 2 00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 78) Subsystem: VIA Technologies, Inc. VT6102 [Rhine II] Embeded Ethernet Controller on VT8235 Flags: bus master, medium devsel, latency 32, IRQ 19 I/O ports at dc00 [size=256] Memory at f6021000 (32-bit, non-prefetchable) [size=256] Capabilities: [40] Power Management version 2 00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration Flags: fast devsel Capabilities: [80] HyperTransport: Host or Secondary Interface 00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map Flags: fast devsel 00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller Flags: fast devsel 00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control Flags: fast devsel 01:00.0 VGA compatible controller: VIA Technologies, Inc. S3 Unichrome Pro VGA Adapter (rev 01) (prog-if 00 [VGA]) Subsystem: Biostar Microtech Int'l Corp Unknown device 1203 Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 5 Memory at f0000000 (32-bit, prefetchable) [size=64M] Memory at f4000000 (32-bit, non-prefetchable) [size=16M] [virtual] Expansion ROM at f5000000 [disabled] [size=64K] Capabilities: [60] Power Management version 2 Capabilities: [70] AGP version 3.0
I removed the drm.ko and via.ko and emerged x11-drm-20051223. Running glxgears averaged 560FPS, 100% CPU. Running a second instance of glxgears (both uncovered) averaged 130FPS, 100% CPU (plus, the gear movement alternated between the two instances). Worse yet, when I bring up a KDE OpenGL screensaver in a preview and run glxgears, Xorg freezes; however, if I have an SSH session already setup on another machine, I can run "top" and see that X is consuming 100% of the CPU. From there, I have to reboot completely; killing X has no effect.Code:May 26 21:46:23 [kernel] Unable to handle kernel paging request at 0000000079604ea8 RIP: May 26 21:46:23 [kernel] <ffffffff8823ae4c>{:via:via_mmFreeMem+12} May 26 21:46:23 [kernel] RIP <ffffffff8823ae4c>{:via:via_mmFreeMem+12} RSP <ffff810077d2be28> May 26 21:46:23 [kernel] <ffffffff8823ae4c>{:via:via_mmFreeMem+12} May 26 21:46:23 [kernel] RIP <ffffffff8823ae4c>{:via:via_mmFreeMem+12} RSP <ffff810077d2baa8>
I've made a few attempts to follow through the following link, but I kept getting "undefined symbol" errors when loading the VIA driver from xf86-video-unichrome.
http://unichrome.sourceforge.net/
After removing "!x86_64" for AGP_VIA in Kconfig and disabling GART_IOMMU, I've tried loading via-agp instead of amd64-agp, but dmesg reported "no agp memory". Consequently, glxgears then averaged 480FPS, 100% CPU, freeze-ups still occurred. I also disabled agpgart only to get the same 480FPS result.
I doubt there are any hardware problems because it is a new machine. Of course it could be defective, but I'd like to leave that thought to the side.
- 05-28-2006 #2
More system info (ran out of characters in the first post):
Code:# cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 44 model name : AMD Athlon(tm) 64 Processor 3000+ stepping : 2 cpu MHz : 1999.841 cache size : 512 KB fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm bogomips : 4009.28 TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts fid vid ttp tm stc
Code:# cat /proc/mtrr reg00: base=0x00000000 ( 0MB), size=1024MB: write-back, count=1 reg01: base=0x40000000 (1024MB), size= 512MB: write-back, count=1 reg02: base=0x60000000 (1536MB), size= 256MB: write-back, count=1 reg03: base=0x70000000 (1792MB), size= 128MB: write-back, count=1 reg04: base=0x78000000 (1920MB), size= 64MB: write-back, count=1 reg05: base=0x7bf00000 (1983MB), size= 1MB: uncachable, count=1 reg06: base=0xe8000000 (3712MB), size= 128MB: write-combining, count=1
Code:# cat /etc/X11/xorg.conf (Comments excluded) Section "Module" Load "dbe" SubSection "extmod" Option "omit xfree86-dga" EndSubSection Load "freetype" Load "glx" Load "dri" EndSection Section "Files" FontPath "/usr/share/fonts/misc" FontPath "/usr/share/fonts/75dpi" FontPath "/usr/share/fonts/100dpi" FontPath "/usr/share/fonts/Type1" EndSection Section "ServerFlags" EndSection Section "InputDevice" Identifier "Keyboard1" Driver "kbd" Option "AutoRepeat" "500 30" Option "XkbRules" "xorg" Option "XkbModel" "pc104" Option "XkbLayout" "us" EndSection Section "InputDevice" Identifier "Mouse1" Driver "mouse" Option "Protocol" "IMPS/2" Option "Device" "/dev/input/mice" Option "Buttons" "5" Option "ZAxisMapping" "4 5" EndSection Section "Monitor" Identifier "CMV CT-934D" HorizSync 31.5 - 82.0 VertRefresh 56-76 EndSection Section "Device" Identifier "Via Unichrome" Driver "via" Option "DisableIRQ" "Yes" Option "EnableAGPDMA" "Yes" EndSection Section "Screen" Identifier "Screen 1" Device "Via Unichrome" Monitor "CMV CT-934D" DefaultDepth 24 Subsection "Display" Depth 8 Modes "1280x1024" "1024x768" "800x600" "640x480" ViewPort 0 0 EndSubsection Subsection "Display" Depth 16 Modes "1280x1024" "1024x768" "800x600" "640x480" ViewPort 0 0 EndSubsection Subsection "Display" Depth 24 Modes "1280x1024" "1024x768" "800x600" "640x480" ViewPort 0 0 EndSubsection EndSection Section "ServerLayout" Identifier "Simple Layout" Screen "Screen 1" InputDevice "Mouse1" "CorePointer" InputDevice "Keyboard1" "CoreKeyboard" EndSection Section "DRI" Mode 0666 EndSection
- 05-28-2006 #3
I thought this might be helpful.
When I was running "top", I noticed that the CPU header information differs whether or not "EnableAGPDMA" is passed to the VIA Xorg driver. In both cases, "top" reports glxgears consuming 100% of the CPU. Without "EnableAGPDMA", 65% of the CPU usage is non-kernel code and 35% is kernel code. With "EnableAGPDMA", it's 10% non-kernel, 90% kernel. If glxgears is covered/minimized in both cases, it's 95% non-kernel.
I take it that using "EnableAGPDMA" tells the VIA Xorg driver to offload to the AGP kernel modules (agpgart and amd64-agp). If that's the case, does that mean that the AGP kernel modules are consuming CPU resources, blocking off other processes? Does "top" consider utilizing the AMD64 on-chip GART feature as "cpu usage"?
Code:# glxinfo -v name of display: :0.0 __driCreateNewScreen_20050727 - succeeded display: :0 screen: 0 direct rendering: Yes server glx vendor string: SGI server glx version string: 1.2 server glx extensions: GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context, GLX_OML_swap_method, GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_hyperpipe, GLX_SGIX_swap_barrier, GLX_SGIX_fbconfig client glx vendor string: SGI client glx version string: 1.4 client glx extensions: GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory, GLX_MESA_swap_control, GLX_MESA_swap_frame_usage, GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group GLX version: 1.2 GLX extensions: GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_swap_control, GLX_MESA_swap_frame_usage, GLX_OML_swap_method, GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig OpenGL vendor string: VIA Technology OpenGL renderer string: Mesa DRI UniChrome (K8M800) 20050526 OpenGL version string: 1.2 Mesa 6.4.2 OpenGL extensions: GL_ARB_imaging, GL_ARB_multisample, GL_ARB_multitexture, GL_ARB_point_parameters, GL_ARB_texture_env_add, GL_ARB_texture_env_combine, GL_ARB_texture_mirrored_repeat, GL_ARB_transpose_matrix, GL_ARB_window_pos, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_clip_volume_hint, GL_EXT_compiled_vertex_array, GL_EXT_convolution, GL_EXT_copy_texture, GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_histogram, GL_EXT_packed_pixels, GL_EXT_point_parameters, GL_EXT_polygon_offset, GL_EXT_rescale_normal, GL_EXT_secondary_color, GL_EXT_separate_specular_color, GL_EXT_stencil_wrap, GL_EXT_subtexture, GL_EXT_texture, GL_EXT_texture3D, GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add, GL_EXT_texture_env_combine, GL_EXT_texture_lod_bias, GL_EXT_texture_object, GL_EXT_vertex_array, GL_APPLE_packed_pixels, GL_IBM_rasterpos_clip, GL_IBM_texture_mirrored_repeat, GL_MESA_window_pos, GL_NV_blend_square, GL_NV_light_max_exponent, GL_NV_texgen_reflection, GL_OES_read_format, GL_SGI_color_matrix, GL_SGI_color_table, GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod glu version: 1.3 glu extensions: GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess Visual ID: 22 depth=24 class=TrueColor bufferSize=32 level=0 renderType=rgba doubleBuffer=1 stereo=0 rgba: redSize=8 greenSize=8 blueSize=8 alphaSize=8 auxBuffers=0 depthSize=24 stencilSize=8 accum: redSize=0 greenSize=0 blueSize=0 alphaSize=0 multiSample=0 multiSampleBuffers=0 visualCaveat=None Opaque. Visual ID: 23 depth=24 class=TrueColor bufferSize=32 level=0 renderType=rgba doubleBuffer=0 stereo=0 rgba: redSize=8 greenSize=8 blueSize=8 alphaSize=8 auxBuffers=0 depthSize=24 stencilSize=8 accum: redSize=0 greenSize=0 blueSize=0 alphaSize=0 multiSample=0 multiSampleBuffers=0 visualCaveat=None Opaque. Visual ID: 24 depth=24 class=TrueColor bufferSize=32 level=0 renderType=rgba doubleBuffer=1 stereo=0 rgba: redSize=8 greenSize=8 blueSize=8 alphaSize=8 auxBuffers=0 depthSize=16 stencilSize=0 accum: redSize=0 greenSize=0 blueSize=0 alphaSize=0 multiSample=0 multiSampleBuffers=0 visualCaveat=None Opaque. Visual ID: 25 depth=24 class=TrueColor bufferSize=32 level=0 renderType=rgba doubleBuffer=0 stereo=0 rgba: redSize=8 greenSize=8 blueSize=8 alphaSize=8 auxBuffers=0 depthSize=16 stencilSize=0 accum: redSize=0 greenSize=0 blueSize=0 alphaSize=0 multiSample=0 multiSampleBuffers=0 visualCaveat=None Opaque. Visual ID: 26 depth=24 class=TrueColor bufferSize=32 level=0 renderType=rgba doubleBuffer=1 stereo=0 rgba: redSize=8 greenSize=8 blueSize=8 alphaSize=8 auxBuffers=0 depthSize=0 stencilSize=0 accum: redSize=0 greenSize=0 blueSize=0 alphaSize=0 multiSample=0 multiSampleBuffers=0 visualCaveat=None Opaque. Visual ID: 27 depth=24 class=TrueColor bufferSize=32 level=0 renderType=rgba doubleBuffer=0 stereo=0 rgba: redSize=8 greenSize=8 blueSize=8 alphaSize=8 auxBuffers=0 depthSize=0 stencilSize=0 accum: redSize=0 greenSize=0 blueSize=0 alphaSize=0 multiSample=0 multiSampleBuffers=0 visualCaveat=None Opaque. Visual ID: 28 depth=24 class=TrueColor bufferSize=32 level=0 renderType=rgba doubleBuffer=1 stereo=0 rgba: redSize=8 greenSize=8 blueSize=8 alphaSize=8 auxBuffers=0 depthSize=24 stencilSize=8 accum: redSize=16 greenSize=16 blueSize=16 alphaSize=16 multiSample=0 multiSampleBuffers=0 visualCaveat=Slow Opaque. Visual ID: 29 depth=24 class=TrueColor bufferSize=32 level=0 renderType=rgba doubleBuffer=0 stereo=0 rgba: redSize=8 greenSize=8 blueSize=8 alphaSize=8 auxBuffers=0 depthSize=24 stencilSize=8 accum: redSize=16 greenSize=16 blueSize=16 alphaSize=16 multiSample=0 multiSampleBuffers=0 visualCaveat=Slow Opaque. Visual ID: 2a depth=24 class=TrueColor bufferSize=32 level=0 renderType=rgba doubleBuffer=1 stereo=0 rgba: redSize=8 greenSize=8 blueSize=8 alphaSize=8 auxBuffers=0 depthSize=16 stencilSize=0 accum: redSize=16 greenSize=16 blueSize=16 alphaSize=16 multiSample=0 multiSampleBuffers=0 visualCaveat=Slow Opaque. Visual ID: 2b depth=24 class=TrueColor bufferSize=32 level=0 renderType=rgba doubleBuffer=0 stereo=0 rgba: redSize=8 greenSize=8 blueSize=8 alphaSize=8 auxBuffers=0 depthSize=16 stencilSize=0 accum: redSize=16 greenSize=16 blueSize=16 alphaSize=16 multiSample=0 multiSampleBuffers=0 visualCaveat=Slow Opaque. Visual ID: 2c depth=24 class=TrueColor bufferSize=32 level=0 renderType=rgba doubleBuffer=1 stereo=0 rgba: redSize=8 greenSize=8 blueSize=8 alphaSize=8 auxBuffers=0 depthSize=0 stencilSize=0 accum: redSize=16 greenSize=16 blueSize=16 alphaSize=16 multiSample=0 multiSampleBuffers=0 visualCaveat=Slow Opaque. Visual ID: 2d depth=24 class=TrueColor bufferSize=32 level=0 renderType=rgba doubleBuffer=0 stereo=0 rgba: redSize=8 greenSize=8 blueSize=8 alphaSize=8 auxBuffers=0 depthSize=0 stencilSize=0 accum: redSize=16 greenSize=16 blueSize=16 alphaSize=16 multiSample=0 multiSampleBuffers=0 visualCaveat=Slow Opaque.
- 06-04-2006 #4
Maybe this problem isn't as serious as I thought. It seems that only certain screensavers combined wtih glxgears eats up the CPU, as if they're niced with -20. I can barely switch terminals in order to kill the offending processes.
The software I've tested that freezes my system are:
glxgears + keuphoria.kss (even at a 19 nice level)
xscreensaver/flipscreen3d
xscreensaver/gflux (grab)
Software that works surprisingly well are:
tuxracer
keuphoria.kss times 3
As unstable DRI is, I can see why there is a "Mode" setting under the DRI section in xorg.conf. It wouldn't be good that a normal user can freeze-up the system by running a screensaver.
I also noticed /etc/drirc and ~/.drirc as a way of enabling/disabling hardware acceleration for certain applications using "no_rast = true". Maybe I'll take this approach, denying users write-access to their own ~/.drirc, along with creating a group with DRI privileges.
Thanks for your response. Oh wait! Nobody replied!


Reply With Quote
