xrandr, panning and Wine

Questions about Wine on Linux
Locked
skelband
Level 2
Level 2
Posts: 12
Joined: Sat Mar 12, 2011 12:10 am

xrandr, panning and Wine

Post by skelband »

Hi,
I'm running wine 1.9.9 on Linux Mint 17.3 installed via the wine-devel PPA as per the instructions for Ubuntu.
I have a lot of trouble with fullscreen games. Moving the mouse to one side scrolls the display off to the left and up.
I've seen quite a few references to xrandr support and it defaulting to XVidMode when xrandr is not supported.

I have to say I'm a bit of a noob in this area but I would really like to sort this out because it has been a longstanding issue for some of the games I try to run.

I'm running Star Wars: Knights of the Old Republic (GOG version) and this is some of the trace that I get from WINEDEBUG=+xrandr:

...
trace:xrandr:X11DRV_XRandR_Init Found XRandR 1.4.
trace:xrandr:xrandr12_init_modes CRTC 0: mode 0x283, 1920x1080+0+0.
trace:xrandr:xrandr12_init_modes OUTPUT 0: name "DVI-D-0".
trace:xrandr:xrandr12_init_modes Adding mode 0x283: 1920x1080@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x284: 1920x1080@50.
trace:xrandr:xrandr12_init_modes Adding mode 0x285: 1680x1050@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x286: 1600x1200@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x287: 1440x900@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x288: 1440x900@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x289: 1280x1024@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x28a: 1280x1024@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x28b: 1280x960@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x28c: 1280x800@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x28d: 1280x720@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x28e: 1280x720@50.
trace:xrandr:xrandr12_init_modes Adding mode 0x28f: 1152x864@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x290: 1024x768@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x291: 1024x768@70.
trace:xrandr:xrandr12_init_modes Adding mode 0x292: 1024x768@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x293: 800x600@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x294: 800x600@72.
trace:xrandr:xrandr12_init_modes Adding mode 0x295: 800x600@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x296: 800x600@56.
trace:xrandr:xrandr12_init_modes Adding mode 0x297: 720x576@50.
trace:xrandr:xrandr12_init_modes Adding mode 0x298: 720x480@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x299: 640x480@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x29a: 640x480@73.
trace:xrandr:xrandr12_init_modes Adding mode 0x29b: 640x480@60.
trace:xrandr:xrandr12_set_current_mode CRTC 0: mode 0x283, 1920x1080+0+0.
fixme:wgl:X11DRV_wglChoosePixelFormatARB unused pfAttribFList
fixme:wgl:X11DRV_wglChoosePixelFormatARB unused pfAttribFList
fixme:wgl:X11DRV_wglChoosePixelFormatARB unused pfAttribFList
fixme:wgl:X11DRV_wglChoosePixelFormatARB unused pfAttribFList
fixme:wgl:X11DRV_wglChoosePixelFormatARB unused pfAttribFList
fixme:wgl:X11DRV_wglChoosePixelFormatARB unused pfAttribFList
fixme:wgl:X11DRV_wglChoosePixelFormatARB unused pfAttribFList
fixme:win:EnumDisplayDevicesW ((null),0,0x76ce1c8,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),0,0x76ce1c8,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),0,0x76ce1c8,0x00000000), stub!
trace:xrandr:xrandr12_set_current_mode CRTC 0: mode 0x29b, 640x480+0+0.
trace:xrandr:xrandr12_set_current_mode CRTC 0: mode 0x283, 1920x1080+0+0.
trace:xrandr:xrandr12_set_current_mode CRTC 0: mode 0x283, 1920x1080+0+0.


So it looks to me like xrandr is being found, yet I'm getting the opt-reported panning issue.
Could someone help me out with diagnosing what is going on?
I see a lot of people having these types of problems, but I really don't know how to proceed.

Cheers,
Ralph

BTW, could I just say a huge thank you to the WINE developers for a friggin' awesome system!
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: xrandr, panning and Wine

Post by Bob Wya »

skelband wrote:Hi,
I'm running wine 1.9.9 on Linux Mint 17.3 installed via the wine-devel PPA as per the instructions for Ubuntu.
I have a lot of trouble with fullscreen games. Moving the mouse to one side scrolls the display off to the left and up.
I've seen quite a few references to xrandr support and it defaulting to XVidMode when xrandr is not supported.
...
I generally run my Wine games in a Wine Virtual Desktop - fullscreen sized. You can easily set this up with the builtin winecfg utility. As Wine doesn't use something sensible, like (cough) using the SDL(2) libraries, it tends to do dumb stuff in a dual monitor setup...

If you want some help with your particular setup you could post us the output from:

Code: Select all

xrandr -q
What graphics card and driver are you using?

Thanks
Bob
skelband
Level 2
Level 2
Posts: 12
Joined: Sat Mar 12, 2011 12:10 am

Re: xrandr, panning and Wine

Post by skelband »

Hi,
I running Nvidia 352.63.
Card is a Galaxy GTX 670.

xrandr -q output:

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
DVI-I-0 disconnected primary (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DVI-D-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 510mm x 287mm
1920x1080 60.0*+ 50.0
1680x1050 60.0
1600x1200 60.0
1440x900 75.0 59.9
1280x1024 75.0 60.0
1280x960 60.0
1280x800 59.8
1280x720 60.0 50.0
1152x864 75.0
1024x768 75.0 70.1 60.0
800x600 75.0 72.2 60.3 56.2
720x576 50.0
720x480 59.9
640x480 75.0 72.8 59.9
DP-1 disconnected (normal left inverted right x axis y axis)


Cheers,
Ralph
skelband
Level 2
Level 2
Posts: 12
Joined: Sat Mar 12, 2011 12:10 am

Re: xrandr, panning and Wine

Post by skelband »

I tried running a virtual desktop at full monitor resolution and it the game keeps changing resolution so that I get a smaller box at the top left of the screen.
It looks a bit naff :(
Something tells me that's not what you get ;)
skelband
Level 2
Level 2
Posts: 12
Joined: Sat Mar 12, 2011 12:10 am

Re: xrandr, panning and Wine

Post by skelband »

Some trace might help:

fixme:win:EnumDisplayDevicesW ((null),0,0x76ce1c8,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),0,0x76ce1c8,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),0,0x76ce1c8,0x00000000), stub!
trace:xrandr:xrandr12_set_current_mode CRTC 0: mode 0x29b, 640x480+218+0.
fixme:wgl:X11DRV_wglChoosePixelFormatARB unused pfAttribFList
fixme:wgl:X11DRV_wglChoosePixelFormatARB unused pfAttribFList
fixme:wgl:X11DRV_wglChoosePixelFormatARB unused pfAttribFList
fixme:wgl:X11DRV_wglChoosePixelFormatARB unused pfAttribFList
fixme:wgl:X11DRV_wglChoosePixelFormatARB unused pfAttribFList
fixme:wgl:X11DRV_wglChoosePixelFormatARB unused pfAttribFList
fixme:wgl:X11DRV_wglChoosePixelFormatARB unused pfAttribFList
trace:xrandr:xrandr12_set_current_mode CRTC 0: mode 0x292, 1024x768+218+0.
err:xrandr:xrandr12_set_current_mode Resolution change not successful -- perhaps display has changed?
skelband
Level 2
Level 2
Posts: 12
Joined: Sat Mar 12, 2011 12:10 am

Re: xrandr, panning and Wine

Post by skelband »

What looks like a relevant bug is: https://bugs.winehq.org/show_bug.cgi?id=31245
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: xrandr, panning and Wine

Post by Bob Wya »

skelband wrote:What looks like a relevant bug is: https://bugs.winehq.org/show_bug.cgi?id=31245
Possibly. Are you running a Cinnamon desktop? That could mean you are affected by that gnome xrandr service ("org.gnome.settings-daemon.plugins.xrandr active") issue??

Otherwise you could try patching:

Code: Select all

dlls/winex11.drv/xrandr.c
to always using xrandr 1.0.

The Nvidia implementation of xrandr >=1.2 is known to be quite flakey (in fact I've got a little patch to stop my console logs being spammed by Wine warning messages about this!!)

The easiest way - is to suck it up and use a Wine Virtual Desktop. I know it's not ideal - it used to annoy me a lot that I had to run a fullscreen Virtual Desktop for BF2... But it's easy to set the background of the Virtual Desktop window to black - so it's at least slightly less annoying. :wink:

Any (Windows) application/game screen resolution changes will only affect the size of the Virtual Desktop Window and not your actual screen resolution. Wine simply draws everything into the Virtual Desktop window rather than the root X Window...

Bob
skelband
Level 2
Level 2
Posts: 12
Joined: Sat Mar 12, 2011 12:10 am

Re: xrandr, panning and Wine

Post by skelband »

Going to be on hols for a fortnight so I will get back to it then.
I will try to build wine with the mod to see if that helps me.

Many thanks!
skelband
Level 2
Level 2
Posts: 12
Joined: Sat Mar 12, 2011 12:10 am

Re: xrandr, panning and Wine

Post by skelband »

Bob Wya wrote: Possibly. Are you running a Cinnamon desktop? That could mean you are affected by that gnome xrandr service ("org.gnome.settings-daemon.plugins.xrandr active") issue??
Running mate. I did try to switch off the active flag and it didn't make any difference to the issue.
Sounds like it's the dodgy support for xrandr1.4
Locked