Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on launch in KMS mode #6972

Open
LaserMoai opened this issue Jul 11, 2018 · 17 comments
Open

Crash on launch in KMS mode #6972

LaserMoai opened this issue Jul 11, 2018 · 17 comments

Comments

@LaserMoai
Copy link
Contributor

Here we go again, I guess. I've checked kmscube just in case.

Log

Version/Commit

Environment information

  • OS: Arch Linux
@ghost
Copy link

ghost commented Jul 11, 2018

Smells like permissions

@i30817
Copy link
Contributor

i30817 commented Jul 11, 2018

Until this and other video permission problems are solved RA in KMS is only really usable in Lakka.

@orbea
Copy link
Contributor

orbea commented Jul 12, 2018

Its still working here in Slackware with the current master. I wonder what the difference is?

Edit: I guess it could be libglvnd again?

@inactive123
Copy link
Contributor

@Themaister Do you have any ideas how we could honor these DRM permissions?

@inactive123
Copy link
Contributor

@i30817 It has always worked fine on my Arch Linux setup though.

@i30817
Copy link
Contributor

i30817 commented Jul 13, 2018

never worked here... the reason is #6763 for me. Or some variant of it.

Maybe #2248 (comment) explains better.

As mentioned in the issue (somewhere, i rambled) it's easy to test on a recent ubuntu by opening a tty at any time (including before wayland starts on the gdm login screen), loading a ps1 game on beetle hardware and just change the internal resolution and try to resume. Instant crash with wl_drm@10: error 0: authenicate failed followed by radeon: failed to get PCI ID, error number -13 followed by Assertion failed at retroarch.c:2330 which by then i doubt has anything to do with the actual error.

Since i'm not going to run retroarch with sudo, this is dead in the water for me - or possibly ubuntu as a whole.

@orbea
Copy link
Contributor

orbea commented Jul 14, 2018

Does running RetroArch as root even work around it? I do agree that its not a good solution, but its worth trying once to see if that is the problem.

When you vt switch with Xorg it drops the DRM master and allows another DRM master to work, like kms RetroArch. Unfortunately RetroArch still needs to be taught how to do this in reverse to get back to the Xorg session. Maybe wayland needs to be taught this too?

@LaserMoai
Copy link
Contributor Author

LaserMoai commented Jul 14, 2018

Using sudo doesn't seem to help (log nvm, the log is identical now).

@ghost
Copy link

ghost commented Jul 14, 2018

KMS works for me on Ubuntu 18.04 as a regular user. I don't use any display server (X, Wayland etc.) on that system though, not sure if related.

@i30817
Copy link
Contributor

i30817 commented Jul 14, 2018

Sudo does work here but i had to do some 'monkeying around' because of the owner.

So i first rebooted and moved out of gdm to a tty (to make sure a running wayland session didn't interfere, although it's unlikely), then i recursively changed the owner of ~/.config/retroarch to root (actually i copied and then changed but details). Then i created a 'new' directory on the home with owner 'root'.

then i ran with:
sudo XDG_RUNTIME_DIR=~/new retroarch

This worked fine always. A small detail that is probably important but may be a gdm bug: when i quit retroarch and tried to return to gdm, it showed the screen for a fraction of a second then the systemd log (like the boot) then stayed hanged on 'color calibration' (or something like that, the point is that either retroarch doesn't 'return' a permission on exiting (this was a normal exit, not crash) or gdm flakes out sometimes.

I have to stress that my two posts are not because it crashes right away like the OP, but when it tries to create the context when you change resolution (retroarch even shows the cmd line on the tty and then tries to return to the core) and are obviously a permission problem.

@orbea
Copy link
Contributor

orbea commented Jul 14, 2018

KMS works for me on Ubuntu 18.04 as a regular user. I don't use any display server (X, Wayland etc.) on that system though, not sure if related.

This is probably why you don't see it. There can only be one DRM master, Xorg will drop it on vt switch so you can have multiple xorg servers running. RetroArch just hogs it and prevents vt switching, but it would probably be better to follow Xorg's example here.

My hypothesis is that this needs to be fixed in wayland too.

@LaserMoai
Copy link
Contributor Author

My mesa's got to be more up to date as well.

@raelgc
Copy link

raelgc commented Jul 20, 2018

I think this started to be an issue on Ubuntu 16.04 too, after the latest graphical drivers update: https://retropie.org.uk/forum/topic/18598/libretro-stopped-working-on-16-04-after-latest-drivers-update.

If this is not related, please, just remove this comment.

@Jj0YzL5nvJ
Copy link

Xubuntu 16.04.5 LTS amd64 with ppa:oibaf/graphics-drivers and "linux*-hwe-16.04" here. Zero problems.
I know, I'm not representative of "the true Ubuntu 16.04 users".

@raelgc
Copy link

raelgc commented Jul 21, 2018

@Jj0YzL5nvJ I tried oibaf, but got the same results in Ubuntu 16.04 + Unity. Basically the same version provided by oibaf until few weeks ago are now the official ones.

@orbea
Copy link
Contributor

orbea commented Jul 21, 2018

This could easily be a different issue, there is not enough information to tell. First question is what video card and driver? When does it crash? I would suggest making a new issue report to not potentially derail this one, thanks!

@Jj0YzL5nvJ
Copy link

Jj0YzL5nvJ commented Jul 21, 2018

It's weird, maybe a different update priority to "newer" or maybe a corrupted software list?
You can fix the first case in the synaptic properties. The second case, is tricky and not well known:

sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo rm -vf /var/lib/apt/lists/*
sudo apt-get update

To confirm, example:
$ apt list -a libgl1-mesa-glx

Listing... Done
libgl1-mesa-glx/xenial 18.2~git1807210730.e1febb~oibaf~x amd64 [upgradable from: 18.2~git1807201930.4d0949~oibaf~x]
libgl1-mesa-glx/now 18.2~git1807201930.4d0949~oibaf~x amd64 [installed,upgradable to: 18.2~git1807210730.e1febb~oibaf~x]
libgl1-mesa-glx/xenial-updates 18.0.5-0ubuntu0~16.04.1 amd64
libgl1-mesa-glx/xenial 11.2.0-1ubuntu2 amd64

First question is what video card and driver?

$ glxinfo | grep OpenGL

OpenGL vendor string: X.Org
OpenGL renderer string: Radeon RX 560 Series (POLARIS11, DRM 3.23.0, 4.15.0-29-generic, LLVM 6.0.1)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.2.0-devel
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.4 (Compatibility Profile) Mesa 18.2.0-devel
OpenGL shading language version string: 4.40
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.2.0-devel
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

$ lspci -k

...
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 67ff (rev cf)
	Subsystem: Micro-Star International Co., Ltd. [MSI] Device 8a91
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu
...

cya

@orbea orbea added the bug: kms label Oct 8, 2018
@orbea orbea added bug: opengl and removed opengl labels Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants