Switching to Wayland: Failed to open drm device at "/dev/dri/card0"

Yes, I've found that too, in the meantime.

I've tried to set that:

QDBusMessage message = QDBusMessage::createMethodCall(s_serviceName, sessionPath,
s_sessionInterface,
QStringLiteral("Activate"));

message.setInteractiveAuthorizationAllowed(true);

But it makes no difference. I think that your explanation actually makes kinda sense. But I still fail to see, where EXACTLY is the problem here, actually.

EDIT: If I understand you correctly, you think actually the opposite is true: That the flag is set, while it shoudn't be. I don't think this is the case. From QDBusMessage documentation:

By default this flag is false and the other end is expected to make any authorization decisions non-interactively and promptly.

This flag sets on the message itself, so it has to be in the default state, as the message is created just one line above.

From the error description you provided, I understood it the other way around:

** Access to the requested operation is not permitted. However, it might be available after interactive authentication. **

Anyway, I've tried to set it both ways, no difference there :(.

But at least we are getting somewhere....

1 Like

Actually, while reading the bottom documentation snippet again, I feel like that flag only applies to use cases, where the user is already in a "rooted session" (I don't know if something like this even exists, but if you for example run pacman and install a package, it prompts you for a password, but it doesn't if you run it again shortly after).

Well I guess the flag is set to true, so it actually wants an interactive authorisation.

Also: In which file and on which line is the function that you edited? I would like to look around and maybe try some compilation attempts myself

EDIT: Okay, so let's maybe try something mildly stupid: Could you try commenting the return xyz line and replace it with return true;?

Here (tag v5.23.4), lines 100-104

1 Like

Ok, interesting idea :slight_smile: let's go for it :slight_smile:

EDIT: Well, this is interesting. I actually see a mouse cursor for a moment, but then it fails anyway. Interestingly, when I try to redirect the logging output to a file, I get something completely different than what I see on the screen, there, in the end. Let me investigate it a bit more....

Welp, tried compiling that myself, but I can't run it, since I'm missing the kwin_x11 or kwin_wayland executables in the build/bin directory :confused:

EDIT: I'm just pancake brain
image

Did you run "make" after "cmake"? Got myself into the same trap before :wink:

I forgot exactly that XD
I didn't make it

me too :man_facepalming: :slight_smile:

Anyway, I wasn't able to extract the logs, yet. As I was trying that, I've run kwin directly without the 'dbus-run-session' part.

The result was different ... well. This time it didn't terminated. So I was staring on black screen with a mouse cursor, and I wasn't able to exit or kill it in any way. Not even switch into a different tty. I had to hard-restart my computer XD. So, beware, if you're going to try this :smiley:

1 Like

Hey, but that's progress, isn't it? Still wondering, why it didn't load the desktop then

1 Like

Exactly. It is a progress. I will run it again with the dbus session, and will study the logs. Meybe there's some clue.

But step by step, we are getting there :slight_smile:

EDIT:
Ok, a bit rudimentary, but desperate times ask for desperate actions :slight_smile:

Google Photos

The "logind: openRestricted" and "so far so good" messages are mine, so don't be confused if you don't see them :slight_smile:

Anyway, the messages I've added show, that kwin goes through DrmBackend::addGpu method multiple times, like it retries it over and over....

BTW, I've exceeded a maximum number of replies (as a new user}. So I probably have to stick to extending this post for the time being :slight_smile:

FINAL EDIT FOR TODAY:

Nice progress!

I have to let it be, for today, unfortunately (family duties ;)), but I will continue in the following days for sure, as this is getting really interesting. I'm neither on Telegram or Matrix so far, but I might try to create an account there, and we will defeat it, finally!

Thanks for a pleasant cooperation, have a nice evening, and hopefully see you again soon :+1:

1 Like

Okay so this explains the "Failed to open DRM devices at xyz" messages, but why is session()->openRestricted(filename) -1
I am confused

Oh okay:

It is -1, because either
(1) The filesize < 0
(2) Dbus errors
(3) If no valid file descriptor exists (unix - What are file descriptors, explained in simple terms? - Stack Overflow)
(4) If the new lowest file descriptor is < 0 (fcntl(3): file control - Linux man page - F_DUPFD)

1: Well the filesize is 0, but it's a kind of harware "link" I guess. -1 Probably means the file does not exist
2: That prints a message, which doesn't happen here
3: The file is not ... loaded? No clue
4: The file ... loading fails?

Could you try to insert a lot of debug prints into the openRestricted function? It seems to compile for you faster than for me. I will try the same in the meantime

EDIT: I tried to run wayland, and wouldn't you know, I got the same black screen as you, but I can move the mouse and even open programs! So close!

BTW: Are you in the Garuda Telegram or Matrix channel? As you can't write stuff here anymore, maybe we can talk over at that end

1 Like

I find it rather confusing, that dbus-run-session ./kwin_wayland works, but dbus-run-session kwin_wayland doesn't .... Is the kwin-git package working and the stable package not? I can't really replace kde with the git stuff, because something interferes, but this is weird.
might try pacman -Rdd kwin and pacmasn -Sdd kwin-git

1 Like

Okay switching to the git packages didn't help.
Same problem, 200% confusion....
Is there some environment variable messing about?

1 Like

Live session works for some reason.
Very annoying.

Resetting all the wayland xml files to the defaults also didn't help

I don't know if one can call this a fix, but reinstalling Garuda fixed it.

(Sorry for the post bump)

1 Like

I had the same issue. I found that disabling ananicity cpp in the garuda assistant fixed it. I have no clue why but it did. Is there someone somewhere we could report this issue to ?

1 Like

Report it Here I guess

Interesting, I didn't expect ananicy to play a role here

Wooot :exploding_head: @aviallon is also in the forum, dunno if he checks it though. Ananicy-Cpp just adjust nice levels, does this also occur when doing this manually?

1 Like