Issue wine falling back to Nouveau driver

Hallo,

I’m not able to use the Nvidia driver for my wine games. While starting wine there are errors on starting up Xrandr. I’m using Ubuntu 14.10.
X.Org X Server 1.16.0
Kernel: 3.16.0-31
Driver 346.47

WINEDEBUG=+xrandr wíne ./Diablo3

trace:xrandr:X11DRV_XRandR_Init Found XRandR 1.4.
trace:xrandr:xrandr12_init_modes CRTC 0: mode 0x1c2, 1920x1080+0+0.
trace:xrandr:xrandr12_init_modes OUTPUT 0: name "DP-2".
err:winediag:xrandr12_init_modes Broken NVIDIA RandR detected, falling back to RandR 1.0. Please consider using the Nouveau driver instead.
trace:xrandr:xrandr10_init_modes XRandR: found 10 sizes.
trace:xrandr:xrandr10_init_modes - at 0: 1920x1080 (1 rates):  50 Hz
trace:xrandr:xrandr10_init_modes - at 1: 1680x1050 (1 rates):  51 Hz
trace:xrandr:xrandr10_init_modes - at 2: 1440x900 (1 rates):  52 Hz
trace:xrandr:xrandr10_init_modes - at 3: 1366x768 (1 rates):  53 Hz
trace:xrandr:xrandr10_init_modes - at 4: 1280x1024 (1 rates):  54 Hz
trace:xrandr:xrandr10_init_modes - at 5: 1280x800 (1 rates):  55 Hz
trace:xrandr:xrandr10_init_modes - at 6: 1280x720 (1 rates):  56 Hz
trace:xrandr:xrandr10_init_modes - at 7: 1024x768 (1 rates):  57 Hz
trace:xrandr:xrandr10_init_modes - at 8: 800x600 (1 rates):  58 Hz
trace:xrandr:xrandr10_init_modes - at 9: 640x480 (1 rates):  59 Hz
trace:xrandr:xrandr10_init_modes XRandR modes: count=10
trace:xrandr:xrandr10_init_modes Available DD modes: count=30
trace:xrandr:xrandr10_init_modes Enabling XRandR

There are some informations about this behaveiour:
http://wiki.winehq.org/FAQ#head-94de08f9ce3090e6f1152c71ce0cb35cbb03b42b
http://http.download.nvidia.com/XFree86/Linux-x86/1.0-9625/README/chapter-04.html

They are telling to modify xorg.conf, what I did like this, but no success until now:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 346.47  (buildmeister@swio-display-x86-rhel47-01)  Thu Feb 19 19:18:25 PST 2015

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 346.47  (buildmeister@swio-display-x86-rhel47-01)  Thu Feb 19 19:19:45 PST 2015

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "LGD"
    # 1920x1080 74.91 Hz (CVT 2.07M9) hsync: 84.64 kHz; pclk: 220.75 MHz
    Modeline "1920x1080_75.00"  220.75  1920 2064 2264 2608  1080 1083 1088 1130 -hsync +vsync
    HorizSync       83.0 - 83.0
    VertRefresh     75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 980M"
    Option	   "DynamicTwinView" "FALSE"
    Option         "metamodes" "1920x1080"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-2"
    Option         "metamodes" "1920x1080_75 +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
	Modes	    "1920x1080_75"
    EndSubSection
EndSection

The guides tell the output of xrandr --q1 should list only the native resolution like 1920x1080 in my case, but with all the modifications ion xorg.conf there are still 10 modes available:

xrandr --q1:

SZ:    Pixels          Physical       Refresh
*0   1920 x 1080   ( 381mm x 211mm )  *50  
 1   1680 x 1050   ( 333mm x 205mm )   51  
 2   1440 x 900    ( 285mm x 175mm )   52  
 3   1366 x 768    ( 271mm x 150mm )   53  
 4   1280 x 1024   ( 254mm x 200mm )   54  
 5   1280 x 800    ( 254mm x 156mm )   55  
 6   1280 x 720    ( 254mm x 140mm )   56  
 7   1024 x 768    ( 203mm x 150mm )   57  
 8    800 x 600    ( 158mm x 117mm )   58  
 9    640 x 480    ( 127mm x  93mm )   59  
Current rotation - normal
Current reflection - none
Rotations possible - normal left inverted right 
Reflections possible - X Axis Y Axis

xrandr -q:

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
VGA-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 382mm x 215mm
   1920x1080      75.0*+
HDMI-0 disconnected (normal left inverted right x axis y axis)
Unknown-0 disconnected (normal left inverted right x axis y axis)

Please let me know, what to do to avoid the xrandr fallback to nouveau driver.

Thanks for help.

Best regards

Kitsab

Hi Kitsab,

Those messages from Wine are purely informational. The “error” that’s printed is due to a check added to Wine by a developer who does not understand how RandR works, and should be ignored. It doesn’t indicate that Wine is using Nouveau.

What is the actual symptom of the problem you’re seeing? Are there other errors printed by Wine or the application you’re trying to run?

If Wine is getting confused by the implicit scaling resolutions listed by “xrandr --q1”, you can disable them by disabling the IncludeImplicitMetaModes option.