You are not logged in.

#1 2014-06-07 12:33:35

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

nouveau: native linux games "gracefully" crash X (lts kernel, x86_64)

i'm aware that games + linux + nvidia is a much discussed topic, and the advice usually is to install the proprietary driver because nouveau simpy isn't up to it, but the games i'm playing aren't too demanding to my resources, and mostly native to linux, so i thought maybe i've missed something else.

my nvidia graphic card:

$ lspci | grep VGA
00:0d.0 VGA compatible controller: NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2)
$  dmesg | grep -i chipset
[    0.505049] nouveau  [  DEVICE][0000:00:0d.0] Chipset: C61 (NV4C)
$ uname -rvm
3.10.41-1-lts #1 SMP Sun Jun 1 08:55:32 UTC 2014 x86_64

I have been succesfully using the nvidia-304xx-lts driver, but according to the wiki i cannot get a high-resolution tty console with it (which i interpreted to mean "full resolution").
That's why i decided to change back to nouveau - it wasn't so difficult, and after enabling tear-free compositing i'm quite satisfied with video (movies) quality.

however some games native to linux crash the X server, and with gracefully I mean i can see the game opening a new window, then the screen goes all black, then it takes me straight back to the console and i can start X again.

some games needed to be re-installed, or config files deleted (armagetronad, flobopuyo) to make them work again, but extremetuxracer and frogatto resist all attempts and keep crashing in the described way, even when they're not set to full screen.

i caught their output, this is frogatto's:

Frogatto engine version 1.3
LOOKING IN 'modules/frogatto/module.cfg': 1
EXPAND DATA PATHS
SET PREFERENCES PATH: ~/.frogatto/
PARSE ERROR: : Could not find file ./signature.cfg
EXPAND DATA PATHS
Preferences dir: ~/.frogatto/
get_dir(): ~/.frogatto/

OpenGL vendor: nouveau
OpenGL version: 2.1 Mesa 10.1.4
OpenGL extensions: GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_copy_texture GL_EXT_polygon_offset GL_EXT_subtexture GL_EXT_texture_object GL_EXT_vertex_array GL_EXT_compiled_vertex_array GL_EXT_texture GL_EXT_texture3D GL_IBM_rasterpos_clip GL_ARB_point_parameters GL_EXT_draw_range_elements GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_ARB_multitexture GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_transpose_matrix GL_EXT_blend_func_separate GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_secondary_color GL_EXT_texture_env_add GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_INGR_blend_func_separate GL_NV_blend_square GL_NV_light_max_exponent GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_S3_s3tc GL_SUN_multi_draw_arrays GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_EXT_framebuffer_object GL_EXT_texture_compression_s3tc GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_MESA_window_pos GL_NV_packed_depth_stencil GL_NV_texture_rectangle GL_ARB_depth_texture GL_ARB_occlusion_query GL_ARB_shadow GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_window_pos GL_EXT_stencil_two_side GL_EXT_texture_cube_map GL_NV_depth_clamp GL_NV_fog_distance GL_APPLE_packed_pixels GL_APPLE_vertex_array_object GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_vertex_program GL_ARB_vertex_shader GL_ATI_draw_buffers GL_ATI_texture_env_combine3 GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_MESA_pack_invert GL_NV_primitive_restart GL_ARB_depth_clamp GL_ARB_fragment_program_shadow GL_ARB_half_float_pixel GL_ARB_occlusion_query2 GL_ARB_point_sprite GL_ARB_shading_language_100 GL_ARB_sync GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object GL_ATI_blend_equation_separate GL_EXT_blend_equation_separate GL_OES_read_format GL_ARB_pixel_buffer_object GL_ARB_texture_rectangle GL_EXT_pixel_buffer_object GL_EXT_texture_compression_dxt1 GL_EXT_texture_mirror_clamp GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_packed_depth_stencil GL_ARB_vertex_array_object GL_ATI_separate_stencil GL_ATI_texture_mirror_once GL_EXT_gpu_program_parameters GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_OES_EGL_image GL_ARB_copy_buffer GL_ARB_half_float_vertex GL_ARB_map_buffer_range GL_ARB_texture_swizzle GL_ARB_vertex_array_bgra GL_EXT_texture_swizzle GL_EXT_vertex_array_bgra GL_NV_conditional_render GL_ARB_ES2_compatibility GL_ARB_debug_output GL_ARB_draw_elements_base_vertex GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions GL_ARB_provoking_vertex GL_ARB_sampler_objects GL_EXT_provoking_vertex GL_EXT_texture_snorm GL_MESA_texture_signed_rgba GL_ARB_get_program_binary GL_ARB_robustness GL_ARB_timer_query GL_NV_vdpau_interop GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ARB_internalformat_query GL_ARB_map_buffer_alignment GL_ARB_texture_storage GL_EXT_framebuffer_multisample_blit_scaled GL_AMD_shader_trinary_minmax GL_ARB_clear_buffer_object GL_ARB_invalidate_subdata GL_ARB_vertex_attrib_binding GL_KHR_debug GL_ARB_texture_mirror_clamp_to_edge 
GLSL Version: 1.20

Stencil bits: 8
JOYSTICKS: 0
initialized ttf
initialized 0 joysticks
SDL_GetVideoSurface()
LOADTEXTURE: backgrounds/loading_screen.png -> 0x2cf3830
failed to load image 'splash.jpg'
LOADING FONT: data/fonts.cfg -> modules/frogatto/data/fonts.cfg
LOADTEXTURE: gui/number_font.png -> 0x2d64830
LOADTEXTURE: gui/outline_font.png -> 0x2d4d470
LOADTEXTURE: gui/label_font.png -> 0x2d90cf0
LOADTEXTURE: gui/dialog-font.png -> 0x2d96b00
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 42 requests (42 known processed) with 0 events remaining.

and extremetuxracer outputs only 2 lines which are identical to those above.

troubleshooting:
- i removed /etc/X11/xorg.conf.d/20-nouveau.conf and restarted the server.
no effect on the 2 games mentioned, so i put it back again.
- i used 'nouveau.noaccel=1' as kernel parameter. all games start now, but performance is too slow. removed that again.

Is there a solution?
workarounds?

edit: supertuxkart fails in more spectacular ways, properly locks up the gpu. with or without the above mentioned /etc/X11/xorg.conf.d/20-nouveau.conf. however i can kill it from another tty and it does not crash X. No change after re-installing and deleting config files.
i logged its output, the first 50 lines:

nouveau: kernel rejected pushbuf: Cannot allocate memory
nouveau: ch0: krec 0 pushes 1 bufs 8 relocs 30
nouveau: ch0: buf 00000000 00000004 00000004 00000004 00000000
nouveau: ch0: buf 00000001 0000000c 00000002 00000002 00000000
nouveau: ch0: buf 00000002 000000a8 00000002 00000002 00000000
nouveau: ch0: buf 00000003 00000008 00000002 00000002 00000002
nouveau: ch0: buf 00000004 00000009 00000002 00000002 00000002
nouveau: ch0: buf 00000005 000000ab 00000002 00000002 00000000
nouveau: ch0: buf 00000006 0000009a 00000002 00000002 00000000
nouveau: ch0: buf 00000007 0000009e 00000002 00000002 00000000
nouveau: ch0: rel 00000000 00000000 00000001 00000000 0004e8e4 00000000 00000000
nouveau: ch0: rel 00000000 00000004 00000001 00000005 00000000 00000001 00000002
nouveau: ch0: rel 00000000 00000008 00000002 00000000 0004fa00 00000000 00000000
nouveau: ch0: rel 00000000 0000000c 00000002 00000001 00000000 00000000 00000000
nouveau: ch0: rel 00000000 00000010 00000002 00000000 0004fa04 00000000 00000000
nouveau: ch0: rel 00000000 00000014 00000002 00000004 000a8528 00000001 00000002
nouveau: ch0: rel 00000000 00000018 00000003 00000000 0004e210 00000000 00000000
nouveau: ch0: rel 00000000 0000001c 00000003 00000001 00000000 00000000 00000000
nouveau: ch0: rel 00000000 00000020 00000004 00000000 0004e214 00000000 00000000
nouveau: ch0: rel 00000000 00000024 00000004 00000001 00000000 00000000 00000000
nouveau: ch0: rel 00000000 000041e4 00000001 00000000 0004e8e4 00000000 00000000
nouveau: ch0: rel 00000000 000041e8 00000001 00000005 00000200 00000001 00000002
nouveau: ch0: rel 00000000 0001de90 00000001 00000000 0004e8e4 00000000 00000000
nouveau: ch0: rel 00000000 0001de94 00000001 00000005 00000000 00000001 00000002
nouveau: ch0: rel 00000000 0001de98 00000005 00000000 0004fa00 00000000 00000000
nouveau: ch0: rel 00000000 0001de9c 00000005 00000001 00000000 00000000 00000000
nouveau: ch0: rel 00000000 0001dea0 00000005 00000000 0004fa04 00000000 00000000
nouveau: ch0: rel 00000000 0001dea4 00000005 00000004 00078528 00000001 00000002
nouveau: ch0: rel 00000000 0001e3e0 00000001 00000000 0004e8e4 00000000 00000000
nouveau: ch0: rel 00000000 0001e3e4 00000001 00000005 00000200 00000001 00000002
nouveau: ch0: rel 00000000 0004cf38 00000001 00000000 0004e8e4 00000000 00000000
nouveau: ch0: rel 00000000 0004cf3c 00000001 00000005 00000000 00000001 00000002
nouveau: ch0: rel 00000000 0004cf40 00000006 00000000 0004fa00 00000000 00000000
nouveau: ch0: rel 00000000 0004cf44 00000006 00000001 00000000 00000000 00000000
nouveau: ch0: rel 00000000 0004cf48 00000006 00000000 0004fa04 00000000 00000000
nouveau: ch0: rel 00000000 0004cf4c 00000006 00000004 000a8528 00000001 00000002
nouveau: ch0: rel 00000000 0006ff4c 00000007 00000000 0004fa00 00000000 00000000
nouveau: ch0: rel 00000000 0006ff50 00000007 00000001 00000000 00000000 00000000
nouveau: ch0: rel 00000000 0006ff54 00000007 00000000 0004fa04 00000000 00000000
nouveau: ch0: rel 00000000 0006ff58 00000007 00000004 000b8528 00000001 00000002
nouveau: ch0: psh 00000000 0000000000 000007fed4
nouveau: 	0x00000000
nouveau: 	0x00000000
nouveau: 	0x00000000
nouveau: 	0x00000000
nouveau: 	0x00000000
nouveau: 	0x00000000
nouveau: 	0x00000000
nouveau: 	0x00000000
nouveau: 	0x00000000
(...)

Last edited by ondoho (2014-06-07 14:40:51)

Offline

#2 2014-06-08 11:14:34

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: nouveau: native linux games "gracefully" crash X (lts kernel, x86_64)

there's been an update to the lts kernel, but it doesn't change the behaviour of these games.
i also tried the "normal" kernel

$ uname -rvm
3.14.5-1-ARCH #1 SMP PREEMPT Sun Jun 1 07:36:23 CEST 2014 x86_64

- no change.

after the crash,

$ journalctl -b | grep -i nouveau
Jun 08 14:03:11 min kernel: nouveau  [  DEVICE][0000:00:0d.0] BOOT0  : 0x04c000a2
Jun 08 14:03:11 min kernel: nouveau  [  DEVICE][0000:00:0d.0] Chipset: C61 (NV4C)
Jun 08 14:03:11 min kernel: nouveau  [  DEVICE][0000:00:0d.0] Family : NV40
Jun 08 14:03:11 min kernel: nouveau  [   VBIOS][0000:00:0d.0] checking PRAMIN for image...
Jun 08 14:03:11 min kernel: nouveau  [   VBIOS][0000:00:0d.0] ... appears to be valid
Jun 08 14:03:11 min kernel: nouveau  [   VBIOS][0000:00:0d.0] using image from PRAMIN
Jun 08 14:03:11 min kernel: nouveau  [   VBIOS][0000:00:0d.0] BIT signature found
Jun 08 14:03:11 min kernel: nouveau  [   VBIOS][0000:00:0d.0] version 05.61.32.14.02
Jun 08 14:03:11 min kernel: nouveau 0000:00:0d.0: irq 43 for MSI/MSI-X
Jun 08 14:03:11 min kernel: nouveau  [     PMC][0000:00:0d.0] MSI interrupts enabled
Jun 08 14:03:11 min kernel: nouveau  [     PFB][0000:00:0d.0] RAM type: unknown
Jun 08 14:03:11 min kernel: nouveau  [     PFB][0000:00:0d.0] RAM size: 32 MiB
Jun 08 14:03:11 min kernel: nouveau  [     PFB][0000:00:0d.0]    ZCOMP: 0 tags
Jun 08 14:03:11 min kernel: nouveau  [  PTHERM][0000:00:0d.0] FAN control: none / external
Jun 08 14:03:11 min kernel: nouveau  [  PTHERM][0000:00:0d.0] fan management: automatic
Jun 08 14:03:11 min kernel: nouveau  [  PTHERM][0000:00:0d.0] internal sensor: no
Jun 08 14:03:11 min kernel: nouveau  [     CLK][0000:00:0d.0] 20: core 425 MHz shader 425 MHz 
Jun 08 14:03:11 min kernel: nouveau  [     CLK][0000:00:0d.0] --:   
Jun 08 14:03:11 min kernel: nouveau  [     DRM] VRAM: 29 MiB
Jun 08 14:03:11 min kernel: nouveau  [     DRM] GART: 512 MiB
Jun 08 14:03:11 min kernel: nouveau  [     DRM] TMDS table version 1.1
Jun 08 14:03:11 min kernel: nouveau W[     DRM] TMDS table script pointers not stubbed
Jun 08 14:03:11 min kernel: nouveau  [     DRM] DCB version 3.0
Jun 08 14:03:11 min kernel: nouveau  [     DRM] DCB outp 00: 01000310 00000023
Jun 08 14:03:11 min kernel: nouveau  [     DRM] DCB outp 01: 00110204 974f0000
Jun 08 14:03:11 min kernel: nouveau  [     DRM] DCB conn 00: 0000
Jun 08 14:03:11 min kernel: nouveau  [     DRM] Saving VGA fonts
Jun 08 14:03:11 min kernel: nouveau W[     DRM] DCB type 4 not known
Jun 08 14:03:11 min kernel: nouveau W[     DRM] Unknown-1 has no encoders, removing
Jun 08 14:03:11 min kernel: nouveau  [     DRM] MM: using M2MF for buffer copies
Jun 08 14:03:11 min kernel: nouveau  [     DRM] allocated 1680x1050 fb: 0x9000, bo ffff8800dd935000
Jun 08 14:03:11 min kernel: fbcon: nouveaufb (fb0) is primary device
Jun 08 14:03:11 min kernel: nouveau 0000:00:0d.0: fb0: nouveaufb frame buffer device
Jun 08 14:03:11 min kernel: nouveau 0000:00:0d.0: registered panic notifier
Jun 08 14:03:11 min kernel: [drm] Initialized nouveau 1.1.1 20120801 for 0000:00:0d.0 on minor 0
Jun 08 14:03:25 min kernel: nouveau E[    PBUS][0000:00:0d.0] MMIO write of 0x00200001 FAULT at 0x00b000
Jun 08 14:03:50 min kernel: nouveau E[    PBUS][0000:00:0d.0] MMIO write of 0x00970001 FAULT at 0x00b010

every time i crash a game, i get 2 more lines just like the last 2, with all 3 kernels mentioned so far.
list of games to reproduce the "graceful" X crash: frogatto, glhack, extremetuxracer.

(as opposed to total gpu crash requiring hard reboot: nikki and the robots, supertuxkart)

all my searches seem to be pointing to proprietary drivers.
i'm starting to think workaround rather than solution.

any ideas on how to get full tty console resolution with proprietary nvidia driver?

meanwhile i will explore my chances of starting the proprietary driver only when X starts.

Last edited by ondoho (2014-06-08 11:27:50)

Offline

#3 2014-06-08 16:03:06

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: nouveau: native linux games "gracefully" crash X (lts kernel, x86_64)

ondoho wrote:

meanwhile i will explore my chances of starting the proprietary driver only when X starts.

this wasn't so hard after all.

i re-installed nvidia-304xx (and uninstalled everything that would prevent that).
i edited and created .conf files in /usr/lib/modprobe.d and /etc/modprobe.d that would blacklist nvidia, and not nouveau.
i edited /etc/mkinitcpio.conf to contain:

MODULES="nouveau"

.
and then,
comes the ugly, hackish part:
i start X like this:

#!/bin/bash

sudo rmmod -f nouveau
sudo modprobe nvidia
startx &> ~/.xlog
sudo rmmod -f nvidia
sudo modprobe nouveau
sudo setfont $( grep ^FONT /etc/vconsole.conf | cut -d "=" -f 2 )
clear

it works, surprisingly.
the downside: all other tty's are messed up while X is running - not only the resolution, also the font, blinkrate, line feed and carriage return.

is this harmful?
is there a better way?
can i tell the console to somehow re-initiate itself whenever nvidia gets modprobed?

Offline

#4 2014-06-08 18:21:41

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: nouveau: native linux games "gracefully" crash X (lts kernel, x86_64)

Because this is nvidia speific I cannot really help you here. Maybe other distributions like OpenSUSE or Ubuntu/Mint will give you a hint.

ondoho wrote:

i edited and created .conf files in /usr/lib/modprobe.d and /etc/modprobe.d that would blacklist nvidia, and not nouveau.

I would settle for /etc/modprobe.d alone, since /usr/lib/DIR are used by packages themselves and probably will be overwritten at update/upgrade. And in case of modprobe from my understanding configuration in /etc takes precedence anyway, since it is parsed later.

You can reduce this part:

sudo setfont $( grep ^FONT /etc/vconsole.conf | cut -d "=" -f 2 )
# could be replaced by awk
sudo setfont $( awk -F = '/^FONT/{print $2}' /etc/vconsole.conf)

Offline

#5 2014-06-08 23:14:40

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: nouveau: native linux games "gracefully" crash X (lts kernel, x86_64)

alternatively, i tried loading uvesafb instead of nouveau. works ok, but the screen resolutions are limited, 16:10 is not supported.
so neither solution is perfect.
sigh.
but thanks for the awk line.

Offline

#6 2014-06-09 00:14:17

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: nouveau: native linux games "gracefully" crash X (lts kernel, x86_64)

I never configured uvesafb, but after skimming through the wiki and modedb documentation it should be possible to get 16:10 aspect ratio.

Edit: Modprobe may not accept everything modedb.txt mentions in options.

Last edited by emeres (2014-06-09 00:18:04)

Offline

#7 2014-06-09 21:26:26

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: nouveau: native linux games "gracefully" crash X (lts kernel, x86_64)

according to the framebuffer wiki the output of

$ cat /sys/bus/platform/drivers/uvesafb/uvesafb.0/vbe_modes
640x400-8, 0x0100
640x480-8, 0x0101
800x600-8, 0x0103
1024x768-8, 0x0105
1280x1024-8, 0x0107
320x200-16, 0x010e
320x200-32, 0x010f
640x480-16, 0x0111
640x480-32, 0x0112
800x600-16, 0x0114
800x600-32, 0x0115
1024x768-16, 0x0117
1024x768-32, 0x0118
1280x1024-16, 0x011a
1280x1024-32, 0x011b
320x200-8, 0x0130
320x400-8, 0x0131
320x400-16, 0x0132
320x400-32, 0x0133
320x240-8, 0x0134
320x240-16, 0x0135
320x240-32, 0x0136
640x400-16, 0x013d
640x400-32, 0x013e
1600x1200-8, 0x0145
1600x1200-16, 0x0146
1400x1050-8, 0x0147
1400x1050-16, 0x0148
2048x1536-32, 0x0152

the only 16:10 resolution available is 640x400, which is not suitable for me...

but the second link you gave looks promising; however i'm not sure how to apply this information. is it still about uvesafb?

for my 1680x1050px display i computed this  "CVT"(?) code: "1722.6562MA-R" because ( 1680 * 1050 ) / 1024 = 1722.6562 and i want 16:10 aspect ratio = A.
i entered this line in /etc/modprobe.d/uvesafb.conf like this:

options uvesafb mode_option=1722.6562MA-R scroll=ywrap

(and also added the file to "FILES=..." in /etc/mkinitcpio.conf)
i also tried adding

video=1722.6562MA-R

to /boot/grub/grub.cfg and ran mkinitcpio with and without the v86d hook and rebooted each time (no effect without the hook).
the best i get is 1600x1200 instead of 640x480, which suggests that uvesafb was somehow able to read that cryptic code and tries to find the best match?

i am about to give up on this but the above mentioned link to fb/modedb doc got my hopes up again. something i haven't tried yet or got wrong?

Last edited by ondoho (2014-06-09 21:29:12)

Offline

#8 2014-06-10 11:04:49

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: nouveau: native linux games "gracefully" crash X (lts kernel, x86_64)

For your resolution I am getting:

1.76MA-R
#by using cvt
cvt -r -v 1680 1050 60

I would just edit the video line in grub directly (during boot), but the module should be in initial rd. Maybe I am missing here something, since like I mentioned, I did never use it. Again I would take a look how OpenSUSE does it. Since kernel 3 I think, they had always adjusted console resolution, but then again I do not use 1680x1050, only 1280x1024 max.

Last edited by emeres (2014-06-10 11:17:24)

Offline

Board footer

Powered by FluxBB