3D applications and games freeze.

Before saying anything i should note that I’m a beginner with Linux so if anyone replies please don’t be to ‘cryptic’ :).

Ok I’m having this odd problem where 3D application (most noticeable in games though) freeze at random moments for a random amount of time (say 1 - 10 seconds). Even stranger is the fact that this only appears to happen in cases where i need internet access like for example multiplayer games. As i said this isn’t a games only problem, the same thing happens when i turn on compiz fusion or the kde desktop effects.

When i play a single player game of Smokin’ Gunz I don’t have the problem. When i play a multiplayer game of Urban Terror i do have the problem. Yet they both use the Quake 3 engine. Same problem for every 3d game played over the internet I’ve tested so far.

I’m pretty sure it isn’t a hardware issue as i didn’t have the problem in windows or in any other case with openSUSE. When a freeze happens everything stops. No keyboard/mouse response, sound stops, and the screen stops.

Here’s some info:

hyperz@linux-1bys:~> glxinfo
name of display: :0.0       
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_import_context, GLX_EXT_texture_from_pixmap, 
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_OML_swap_method,          
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_visual_select_group     
client glx vendor string: SGI                                                 
client glx version string: 1.4                                                
client glx extensions:                                                        
    GLX_ARB_create_context, 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_NV_swap_group, 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_swap_barrier, GLX_SGIX_swap_group,             
    GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap                 
GLX extensions:                                                               
    GLX_ARB_create_context, 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_NV_swap_group, GLX_OML_swap_method,            
    GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig,              
    GLX_SGIX_swap_barrier, GLX_SGIX_swap_group, GLX_SGIX_visual_select_group  
OpenGL vendor string: ATI Technologies Inc.                                   
OpenGL renderer string: ATI RADEON X850 XT                                    
OpenGL version string: 2.1.8494 Release                                       
OpenGL extensions:                                                            
    GL_AMD_performance_monitor, GL_ARB_depth_texture, GL_ARB_draw_buffers,    
    GL_ARB_fragment_program, GL_ARB_fragment_program_shadow,                  
    GL_ARB_fragment_shader, GL_ARB_framebuffer_object,                        
    GL_ARB_half_float_pixel, GL_ARB_half_float_vertex,                        
    GL_ARB_map_buffer_range, GL_ARB_multisample, GL_ARB_multitexture,         
    GL_ARB_occlusion_query, GL_ARB_pixel_buffer_object,                       
    GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_shader_objects,      
    GL_ARB_shading_language_100, GL_ARB_shadow, GL_ARB_shadow_ambient,        
    GL_ARB_texture_border_clamp, GL_ARB_texture_compression,                  
    GL_ARB_texture_cube_map, GL_ARB_texture_env_add,                          
    GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar,                  
    GL_ARB_texture_env_dot3, GL_ARB_texture_float,                            
    GL_ARB_texture_mirrored_repeat, GL_ARB_texture_non_power_of_two,          
    GL_ARB_texture_rectangle, GL_ARB_transpose_matrix,                        
    GL_ARB_vertex_array_object, GL_ARB_vertex_buffer_object,                  
    GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_ARB_window_pos,           
    GL_ATI_draw_buffers, GL_ATI_envmap_bumpmap, GL_ATI_fragment_shader,       
    GL_ATI_meminfo, GL_ATI_separate_stencil, GL_ATI_texture_compression_3dc,  
    GL_ATI_texture_env_combine3, GL_ATI_texture_float, GL_EXT_abgr,           
    GL_EXT_bgra, GL_EXT_blend_color, GL_EXT_blend_equation_separate,          
    GL_EXT_blend_func_separate, GL_EXT_blend_minmax, GL_EXT_blend_subtract,   
    GL_EXT_compiled_vertex_array, GL_EXT_copy_texture,                        
    GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_framebuffer_blit,    
    GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_object,                
    GL_EXT_gpu_program_parameters, GL_EXT_multi_draw_arrays,                  
    GL_EXT_packed_depth_stencil, GL_EXT_packed_pixels,                        
    GL_EXT_point_parameters, GL_EXT_rescale_normal, GL_EXT_secondary_color,   
    GL_EXT_separate_specular_color, GL_EXT_shadow_funcs, GL_EXT_stencil_wrap, 
    GL_EXT_subtexture, GL_EXT_texgen_reflection, GL_EXT_texture3D,            
    GL_EXT_texture_compression_s3tc, GL_EXT_texture_cube_map,                 
    GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add,                        
    GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3,                      
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_lod_bias,               
    GL_EXT_texture_mirror_clamp, GL_EXT_texture_object,                       
    GL_EXT_texture_rectangle, GL_EXT_texture_sRGB, GL_EXT_vertex_array,       
    GL_KTX_buffer_region, GL_NV_blend_square, GL_NV_conditional_render,       
    GL_NV_texgen_reflection, GL_SGIS_generate_mipmap,                         
    GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_WIN_swap_hint,        
    WGL_EXT_swap_control                                                      
glu version: 1.3                                                              
glu extensions:                                                               
    GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess
hyperz@linux-1bys:~> fglrxinfo
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI RADEON X850 XT
OpenGL version string: 2.1.8494 Release

hyperz@linux-1bys:~> glxgears
47968 frames in 5.0 seconds = 9593.533 FPS
48169 frames in 5.0 seconds = 9633.646 FPS
48452 frames in 5.0 seconds = 9690.395 FPS
48710 frames in 5.0 seconds = 9741.863 FPS
48731 frames in 5.0 seconds = 9746.058 FPS
48655 frames in 5.0 seconds = 9730.915 FPS

hyperz@linux-1bys:~> fgl_glxgears
Using GLX_SGIX_pbuffer
9983 frames in 5.0 seconds = 1996.600 FPS
10493 frames in 5.0 seconds = 2098.600 FPS
10008 frames in 5.0 seconds = 2001.600 FPS
10088 frames in 5.0 seconds = 2017.600 FPS
10512 frames in 5.0 seconds = 2102.400 FPS
10402 frames in 5.0 seconds = 2080.400 FPS


# /.../
# SaX generated X11 config file
# Created on: 2009-05-12T06:31:20+0200.
#
# Version: 8.1
# Contact: Marcus Schaefer <sax@suse.de>, 2005
# Contact: SaX-User list <https://lists.berlios.de/mailman/listinfo/sax-users>
#
# Automatically generated by [SaX2] (8.1)
# PLEASE DO NOT EDIT THIS FILE!
#

Section "ServerLayout"
	Identifier     "Layout[all]"
	Screen      0  "Screen[0]" 0 0
	InputDevice    "Keyboard[0]" "CoreKeyboard"
	InputDevice    "Mouse[1]" "CorePointer"
EndSection

Section "Files"
	InputDevices   "/dev/gpmdata"
	InputDevices   "/dev/input/mice"
	FontPath     "/usr/share/fonts/misc:unscaled"
	FontPath     "/usr/share/fonts/local"
	FontPath     "/usr/share/fonts/75dpi:unscaled"
	FontPath     "/usr/share/fonts/100dpi:unscaled"
	FontPath     "/usr/share/fonts/Type1"
	FontPath     "/usr/share/fonts/URW"
	FontPath     "/usr/share/fonts/Speedo"
	FontPath     "/usr/share/fonts/PEX"
	FontPath     "/usr/share/fonts/cyrillic"
	FontPath     "/usr/share/fonts/latin2/misc:unscaled"
	FontPath     "/usr/share/fonts/latin2/75dpi:unscaled"
	FontPath     "/usr/share/fonts/latin2/100dpi:unscaled"
	FontPath     "/usr/share/fonts/latin2/Type1"
	FontPath     "/usr/share/fonts/latin7/75dpi:unscaled"
	FontPath     "/usr/share/fonts/baekmuk:unscaled"
	FontPath     "/usr/share/fonts/japanese:unscaled"
	FontPath     "/usr/share/fonts/kwintv"
	FontPath     "/usr/share/fonts/truetype"
	FontPath     "/usr/share/fonts/uni:unscaled"
	FontPath     "/usr/share/fonts/CID"
	FontPath     "/usr/share/fonts/ucs/misc:unscaled"
	FontPath     "/usr/share/fonts/ucs/75dpi:unscaled"
	FontPath     "/usr/share/fonts/ucs/100dpi:unscaled"
	FontPath     "/usr/share/fonts/hellas/misc:unscaled"
	FontPath     "/usr/share/fonts/hellas/75dpi:unscaled"
	FontPath     "/usr/share/fonts/hellas/100dpi:unscaled"
	FontPath     "/usr/share/fonts/hellas/Type1"
	FontPath     "/usr/share/fonts/misc/sgi:unscaled"
	FontPath     "/usr/share/fonts/xtest"
	FontPath     "/opt/kde3/share/fonts"
EndSection

Section "Module"
	Load  "dbe"
	Load  "freetype"
	Load  "extmod"
	Load  "glx"
	Load  "dri"
EndSection

Section "ServerFlags"
	Option	    "AIGLX" "on"
	Option	    "AllowMouseOpenFail" "on"
	Option	    "IgnoreABI" "on"
	Option	    "ZapWarning" "on"
EndSection

Section "InputDevice"
	Identifier  "Keyboard[0]"
	Driver      "kbd"
	Option	    "Protocol" "Standard"
	Option	    "XkbLayout" "be"
	Option	    "XkbModel" "microsoftpro"
	Option	    "XkbOptions" "caps:capslock"
	Option	    "XkbRules" "xfree86"
EndSection

Section "InputDevice"
	Identifier  "Mouse[1]"
	Driver      "mouse"
	Option	    "Buttons" "9"
	Option	    "Device" "/dev/input/mice"
	Option	    "Name" "Razer Diamondback 3G"
	Option	    "Protocol" "explorerps/2"
	Option	    "Vendor" "Sysp"
	Option	    "ZAxisMapping" "4 5"
EndSection

Section "Modes"
	Identifier     "Modes[0]"
EndSection

Section "Monitor"
	Identifier   "Monitor[0]"
	VendorName   "SAMSUNG"
	ModelName    "SYNCMASTER 226BW"
	UseModes     "Modes[0]"
	DisplaySize  474	296
	HorizSync    30.0 - 81.0
	VertRefresh  56.0 - 75.0
	Option	    "CalcAlgorithm" "XServerPool"
	Option	    "DPMS"
	Option	    "PreferredMode" "1680x1050"
EndSection

Section "Device"
	Identifier  "Device[0]"
	Driver      "fglrx"
	VendorName  "ATI"
	BoardName   "Radeon X850 XT (R480) (AGP)"
	Option	    "Capabilities" "0x00000000"
	Option	    "VideoOverlay" "on"
	Option	    "OpenGLOverlay" "off"
	Option	    "FSAAEnable" "off"
	Option	    "FSAAScale" "0"
	Option	    "XAANoOffscreenPixmaps" "true"
  #BusID       "PCI:1:0:0"
EndSection

Section "Screen"
	Identifier "Screen[0]"
	Device     "Device[0]"
	Monitor    "Monitor[0]"
	DefaultDepth     24
	SubSection "Display"
		Depth     15
		Modes    "1680x1050"
	EndSubSection
	SubSection "Display"
		Depth     16
		Modes    "1680x1050"
	EndSubSection
	SubSection "Display"
		Depth     24
		Modes    "1680x1050"
	EndSubSection
	SubSection "Display"
		Depth     8
		Modes    "1680x1050"
	EndSubSection
EndSection

Section "DRI"
	Group        "video"
	Mode         0660
EndSection


My system specs are:
Athlon64 3700+ @ 2.45Ghz
2 x 1GB DDR 400 ram
Creative Audigy 2 zs
Sapphire Radeon x850xt 256MB GDDR3 (agp)
Abit kv8-pro motherboard
Asus wl-167g wireless usb network card (rt73 chip)
openSUSE 11.1 with KDE 4.1 (64bit, installed from the live cd)

As far as i know everything is up to date. Hope i included enough info :).

Regards

Sorry for bumping lads, but I found the cause of the problem.
Now I only need a way to fix it.

I ran the Urban Terror game in windowed mode together with the system monitor to see if it was caused by a process.
And indeed it appears to be the case. Here’s a screenshot:

http://www.cubeupload.com/files/b11800ut.png

Every time the game freezes these 2 processes pop up with a cpu usage of ‘disk sleep’ :.
Sometimes the Xorg process and another one called kjournald does this to, again resulting in a freeze.
All the above is the same when i turn on compiz or kde desktop effects or most other games for that matter.

So my questions now are:
What is causing this and why?
How do i resolve this problem?

Any help would be greatly appreciated :)!

  • Regards

Do you have an external disk connected? Try without. I’ve seen this while hal was trying to talk to an external USB disk.

No I have 2 internal IDE disks that’s all.
I have 2 devices on USB ports; my wifi card and my mouse.
However one of my harddrives is very old, like from the Pentium 1 era (1GB).
But I never had any problems with it in Windows.
Could it be the fact that the old hard drive (fat32) is mounted or something?

Edit, and then again these problems only happen on some (well, most) 3d apps.

Another update. I googled a bit for ‘disk sleep’ etc but found only things related to external hard drives etc as Knurpht said.
I did try the following which should fix that (even though i have no external drivers):

hyperz@linux-1bys:~> su
Password:
linux-1bys:/home/hyperz # hdparm -S 0 /dev/sda

/dev/sda:
 setting standby to 0 (off)
linux-1bys:/home/hyperz # hdparm -S 0 /dev/sdb

/dev/sdb:
 setting standby to 0 (off)

Didn’t work :’(. This is really an anoying problem.
I’ve had it ever since i started using openSUSE and i really would hate to have to go back to that other OS just because of this.
So if anyone else has any idea’s I’d be more then glad to hear them.

I finally managed to fix the problem.
In case other people should have this issue in the future here’s what I did to fix it:

Yast -> System -> Kernel Settings.
Go to the Kernel Settings tab.
For Global I/O Scheduler choose Deadline.
Click Ok.
Solved (in my case).