|
Issues with allegro games |
pix3lworkshop
Member #17,123
September 2019
|
Hello everyone, Playing results in system slowdown, 100% cpu peaks and very slow system responses, also the screen refresh is irregular and choppy. All of these problems where not ever experienced in debian 8 or ubuntu 14.04, and are encountered only after upgrade the system. I experienced the issue on two different hardwares, Intel i3 and i5, both with an intel based graphic card and direct rendering enabled. I don't have any graphical problems with games based on X11, SDL or OpenGL directly, only Allegro ones. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
I don't know what to say. I run Ubuntu 18.04 in a VBox VM and while Alex 4 runs fine, the keys are stuck and won't stop repeating, and it doesn't respond to keyboard input. No CPU spikes at all. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Niunio
Member #1,975
March 2002
|
Xubuntu 18.04.3 here and no problems with Alex4. I must say I don't know what's my computer hardware more than several years old Intel and nVidia. ----------------- |
Chris Katko
Member #1,881
January 2002
|
For the CPU issue: Since you're on Linux, you can run a poor man's profiler (if the game has symbols still in it, or you compile it yourself). Run the game in gdb, then simply hit Control-C (on GDB). then type bt and hit enter for backtrace (shows the call stack). Because you randomly paused, it's most likely to be in the most CPU intensive part. If you do it like 5+ times in a row, and it's really frozen in a few (or one) functions, it'll show up over and over and over thanks to random chance. ("GDB poor mans profiler" has many Google results) https://readwrite.com/2010/11/01/using-gdb-as-a-poor-mans-profi/ [edit] Is Debian 9 brand new or something? Because I usually keep my Linux up-to-date (it's some merge of Xubuntu/Ubuntu at this point) and I'm programming Allegro game prototypes without issue so far. I'll try downloading someone else's Allegro game later. -----sig: |
pix3lworkshop
Member #17,123
September 2019
|
Thanks everyone for the replies. I just made some simple test with Alex4. [code] PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND [/code] As you can see, the CPU run over 100%, the screen refresh is very choppy, I can see it half updated most of the time. Just for testing, I just commented out everything inside "blit_to_screen" function in main.c, to check if the problem is the rendering process [code] The CPU still at 100% usage, but the keyboard responds quickly this time, I can tell you this because of the associated sounds effects. Just for the sake, I added an empty user to my system, for have an empty home folder without any kind of configs files, and tried other DE instead of KDE, but the results still the same. One curious things anyway, is that compiling the allegro 4.4.2 from sources and run the bundled examples, like ex3d or exaccel, results in smooth rendering and very low cpu usage... Anyway, my graphic card is a: I'm using the xorg intel driver. Sorry for my bad english or if something is miswritten or ununderstandable... |
gusnan
Member #11,822
April 2010
|
@Edgar - I believe I can solve your stuck keyboard problem at least - If you don't have a connected hardware joystick, try to remove the file /dev/input/js0, and that problem should go away. [edit] |
Edgar Reynaldo
Major Reynaldo
May 2007
|
@gusnan, that fixed it for me, thank you! My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Niunio
Member #1,975
March 2002
|
I'm really curious. As I've said, I have no problem in my installation, and I have a joystick that I use sometimes that is connected only when I use it. Let's compare my installation with yours: Name | Package | Version ----------------------+---------------+----------- Xubuntu | Ubuntu | 18.4.3 LTS Allex the Allegator 4 | Alex4 | 1.1-7 Allegro | liballegro4.4 | 2:4.4.2-10
----------------- |
Edgar Reynaldo
Major Reynaldo
May 2007
|
I'm running Ubuntu 18.04 in a VBox VM. As soon as I deleted /usr/input/js0 and js1, Alex worked again. The non-existent joystick was stuck. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
pix3lworkshop
Member #17,123
September 2019
|
@Niunio My system is a Devuan Ascii (Debian Stretch), the packages installed are this (Merged from debian): alex4/stable,now 1.1-7 amd64 [installed] On Devuan Jessie version, every Allegro games was running smoothly and fine. I tried this game also on Trisquel, in live environment, and to my surprise it was runnning smoothly, but the use of the cpu was really very high, so much so that when I reboot, the uefi bios also warned me of a high CPU temperature. I will try to check with the "poor man's profiler" as soon as possible as suggested by Katko and see if I can found something interesting... Anyway, thanks a lot for now! |
Niunio
Member #1,975
March 2002
|
Edgar Reynaldo said: I'm running Ubuntu 18.04 in a VBox VM. May be the communication between VM and joystick isn't working as Linux expect. Just wondering, I have no idea, but if host is Windows peripheral devices works in a very different way than Linux (I have both Windows 7 and Xubuntu installed in the same computer, so I know about it). pix3lworkshop said: alex4/stable,now 1.1-7 amd64 [installed] That's exactly the same installation I have. I have a 64bit system too so may be we're using the same binary! Maybe we're using different joystick configuration. ----------------- |
bamccaig
Member #7,536
July 2006
|
I'm running Ubuntu 18.04.3 LTS (MATE flavor) and input appears half functional and half blocked. I can navigate the menu, and start the game. When I start the game, I can walk left or right, but I cannot jump (Alt apparently). I've tried hitting damn near every key on the keyboard, and the only thing that would work was left and right arrow keys. I haven't attempted to delete a joystick device yet. That seems like the wrong way to fix it, albeit a viable workaround for somebody that really wants the game to work and doesn't care about joysticks. Disappointingly the bug report linked to appears to give up and pass the buck instead of at least linking to a new bug on the appropriate package. If the kernel is indeed wrong I'd hope somebody has reported the bug to the kernel devs as that's arguably the most important piece of software running on your machine... -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
pix3lworkshop
Member #17,123
September 2019
|
@Chris Katko I tried the "poor man's profiler" as suggested. [code] I noticed a strange thing during the test. If I cover the game window on the side and not bottom, the rendering starts to be choppy again. In the first attachment, a screen of what the rendering looks like during a normal gameplay. |
gusnan
Member #11,822
April 2010
|
I can reproduce pretty high CPU load when running alex4 in a virtualbox mahcine running Debian in some cases, and this seems to be due to Pulseaudio emulating alsa for the sound. Running htop reports high CPU usage on Pulseaudio. When running using the command "pasuspender alex4" it runs fine on this VM too (But without sound of course). I have found bug reports that seems to support this, but they are really old. |
pix3lworkshop
Member #17,123
September 2019
|
Thanks for your reply gusnan, I tried "pasuspender", but it doesn't solve the problem... Update So, I blacklisted it, and well, now alex4 and ballz (I tried this two only so far) works smoothly and well! [code] By searching the web I saw that a lot of people had similar problems with this driver and some had fixed it by passing some configuration options to it in /etc/modprobe.d. So, I will provide some more further info if I will find the correct option and fix the problem definitly, hoping this can be useful also to others. Thanks to everyone for the support until now Another update Since I found that the problem was the driver, I played around with X11 configs, and just added this one to my system. [code] Now everything seems to works right, even the CPU is on average 90%. |
|