Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No GL Display on Linux #57

Closed
gameblabla opened this issue Jan 25, 2018 · 14 comments
Closed

No GL Display on Linux #57

gameblabla opened this issue Jan 25, 2018 · 14 comments

Comments

@gameblabla
Copy link
Contributor

gameblabla commented Jan 25, 2018

Currently, when attempting to run 3DGE on linux, all you get is a black display.
Last commit before that to work with few modifications was the git commit from December 7.
When raa-eruanna attempted to fix Linux support after some windows code was added in src/system/i_video.cc, he actually broke the display on Linux.
(c90b785)

Fix is fairly trivial, its only a few lines of code.
I'll post a PR very shortly here.

@gameblabla gameblabla mentioned this issue Jan 25, 2018
@madame-rachelle
Copy link
Contributor

First of all, I am "she" and prefer to be referred as that way, and secondly, I have NO idea what was going on with that code, it was among a whole bunch of code that Coraline committed one night. Thirdly, the PR breaks Windows compile, so I will have to take a look at it more closely and figure out what's going on. It's possible to compile two completely separate code paths based on operating system and we may end up having to do that in order to fix this issue.

@gameblabla
Copy link
Contributor Author

Yeah that's why i said this needed some testing on Windows. i was not sure if this would work on Windows. However, as it is now, it still prevents the Linux build from working properly.
Feel to free to provide your own fixes.

@madame-rachelle
Copy link
Contributor

madame-rachelle commented Jan 25, 2018

Yeah I am just going to rewrite (or possibly just reimport) that entire thing using the code that was there previously before all those commits.

@Corbachu Corbachu reopened this Jan 25, 2018
@Corbachu
Copy link
Contributor

Corbachu commented Jan 25, 2018

Reopened as reported by @dsdman. @ChillyWillyGuru is going to take a look at it this weekend and determine if it is indeed a driver issue. If so, we should put some sort of Linux video driver detection thru SDL and I_Error if its an unsupported driver.

@gameblabla
Copy link
Contributor Author

As of latest commit, this issue is fixed. At least it is for me with nouveau and llvmpipe.

@madame-rachelle
Copy link
Contributor

It works fine for me too, when using VirtualBox and "-norenderbuffers" - but I can't test it on my bare metal Linux system because that one's running a few Discord bots and it's crashed the kernel on that one before.

@gameblabla
Copy link
Contributor Author

For me, it also works with render buffers too and i'm using bare metal. I just need to try it with the Nvidia proprietary drivers.

@gameblabla
Copy link
Contributor Author

As i reported here (#47), using the Nvidia proprietary drivers also work fine too. I'm using Devuan unstable as my linux distribution.

@dsdman
Copy link
Contributor

dsdman commented Jan 26, 2018

@gameblabla What is the version number of the Nvidia proprietary drivers are you using? I'm thinking this issue may be due to my laptop's switchable graphics using Nvidia Optimus (very likely), or a new driver making some OpenGL calls deprecated (unlikely). I have set up my X11 server as discribed here on the Arch Linux wiki. I am unable to replicate this setup using Nouveau, as it just segfaults when I try to start Xorg with it.

Either way, it is a linux specific issue (at least on my machine), as the windows build works just fine in wine/native windows.

@gameblabla
Copy link
Contributor Author

@dsdman I was using 384.111 for the proprietary drivers. I heard that later versions had some issues with games on Linux and Nvidia was not recommending them. (that and the increased memory usage too)
What is your GPU ? If its a Geforce 900 or later, then they won't work properly on nouveau.

@dsdman
Copy link
Contributor

dsdman commented Jan 26, 2018

@gameblabla I am using a Geforce GTX 960m (Maxwell architecture circa 2014-2015). From what I gather from Nvidia's website, this card seems to be the mobile equivalent of the desktop Geforce 750 TI (also Maxwell), just clocked slightly higher. Until I can get nouveau working somehow, I am stuck using nvidia 387.34. I guess I'll continue to use the windows version until I can figure out the cause of this problem.

@dsdman
Copy link
Contributor

dsdman commented Jan 26, 2018

Okay, so I did more testing, and I finally got 3DGE to work in Linux (proprietary driver). As it turns out, it works fine if you use a compositing window manager or a compositor, but it doesn't give a display if you don't use a compositor (ie Openbox, i3, dwm). This issue can be closed.
EDIT: Also, it works fine with render buffers as well

@gameblabla
Copy link
Contributor Author

gameblabla commented Jan 26, 2018

Oh i get it now. This is actually not a EDGE issue but an Optimus/Prime one. If you have two graphics card, you may not get a GL display unless you use a compositor. That also explains why it worked on my desktop with an Nvidia but not on yours since you're on Optimus.

It's actually a known issue
https://wiki.archlinux.org/index.php/PRIME

When an application is rendered with the discrete card, it only renders a black screen

In some cases PRIME needs a composition manager to properly work.
If your window manager doesn’t do compositing, you can use xcompmgr on top of it.
If you use Xfce,
you can go to Menu->Settings->Window Manager Tweaks->Compositor and enable > compositing,
then try again your application.

@Corbachu
Copy link
Contributor

We also have a setting that gets enabled for Optimus GPU:

r_gpuswitch, which is found in e_main in DoSystemStartup(). I've never had a need for it so I didn't look into it too much, but nevertheless it is there.

So it appears the engine is back in a stable state for both Linux and Windows. I'll go ahead and close the issue =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants