# Xorg 1.7.7_1,1 and Wine



## rusty (Jul 18, 2011)

Over the weekend I rebuilt this box to track 8.2-STABLE and it appears changes between xorg versions breaks Wine.

I'd been playing Lord of the Rings Online for a while with no issues at all on 8.2-RELEASE.
When LotRO loads there's a DirectX9 load screen before the main options screen is loaded (which is handled by opengl).

The DirectX9 load screen works and then I end up with a black 10mm sq box at the bottom left corner.
Output from top reports minimal usage from wine/wineserver ~3.5% at this point.

I've tried older and newer nvidia-driver, reinstalling x11-server/xorg, different versions of wine from http://people.freebsd.org/~ivoras/wine/, installing as per wiki. All the same.

Flash games like Machinarium + Samarost work but opengl games don't. 
However GLXinfo reports no issues and GLXgears works fine.

I also gave FreeBSD-9.0 a spin, same issue as above.

I installed 8.2-RELEASE to another disk, patched and installed via packages, the game works straight away.

Anyone got Wine working on 8.2-STABLE with OpenGL games?


----------



## adamk (Jul 18, 2011)

What output do you get from wine when you run the game from a terminal?

Adam


----------



## rusty (Jul 18, 2011)

I get this code from both 8.2-STABLE and 8.2-RELEASE. PyLotRO is the handler for the actual game, allows for changing servers, patching etc.


```
[~] % wine /export/data/wine/LotRO/drive_c/Program\ Files/PyLotRO/pylotro.exe                          freebsd.gftm.eu:10:47
err:ntlm:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path.
err:ntlm:SECUR32_initNTLMSP Usually, you can find it in the winbind package of your distribution.
fixme:system:SetProcessDPIAware stub!
err:module:import_dll Library QtSvg4.dll (which is needed by L"C:\\Program Files\\PyLotRO\\qt4_plugins\\iconengines\\qsvgicon4.dll") not found
err:module:import_dll Library QtSvg4.dll (which is needed by L"C:\\Program Files\\PyLotRO\\qt4_plugins\\imageformats\\qsvg4.dll") not found
err:wintab32:LoadTablet LoadTabletInfo(0x10066) failed
err:module:import_dll Library QtSvg4.dll (which is needed by L"C:\\Program Files\\PyLotRO\\qt4_plugins\\iconengines\\qsvgicon4.dll") not found
err:module:import_dll Library QtSvg4.dll (which is needed by L"C:\\Program Files\\PyLotRO\\qt4_plugins\\iconengines\\qsvgicon4.dll") not found
fixme:win:FlashWindowEx 0x33e75c
fixme:imm:NotifyIME IMC_SETCANDIDATEPOS
fixme:imm:ImmReleaseContext (0x10074, 0x19fdd0): stub
fixme:winsock:convert_socktype_u2w unhandled UNIX socket type 5
fixme:winsock:convert_proto_u2w unhandled UNIX socket protocol 132
fixme:winsock:WSAIoctl WS_SIO_UDP_CONNRESET stub
fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
fixme:toolhelp:Heap32ListFirst : stub
fixme:imm:NotifyIME IMC_SETCANDIDATEPOS
fixme:win:FlashWindowEx 0x33abd4
```


----------



## adamk (Jul 18, 2011)

Grab wglgears from here: http://www.cs.nmsu.edu/~jeffery/win32/

Run it via wine and pass the -info option:

[cmd=""]wine ./wglgears.exe -info[/cmd]

Check the RENDERER string.

Adam


----------



## rusty (Jul 18, 2011)

Output from `% wine ./wglgears -info`


```
GL_RENDERER   = GeForce GTS 250/PCI/SSE2
GL_VERSION    = 3.3.0 NVIDIA 270.41.19
GL_VENDOR     = NVIDIA Corporation
GL_EXTENSIONS = <snip>
34409 frames in 5.0 seconds = 6881.800 FPS
35292 frames in 5.0 seconds = 7058.400 FPS
35475 frames in 5.0 seconds = 7095.000 FPS
```


----------



## adamk (Jul 18, 2011)

Do the gears render properly on the screen?  If so, then we know there is no inherent problem with wine, Xorg, and the nvidia drivers.  There may just be some incompatibility with that game, though.  You should consider bringing this up to the wine folks.

Adam


----------



## rusty (Jul 18, 2011)

On 8.2-STABLE they render differently to the mesa-demo glxgears. The large gear rotates back and forth ie 11 to 1 o/c instead of a smooth clockwise rotation.


----------



## adamk (Jul 18, 2011)

The difference is rotation appearance is likely due to a different framerate, one slightly out of sycn with the vertical refresh rate.  Again, I suggest checking with the wine folks.

Adam


----------



## rusty (Jul 18, 2011)

Running wglxgears on 8.2-RELEASE (same nvidia driver and wine version) results in

```
GL_RENDERER   = GeForce GTS 250/PCI/SSE2
GL_VERSION    = 3.3.0 NVIDIA 270.41.19
GL_VENDOR     = NVIDIA Corporation
GL_EXTENSIONS =  <snip>
47515 frames in 5.0 seconds = 9503.000 FPS
53302 frames in 5.0 seconds = 10660.400 FPS
53102 frames in 5.0 seconds = 10620.400 FPS
```

So a fair increase in framerate, plus all games using OpenGL actually work.



> Again, I suggest checking with the wine folks.


Sorry but I disagree, no wine version from 1.1.35 to 1.3.24 renders OpenGL using 8.2-STABLE however _all_ of them render OpenGL on 8.2-RELEASE.
The major change being xorg 1.7.5_1,1 (RELEASE) to 1.7.7_1,1 (STABLE).


----------



## adamk (Jul 18, 2011)

rusty said:
			
		

> Running wglxgears on 8.2-RELEASE (same nvidia driver and wine version) results in
> 
> ```
> GL_RENDERER   = GeForce GTS 250/PCI/SSE2
> ...



Well, according to what you said above, wglgears did render using wine on 8.2-STABLE.

Adam


----------



## rusty (Jul 18, 2011)

Yeah OK  wglgears does render albeit incorrectly due to the twitchiness.

But I do think it's related to x11-servers/xorg-server-1.7.7_1,1 as that's what 9.0-CURRENT and 8.2-STABLE have in common, and no opengl games render on them.

8.2-RELEASE with xorg-server-1.7.5_1,1, however, is fine.


----------



## rusty (Jul 28, 2011)

A follow up on this.

2 days ago I got an Nvidia card (GT430) for an old box which I haven't used FreeBSD on until now as it had an ATI card.
I set up 8.2-RELEASE on said box and installed exactly the same packages as those on the PC where wine/LotRO does work, it failed to run the game...ï¿½jr

Swapped video cards / rsynced $HOME/.wine / rsynced game files, mounted files across the LAN all no go.

The only thing I can think to try is a dump and restore. Otherwise I'm at a total loss as to what is causing the issue.


----------



## rusty (Jul 28, 2011)

So unfortunately a dump | restore works as I expected it to (wine and games run correctly), which brings me no closer to why things didn't work before.

The only thing I see on starting X when using the older GPU (GTS250) is

```
(EE) JUL 28 18:32:39 NVIDIA(0): WAIT: (E, 0, 0X287d, 0)
```

The only effect this has seems to be slower X <-> console switching.


----------



## rusty (Aug 5, 2011)

Adding to this again as I'm totally perplexed.
FreeBSD 8.2-RELEASE was temporarily running on a Western Digital 1TB Caviar Black drive before I did the dump | restore to a Western Digital 500GB RE4 where it also ran fine.

Last night I did a dump | restore from the 500GB RE4 to a 250GB RE3, the game works correctly the first time I boot, after a reboot it black screens.
Somewhat confused I did exactly the same dump | restore to a Western Digital 640GB Caviar Black, everything works fine after reboots...

Zeroed the 250GB RE3 and tried again. As before, after a reboot I get the black screen.

x(


----------



## x-com (Aug 13, 2011)

*Same here*

Hi,

just to show some empathy 
I've got the same problem. I'm using FBSD 8.2 64 Bit, after I set up the chroot, 2D Applications worked fine, but no OpenGL Game is running. I'm seeing some artefacts on the screens wine opens (mainly relics from the work screen) an then the game crashes. I installed new nvidia drivers (280.13) but nothing changed. My xorg-server is exactly the same version as yours. Seems like a bug.


----------



## rusty (Aug 21, 2011)

Haha, thanks for the empathy 

I installed PC-BSD-9.0,Beta1.5 on a spare disk today and figured that I'd be daft if I didn't atleast try installing LotRO. I used wine-fbsd64-1.3.21,1 from David Naylor's mediafire repo and despite my expectation of seeing a black screen as has happened so many times before, the game loaded up just fine.


----------

