-
-
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
High CPU usage without even starting a xrdp session #2698
Comments
|
Hello matt335672, as described, this kind of behaviour accurs as soon as xrdp is installed and the service is enabled and started, ive tried multiple times, this kind of behaviour only happens after activating xrdp, also the server is freshly installed kubuntu without anything else in particular that could cause this, and the cpu usage is quite normal before installing xrdp, also i must say the cpu usage is normal with xfce as well, but kde seems to mess with xrdp, or vice versa.
|
to your number 2., im using remote desktop manager on windows, and i have similar performance with rdm and with the option that you offered, i barely see any difference, bandwich isnt a issue i can easily support a high bandwich and it is already happening even in my rdm, as i described, simplest actions already use a lot of traffic, watching a simple 480p youtube video can cause up to 80mbit traffic, understandable of couse, but same action causes 20% of that network on a windows server. |
There's nothing I can add apart from my comment above I'm afraid. Try using RemoteFX if your client supports it. |
hello. i still havent found any data related to enabling rfx from server side, is this even possible or am i looking for somehting that does not exist? |
Sorry - I could have been clearer. I don't think you've mentioned your xrdp version (see The selection of the codec to use then depends entirely on what the client sends over. Importantly, the client connection type must be set to 'LAN' (not automatic), and you must have 24-bit or 32-bit colour selected. I wish the server-side logging was better than it is. For some reason the codec selection is only logged for development builds. We should probably fix that. |
Sorry again - I see your xrdp version is listed above. Try losing those tweaks regarding setting the max_bpp and xserverbpp to 16. They won't be helping at all. |
thank you, it was mainly because of the max_bpp, works much better now |
Great. Any joy with the codec on the client? |
yes, i did actually go through the steps you mentioned on another thread but it didnt work before i changed the bpp back to 24, also another thing: > Sorry again - I see your xrdp version is listed above.
also i noticed there was a thread going around about automatic scripts that would be running before or even after the session, i realized you are already working on it? i have this to kill the session: ps u -u "$USER" | awk '/xrdp/ && ! /awk / {system("kill "$2)}' |
I don't fully understand your last comment. Are you saying you want to kill previous sessions, and don't want to reconnect to an existing session? |
well for me it never actually worked to connect to a previous session, all i see is a glance of a white screen and then im disconnected and in order to prevent this i needed that, generally xfce saves the sessions locally? so it still feels like connecting to the same session. |
is there also a way to limit the resolution? as i see xrdp takes automatically what the client selects, thats not a behaviour that id like to have, id like the resolution to be forced to the client, is there a possible way to do that? |
The reconnect should work fine. It's probably worth getting to the bottom of that. There's no real support for fixing a session size. You might be able to lash something up by:-
That's off the top of my head - it's a bit of a long shot. |
thanks, just an update, maybe it could be useful: xfce saves sessions locally, so killing sessions does not actually kill the sessions, xrdp behaviour is like this when im logged in somewhere else and i try to log in again: a black screen and nothing else happens, restarting the service does have the same behaviour, as the session is never killed ... i added the line i provided you at the end of startwm.sh, works like magic, in case someone else needs it |
i also noticed a weird behaviour: if the user manually doesnt log out, but just uses the lock screen, im never ever able to login agian through rdp, my only solution so far was to either reboot or login again manually? first login works, after that if you lock the screen you cant log in again, my solution isnt very clean so id be glad if there would be a way to fix this, or is there a command to actually manually call for the xrdp login screen? so i can just rework the shortcut in the desktop... or should i just remove this option totally? the one that is used on the first xrdp login? because i think what is happening here is that im using lightdm and ofc you cannot see anything when the screen is locked. |
If you're logged in somewhere and you try to take over the session from somewhere else, that won't work currently. We're aware of it, and it should be a lot easier to fix in devel now. If you log out from the remote session before you leave it, and reconnect later that should be fine. Your description bothers me somewhat. startwm.sh is only run when a new session is started. If you're trying to reconnect, you shouldn't be using that code path at all. Have you changed the session allocation policy in sesman.ini? I can't help you with your screen locking I'm afraid. Do you need a screensaver configured at all for xrdp sessions? |
when starting the system, using htop in ssh, a 80% cpu usage can be seen by
root 650 79.0 0.6 862224 75872 tty1 Rsl+ 12:38 26:41 /usr/lib/xorg/Xorg -nolisten tcp -auth /var/run/sddm/{7a9981cf-4f8a-449f-8b60-44d75944b484} -background none -noreset -displayfd 17 -seat seat0 vt1
xrdp --version
xrdp 0.9.17
kubuntu 22.04
some of my tweaks:
crypt_level=none
max_bpp=16
xserverbpp=16
tcp_send_buffer_bytes=4194304
tcp_recv_buffer_bytes=4194304
delay_ms=250
tls_ciphers=HIGH
#Performance
perf.cursor_shadow=false
perf.cursor_blink=false
perf.themes=false
perf.menu_anims=false
perf.full_window_drag=false
perf.desktop_composition=false
perf.font_smoothing=false
new_cursors=false
sudo vim /etc/xrdp/sesman.ini
AllowRootLogin=false
sysctl -w net.core.wmem_max=8388608
this problem is only happening with kde desktop, also despite the quality tweaks, seems like xrdp is not using any compression? or low levels of compression as a simple behaviour like moving a terminal with htop open is very laggy and already puts my network under 8mbit of pressure, this is not an issue on windows client, i also compared visual things, like watching youtube, youtube is smoother on KDE, although it consumes 3 times the traffic compared to a windows server while the quality is questionably low.
Some other things i tried: compositing is disabled, changed rdp client settings to (LAN) and tried lower resolutions, the high cpu usage is there when no rdp connection has been even activated and stays the same throughout the whole session. this is not a network issue as my network is pretty stable, on xubuntu the performance is slightly worse but the cpu usage is nowhere near kde, but the traffic usage is 3 or 4 times higher than windows rdp, now this isnt quite an issue when you have stable internet sitting somewhere but could be annoying when you are moving around alot. Is there anyway to icrease the compression levels? i tried compression=yes, use_compression=yes, compression=9, now i know these are not in the documentation, but i still found them on the internet and gave them a try.
So here to summarize:
id be happy if someone had something here to say, if you need more info about my system, hardware or anything else please let me know.
The text was updated successfully, but these errors were encountered: