Configuring xrdp and xorgxrdp on NVIDIA proprietary graphics driver

This article covers configuring xrdp and solving the OpenGL issue that has been caused by the NVIDIA proprietary driver.

Environment: KDE version of Manjaro Linux. With NVIDIA proprietary driver version 375.66.

Step 1: Install xrdp and xorgxrdp

yaourt xrdp
yaourt xorgxrdp-git
systemctl enable xrdp xrdp-sesman

Step 2: Some Fixes

http://qiita.com/hisadg/items/cf58d3f4e3ededcffca4 (Use Google translate)

Now you should be able to connect to RDP server and login. After you login you may see a message box telling you

Plasma is unable to start as it could not correctly use OpenGL 2.

Step 3: Deal with OpenGL Issues

The NVIDIA driver adds an option ModulePath in /usr/share/X11/xorg.conf.d/nvidia-drm-outputclass.conf which overrides the search path for module files to its directory /usr/lib/nvidia/xorg. The glx module for X11 is overridden to NVIDIA’s closed-source one that doesn’t support RDP. We have to move this file out of Xorg’s default config directory.

3.1 Move Config files

3.1.1 Make directory /etc/X11/nvidia.d

We will put all NVIDIA things here.

3.1.2 Move /usr/share/X11/xorg.conf.d/nvidia-drm-outputclass.conf and /etc/X11/xorg.conf.d/90-mhwd.conf to /etc/X11/nvidia.d

/etc/X11 should look like this:

.
├── mhwd.d
│   ├── nvidia.conf
│   └── nvidia.conf.nvidia-xconfig-original
├── nvidia.d
│   ├── 90-mhwd.conf
│   └── nvidia-drm-outputclass.conf
├── xinit
│   ├── xinitrc
│   ├── xinitrc.d
│   │   ├── 40-libcanberra-gtk-module.sh
│   │   └── 50-systemd-user.sh
│   └── xserverrc
├── xorg.conf.d
│   └── 00-keyboard.conf
├── xrdp
│   └── xorg.conf
└── Xwrapper.config

3.2 Editing SDDM configuration

Now we have to tell SDDM to use our created configuration.

Edit /etc/sddm.conf:

3.2.1 Rename [XDisplay] to [X11]

If there’s no [XDisplay] section please ignore this.

This is a bug of Manjaro Linux. The section name have been renamed to X11 in this commit, but it seems that the Manjaro guys haven’t renamed it. I’ve reported the bug to Manjaro forum.

3.2.2 Edit ServerArguments

Append -configdir /etc/X11/nvidia.d to the ServerArguments line.

Now it should look like this:

ServerArguments=-nolisten tcp -configdir /etc/X11/nvidia.d

And the OpenGL issue is now solved. The local session will continue to use the NVIDIA files while the remote RDP session will just ignore them and use Xorg’s built-in glx library.

If you have any problems please feel free to comment below 😉

CC BY-SA 4.0 本作品使用基于以下许可授权:Creative Commons Attribution-ShareAlike 4.0 International License.

发表评论

您的电子邮箱地址不会被公开。

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据