-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
XRDP not working with Optimus Manager - permission denied on /dev/tty0 #2010
Comments
Hi @Pipodi - thanks for bearing with me. Since this follows an update, you probably won't be the only one experiencing this issue. The problem is seen in this line:-
The session is probably exiting either because of a problem with it, or because the X server is failing. Your mention of an update reminds me of this reply I wrote earlier today. Couple of things to check:-
Can you have a look and report back? |
This is what I've got.
And
I think there is something on the
So it tries to get an unkown session and it fails, right? |
The systemd-logind message is related to #1684. We're working on a fix, but it's a massive job. Workarounds are linked in the PR. Your main problem is the
The xorgxrdp driver appears to be trying to use your build in video card in addition to the RDP module. That's not really my area, but I suspect it's causing your problem. I don't know if this is a supportable xrdp configuration or not. It might help if we know where these devices are coming from. What do you get from this command, run as a non-root user?
|
My laptop is an "optimus" one, so it has 2 GPUs, the discrete one (Nvidia) and the integrated one. Could it be the culprit here? I have The command, btw, does't return any result. |
I've had a poke around in the Xorg sources, and as far as I can tell, the driver combination that is loaded is quite important. If certain modules are loaded, the X server will try to open the console, and this will be fatal for the X server in this configuration. I've compared your .xorgxrdp.log with one of my working ones. There are a few significant additions in yours:-
I've got a couple of things for you to look at:-
Thanks |
I've added my user to
|
This looks like a different manifestation of the same error. The code is calling I note the modesetting driver is still being loaded, so something is still triggering that. Can you provide the contents of any files in /etc/X11/xorg.conf.d? That may well hold something interesting. EDIT : Can you also see what's in /usr/share/X11/xorg.conf.d ? |
Inside of
In
|
It looks like the problem is in Can you vertify that by (temporarily) renaming |
Renamed, rebooted, tried to connect from Windows 11, no luck. I think it's the same log, tho (I deleted the file before trying to connect):
|
Same problem - modesetting module is being loaded. It's possible you've connected to a different DISPLAY. Try The bottom line is we need to get to the bottom of why the modesetting driver is being loaded. According to my reading of the manpages, renaming a Another option is to investigate loading the |
Nope, there is only one Another thing I've just seen is that even if I renamed the I also renamed the file adding a |
I misunderstood the renaming part, I thought you told me to rename the files inside the folder, not the folder itself. I've now renamed the folder with the trailing
|
From what I can see from the xserver sources, that log file isn't consistent with the directory being renamed. You've still got this line present:-
On a test CentOS 7 VM I've got, that line disappears if the directory isn't present:- $ /tmp/Xorg :10 X.Org X Server 1.20.4 X Protocol Version 11, Revision 0 Build Operating System: 3.10.0-957.1.3.el7.x86_64 Current Operating System: Linux centos7.lan 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64 Kernel command line: BOOT_IMAGE=/vmlinuz-3.10.0-1160.36.2.el7.x86_64 root=/dev/mapper/centos_centos7-root ro crashkernel=auto rd.lvm.lv=centos_centos7/root rd.lvm.lv=centos_centos7/swap rhgb quiet LANG=en_GB.UTF-8 . . . (==) Using config directory: "/etc/X11/xorg.conf.d" (==) Using system config directory "/usr/share/X11/xorg.conf.d" (EE) Fatal server error: (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied) (EE) . . . $ sudo mv /etc/X11/xorg.conf.d /etc/X11/xorg.conf.d_ $ /tmp/Xorg :10 X.Org X Server 1.20.4 X Protocol Version 11, Revision 0 Build Operating System: 3.10.0-957.1.3.el7.x86_64 Current Operating System: Linux centos7.lan 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64 Kernel command line: BOOT_IMAGE=/vmlinuz-3.10.0-1160.36.2.el7.x86_64 root=/dev/mapper/centos_centos7-root ro crashkernel=auto rd.lvm.lv=centos_centos7/root rd.lvm.lv=centos_centos7/swap rhgb quiet LANG=en_GB.UTF-8 . . . (==) Using system config directory "/usr/share/X11/xorg.conf.d" (EE) Fatal server error: (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied) (EE) Can you investigate that on your system? Keeping track of file dates may be a useful thing to do. |
It seems that the folder is recreated at boot too. In fact, with |
Try that for starters. Any extra info is useful at this stage. I'm hopeful we can find a way to get these two to play together nicely. |
Disabled the service, this is the log after rebooting the machine:
|
Ok, seems now that we are with another error. I forgot to delete the "new"
|
Ok, disabling Optimus Manager and forcing the Nvidia card as the only working GPU (https://wiki.archlinux.org/title/NVIDIA_Optimus#Use_NVIDIA_graphics_only) makes me log in with Remote Desktop on Windows 11. But I want to use Optimus Manager, because when I'm not home I won't be using the Nvidia GPU, so I need to switch back to the Intel GPU. |
I understand that, and I suspect this is a common enough configuration that it's worth spending some time trying to find a solution. Here's something else to try. Can you re-install the Optimus Manager and get back to where we've got these lines in the log as per your post here :-
There shouldn't be any mention of nvidia in the above. Once you're there, edit
I'm hopeful this will stop the X server looking in I can't see any way to prevent the X server looking in If that doesn't work, I think we're going to be looking at using the Xvnc backend. Let's see what happens with this config first however. |
I have re-enabled Seeing the log you posted me, I thought it was from when I switched to the Intel GPU with Optimus Manager, so I did that, but now it suggested me to install But I still have the edits I made yesterday following the guide for Nvidia GPU only, which are:
And I've added this to my
Later I will try to remove this edits, now I'm currently working with this laptop and I tested this when I was on pause from working. :P |
Great - thanks for the update! |
It seems that those drivers did the trick. I rolled back those edits and RDP is still working. It takes a little longer to load, I don't know why, but in the end I still have what I want, working RDP and Optimus Manager installed and working. I tried connecting with RDP with all the GPU modes and it seems fine. I will keep an eye on the situation, I think you can close this issue if you want! Thanks for all the help. |
Thanks for the update, and for helping me to get to the bottom of this. This has become quite a long thread. To summarise what I think the situation is for other readers:-
I'll close this now and change the title to be a bit more descriptive. |
FYI: param=-config
param=xrdp/xorg.conf to: param=-configdir
param=xrdp/ would do the trick, as it prevent any system related X11 configurations in Side note: 3D rendering & optimus offloading should be fine, at least my current use case didn't yield any error. |
I was able to connect with my Windows 10 pc to my Manjaro XFCE laptop, but after what I think to be a system update on Manjaro, it stopped working. I can reac XRDP login page, select XORG, typing my login, but when I click ok it freezes, and after a while it goes on timeout.
This is the
journalctl
output of the issue:Both xrdp-git and xorgxrdp-git installed.
Any tip? Thanks!
The text was updated successfully, but these errors were encountered: