https://bugs.winehq.org/show_bug.cgi?id=50496
Bug ID: 50496 Summary: OpenGL executable crashes unless wine is run as superuser. Product: Wine Version: 5.22 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: adam@pimentel.space Distribution: ---
on linux-gentoo-5.4.80-r1 with wine-vanilla-5.22-r2, opengl .exe's cause wine to crash. however they do work when wine is run with super-user privleges (e.g. sudo wine ./saddle.exe). I have reason to believe this is a regression, because I was able to run and test windows opengl executables in the past without having to be logged in as root. i've attached the error log.
(the package was compiled with the opengl, abi_x86_64, abi_x86_32 features enabled, amount others)
The executable is an OpenGL/SDL2 program I wrote and compiled with mingw-w64-gcc. it is staticially-linked with GLEW and SDL2. would it help if I attached the libraries I compiled against? I can also attach the executable if you need, but I know .exe files usually get flagged as malware by email and these sorts of things.
I am also using a wayland compositor (sway), and my x11 server is Xwayland. but like I said earlier, wine has ran these executables in the past without having to log in as root or log into an x11 server (e.g. xfce4). but I can test it in xfce4 if you want.
In a windows VM the executable doesn't crash or require administrator privileges. I've done some testing with it in virtualbox, but opengl in virtualbox is an older incompatible version. I can also try with KVM/QEMU to double check that that it's not a problem with the executable.
is it possible that it is just a file permissions error?
https://bugs.winehq.org/show_bug.cgi?id=50496
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #1 from Zebediah Figura z.figura12@gmail.com --- There's no error log attached.
Can you please also attach the program sources or binary?
https://bugs.winehq.org/show_bug.cgi?id=50496
adam@pimentel.space changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |adam@pimentel.space
--- Comment #2 from adam@pimentel.space --- Created attachment 69155 --> https://bugs.winehq.org/attachment.cgi?id=69155 backtrace.txt
https://bugs.winehq.org/show_bug.cgi?id=50496
--- Comment #3 from adam@pimentel.space --- Created attachment 69156 --> https://bugs.winehq.org/attachment.cgi?id=69156 log (just before a fresh rm -r ~/.wine)
https://bugs.winehq.org/show_bug.cgi?id=50496
--- Comment #4 from adam@pimentel.space --- Created attachment 69158 --> https://bugs.winehq.org/attachment.cgi?id=69158 program source code (saddle.cpp)
In my makefile, I compile saddle.exe with
$(WINDOWS_CC) saddle.cpp -o saddle.exe -static -lglew32 -lopengl32 $(shell /usr/x86_64-w64-mingw32/bin/sdl2-config --static-libs)
which expands to
x86_64-w64-mingw32-g++ -s -O3 saddle.cpp -o saddle.exe -static -lglew32 -lopengl32 -L/opt/local/x86_64-w64-mingw32/lib -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--no-undefined -Wl,--dynamicbase -Wl,--nxcompat -Wl,--high-entropy-va -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -static-libgcc
https://bugs.winehq.org/show_bug.cgi?id=50496
--- Comment #5 from adam@pimentel.space --- Created attachment 69159 --> https://bugs.winehq.org/attachment.cgi?id=69159 program binary
https://bugs.winehq.org/show_bug.cgi?id=50496
--- Comment #6 from adam@pimentel.space --- Created attachment 69160 --> https://bugs.winehq.org/attachment.cgi?id=69160 program source code (simple)
the program's source code, with the irrelevant parts (unused subroutines, etc. removed)
https://bugs.winehq.org/show_bug.cgi?id=50496
--- Comment #7 from Zebediah Figura z.figura12@gmail.com --- The program doesn't crash for me, though that's with X11 + radeonsi.
Does it still crash with a clean wine prefix?
https://bugs.winehq.org/show_bug.cgi?id=50496
--- Comment #8 from adam@pimentel.space --- yes it does. unless I run it with sudo. should I attach my /root/.wine?
also, I got windows 10 running within KVM (with GVT-g which is basically intel gpu passthrough) and I updated the program so that it works properly in windows, and I still get this problem with wine. I wonder if this is a problem with MinGW-w64 and not wine? I don't compile with wineg++ because I statically link GLEW and SDL2.
https://bugs.winehq.org/show_bug.cgi?id=50496
--- Comment #9 from Zebediah Figura z.figura12@gmail.com --- (In reply to adam from comment #8)
yes it does. unless I run it with sudo. should I attach my /root/.wine?
also, I got windows 10 running within KVM (with GVT-g which is basically intel gpu passthrough) and I updated the program so that it works properly in windows, and I still get this problem with wine. I wonder if this is a problem with MinGW-w64 and not wine? I don't compile with wineg++ because I statically link GLEW and SDL2.
How are you creating a new prefix? Why aren't you creating it as a normal user?
In general you shouldn't run Wine as root; it's designed to run as a normal user.
https://bugs.winehq.org/show_bug.cgi?id=50496
--- Comment #10 from adam@pimentel.space ---
How are you creating a new prefix? Why aren't you creating it as a normal user?
I am creating a new prefix with rm -rf ~/.wine, then running wincfg.
I am creating a prefix as a normal user, and it isn't working.
I have also tried logging into root using su, then doing wine ./saddle.exe, and it also crashes
the only way my program runs is if I do sudo wine ./saddle.exe
In general you shouldn't run Wine as root; it's designed to run as a normal user.
that is why i made this bug report. it is rather strange. It runs in your x11 system? I'll try running it in x11 now.
https://bugs.winehq.org/show_bug.cgi?id=50496
--- Comment #11 from adam@pimentel.space --- okay when I run in x11 I get the same thing, but with the following line
INTEL-MESA: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0
perhaps it is a driver-specific bug? I am using the i965 drivers btw, is there some way I can get wine to accept MESA_LOADER_DRIVER_OVERRIDE=i965?