Do not let Wine to change resolution...
Do not let Wine to change resolution...
I noticed a strange behavior when Wine changes the resolution of the screen to play some fullscreen application.
It usually works perfect, but when the application leaves the resolution is not restored. This is minor, but even xrandr -s 0 has no effects. Even the xrandr output list shows the expected resolution.
I usually start wine application via script selecting the resolution forehand, yet it is strange.
What can possibly be the problem?
It usually works perfect, but when the application leaves the resolution is not restored. This is minor, but even xrandr -s 0 has no effects. Even the xrandr output list shows the expected resolution.
I usually start wine application via script selecting the resolution forehand, yet it is strange.
What can possibly be the problem?
Re: Do not let Wine to change resolution...
etwineb there are two issues that cause the problem you are talking about.
1 is some windows applications don't restore resolution when they close. Those applications is a wrapper script around them to restore resolution is correct action. It is very hard for wine to work out when all of a particular application has end so it was decided a long time ago not to address this but to give the recommendation of wrapper script.
Think multi exe programs where the first program sets the resolution then hands off to other exes that now expect theresolution to be something.
The second you describe here.
etwineb using a script to select it in advance with a unstable xrandr it will happen to you from the script at some time as well. The fun of intermittent bugs. You think you have got away from them when all they are doing is hiding.
1 is some windows applications don't restore resolution when they close. Those applications is a wrapper script around them to restore resolution is correct action. It is very hard for wine to work out when all of a particular application has end so it was decided a long time ago not to address this but to give the recommendation of wrapper script.
Think multi exe programs where the first program sets the resolution then hands off to other exes that now expect theresolution to be something.
The second you describe here.
This is not a wine error in most cases. This is video card driver failure in most cases. You will find xrandr has ceased operating completely. xrandr is never meant todo this so is a breach of spec operating this way. xrandr is always meant to show a tag on what ever is the current resolution. The common sign of xrandr failure is that you can keep on changing the resolution with xrandr and nothing happens other than xrandr changing what it is reporting.This is minor, but even xrandr -s 0 has no effects. Even the xrandr output list shows the expected resolution.
etwineb using a script to select it in advance with a unstable xrandr it will happen to you from the script at some time as well. The fun of intermittent bugs. You think you have got away from them when all they are doing is hiding.
Re: Do not let Wine to change resolution...
Not really... xrandr fails to reset the original resolution, but it still works with the other ones. I am missing something, how is possible that changing resolution works fine when I use xrandr, but not with Wine? Does Wine change resolution in another way? (Forget about setting it back at the end of the program)oiaohm wrote:This is not a wine error in most cases. This is video card driver failure in most cases. You will find xrandr has ceased operating completely. xrandr is never meant todo this so is a breach of spec operating this way. xrandr is always meant to show a tag on what ever is the current resolution. The common sign of xrandr failure is that you can keep on changing the resolution with xrandr and nothing happens other than xrandr changing what it is reporting.
etwineb using a script to select it in advance with a unstable xrandr it will happen to you from the script at some time as well. The fun of intermittent bugs. You think you have got away from them when all they are doing is hiding.
The script thingy always worked, at least until now. As I mentioned in the topic title "Do not let wine change resolution"; in my system change resolution with xrandr; exec wine; change back with xrandr works well.
Re: Do not let Wine to change resolution...
WINEDEBUG=+xrandr wine program.exe
shows what wine is setting.
This can be windows application stupidity combined with xrandr being slightly defective. Some Windows applications like setting resolution more than once when they see it does not match what they requested. On some video cards this results in reseting the xrandr default. Still a driver bug.
Will know more when I see a log from wine running your program with +xrandr on.
shows what wine is setting.
This can be windows application stupidity combined with xrandr being slightly defective. Some Windows applications like setting resolution more than once when they see it does not match what they requested. On some video cards this results in reseting the xrandr default. Still a driver bug.
Will know more when I see a log from wine running your program with +xrandr on.
Re: Do not let Wine to change resolution...
This is a longstanding upstream bug that will probably never be fixed.etwineb wrote: It usually works perfect, but when the application leaves the resolution is not restored.
https://bugs.freedesktop.org/show_bug.cgi?id=14255
http://bugs.winehq.org/show_bug.cgi?id=10841
Re: Do not let Wine to change resolution...
My bad, re-reading my first message I noticed I expressed myself badly. I am aware that "not restoring resolution" is a known problem.
What really puzzle me was the second part, why after wine finishes I cannot just exec xrandr -s 0 to get my resolution back, but I have to restart X.
But as oiahom mentioned, it is probably not a Wine fault either. When I go home I will play around with the suggestions.
What really puzzle me was the second part, why after wine finishes I cannot just exec xrandr -s 0 to get my resolution back, but I have to restart X.
But as oiahom mentioned, it is probably not a Wine fault either. When I go home I will play around with the suggestions.
Re: Do not let Wine to change resolution...
Using Giana again:
The log shows set current mode to 1920x1080, but actually it sets the resolution of 1280x720.
And after executing I get this:
Code: Select all
% WINEDEBUG=-all,+xrandr wine GSGameExe_DX9.exe
trace:xrandr:X11DRV_XRandR_Init Found XRandR 1.4.
trace:xrandr:xrandr12_init_modes CRTC 0: mode 0x24d, 1920x1080+0+0.
trace:xrandr:xrandr12_init_modes OUTPUT 0: name "DVI-I-2".
trace:xrandr:xrandr12_init_modes Adding mode 0x24d: 1920x1080@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x24e: 1680x1050@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x24f: 1440x900@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x250: 1280x1024@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x251: 1280x1024@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x252: 1280x960@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x253: 1280x800@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x254: 1280x720@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x255: 1152x864@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x256: 1024x768@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x257: 1024x768@70.
trace:xrandr:xrandr12_init_modes Adding mode 0x258: 1024x768@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x259: 800x600@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x25a: 800x600@72.
trace:xrandr:xrandr12_init_modes Adding mode 0x25b: 800x600@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x25c: 800x600@56.
trace:xrandr:xrandr12_init_modes Adding mode 0x25d: 640x480@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x25e: 640x480@73.
trace:xrandr:xrandr12_init_modes Adding mode 0x25f: 640x480@60.
trace:xrandr:xrandr12_get_current_mode CRTC 0: mode 0x24d, 1920x1080+0+0.
trace:xrandr:X11DRV_XRandR_Init Found XRandR 1.4.
trace:xrandr:xrandr12_init_modes CRTC 0: mode 0x24d, 1920x1080+0+0.
trace:xrandr:xrandr12_init_modes OUTPUT 0: name "DVI-I-2".
trace:xrandr:xrandr12_init_modes Adding mode 0x24d: 1920x1080@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x24e: 1680x1050@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x24f: 1440x900@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x250: 1280x1024@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x251: 1280x1024@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x252: 1280x960@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x253: 1280x800@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x254: 1280x720@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x255: 1152x864@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x256: 1024x768@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x257: 1024x768@70.
trace:xrandr:xrandr12_init_modes Adding mode 0x258: 1024x768@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x259: 800x600@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x25a: 800x600@72.
trace:xrandr:xrandr12_init_modes Adding mode 0x25b: 800x600@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x25c: 800x600@56.
trace:xrandr:xrandr12_init_modes Adding mode 0x25d: 640x480@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x25e: 640x480@73.
trace:xrandr:xrandr12_init_modes Adding mode 0x25f: 640x480@60.
trace:xrandr:X11DRV_XRandR_Init Found XRandR 1.4.
trace:xrandr:xrandr12_init_modes CRTC 0: mode 0x24d, 1920x1080+0+0.
trace:xrandr:xrandr12_init_modes OUTPUT 0: name "DVI-I-2".
trace:xrandr:xrandr12_init_modes Adding mode 0x24d: 1920x1080@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x24e: 1680x1050@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x24f: 1440x900@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x250: 1280x1024@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x251: 1280x1024@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x252: 1280x960@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x253: 1280x800@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x254: 1280x720@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x255: 1152x864@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x256: 1024x768@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x257: 1024x768@70.
trace:xrandr:xrandr12_init_modes Adding mode 0x258: 1024x768@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x259: 800x600@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x25a: 800x600@72.
trace:xrandr:xrandr12_init_modes Adding mode 0x25b: 800x600@60.
trace:xrandr:xrandr12_init_modes Adding mode 0x25c: 800x600@56.
trace:xrandr:xrandr12_init_modes Adding mode 0x25d: 640x480@75.
trace:xrandr:xrandr12_init_modes Adding mode 0x25e: 640x480@73.
trace:xrandr:xrandr12_init_modes Adding mode 0x25f: 640x480@60.
trace:xrandr:xrandr12_get_current_mode CRTC 0: mode 0x24d, 1920x1080+0+0.
trace:xrandr:xrandr12_set_current_mode CRTC 0: mode 0x24d, 1920x1080+0+0.
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
WINEDEBUG=-all,+xrandr wine GSGameExe_DX9.exe 14.14s user 9.62s system 52% cpu 45.324 total
%
And after executing I get this:
Code: Select all
% xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 8192 x 8192
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)
TV-0 disconnected (normal left inverted right x axis y axis)
DVI-I-2 connected 1280x720+0+2 (normal left inverted right x axis y axis) 530mm x 300mm panning 1920x1080+0+0
1920x1080 60.0 +
1680x1050 60.0
1440x900 59.9
1280x1024 75.0 60.0
1280x960 60.0
1280x800 59.8
1280x720 60.0*
1152x864 75.0
1024x768 75.0 70.1 60.0
800x600 75.0 72.2 60.3 56.2
640x480 75.0 72.8 59.9
DVI-I-3 disconnected (normal left inverted right x axis y axis)
% xrandr -s 1920x1080
Size 1920x1080 not found in available modes
Re: Do not let Wine to change resolution...
No idea oiaohm?
Re: Do not let Wine to change resolution...
Thanks for the tap sorry I did not see you prior response.
1920x1080 60.0 + says that the default is still 1920x1080 and still should be callable by xrandr.
What we have here is some form of very strange driver failure. I cannot see exactly how wine can cause it and in fact should not cause it. You need to open up bug report with driver maker.
xrandr -s 0 should by what xrandr is reporting switch to 1920x1080
Yes the fact you cannot switch to that resultion directly is a driver side failure as well thinking its listed as available.
1920x1080 60.0 + says that the default is still 1920x1080 and still should be callable by xrandr.
What we have here is some form of very strange driver failure. I cannot see exactly how wine can cause it and in fact should not cause it. You need to open up bug report with driver maker.
xrandr -s 0 should by what xrandr is reporting switch to 1920x1080
Yes the fact you cannot switch to that resultion directly is a driver side failure as well thinking its listed as available.
Re: Do not let Wine to change resolution...
To answer to dougmack question; I played around with a second X server and I got the confirmation something is wrong with my video drivers. The second X server works fine, but to switch between the first and the second (CTRL-ALT-F8 and CTRL-ALT-F9) has problems. Going from the second to the first works, but to switch back results in a blinking cursor as no X servers were running; this is definitely a X problem.