dMZX Forums: GNU/Linux sound problem - dMZX Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

GNU/Linux sound problem

#1 User is offline   sniper 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 24-February 15

Posted 27 February 2016 - 11:11 PM

Anyone know of any memory leak or sound-related problems with MZX 2.84c under GNU/Linux?

After five to ten minutes of play, CPU usage on one of my cores (usually the second one, occasionally the first) shoots up to 100%, and all sound in the game stops working. If I disable sound via /etc/megazeux-config, the CPU issue never happens, although then I don't have sound at all of course :(

I'm running under Manjaro (Arch) Linux, using Pulse audio. I compiled MZX from the 2.84c source, using all default options.
0

#2 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,944
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 28 February 2016 - 02:36 AM

No idea, but this looks to be a related problem. Might be something in there that helps.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#3 User is offline   sniper 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 24-February 15

Posted 28 February 2016 - 01:59 PM

View PostDr Lancer-X, on 27 February 2016 - 08:36 PM, said:

No idea, but this looks to be a related problem. Might be something in there that helps.


Yeah, I bet there is some issue with either SDL or Pulse! Good thinking; MZX's audio apparently works fine in the setups on other distros.

Also, it seems like the issue only happens when I fork MZX to the background! So, "megazeux &" results in the issue, "megazeux" does not. Which is no prob-- I can easily just keep a terminal window open whenever I have the game running, doesn't bother me at all.
0

#4 User is offline   sniper 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 24-February 15

Posted 28 February 2016 - 02:25 PM

View Postsniper, on 28 February 2016 - 07:59 AM, said:

Yeah, I bet there is some issue with either SDL or Pulse! Good thinking; MZX's audio apparently works fine in the setups on other distros.

Also, it seems like the issue only happens when I fork MZX to the background! So, "megazeux &" results in the issue, "megazeux" does not. Which is no prob-- I can easily just keep a terminal window open whenever I have the game running, doesn't bother me at all.


Actually, just happened again :(/> So the forking thing didn't matter, although the game did run properly for almost a half hour, which is way longer than usual.

I'll do some more digging, but I have my kids hanging off of me, so it's tough to research. It's a shame, because MZX is basically unusable on my system because of this. Last night I even had code disappearing out of robots after awhile, like some kind of crazy memory leak was happening, and impacting things other than audio!
0

#5 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,944
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 28 February 2016 - 07:06 PM

Is it possible for you to use a different audio device? The other possibility is installing that sdl-1.1-esd thing that's mentioned in the thread, if you can find an equivalent.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#6 User is offline   sniper 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 24-February 15

Posted 04 March 2016 - 07:21 PM

I may have solved it! Behold, run_megazeux.sh:

#!/bin/sh
export SDL_AUDIODRIVER=alsa
megazeux


I just left the game running for 45 minutes, and no issues. I also noticed that the general CPU usage pattern-- even before the problem happens-- was different; usage was the same across all CPU cores. Whereas without setting that flag to "alsa", CPU usage seems to focus on just one core.

I may work on a game over the weekend, and then I'll know for sure if this worked.

This is off topic, but I might also play around with a Steam Controller mapping for Megazeux; obviously it's worthless for editing, but for actually playing games it might be fun.

This post has been edited by sniper: 04 March 2016 - 07:22 PM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users