Problem starting DirectX apps, possibly due to glibc update?

Questions about Wine on Linux
Locked
Captain Crutches
Level 2
Level 2
Posts: 11
Joined: Fri Jan 10, 2014 11:39 pm

Problem starting DirectX apps, possibly due to glibc update?

Post by Captain Crutches »

I've been desperately trying to figure this problem out for over a month now to no avail, and I don't even know if the Wine forums are the right place to ask, but given that my problem only seems to appear in Wine apps, I figure I'll start here and you guys can shoo me off somewhere else if you think I'd be better off there.

Let me start at the beginning - at the beginning of December, that is. At that point I had Wine version 1.7.4 (the latest version in the Gentoo portage tree). I had a 32-bit wineprefix where, after some work, Steam (and whatever games I could run from it) and Eve Online were working well. Then one day, they just stopped. Steam reverted to its old behavior of hanging on "connecting steam account", and Eve began hanging before even opening the window. I couldn't even get Steam to start using taskset. I eventually learned that a recent Steam update had broken it in Wine and that it was fixed in version 1.7.8, so I decided to wait for that to show up in Portage and focus on Eve.

Starting the ExeFile directly (if you're unaware, that's the way to start the game up while bypassing the unnecessary and known-to-be-buggy launcher) simply stopped running when it hit roughly 49MB of memory usage and had to be killed manually. The launcher seemed okay, until I clicked launch, at which point it started the ExeFile itself with the same result. However, I got really concerned when I tried to open the settings in the launcher, and was met with this Wine exception report: http://pastebin.com/eBg1Ppeq (Note, I now have Wine 1.7.10, with the same symptoms)

The backtrace starts at libc.so.6, which is part of glibc, which I had indeed updated the other day. Unfortunately, I can't downgrade it to see if that's really the culprit, as downgrading glibc in Gentoo is a very very bad idea (especially since I've since run emerge -e to rebuild my entire system out of desperation).

After about a week of messing around, downgrading packages I'd upgraded around the time it stopped working, trying different wineprefix combinations, etc, I went home from school for the holidays, and when I came back 3 weeks later, I upgraded wine to 1.7.10, with no effect. Same problems, even with Steam.

However, I've recently discovered that DirectX seems to have an effect... Disabling d3d9.dll in Wine lets Eve get a little further in its startup (until it tries to load d3d11, at which point it hangs again, or if d3d11 is also disabled, complains about not finding any DirectX). Indeed, with both d3d9 and d3d11 disabled, I can get into the settings for the Eve launcher without the exception. I can also start Steam with taskset if d3d9 is disabled, but then if I start Audiosurf from Steam (which before all this started had worked flawlessly) it complains about d3d9 being missing. So, I tell Wine to disable d3d9 only for Steam.exe, and Audiosurf then gives me a backtrace very similar to the Eve launcher's: http://pastebin.com/zS2Xp8QE

So, it seems this problem may be related to Wine's DirectX (even though I've winetricks'd d3dx9), but I can't find anyone else with anything resembling my problem anywhere, and after a month of fighting with this, I'm at a complete loss. I've tried rolling back just about every package I've upgraded since things stopped working (except glibc), I must have made several dozen new wineprefixes by now (32bit, 64bit, WinXP mode, Win7 mode, different things winetricks'd...), and I've even rebuilt my entire system with emerge -e, with no results. On the bright side, I've used my laptop to manage my skill queue in Eve and been able to train Siege V while this has been going on...

emerge --info: http://pastebin.com/CxVT5d1s
eix wine: http://pastebin.com/ddB4h0dq
Running Eve with d3d9 enabled and WINEDEBUG="+loaddll": http://pastebin.com/pWPJvvUm
Running Eve with d3d9 disabled and WINEDEBUG="+loaddll": http://pastebin.com/gtStGUfd

At this point, any and all suggestions would be much appreciated, including telling me to go away and bother some other more appropriate forum with my problems. If you need any other output/logs/winedebug settings/etc, let me know and I'll do my best to provide them. Thanks!
Captain Crutches
Level 2
Level 2
Posts: 11
Joined: Fri Jan 10, 2014 11:39 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by Captain Crutches »

Just updated to Wine 1.7.11, no change. I wonder if a clean install would fix it... I'm about at the end of my rope here.
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by dimesio »

I don't have any clear answers for you, or even much of a guess. But the one thing I did notice in your backtraces is that you are using a "hardened" kernel, and I have definitely seen cases on the forum where SELinux or some other security feature was crashing Wine. You might want to test a kernel without the hardening.
Captain Crutches
Level 2
Level 2
Posts: 11
Joined: Fri Jan 10, 2014 11:39 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by Captain Crutches »

Clean install of Funtoo did NOT fix the problem. There goes 12 hours of work backing up, reinstalling, and restoring, only to see the exact same symptoms. GG.

Kernel issue, eh? Well, I've been using hardened for months with no issues at all, and I don't think I had upgraded my kernel when it stopped working (though now that I've wiped everything I can't tell you for sure). I can certainly try using a different kernel, but not right now as it's 3:30 AM and I'm exhausted and irritated. I'll give it a shot tomorrow or Friday (or today or tomorrow, since it's Thursday now) and let you know if it works.
Captain Crutches
Level 2
Level 2
Posts: 11
Joined: Fri Jan 10, 2014 11:39 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by Captain Crutches »

Nope... I tried switching over to gentoo-sources-3.12.8 (since my video drivers aren't compatible with 3.13 yet) and still get the same problem.
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by dimesio »

You mentioned that the games are working on your laptop. What are the differences between the two systems?
Captain Crutches
Level 2
Level 2
Posts: 11
Joined: Fri Jan 10, 2014 11:39 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by Captain Crutches »

Well, the laptop runs Windows, so Wine isn't an issue there. :P
Captain Crutches
Level 2
Level 2
Posts: 11
Joined: Fri Jan 10, 2014 11:39 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by Captain Crutches »

I also dual boot with Windows on my desktop, where everything works fine and dandy. I just really hate having to reboot into Windows every time I want to play a game that I know should work in Wine...
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by dimesio »

Have you asked for help on the Gentoo forum? Someone more knowledgeable about their build system might be better able to sort this out.

You could also try another distro on the same system.
Captain Crutches
Level 2
Level 2
Posts: 11
Joined: Fri Jan 10, 2014 11:39 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by Captain Crutches »

No, this is the first place I've tried, thinking maybe since the problem seemed to be with Wine that someone here could see what was wrong more easily than me. But I did just start a thread on the Funtoo forum, which if you're interested you can follow here.
Tpyo
Level 1
Level 1
Posts: 6
Joined: Tue Jan 28, 2014 5:27 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by Tpyo »

Just registered to say I have the exact same problem.

I run ~amd64, and compile with CFLAGS -O3 for most packages. So I realise I am a bad example and will have to do a clean stable install without fiddling about to have a proper test case. I reverted wine back to multiple versions in 1.6.x and 1.7.x, created a load of WINEPREFIX'es with different overrides each, all to no avail. This is the first time though that I can't make EVE Online run without reverting a wine version, falling back to 32bit, changing USE or compile flags or the like. Time permitting, I will do a clean Gentoo installation on a spare disk with >=sys-libs/glibc-2.18 masked from an older ISO and see if that makes any difference.

emerge --info: http://pastebin.com/nUbY9fjZ

Code: Select all

# uname -a
Linux dop 3.13.0-gentoo-r1 #1 SMP PREEMPT Sun Jan 26 12:37:48 GMT 2014 x86_64 AMD FX(tm)-8150 Eight-Core Processor AuthenticAMD GNU/Linux

Code: Select all

# lspci | grep VGA
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Tahiti PRO [Radeon HD 7950]
x11-drivers/ati-drivers: 13.12 (patched on local overlay for gentoo-sources 3.13.0)

app-emulation/wine-1.7.11 USE="X alsa fontconfig gecko jpeg mp3 ncurses opengl png realtime run-exes ssl threads truetype xcomposite xinerama xml -capi -cups -custom-cflags -dos -gphoto2 -gsm -gstreamer -lcms -ldap -mono -netapi -nls -odbc -openal -opencl -osmesa -oss -perl -prelink -pulseaudio -samba -scanner (-selinux) {-test} -udisks -v4l" ABI_X86="32 64 (-x32)" LINGUAS="-ar -bg -ca -cs -da -de -el -en -en_US -eo -es -fa -fi -fr -he -hi -hr -hu -it -ja -ko -lt -ml -nb_NO -nl -or -pa -pl -pt_BR -pt_PT -rm -ro -ru -sk -sl -sr_RS@cyrillic -sr_RS@latin -sv -te -th -tr -uk -wa -zh_CN -zh_TW"
Captain Crutches
Level 2
Level 2
Posts: 11
Joined: Fri Jan 10, 2014 11:39 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by Captain Crutches »

Glad to see I'm not alone. Maybe we can figure something out... also maybe bump my Funtoo forum thread I linked in my last post? Seems you run plain Gentoo while I'm on Funtoo, but other than that our systems look similar, and despite Funtoo having some differences like Portage trees, they've got the same basic functions.

Can you remember when it stopped working/what might have changed around then? I already tried a clean install, but it was with a recent enough stage3 that glibc-2.18 was included and couldn't be masked. If you're able to make something work with a lower version, though, let me know (although I'm not sure then if the bug would be in Wine or glibc, but we'll cross that bridge if we come to it I suppose).
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by oiaohm »

I don't know if this is linked but wine itself is normally only recommend to be built with -O2. -O3 in particular versions of gcc at times can get over savage with wine removing what appear to be unused structures. structures that windows applications will interface with if that is happening it might not be glibc or wine it might simply be your complier and being a little too performance hunting.
Captain Crutches
Level 2
Level 2
Posts: 11
Joined: Fri Jan 10, 2014 11:39 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by Captain Crutches »

I was using O2 myself. Never touched my cflags from the default "-march=native -O2 -pipe". That's the weird thing, I didn't change any settings at all, just all of a sudden one day it worked and the next it didn't.
Tpyo
Level 1
Level 1
Posts: 6
Joined: Tue Jan 28, 2014 5:27 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by Tpyo »

Since lots of problems many years ago with World of Warcraft, I leave wine on the default C flags. However, the rest of the system being unstable, and almost all other packages with -O3 will make it a bad test enviorment anyhow.
I just finished recompiling my entire system (emerge -e world) without any change to our problem. Sadly I haven't had the time to play eve for about 2 months, so I can't pinpoint any moment from where it went wrong.
Just now starting to create a Gentoo installation without >= glibc-1.18
Captain Crutches
Level 2
Level 2
Posts: 11
Joined: Fri Jan 10, 2014 11:39 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by Captain Crutches »

I just made an interesting discovery.

By switching to the xorg-x11 opengl interface, I was able to access and use the menu in the Eve launcher, which wasn't possible before. However, starting the ExeFile caused my entire screen to freeze, and I had to alt-tab over to the terminal on my other screen to kill the wineserver (I also saw in the alt-tab menu a dialog saying "outdated graphics card detected", though I couldn't manage to get it to show itself through the frozen screen). Launching the ExeFile in a virtual desktop caused my entire system to freeze up and need a hard-reset, but not before I saw a message in the terminal saying that direct rendering was disabled, which it indeed is in my kernel for ati-drivers to work.

Of course, since I'd switched to the xorg-x11 opengl interface, KDE then refused to start on boot, and I had to boot into a livecd and chroot into my system to switch it back.

Does any of that shed any light on anything?
Tpyo
Level 1
Level 1
Posts: 6
Joined: Tue Jan 28, 2014 5:27 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by Tpyo »

I just created a gentoo installation with glibc-2.16, and I can play the game now. I only winetricksed vcrun2010 and did nothing else bar disabling the captains quarters of course. I didn't change winecfg settings bar virtual desktop (1920x1080 at first) and window decorations. Seeing as you run KDE as well as I did, you might want to see if you can run the game from a text console with 'xinit <your usual command line to start eve>'. Right now I am running eve from FVWM 2 and without window manager without issues (even tripple monitor setup works).
For the installation of Gentoo with glibc-2.16 I copied all settings (/etc/portage directory, and everything else needed, running the precise same kernel from the same boot device even), and only masked >=sys-libs/glibc-2.17 and stripped my /var/lib/portage/world file to a minimum.

I think I'll call it here for now, I don't need any more than terminals and EVE Online to run for the moment, and I rather wait for an update to wine/glibc than reinstall my SSD. If there's any help I can offer to pinpoint the problem please ask, but beware I might be slow to respond due to family life.
Tpyo
Level 1
Level 1
Posts: 6
Joined: Tue Jan 28, 2014 5:27 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by Tpyo »

After a repeated search today I found other people having issues with glibc-2.18. I will try and recompile glibc-2.18 with -O3 and see if that fixes the problem for me. And if so, I am shocked to fix something with more agressive CFLAGS ;)

Edit: forgot to link the search result: http://www.linuxquestions.org/questions ... 175473288/
Tpyo
Level 1
Level 1
Posts: 6
Joined: Tue Jan 28, 2014 5:27 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by Tpyo »

Recompiling sys-libs/glibc-2.18-r1 with -O3 worked for me.
Captain Crutches
Level 2
Level 2
Posts: 11
Joined: Fri Jan 10, 2014 11:39 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by Captain Crutches »

Confirmed, that worked for me too. I'm only on glibc-2.18 (not r1) because 2.18-r1 is currently masked in Funtoo, but rebuilding that with -O3 fixes the problem in Eve. Whether it works for the other games I know work in Wine remains to be seen, but I'm hopeful. Thanks for the tip... no more rebooting into Windows when I get a Jabber ping!

I'm gonna go ahead and mark this thread as solved, but the question now becomes... why? Is it a bug in glibc? Wine? We know the solution now, but what's the problem?

Er... noob question, how do I mark a thread as solved? I can't find an edit button on the OP or anything...
Tpyo
Level 1
Level 1
Posts: 6
Joined: Tue Jan 28, 2014 5:27 pm

Re: Problem starting DirectX apps, possibly due to glibc upd

Post by Tpyo »

If I understood correctly from the thread I found: there is a glibc function not being inlined in i686 which results in us having problems, so I assume it's a glibc problem. Archlinux glibc 2-18-2 has it fixed with a patch that prefixes the function with 'inline' to help the compiler without the -O3 (a better approach to fix this I would say). if interrested, follow the thread: https://bugs.archlinux.org/task/36556?project=1.
Locked