# i386-wine question



## Oskman (Jan 30, 2018)

Greetings.
After asking a question on wineHQ I got this answer and thought I'd check here what it means:


```
After looking at this (which does indicate that your baseline hardware acceleration is working), I did some poking around. The issue looks like something I've run into a few times with Linux users: 32-bit compatibility. WINE needs a fully-working 32-bit graphics stack in order to provide 3D acceleration, otherwise it's going to fall back to software rendering. I haven't got any idea how to set this up in FreeBSD, as I have never used it. Your best bet may be to inquire about this on the FreeBSD forums/wiki/mailing lists. Sorry I can't be of more assistance.
```


----------



## xchris (Jan 30, 2018)

Indeed , wine uses 32-bit virtual drivers, that's why on 64-bit linux installations you must enable the 32-bit support (in Ubuntu is called multi-arch) so to install the 32-bit gfx drivers too. Looks like that on FreeBSD we have only 64-bit gfx drivers.


----------



## shkhln (Jan 30, 2018)

And where is the question itself? Anyway, for Nvidia GPUs i386-wine package provides /usr/local/share/wine/patch-nvidia.sh script specifically meant for downloading 32-bit libGL.so.1 and copying it into correct location.


----------



## Oskman (Jan 30, 2018)

I have a radeon card..this means I need to install a 32-bit radeon driver to use wine 32-bit on my 64-bit system?


----------



## SirDice (Jan 30, 2018)

No, not required. Only if you want to have accelerated (3D) graphics with the application you're running through Wine.


----------



## shkhln (Jan 30, 2018)

Oskman said:


> I need to install a 32-bit radeon driver to use wine 32-bit on my 64-bit system?



No, not really. It's not even possible to use an actual gpu driver, that is, a kernel module, with architecture it is not compiled for. Wine only needs 32-bit userspace part of the graphics stack. In you case that would be OpenGL library from Mesa 3D project and it is already included in i386-wine package.


```
% pkg info -l i386-wine-staging | grep -i libgl
   /usr/local/lib32/.libGL/dri/i915_dri.so
   /usr/local/lib32/.libGL/dri/i965_dri.so
   /usr/local/lib32/.libGL/dri/kms_swrast_dri.so
   /usr/local/lib32/.libGL/dri/r200_dri.so
   /usr/local/lib32/.libGL/dri/r300_dri.so
   /usr/local/lib32/.libGL/dri/r600_dri.so
   /usr/local/lib32/.libGL/dri/radeon_dri.so
   /usr/local/lib32/.libGL/dri/radeonsi_dri.so
   /usr/local/lib32/.libGL/dri/swrast_dri.so
   /usr/local/lib32/.libGL/dri/vmwgfx_dri.so
   /usr/local/lib32/.libGL/libGL.so.1
   /usr/local/lib32/libGLU.so.1
   /usr/local/lib32/libglapi.so.0
   /usr/local/lib32/wine/libglu32.def
```


----------



## Oskman (Jan 30, 2018)

Then why do I have 1 fps every 3 seconds on common dx9 games?


----------



## shkhln (Jan 30, 2018)

Can you _please_ post here the winehq (irc?) question with all details? I'm not going to ask the third time and I will just ignore this thread otherwise.


----------



## Oskman (Jan 30, 2018)

The question is based on this output on my 64-bit FreeBSD with i386-wine. Why do all my favorite games lag!

```
root@MyBSD:/home/agile717 # dmesg | grep dri
vtvga0: <VT VGA driver> on motherboard
lpt0: Interrupt-driven port
drmn0: info: fence driver on ring 0 use gpu addr 0x0000000080000c00 and cpu addr 0x0xfffff8006835ec00
drmn0: info: fence driver on ring 1 use gpu addr 0x0000000080000c04 and cpu addr 0x0xfffff8006835ec04
drmn0: info: fence driver on ring 2 use gpu addr 0x0000000080000c08 and cpu addr 0x0xfffff8006835ec08
drmn0: info: fence driver on ring 3 use gpu addr 0x0000000080000c0c and cpu addr 0x0xfffff8006835ec0c
drmn0: info: fence driver on ring 4 use gpu addr 0x0000000080000c10 and cpu addr 0x0xfffff8006835ec10
VT: Replacing driver "vga" with new "fb".
```


----------



## Oskman (Jan 30, 2018)

Here's some more rendering stuffs:

```
root@HellRaker++:/home/agile717 # dmesg | grep dri
vtvga0: <VT VGA driver> on motherboard
lpt0: Interrupt-driven port
drmn0: info: fence driver on ring 0 use gpu addr 0x0000000080000c00 and cpu addr 0x0xfffff8006835ec00
drmn0: info: fence driver on ring 1 use gpu addr 0x0000000080000c04 and cpu addr 0x0xfffff8006835ec04
drmn0: info: fence driver on ring 2 use gpu addr 0x0000000080000c08 and cpu addr 0x0xfffff8006835ec08
drmn0: info: fence driver on ring 3 use gpu addr 0x0000000080000c0c and cpu addr 0x0xfffff8006835ec0c
drmn0: info: fence driver on ring 4 use gpu addr 0x0000000080000c10 and cpu addr 0x0xfffff8006835ec10
VT: Replacing driver "vga" with new "fb".
root@HellRaker++:/home/agile717 # dmesg | grep drm
info: [drm] Initialized drm 1.1.0 20060810
drmn0: <Pitcairn> on vgapci0
info: [drm] RADEON_IS_PCIE
info: [drm] initializing kernel modesetting (PITCAIRN 0x1002:0x6810 0x1043:0x0464).
info: [drm] register mmio base: 0xFDE80000
info: [drm] register mmio size: 262144
info: [drm] radeon_atrm_get_bios: ===> Try ATRM...
info: [drm] radeon_atrm_get_bios: pci_find_class() found: 0:1:0:0, vendor=1002, device=6810
info: [drm] radeon_atrm_get_bios: Get ACPI device handle
info: [drm] radeon_acpi_vfct_bios: ===> Try VFCT...
info: [drm] radeon_acpi_vfct_bios: Get "VFCT" ACPI table
info: [drm] radeon_acpi_vfct_bios: Failed to get "VFCT" table: AE_NOT_FOUND
info: [drm] igp_read_bios_from_vram: ===> Try IGP's VRAM...
info: [drm] igp_read_bios_from_vram: VRAM base address: 0xd0000000
info: [drm] igp_read_bios_from_vram: Map address: 0xfffff800d0000000 (262144 bytes)
info: [drm] igp_read_bios_from_vram: Incorrect BIOS signature: 0xFFFF
info: [drm] radeon_read_bios: ===> Try PCI Expansion ROM...
info: [drm] radeon_read_bios: Map address: 0xfffff800000c0000 (131072 bytes)
info: [drm] ATOM BIOS: 6810HB.15.41.0.1.AS02
drmn0: info: VRAM: 2048M 0x0000000000000000 - 0x000000007FFFFFFF (2048M used)
drmn0: info: GTT: 512M 0x0000000080000000 - 0x000000009FFFFFFF
info: [drm] Detected VRAM RAM=2048M, BAR=256M
info: [drm] RAM width 256bits DDR
info: [drm] radeon: 2048M of VRAM memory ready
info: [drm] radeon: 512M of GTT memory ready.
info: [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
info: [drm] Driver supports precise vblank timestamp query.
info: [drm] MSI enabled 1 message(s)
drmn0: info: radeon: using MSI.
info: [drm] radeon: irq initialized.
info: [drm] GART: num cpu pages 131072, num gpu pages 131072
info: [drm] Loading PITCAIRN Microcode
info: [drm] PCIE GART of 512M enabled (table at 0x0000000000040000).
drmn0: info: WB enabled
drmn0: info: fence driver on ring 0 use gpu addr 0x0000000080000c00 and cpu addr 0x0xfffff8006835ec00
drmn0: info: fence driver on ring 1 use gpu addr 0x0000000080000c04 and cpu addr 0x0xfffff8006835ec04
drmn0: info: fence driver on ring 2 use gpu addr 0x0000000080000c08 and cpu addr 0x0xfffff8006835ec08
drmn0: info: fence driver on ring 3 use gpu addr 0x0000000080000c0c and cpu addr 0x0xfffff8006835ec0c
drmn0: info: fence driver on ring 4 use gpu addr 0x0000000080000c10 and cpu addr 0x0xfffff8006835ec10
info: [drm] ring test on 0 succeeded in 3 usecs
info: [drm] ring test on 1 succeeded in 1 usecs
info: [drm] ring test on 2 succeeded in 1 usecs
info: [drm] ring test on 3 succeeded in 2 usecs
info: [drm] ring test on 4 succeeded in 1 usecs
info: [drm] ib test on ring 0 succeeded in 0 usecs
info: [drm] ib test on ring 1 succeeded in 0 usecs
info: [drm] ib test on ring 2 succeeded in 0 usecs
info: [drm] ib test on ring 3 succeeded in 0 usecs
info: [drm] ib test on ring 4 succeeded in 1 usecs
info: [drm] radeon_device_init: Taking over the fictitious range 0xd0000000-0xe0000000
radeon_iicbb0 on drmn0
radeon_iicbb1 on drmn0
radeon_iicbb2 on drmn0
radeon_iicbb3 on drmn0
radeon_iicbb4 on drmn0
radeon_iicbb5 on drmn0
radeon_iicbb6 on drmn0
radeon_iicbb7 on drmn0
drm_iic_dp_aux0 on drmn0
info: [drm] Radeon Display Connectors
info: [drm] Connector 0:
info: [drm]   DP-1
info: [drm]   HPD4
info: [drm]   DDC: 0x6530 0x6530 0x6534 0x6534 0x6538 0x6538 0x653c 0x653c
info: [drm]   Encoders:
info: [drm]     DFP1: INTERNAL_UNIPHY2
info: [drm] Connector 1:
info: [drm]   HDMI-A-1
info: [drm]   HPD5
info: [drm]   DDC: 0x6540 0x6540 0x6544 0x6544 0x6548 0x6548 0x654c 0x654c
info: [drm]   Encoders:
info: [drm]     DFP2: INTERNAL_UNIPHY2
info: [drm] Connector 2:
info: [drm]   DVI-I-1
info: [drm]   HPD6
info: [drm]   DDC: 0x6580 0x6580 0x6584 0x6584 0x6588 0x6588 0x658c 0x658c
info: [drm]   Encoders:
info: [drm]     DFP3: INTERNAL_UNIPHY
info: [drm]     CRT1: INTERNAL_KLDSCP_DAC1
info: [drm] Connector 3:
info: [drm]   DVI-D-1
info: [drm]   HPD1
info: [drm]   DDC: 0x6570 0x6570 0x6574 0x6574 0x6578 0x6578 0x657c 0x657c
info: [drm]   Encoders:
info: [drm]     DFP4: INTERNAL_UNIPHY1
info: [drm] Internal thermal controller with fan control
info: [drm] radeon: power management initialized
info: [drm] Connector DP-1: get mode from tunables:
info: [drm]   - kern.vt.fb.modes.DP-1
info: [drm]   - kern.vt.fb.default_mode
info: [drm] Connector HDMI-A-1: get mode from tunables:
info: [drm]   - kern.vt.fb.modes.HDMI-A-1
info: [drm]   - kern.vt.fb.default_mode
info: [drm] Connector DVI-I-1: get mode from tunables:
info: [drm]   - kern.vt.fb.modes.DVI-I-1
info: [drm]   - kern.vt.fb.default_mode
info: [drm] Connector DVI-D-1: get mode from tunables:
info: [drm]   - kern.vt.fb.modes.DVI-D-1
info: [drm]   - kern.vt.fb.default_mode
info: [drm] fb mappable at 0xD114B000
info: [drm] vram apper at 0xD0000000
info: [drm] size 8294400
info: [drm] fb depth is 24
info: [drm]    pitch is 7680
fbd0 on drmn0
info: [drm] Initialized radeon 2.29.0 20080528 for drmn0 on minor 0
```


----------



## Oskman (Jan 30, 2018)

In particular I've tried Dungeons & Dragons Neverwinter Online and Dungeons & Dragons Ebberon Unlimited....thus far


----------



## shkhln (Jan 30, 2018)

Ok, thanks. According to the FreeBSD wiki Radeon driver from FreeBSD 11 doesn't support hardware acceleration for Pitcairn GPUs. What you are seeing is a fallback on the software renderer from Mesa. There exists _drm-next-kmod_ port providing up-to-date Amd and Intel GPU drivers, but it requires FreeBSD-CURRENT, which is a development branch of the operating system.


----------

