MrMEEE / bumblebee-Old-and-abbandoned

OUTDATED!!!!! - Replaced by "The Bumblebee Project" and "Ironhide"
http://www.martin-juhl.dk/2011/08/ironhide-reporting-for-duty/
469 stars 49 forks source link

Changing screen resolution in wine after running optirun breaks the display #179

Closed rockorequin closed 13 years ago

rockorequin commented 13 years ago

If I run a fullscreen game in wine and the game changes the screen resolution (for instance from the native 1920x1080 to 1024x768), the screen goes black (or grey) and the graphic output is completely broken (there is sometimes some random flickering of pixels at the top of the display). The game still runs - I can hear it playing music, and ALT-F4 will shut it down. After I shut it down, the screen usually remains black/grey afterwards until I switch to a tty console and back (eg with CTRL-ALT-F1 then CTRL-ALT-F7 or -F8).

If I change the resolution first to say 1024x768 using xrandr and then run the game, it runs in full screen just fine. If I don't run optirun so that only the intel card is used, the screen resolution changes and the graphics are ok (as ok can be expected from the intel card).

Another workaround is to tell wine to emulate a virtual desktop so that it runs in its own window rather than fullscreen.

So it seems that the change in screen resolution isn't picked up by the VirtualGL server, or that something in it breaks.

This is on an XPS 15 L502x running Ubuntu 11.04.

cierzniak commented 13 years ago

How you start wine games? I can;t because Optirun says he can;t go to C:/Program full patch is env WINEPREFIX="/home/cierzniak/.local/share/wineprefixes/oblivion" wine C:\windows\command\start.exe /Unix /home/cierzniak/.local/share/wineprefixes/oblivion/drive_c/Program\ Files/Bethesda\ Softworks/Oblivion/OblivionLauncher.exe and if I start with that patch, game will start normally. But if I write optirun env... it crash

rockorequin commented 13 years ago

Put optirun32 immediately before the wine command instead of in front of where you set the environment variable, eg:

    WINEPREFIX="/home/cierzniak/.local/share/wineprefixes/oblivion" optirun32 wine C:\windows\command\start.exe /Unix /home/cierzniak/.local/share/wineprefixes/oblivion/drive_c/Program\ Files/Bethesda\ Softworks/Oblivion/OblivionLauncher.exe

Otherwise optirun32 will try to run 'env' instead of 'wine'. (You need optirun32 instead of optirun64 because wine is a 32-bit program. If you're running on a 32-bit platform, you might need optirun instead of optirun32.)

cierzniak commented 13 years ago

I have only optirun command, not optirun32/64 :) so optirun = optirun32

rockorequin commented 13 years ago

And does it work if you put optirun in front of wine instead of the env command?

cierzniak commented 13 years ago

no.. that same:

cierzniak@1215n:~$ env WINEPREFIX="/home/cierzniak/.PlayOnLinux/wineprefix/TheElderScrolls4_Oblivion" optirun wine C:\Program\ Files\Bethesda\ Softworks\Oblivion\OblivionLauncher.exe

rockorequin commented 13 years ago

That error is wine telling you that it doesn't like the argument you gave it, perhaps because of how optirun passes the arguments to it. You could try putting it in inverted commas:

    WINEPREFIX="/home/cierzniak/.PlayOnLinux/wineprefix/TheElderScrolls4_Oblivion" optirun wine "c:/Program Files/Bethesda Softworks/Oblivion/OblivionLauncher.exe"

Or, if that doesn't work, change to the directory manually first:

    cd "/home/cierzniak/.PlayOnLinux/wineprefix/TheElderScrolls4_Oblivion/drive_c/Program Files/Bethesda Softworks/Oblivion"
    export WINEPREFIX="/home/cierzniak/.PlayOnLinux/wineprefix/TheElderScrolls4_Oblivion"
    optirun wine OblivionLauncher.exe
cierzniak commented 13 years ago

wow, you're awesome :) second idea works!

rockorequin commented 13 years ago

That's great! Glad you got it working.

Do you find this is an issue for you? ie if you run a game in wine fullscreen and then change resolution within the game, you get a blank screen?

gurketsky commented 13 years ago

Ok, got the same problem with wine and wc3. Changing the ingame resolution produces a X Error (BadMatch). I'm not sure if this is only an issue with wine, but torcs seems to get the correct resolutions and could change the screen, but it isn't a real "fullscreen", it's only an overlay on the left top corner. Where as wine is real fullscreen and tries to change the resolution of the screen.