The online racing simulator
LFS crash loading Weshill track under wine
LFS is crashing while "Rebuilding" Westhill track, also "Loading textures" takes unusually slow. Increasing wine's VideoMemorySize with winetricks did not make any difference. Any idea?
Attached files
backtrace.txt - 8.1 KB - 236 views
journallog.txt - 172.4 KB - 263 views
..
Tried different wine versions 1.9.4, 1.9.5, 1.9.6. It is crashing on one of my computer and not the other (same linux distribution). Is crashing on the one that is working on with new distro version. I am currently using Fedora 23, but is not working on Fedora 24 anymore on the computer that was working on resulting with the same crash.

Thanks for interest

EDIT: Looking at history tried also downgrading wine to 1.7.52.
..
$ lspci -v | grep -i VGA -A 10
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])
Subsystem: ASRock Incorporation Device 0102
Flags: bus master, fast devsel, latency 0, IRQ 29
Memory at fe000000 (64-bit, non-prefetchable) [size=4M]
Memory at c0000000 (64-bit, prefetchable) [size=256M]
I/O ports at f000 [size=64]
Expansion ROM at <unassigned> [disabled]
Capabilities: <access denied>
Kernel driver in use: i915
Kernel modules: i915

It's a Intel(R) Core(TM) i3-2100 sharing memory with system. This would indicate that is currently at 256MB. As I said already I tried setting VideoMemorySize with winetricks and then even manually to 256MB using regedit as winetricks supports only few values, but that didn't help a bit.

Disk does not matter it happens slowly on both SSD as well with HDD. But I don't mind the slowness if it loads eventually. I noted it only because it's probably a clue for debugging purposes.
..
Allocating 1GB to GPU in UEFI firmware didn't help, still the same crash. Providing that it did allocate in OS correctly. As shown by 'free -m' it did since I have 8GB of RAM:

$ free -m
total used free shared buff/cache available
Mem: 6928 1362 3395 435 2170 4994
Swap: 0 0 0

lspci is showing 256MB prefetchable no matter what the setting in UEFI is and it seems not to be the valid check.

Another interesting output seems to indicate that VMEM is allocatable up to 2GB.

$ dmesg | grep drm | grep Memory
[ 1.476500] [drm] Memory usable by graphics device = 2048M

EDIT: Another interesting line from dmesg to whom can translate this to MB:
[ 0.000000] Reserving Intel graphics stolen memory at 0x9fa00000-0xc19fffff

Attached files
dmesg-1024M.txt - 65.7 KB - 333 views
It also seems that key VideoMemorySize does not have an effect on LFS, on working configuration I can go as low as 2MB and still maintain the game in working condition.
..
This most likely doesn't have anything to do with your GPU actually running out of VRAM. As far as I remember from what one of the i915 module devs said, i915 will allocate as much memory as needed up to the 2 GB limit. Reserving huge amounts of RAM for GPU directly in BIOS is actually a waste of memory, i915 can allocate it dynamically.

What actually happens is probably covered by this bug (https://bugs.winehq.org/show_bug.cgi?id=13335). LFS apparently tries to allocate so much resources that it runs out of the address space that WINE reserves for it. This comment in particular (https://bugs.winehq.org/show_bug.cgi?id=13335#c192) suggests two hackarounds that might fix the issue for you.

I can try to experiment with this on my machine with Sandy Bridge GPU once I'm off work...

EDIT: 0.6N works fine on my Sandy Bridge laptop (Arch Linux, WINE 1.9.6) even with Westhill. Fedora patches WINE with out-of-tree Gallium Nine patch series. It is not enabled by default and it shouldn't have any effect when Intel GPU is being used but it's the only difference related to 3D rendering I can think of now.
** Best answer **
I've installed libtxc_dxtn.i686 package from rpmfusion-free repository and all of a sudden Weshill started to work. That's why it didn't work on a fresh installed Fedora 24. How and why I have installed it before I have no idea, all I know that is present on one system that loads Westhill fine. This package is not in Fedora as it probably have some licensing issues. Now that I think about I might have installed it because some other game required it.

Came across it accidentally when trying to eliminate what mesa version might have broke it. It complained about missing library libtxc_dxtn at some point when I broke mesa with a mix of old and new version of packages, I googled it and what do you know, it's a library for managing textures!

I was preparing to bisect mesa which does not sound like fun thing to do, I am relieved that I had not to Big grin

Thanks for the tips MadCatX about managing memory, good to know.

FGED GREDG RDFGDR GSFDG