MME_SR2 (RA 15khz) without window manager (bare X server using xinit)

Hi,

I successfully configured MME_SR2 on a dedicated Intel GPU laptop with Archlinux connected to a TV Set via an UMSA card.

It works very well using Openbox as a desktop manager (using super resolutions configured through a switchres.ini file).

Now i want to go a step further by getting rid of the windows manager which seems to be useless now.

My first question is, is it intended to work as is ?

After tweaking some rights issues related to xinit as regular user, i am able to launch MME_SR2 on a bare X server with xinit but Retroarch screen scaling is wrong:

$ cd MME_SR2/
$ xinit ./retroarch -v

Switchres does change the resolution correctly (executed through ssh):

$ DISPLAY=:0 xrandr

[ben@arcade MME_SR2]$ DISPLAY=:0 xrandr
Screen 0: minimum 320 x 200, current 2560 x 240, maximum 8192 x 8192
VGA-1 connected primary 2560x240+0+0 (normal left inverted right x axis y axis) 485mm x 364mm
   1400x480_intel  60.00 +
   1400x480i     59.99 +
   [email protected]  60.00* 
DP-1 disconnected (normal left inverted right x axis y axis)
SVIDEO-1 disconnected (normal left inverted right x axis y axis)

But there is this final line in Retroarch logs which make me think RA screen is scaled according to 1400x480 (the original connector resolution set by EDID), not the switchres one (entire log in the bottom of this post):

[INFO] [GLX]: Resized fullscreen resolution to 1400x480.

Same behaviour when launching a core (Good switchres resolution but screen scaled to 1400x480)

If i launch openbox first, screen resolution and size are correct:

$ xinit openbox &
$ DISPLAY=:0 ./retroarch -v

Apparently, the window manager helps Retroarch to scale the screen correctly according to current connector resolution in some way. I cave give more information if needed.

ra.logs:

X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
Build Operating System: Linux Archlinux
Current Operating System: Linux arcade 5.12.9-arch1-1 #1 SMP PREEMPT Thu, 03 Jun 2021 11:36:13 +0000 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=d74f8111-55c8-4bd1-b53f-f9be5e548bc5 rw loglevel=3 video=LVDS-1:d video=SVIDEO-1:d video=TV-1:d video=DP-1:d video=VGA-1:e drm_kms_helper.edid_firmware=VGA-1:edid/crt.bin
Build Date: 13 April 2021  03:12:10PM
 
Current version of pixman: 0.40.0
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat Jun 12 14:38:48 2021
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
[INFO] RetroArch 1.9.4 (Git cc1d8e3f42)
[INFO] === Build =======================================
[INFO] CPU Model Name: Pentium(R) Dual-Core CPU       T4500  @ 2.30GHz
[INFO] Capabilities:  MMX MMXEXT SSE SSE2 SSE3 SSSE3
[INFO] Built: Jun 10 2021
[INFO] Version: 1.9.4
[INFO] Git: cc1d8e3f42
[INFO] =================================================
[INFO] [Input]: Found input driver: "x".
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 48000.00 Hz.
[INFO] [Video]: Video @ fullscreen
[ERROR] [Wayland]: Failed to connect to Wayland server.
[INFO] [GLX]: GLX_EXT_swap_control_tear supported.
[INFO] [GL]: Found GL context: x
[INFO] [GL]: Detecting screen resolution 1400x480.
[INFO] [XINERAMA]: Xinerama version: 1.1.
[INFO] [XINERAMA]: Xinerama screens: 1.
[INFO] [GLX]: Using Xinerama on screen #0.
[INFO] [GLX]: X = 0, Y = 0, W = 1400, H = 480.
[INFO] [GLX]: Requesting compositor bypass.
[INFO] [GLX]: Using windowed fullscreen.
[INFO] [GLX]: Found swap function: glXSwapIntervalEXT.
[INFO] [GL]: Vendor: Intel Open Source Technology Center, Renderer: Mesa DRI Mobile Intel® GM45 Express Chipset (CTG).
[INFO] [GL]: Version: 2.1 Mesa 21.1.2.
[INFO] [GL]: Using resolution 1400x480
[INFO] [GL]: Default shader backend found: glsl.
[INFO] [Shader driver]: Using GLSL shader backend.
[INFO] [GLSL]: Checking GLSL shader support ...
[WARN] [GL]: Stock GLSL shaders will be used.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GL]: Using 4 textures.
[INFO] [GL]: Loaded 1 program(s).
[INFO] [GL]: Using GL_RGB565 for texture uploads.
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [X11]: Suspending screensaver (X11, xdg-screensaver).
[INFO] [Video]: Found display server: x11
[INFO] [PulseAudio]: Requested 24576 bytes buffer, got 18432.
[INFO] [Display]: Found display driver: "gl".
ALSA lib seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: Permission denied
[ERROR] [MIDI]: snd_seq_open failed with error -13.
[ERROR] [MIDI]: Initialization failed.
[INFO] [SRAM]: SRAM will not be saved.
[INFO] [Playlist]: Loading history file: [/home/ben/.config/retroarch/content_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/ben/.config/retroarch/content_music_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/ben/.config/retroarch/content_video_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/ben/.config/retroarch/content_image_history.lpl].
[INFO] [Playlist]: Loading favorites file: [/home/ben/.config/retroarch/content_favorites.lpl].
[INFO] [PulseAudio]: Pausing.
[INFO] [GLX]: Resized fullscreen resolution to 1400x480.
[INFO] [CRT]: Current running core  
[INFO] [CRT]: Requested Reolution: [email protected] 
[INFO] [CRT]: SR init 
[INFO] [CRT]: CRT Mode: 4 - Selected from ini 
[INFO] [CRT]: SR init_disp 
[INFO] SRobj: RA Monitor Index: (null)
[INFO] [CRT]: SR Disp Monitor Index: Auto  
[INFO] [CRT]: SR rtn 1 
[INFO] Switchres: Modeline "2560x240_60 15.660000KHz 60.000000Hz" 49.078440 2560 2658 2889 3134 240 242 245 261   -hsync -vsync
[INFO] sr_refresh_display: mode was added
[INFO] sr_switch_to_mode: successfully switched to [email protected]
[INFO] [CRT]: Setting Video Screen Size to: 2560x240 
[INFO] [CRT]: Setting Aspect Ratio: 10.666667 
[INFO] [CRT]: SR scaled  X:8 Y:1 
[INFO] [Video]: Setting refresh rate to: 60.000 Hz.
[INFO] [GLX]: Resized fullscreen resolution to 1400x480.

EDIT

In fact, with OpenBox, there is this line at the end of the logs which is missing in bare X :

[INFO] [GLX]: Resized fullscreen resolution to 2560x240.

SR needs an X environment running. So add RetroArch to your open box autosrtart.

What issues are you still having?

Hi Alphanu,

Thanks for your reply.

In fact I have an X server running (xinit is a command to launch a bare X server). My goal was to launch MME_SR2 on this bare X server (meaning X server only without any window manager).

As you can see in my first post MME_SR2 is launching but i have an issue with RA screen not fitting the resolution correctly.

If i launch MME_SR2 with an X server AND a window manager (in my case openbox), the screen fit the resolution correctly (second picture).

So my first question is: is it a bug or simply MME_SR2 needs a window manager to work correctly ?

As you can see in the logs, SwitchRes is working correctly, it seems only RA does not resize its internal screen size correctly once switchres changed the resolution. Using xrandr i can attest switchres changed correctly the resolution…

Its no big deal really because if i launch a window manager on top of X server everything is working correctly. My ultimate goal is to dedicate a laptop to CRT gaming so i’m in the process to reduce dependencies to the minimum and so get ride of a window manager if it is possible.

When RetroArch is under and X backend it does need a windowing environment to work properly.

Ok that is what i suspected. Thanks for reply