DOSBox opens then immediately closes

Hello Sir, it seems you have a laptop with an Nvidia GPU and that might be your issue.

I think there is a lutris configuration to enable Nvidia Prime, you should enable that.

Other option is to check the following:

PS. Security advice, clean your logs Todd and don’t use your full name when setting up a laptop. Just my 2 cents

1 Like

Also this one:

1 Like

Thank you for the help!!

OK - the solutions above didn’t seem to work. I’ve been trying different combinations of the video settings under the “Configure” option for the game in Lutris. When I modified the “Switch Resolution” from “Keep current (default)” to different settings like “1368x768” the game will start into a black screen and the music will play. No video appears, though, and I have to kill DOSBox to exit.

But that is farther than it was getting before. Any other suggestions on perhaps figuring out the right settings?

Following up here in case it’s helpful to anyone else.

My laptop is a System76 Gazelle. It has both integrated graphics and Nvidia graphics which can be switched on reboot. My normal use is the integrated graphics for better battery life. On a hunch, I tried rebooting and switching to Nvidia. The game ran just fine.

So I have a workaround but still haven’t figured out how to configure the integrated graphics to get the game to run again.

1 Like

You should run the DOSbox from the runner folder:

~/.local/share/lutris/runners/dosbox/bin

this way we can ignore any lutris settings and check what the program writes in this window.

1 Like

I see an executable dosbox file in that folder. I right-clicked on it and selected “Run” but nothing happened. What am I missing?

You should at least see the DOSbox window.
That means you are missing something, please use the Terminal to run the binary:

./dosbox

And report back what is printed, in my case I was missing some dependencies like the opusfile.

OK! Got this error message:

./dosbox: error while loading shared libraries: libSDL2_net-2.0.so.0: cannot open shared object file: No such file or directory

1 Like

Ah I also got that one, you need to install that dependency:

Look there, you need to install the following:

sudo apt install libsdl2-2.0-0 libsdl2-net-2.0-0 libopusfile0

1 Like

OK that let me run Dosbox. I’ll be honest - I don’t know how to do the steps that Dosbox needs to run the game.

You should now try running it from Lutris, it should work now

Argh! Getting that same error. It must be the video resolution?

Started initial process 20050 from /home/toddpanek/Games/gog/master-of-magic/start.sh
Start monitoring process.
Running Master of Magic
Starting DOSBox
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 153 (XFree86-VidModeExtension)
Minor opcode of failed request: 10 (XF86VidModeSwitchToMode)
Value in failed request: 0x7e7
Serial number of failed request: 233
Current serial number in output stream: 235
DOSBox version 0.74
Copyright 2002-2010 DOSBox Team, published under GNU GPL.

CONFIG:Loading primary settings from config file dosboxMOM.conf
CONFIG:Loading additional settings from config file dosboxMOM_single.conf
MIXER:Got different values from SDL: freq 44100, blocksize 1024
ALSA:Can’t subscribe to MIDI port (65:0) nor (17:0)
MIDI:Opened device:none
Done.

In a terminal can you run:

/home/toddpanek/Games/gog/master-of-magic/start.sh

An check what is reported, the game is started with a script so maybe it’s a script issue.

1 Like

Keeps coming back to the same error.

toddpanek@pop-os:~$ /home/toddpanek/Games/gog/master-of-magic/start.sh
Running Master of Magic
Starting DOSBox
DOSBox version 0.74
Copyright 2002-2010 DOSBox Team, published under GNU GPL.

CONFIG:Loading primary settings from config file dosboxMOM.conf
CONFIG:Loading additional settings from config file dosboxMOM_single.conf
MIXER:Got different values from SDL: freq 44100, blocksize 1024
ALSA:Can’t subscribe to MIDI port (65:0) nor (17:0)
MIDI:Opened device:none
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 153 (XFree86-VidModeExtension)
Minor opcode of failed request: 10 (XF86VidModeSwitchToMode)
Value in failed request: 0x7e7
Serial number of failed request: 231
Current serial number in output stream: 233
Done.

well, we have learned a lot now, it is not a lutris issue. it seems to be something with the script. Also, maybe you have a local installation of the dosbox.

In any case, can you share the contents of the script file?

One question - the game will run through Lutris when I change graphics mode from the integrated graphics to Nvidia. Also, when running the integrated graphics, I was able to get it running but only heard the game music with a blank screen.

…I’ve been trying different combinations of the video settings under the “Configure” option for the game in Lutris. When I modified the “Switch Resolution” from “Keep current (default)” to different settings like “1368x768” the game will start into a black screen and the music will play. No video appears, though, and I have to kill DOSBox to exit.

1 Like

Is this the script you are referring to? “start.sh” in the Master of Magic folder.

https://paste.ubuntu.com/p/KbCxwjHX56/

You should try now with this:

That might be solved already after you fixed the dependencies.
Also you might need to check these files:

run_dosbox “dosboxMOM.conf” “dosboxMOM_single.conf”

From what I understand, the nvidia driver does all it should but the integrated graphics are not. Also, like you said it has to do with the window size so in those conf file you should try to set some windowed output setting.

1 Like

Esto funciono para mi, me faltaban las librerías libsdl, muchas gracias!!!
This worked for me, I was missing the libsdl libraries, thank you very much!!!