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

x11 crashes when switching from the wlc vt back to x11 vt #217

Open
raboof opened this issue Dec 29, 2016 · 2 comments
Open

x11 crashes when switching from the wlc vt back to x11 vt #217

raboof opened this issue Dec 29, 2016 · 2 comments
Labels

Comments

@raboof
Copy link

raboof commented Dec 29, 2016

When running a wlc-based session on vt1 and x11 on vt7, using nouveau as the display driver, switching from vt1 to vt7 crashes x11. The Xorg.log reveals:

modeset(0): drmSetMaster failed: Invalid argument
modeset(0): failed to set mode: Permission denied

It seems only one program can be DRM master at a time, and the wlc-based session hasn't given up its control before nouveau tried to get it. Indeed, when I switch from vt1 to vt2 (giving it time to release DRM master) and then to vt7, x11 does not crash.

In the wlc sources I do see some drmDropMaster in sensible places, but looking with gdb it doesn't seem to be ever called - not even in the 'successful' case where I go via vt2.

(I originally encountered this issue with way-cooler (way-cooler/way-cooler#190) but can also reproduce it with orbment, leading to think this is a wlc issue)

@Cloudef
Copy link
Owner

Cloudef commented Jan 4, 2017

In the wlc sources I do see some drmDropMaster in sensible places, but looking with gdb it doesn't seem to be ever called - not even in the 'successful' case where I go via vt2.

This sounds interesting. AFAIK the calls should always be before TTY switch signal is sent to kernel.

@Cloudef Cloudef added the drm label Jan 4, 2017
@raboof
Copy link
Author

raboof commented Jan 4, 2017

I did some more digging but don't have final conclusions yet.

I'm using logind, wlc correctly sees that and goes into the logind code instead of the tty code.

Looking at the logind code (and learning about VT switching :) ) I see some code that looks like it should do the right thing, but poking around with gdb/printf statements reveals in my case this code doesn't seem to be called at all.

I'm still kind of confused what's going on, I wrote up my observations and asked for help at https://plus.google.com/110534994903711886928/posts/GgVKKtU5d1u

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants