WineHQ
Bug Tracking Database – Bug 33290

 Bugzilla

 

Last modified: 2020-04-10 18:57:00 UTC  

Fullscreen games cause panning configurations to be generated on some NVidia proprietary drivers

Bug 33290 - Fullscreen games cause panning configurations to be generated on some NVidia proprietary drivers
Fullscreen games cause panning configurations to be generated on some NVidia ...
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: winex11.drv
1.5.26
x86-64 Linux
: P2 major
: ---
Assigned To: Mr. Bugs
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-03-29 09:47 UTC by Mr Sinister
Modified: 2020-04-10 18:57 UTC (History)
6 users (show)

See Also:
Regression SHA1:
Fixed by SHA1: 70d842b106d3ccbb0a786a41474903bddc4ea879
Distribution: ---
Staged patchset:


Attachments
Console output (1.74 KB, application/octet-stream)
2013-03-29 09:47 UTC, Mr Sinister
Details
H3 install -console output (4.73 KB, text/plain)
2013-04-09 07:18 UTC, Mr Sinister
Details
Output of xrandr showing panning (1.13 KB, text/plain)
2016-07-14 17:53 UTC, Gabriel Corona
Details
Simple test of the libxrandr API (2.33 KB, text/plain)
2016-07-15 10:42 UTC, Gabriel Corona
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mr Sinister 2013-03-29 09:47:14 UTC
Created attachment 44042 [details]
Console output

I have a problem with fullscreen mode with Heroes of Might and Magic III and recently with Portal Prelude. I will try to explain the situation with HoM&M:
As I start the game the 3DO animation is often shited a bit to the upper-left but moving cursor in the corner upper-left corner centers it. Now while playing the actual game at some point (sometimes quite soon sometimes after a while) while trying to y see the desktop. The resmove the map with a cursor you start to move the whole game screen. When game screen is shifted you can clearlolution is 800x600 ("Heroes" resolution) but desktop seem to be size 1280x1024 which is the native resolution of my display. This bug obviously makes playing impossible and the only solution for now is to change the resolution before starting the game which is not really convenient. As I've mentioned in the beginning the same bug applies to Portal prelude which at first opened in 1280x960 for some reason. Of course with portal the situation is much better becuse you can actually change the game's resolution, not so much with HoM&M.
This bug did not take place in Wine 1.4 and (as far as I remember) 1.3

I'm using Linux Mint 14.1 Mate
GF 250 GTS
Nvidia drivers  310.14
Comment 1 Mr Sinister 2013-03-29 15:23:50 UTC
I'm sorry but I have to post the description once more because in some mysterious way I have mixed up two sentences.

I have a problem with fullscreen mode with Heroes of Might and Magic III and
recently with Portal Prelude. I will try to explain the situation with HoM&M:
As I start the game the 3DO animation is often shited a bit to the upper-left
but moving cursor in the corner upper-left corner centers it. Now while playing
the actual game at some point (sometimes quite soon sometimes after a while)
while trying to move the map with a cursor you start
to move the whole game screen. When the game screen is shifted you can
cleary see the desktop. The resolution is 800x600 ("Heroes" resolution) but desktop seem to be size 1280x1024 which is the native resolution of my display. This bug obviously makes playing impossible and the only solution for now is to change the resolution before starting the game which is not really convenient. As I've mentioned in the beginning the same bug applies to Portal prelude which at
first opened in 1280x960 for some reason. Of course with portal the situation
is much better becuse you can actually change the game's resolution, not so
much with HoM&M.
This bug did not take place in Wine 1.4 and (as far as I remember) 1.3

I'm using Linux Mint 14.1 Mate
GF 250 GTS
Nvidia drivers  310.14
Comment 2 Mr Sinister 2013-04-05 09:56:46 UTC
Today the same thing happened while trying to force Darksiders(Steam version) to work.
Comment 3 Rosanne DiMesio 2013-04-05 13:37:54 UTC
(In reply to comment #1)
> This bug did not take place in Wine 1.4 and (as far as I remember) 1.3
> I'm using Linux Mint 14.1 Mate
> GF 250 GTS
> Nvidia drivers  310.14
> 
And were you using the exact same kernel/graphics driver/window manager/everything else with the older versions of Wine?

If this really is due to a change in Wine and not something else on your system, you need to run a regression test to identify the patch that caused it. http://wiki.winehq.org/RegressionTesting
Comment 4 Mr Sinister 2013-04-05 22:53:27 UTC
(In reply to comment #3)

> And were you using the exact same kernel/graphics driver/window
> manager/everything else with the older versions of Wine?
> 

When it comes to Wine 1.4 and 1.5 yes - both versions were tested on the very same drivers and kernel version, I've upgraded after installing 1.5. As for 1.3 version, I had it some time ago on my Ubuntu 10.04 and I can't recall a single instance of the behavior I described.I've installed 1.5 because I was getting the infamous Mp3dec.asi error in Heroes and the error is no more but it's not really playable right now.
BTW: Including Darksiders, this makes it up to 3 titles, each from different developer.
I've never done Regression Test before but it looks like it might be necessary in this case so I have to find some time to do some reading and, eventually, to perform the test.
Comment 5 Mr Sinister 2013-04-09 07:18:12 UTC
Created attachment 44128 [details]
H3 install -console output
Comment 6 Mr Sinister 2013-04-09 07:37:16 UTC
I have some problems running regression test. I succesfully clone git, then i ran CC="ccache gcc" ./configure --enable-win64 --verbose --disable-tests (after installing a ton of dependencies), make and I have succesfully compiled wine-1.5.27-174-ge2b88dc . But obviously sth is wrong because when I type simply "./wine" I get "wine: could not find the Wine loader in /home/hades/wine-git" message. I've managed to install H3 with ./wine64 and I attach the console output. Strange thing about the ntdll.dll.so beacuse I actually have it but not in /usr/local/lib64/wine/ but in /usr/lib/x86_64-linux-gnu/wine/ and of course in /home/hades/wine-git/dlls/ntdll/.
Anyway, now I can't run the game because ./wine command does not work at all (see above) and ./wine64 runs the game (despite the few Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated. messages) but it pops up the requester saying that "Game files are missing. Please reinstall", which is obviously ridiculous as it had been installed correctly.
What do I do now?
Comment 7 Austin English 2013-04-09 17:03:37 UTC
(In reply to comment #6)
> I have some problems running regression test. I succesfully clone git, then i
> ran CC="ccache gcc" ./configure --enable-win64 --verbose --disable-tests (after
> installing a ton of dependencies), make and I have succesfully compiled
> wine-1.5.27-174-ge2b88dc . But obviously sth is wrong because when I type
> simply "./wine" I get "wine: could not find the Wine loader in
> /home/hades/wine-git" message. I've managed to install H3 with ./wine64 and I
> attach the console output. Strange thing about the ntdll.dll.so beacuse I
> actually have it but not in /usr/local/lib64/wine/ but in
> /usr/lib/x86_64-linux-gnu/wine/ and of course in
> /home/hades/wine-git/dlls/ntdll/.
> Anyway, now I can't run the game because ./wine command does not work at all
> (see above) and ./wine64 runs the game (despite the few Fontconfig warning:
> "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from
> ~/.fonts.conf is deprecated. messages) but it pops up the requester saying that
> "Game files are missing. Please reinstall", which is obviously ridiculous as it
> had been installed correctly.
> What do I do now?

Please use the forums or IRC for help running the regression test.
Comment 8 tesla_d1 2013-05-03 14:30:08 UTC
Could this be related to bug 33479?

http://bugs.winehq.org/show_bug.cgi?id=33479

There is a ppa there that could be tested.
Comment 9 Reinhard Berger 2013-07-07 11:34:21 UTC
(In reply to comment #1)
> I'm sorry but I have to post the description once more because in some
> mysterious way I have mixed up two sentences.
> 
> I have a problem with fullscreen mode with Heroes of Might and Magic III and
> recently with Portal Prelude. I will try to explain the situation with HoM&M:
> As I start the game the 3DO animation is often shited a bit to the upper-left
> but moving cursor in the corner upper-left corner centers it. Now while playing
> the actual game at some point (sometimes quite soon sometimes after a while)
> while trying to move the map with a cursor you start
> to move the whole game screen. When the game screen is shifted you can
> cleary see the desktop. The resolution is 800x600 ("Heroes" resolution) but
> desktop seem to be size 1280x1024 which is the native resolution of my display.
> This bug obviously makes playing impossible and the only solution for now is to
> change the resolution before starting the game which is not really convenient.
> As I've mentioned in the beginning the same bug applies to Portal prelude which
> at
> first opened in 1280x960 for some reason. Of course with portal the situation
> is much better becuse you can actually change the game's resolution, not so
> much with HoM&M.
> This bug did not take place in Wine 1.4 and (as far as I remember) 1.3
> 
> I'm using Linux Mint 14.1 Mate
> GF 250 GTS
> Nvidia drivers  310.14


As far as i have discovered this problem appears with recent newer nvidia driver.

Nvidia driver before 310 (295.x) works correctly on evry wine version.

Newer NVIDIA drivers 310.x, 325.x  shows this effect.

I have discovered 2 workarounds :

1.) When this problem apperas during gameplay, switch away window (CTRL+TAB) and switch back to (full screen) heroes window, center the picture and leave the town , when the game re-draws the screen it will not anymore scroll out .

Only problem is that this works not very long, after a few rounds this problem  will appear once again.

2.) switch the desktop resolution to 800X600 before the game runs, and setup wine to emualy a virtual desktop with 800X600.

It will be fullscreen as well when you start the game.

I can not test if this problem appears with older wine versions when using newer nvidia drivers (310 & up) since older wine versions have problems to dedect  the OPEN GL libraries from this nvidia drivers and report that no OPENGL / Dricect-X is installed, as a result the game will not run.

Only newer Wine versions can use the OPEN GL mode from the newer nvidia drivers.

Currently the best way at the moment is to use the older NVIDIA drivers, but i fear that in future wine will refuse to work with that.

The bug must have something to do with the new resolution switching system that comes with the 310.x series of nvidia drivers.

Hard to tell if it is a bug in wine or nvidia or both.
Comment 10 Mr Sinister 2015-02-08 07:35:19 UTC
Howcome this is still unconfirmed?  Reinhard Berger even posted a workaround so it means that it is an issue not only for one user. Now I use wine 1.6.2 and Nvidia 331 drivers and this bugs still affects me in Mint 17.1.
Comment 11 Gabriel Corona 2016-07-14 16:20:29 UTC
I think I'm affected by this (using nvidia driver). It happens all the time when the fullscreen/in-game resolution is not the same as the desktop resolution: the screen displays only a view of a larger virtual screen and you can pan with the mouse (like this https://sinewalker.wordpress.com/2010/07/09/what-happened-to-my-ctrl-zoom-in-xorg/).

One workaround is to use UseXRandR=N (https://wiki.winehq.org/Useful_Registry_Keys).
Comment 12 Gabriel Corona 2016-07-14 16:41:30 UTC
The thins I am talking about is the quite of thing you get if you do:

    xrandr --output DVI-I-0 --panning 3000x3000

where 3000x3000 is larger than your resolution.
Comment 13 Gabriel Corona 2016-07-14 17:53:00 UTC
Unsurprisingly, when this happens the output of xrandr gives: "1280x1024+0+0 (normal left inverted right x axis y axis) 430mm x 270mm panning 1680x1050+0+0" where 1680x1050 is my desktop resolution and 1280x1024 is the resolution the game is trying (and apparently failing) to get.

I'm attaching the full output ox xrandr.
Comment 14 Gabriel Corona 2016-07-14 17:53:37 UTC
Created attachment 55100 [details]
Output of xrandr showing panning
Comment 15 Gabriel Corona 2016-07-15 10:41:13 UTC
Apparently, the nvidia Driver expects needs XRRSetScreenSize() before XRRSetCrtcConfig(). Failing to do so leads to panning mode. I'm attaching a prototype program which successfully change resolution (at least in the simple cases) without introducing panning.

The needed steps are:

1. XGrabServer();

2. Disable the CRTC with XRRSetCrtcConfig;

3. XRRSetScreenSize to the new resolution;

4. XRRSetCrtcConfig to set the CRT to the new resolution (and reenable it);

5. XUngrabServer.

You can comment out the XRRSetScreenSize() call (and possibly everythin but the main XRRSetCrtcConfig call) to get somethying similar to the current behaviour of the Wine implementation which leads to panning (at least using the nvidia driver).

I'm not sure if this is the expected behaviour ox xrandr or if this is a bug in the nvidia driver.
Comment 16 Gabriel Corona 2016-07-15 10:42:11 UTC
Created attachment 55105 [details]
Simple test of the libxrandr API
Comment 17 Gabriel Corona 2016-07-16 08:50:00 UTC
This patch fixes the issue for me:

https://www.winehq.org/pipermail/wine-patches/2016-July/152363.html
Comment 18 Mr Sinister 2016-07-16 09:19:59 UTC
Any comments from wine devs? Will this patch included in Wine new releases?
Comment 19 Gabriel Corona 2016-07-19 20:41:17 UTC
The current patch breaks multihead so it won't get merged. The problem seems to be in the nvidia driver anyway so we might want to try to have this bug fixed there.

For now, you should be able to use UseXRandR=N. Another possible workaround might be to force xrandr 1.0 somehow.
Comment 20 Henri Verbeet 2016-07-19 20:54:09 UTC
(In reply to Gabriel Corona from comment #19)
> For now, you should be able to use UseXRandR=N. Another possible workaround
> might be to force xrandr 1.0 somehow.
Forcing RandR 1.0 would be easy enough by just removing the "only_one_resolution" condition when checking for the NV-CONTROL extension. It may not behave any better though.
Comment 21 Gabriel Corona 2016-07-20 20:06:14 UTC
Yes, forcing xrandr 1.0 (tested by removing only_one_resolution) is working as well (and is easy enough).
Comment 22 Zeb Figura 2019-04-12 18:25:31 UTC
A similar patch was upstreamed as <https://source.winehq.org/git/wine.git/commitdiff/70d842b106d3ccbb0a786a41474903bddc4ea879>. Please retest.
Comment 23 joaopa 2020-03-27 17:16:22 UTC
Time to mark this bug as FIXED?
Comment 24 Reinhard Berger 2020-03-29 12:11:03 UTC
(In reply to joaopa from comment #23)
> Time to mark this bug as FIXED?

As today using nvidia drivers 435.21 and wine-4.0.2 this problem is gone.
So yes, time to close.
Comment 25 Mr Sinister 2020-03-29 12:39:39 UTC
(In reply to Reinhard Berger from comment #24)
> (In reply to joaopa from comment #23)
> > Time to mark this bug as FIXED?
> 
> As today using nvidia drivers 435.21 and wine-4.0.2 this problem is gone.
> So yes, time to close.

I haven't tried Darksiders nor Portal for a while but HoMM III seems to be working fine so yes.
Comment 26 Alexandre Julliard 2020-04-10 18:57:00 UTC
Closing bugs fixed in 5.6.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to privacy@winehq.org

Hosted By CodeWeavers