xinit / startx results in tiny box in corner of the screen with high CPU
Pi Model : 3B
RetroPie Version: 4.4.15
Built From: Pre made image on Retropie site (and then updated after installation.
Thank you for taking the time to read this. I've have tried to do my own research for this issue but so far have come up with nothing that helps. One of the emulators I use is AGS (Adventure Game Studio) and it was working perfectly fine until recently. I can only assume an update of some description changed the behaviour but I can't be sure. When I launch it now, it only takes up a tiny corner of the screen (the top left hand corner). On top of that the CPU usage goes through the roof, I suspect it has gone off the rails in some way. The only way I can escape is to restart the machine.
I did discover that this emulator uses xinit to display it's output. The actual command in it's emulators.cfg file reads:
ags = "xinit /opt/retropie/emulators/ags/bin/ags --fullscreen %ROM%".
When I F4 out of EmulationStation to the command prompt and try to run xinit alone without any other parameters, I get the same thing, ie, it just pops up in a tiny box in the corner of the screen, so the issue would seem to be with xinit settings (or a bug) and not with the emulator itself.
I have tried all sorts of suggestions that I've found online, all related to HDMI settings in /boot/config.txt (like overscan, for example) but nothing seems to make any difference.
Would anyone be able to provide some guidance please? I am happy to provide any and all information that would be helpful (logs, etc) I just wasn't 100% certain which logs would be relevant.
retropi19 last edited by
you need to install also matchbox to get if working full screen eg:
xset -dpms s off s noblank
matchbox-window-manager -use_titlebar no &
Thanks for the reply @retropi19. Unfortunately this has made no difference to the outcome. I did the following steps:
sudo apt-get install matchbox
I then created a test script with the commands you provided and ran it (after restarting). I had exactly the same result, ie, just a tiny box in the top left hand corner and not full screen.
@vincent-a-nativo X.org log file is in
/home/pi/.local/share/xorg). Get the log after you run an AGS game and then try to get the log file and post its contents on pastebin.com.
What is the resolution of your TV/monitor/display ?
vincent.a.nativo last edited by vincent.a.nativo
@mitu thank you so much for your help!
I've pasted the contents of the log on pastebin as requested:
For this test, I installed a clean image of retropie on my card from https://retropie.org.uk/download/. The only things I did after that were:
- Set up wifi connectivity.
- Enabled SSH access.
- Updated the retropie-setup script.
- Installed AGS which also installed Xorg dependencies.
- Copied a rom over to test with.
The conditions of my original test were that I had updated all packages (both OS and otherwise) as well as set up a WIFI dongle and install steamlink and steam controller driver. I know none of those things should really make a difference but just wanted to be clear on the condition of both tests which had the same result.
I've also included a of how it looks on my monitor when I attempt it. The little purple box in the top right corner is basically the entire screen! If that image link doesn't work this is the URL: https://1drv.ms/u/s!ArEBR8bIbg32gaZaepD5Mnjwck48rA
I also tested on my TV and got the same result. In both cases, the native resolution is 1920 X 1200.
The only thing I haven't tried is to go back to an older image I was using prior 4.4 (ie, 3.x) which from memory was working but I don't want to say I'm 100% certain on that until I try it again! Let me know if you think that would be helpful.
I would be grateful for any guidance you can provide!
@vincent-a-nativo I'll see if I can reproduce the problem. The log file doesn't show the display resolution, maybe the auto-detection doesn't work. You're using the HDMI port for the output, right ?
Can you also post the
/boot/config.txtfile contents ?
I'll see if I can reproduce the error.
@mitu correct, HDMI.
config.txt here: https://pastebin.com/BRvHhPJB
As mentioned I did try playing with a few of the settings in here based on recommendations in various posts / forums I found but nothing seemed to have an effect.
@mitu I have managed to get it working.
So at a certain point retropie images stopped including a desktop / window manager to save on space. So I installed it by running the retropie setup script and selecting:
Configuration / Tools -> Raspbian tools -> Install pixel desktop environment
But that wasn't all. While that corrected the size of the screen, it performed very poorly, too slow to be usable. It seems that AGS is now defaulting to using the OpenGL driver when a graphics driver is not specified on the command line. Again, retropie doesn't come with the OpenGL driver enabled. Given that it is experimental and I have had graphical issues using it recently, I opted against enabling it and instead selected the software graphics driver instead. So my emulators.cfg file for AGS now looks like this:
ags = "sudo xinit /opt/retropie/emulators/ags/bin/ags --fullscreen --gfxdriver software --gfxfilter hqx 1 %ROM%"
default = "ags"
And it is now functional when run from Emulation Station.
Thanks for your time! It may be worth including this information in a guide somewhere for AGS on retropie, how would I go about doing that?
@vincent-a-nativo Thank you for coming back with a solution.
You can add your notes in the Wiki - https://github.com/RetroPie/RetroPie-Setup/wiki/Adventure-Game-Studio - if you have a github.com account.
- RetroPie has the desktop as an optional install, it doesn't come by default with it installed. The RetroPie image is based on the Raspbian Lite version image, which doesn't include the Desktop.
- Enabling the experimental OpenGL driver will cause incompatibilities with the installed emulators/programs, which use the legacy RPI VideoCore driver, that's why is not enabled on the current release.
I might also add a note to modify the scriptmodule based on your setting, but I'll have to test it first.
@mitu I have updated the wiki. Please feel free to edit as you see fit.