mickelson / attract

A graphical front-end for command line emulators that hides the underlying operating system and is intended to be controlled with a joystick or gamepad.
http://attractmode.org
GNU General Public License v3.0
393 stars 115 forks source link

Attract 2.6.2 (USE_DRM=1) / SFML-pi on Arch Linux: DRM error - Failed to set mode: Permission Denied #730

Open shbon opened 2 years ago

shbon commented 2 years ago

I've compiled Attract 2.6.2 with USE_DRM=1 and SFML-pi with the SFML_DRM=1 on a Arch Linux installation with no X11/wm. I can run attract via the tty and configure stuff through the UI fine, but when I launch any game I get the error "Failed to set mode: Permission Denied" and then attract aborts with a core dump.

I think that error is being thrown by SFML-pi, specifically the call to drmModeSetCrtc.

I hoping there's a simple config change I can make to fix this?

Machine configuration: Fresh Arch Linux install with all dependencies for Attract/SFML-pi, no X11, running directly from tty as a user (not root). Intel iGPU i915.

I've tried the following:

  1. Running attract as root. No difference.
  2. Setting the environment variables for SFML-pi (e.g. SFML_DRM_DEVICE). No difference.
  3. Downloading and compiling the DRM examples at https://dvdhrm.wordpress.com/2012/09/13/linux-drm-mode-setting-api/. They all work OK with no errors.
  4. I've dropped some printf statements in both dvdhrm (modeset.c) and SFMI-pi (DRMContext,cpp). It shows that both use the same connector and crtc for the default card /dev/dri/card0, so they seem to be doing (approximately) the same thing.

Any thoughts?

Thanks

fede843 commented 1 year ago

I am getting same error in a raspberry pi using the retropie installation