Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
hacked dfreerdp
18-10-2014, 11:06 PM, (This post was last modified: 20-10-2014, 03:44 PM by Sand Brow.)
#1
hacked dfreerdp
I already mentioned in 'video' thread about hacked version of dfreerdp. Currently it 2..3 times faster than default dfreerdp built from current stable-1.0.
Its sources is here: https://github.com/mister-r/FreeRDP
I filled PR on main project on it here: https://github.com/FreeRDP/FreeRDP/pull/2129
But it probably will not be accepted cuz there too much changes in my fork while it forked from stable-1.0 branch that in 'maintenance mode'.
But you may compile it yourself or use ready binary that I attached to this message. There is several files in archieve: 3 configs, 3 helper scripts and dfreerdp binary compiled without in static libs config (so it doesn't need any other libfreerdp-*.so).
About helper scripts: there is main launcher script named rdp.sh that needs only address of remote Windows machine to RDP to. It does following: switches cpufreq governor to performance mode, launched dfreerdp and after it exits - adjusts cpufreq back to ondemand mode.
So how to use this all:
1) Write hardfloat raspbian image on SD and get ready to experiments
2) Make it boot to console (without X!). The easiest way to do this - in raspi-config (blue console window shown on first raspbian boot) select boot_behaviour settings.
3) Download attached file somewhere, like /home/pi in my example
4) Unpack dfreerdp.zip file from root so everything will get on right places. You will be prompted to overwrite some files - answer Y or A:
Quote:pi@raspberrypi ~ $ sudo bash
root@raspberrypi:/home/pi# cd /
root@raspberrypi:/# unzip /home/pi/dfreerdp.zip
Archive: /home/pi/dfreerdp.zip
inflating: bin/dfreerdp
inflating: bin/speedup.sh
inflating: bin/relax.sh
inflating: bin/rdp.sh
inflating: etc/directfbrc
replace etc/fb.modes? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
inflating: etc/fb.modes
inflating: boot/config.txt
root@raspberrypi:/#

Note that all that configs are defined to make your RPI work in HDMI mode 1920x1080x16bpp. If your display requires another mode - you will have to change following files: /boot/config.txt /etc/directfbrc /bin/rdp.sh and check that you desired resolution already listed in /etc/fb.modes
So once you unpacked/prepared that files do reboot raspberry (to apply config.txt changes), then login to console and type
sudo rdp.sh YOURSERVER
like
sudo rdp.sh 192.168.0.1
And if I didn't forget something you should get working RDP session Wink However, its possible to keep several sessions in parallel switching between them as usual linux VTs: just switch by ctrl+alt+f.. to any remained free TTY, do the same things and connect to another server. After that you will be able to quickswitch between connections by ctrl+alt+F1..F6 - depending how many connections you will establish - actually connections count limited only by amount of RAM. Any 'background' connection will go 'idle' state and will not eat network traffic/CPU (unlike usual freerdp-s).
Known issues:
1) Sometimes after TTY VT switched from graphical to text - keyboard input broken - instead of keypresses there comes some garbage. Remediation - just switch to any other text TTY and back - and text input will work fine again. It looks like DirectFB bug, anyway they claim VT-switching as 'experimental' feature. But it very handy.
2) When mouse pointer is located over some frequently updated region (like video or animation) - cursor image is flickering. This is 'by design' bug - minor trade-off for a best performance.

Also couple tricks to improve performance:
1) Set RDP server's Encryption level policy to 'Low'. This can be done by launching gpedit.msc on server: http://technet.microsoft.com/en-us/libra...70833.aspx After doing that all traffic coming from server to RPI will not be encrypted that noticeable improves performance, but make sure your networking infrastructure secure enough for that.
2) Also you may more overclock RPI: edit /boot/config.txt, go to its end, comment line arm_freq=800 and then uncomment last 3 lines with other frequencies. Both my boards work stable on that settings (and even higher).

#Post updated on 20 oct 2014: fixed VT switch bugs, everything now in single zip file, description updated respectively.


Attached Files
.zip   dfreerdp.zip (Size: 219.36 KB / Downloads: 172)
Reply
21-10-2014, 09:17 PM,
#2
RE: hacked dfreerdp
Tested... really great work!!!
Ill try to compile for armel and include it in next RPi-TC Smile
Reply
21-10-2014, 10:38 PM, (This post was last modified: 21-10-2014, 10:52 PM by Sand Brow.)
#3
RE: hacked dfreerdp
If you agree I can upload to somewhere and put here link to minimalistic image that has this preinstalled together wth directvnc and small 'shell' that shows console menu upon boot. I made such system for my daily work and can prepare minimal image with same settings. There is no cool animation - just hardcore console raspbian boot followed by even more hardcore console menu allowing to RDP/VNC connect to specific address.
About build: its better to build it compiled with static libs - all together in single binary just I did, because I changed certain interfaces of libfreerdp-utils and gdi so they can conflict with libraries for 'usual' freerdp. Its possible to resolve that conflicts, but it easier just to build dfreerdp as solid binary by adding BUILD_SHARED_LIBS def for cmake, to cmake configuration command should look like:
cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DWITH_FFMPEG=OFF -DWITH_XINERAMA=OFF -DWITH_XCURSOR=OFF -DWITH_DIRECTFB=ON
BTW This trick will not work on 'normal' stable-1.0. Only on my fork or their master branch.
Reply
22-10-2014, 09:38 AM,
#4
RE: hacked dfreerdp
Compiled and working also for softfloat. Ill include it in the next release Wink
I've stick the thread, you can link your .img file/os Smile
Reply
22-10-2014, 12:14 PM, (This post was last modified: 22-10-2014, 12:27 PM by Sand Brow.)
#5
RE: hacked dfreerdp
So here is that minimalistic image I called 'silent room' cuz it was created to be used in silent workplace: http://killprog.com/silentroom.7z MD5: bb0dd5e323b96b190abbfab553e7cb11
I made resolution autodetect, but still tested it only on 1920x1080 and 1280x720 monitors. Anyway if it will not work its possible to set resolution via config.txt
So this image boots into console, first 5 VTs - Ctrl+Alt+F1 to Ctrl+Alt+F5 assigned to autologin with console menu allowing to RDP/VNC/SSH to desired address. In order to enter address: hit 0 key and then type address optionally prefixed with protocol (RDP defaulted). Like: 'vnc 192.168.0.1' or 'rdp 192.168.0.1:3389' or simple '192.168.0.1' that will be defaulted to previous one.
It will write to log all connections and will show last 5 of them in menu next time allowing to quick connect by pressing any key from '1'..'5'
dfreerdp there is same as in my top message here, also it would be useful to try to overclock RPI using config.txt
directvnc's performance is poor, also it needs 'manual repaint' after VT switched, but anyway may be it will be usefull
Also in that menu you can see 'Music' item that launches ncmpc. But it will not work from the box until configured properly: either install mpd locally and configure automounting of some resource with music either config ncmpc to control mpd running somewhere else.
However I've disabled internal RPI's sound to avoid messing devices indexes when using USB headset. Also there is no sound plugin configured for dfreerdp, I didn't test it, but you may try that with plugin that can be found in raspbian repository. Theoretically it should work.
Swap file is disabled. 512MB RAM ought to be enough for anybody Wink However even old 256MB raspberry, configured for 64MB videomemory is capable to keep 2 rdp connections together with ncmpc + local mpd playing music from curlftpfs-mounted remote FTP folder.
About config: last VT (Ctrl+Alt+F6) is allowed for normal login. Usual raspbian's pi/raspberry credentials will work. If you want to change menuL its source code in /home/pi/silentroom.c and copy build result to /usr/bin/silentroom. Also in that .c file you will see what scripts are used to launch rdp/vnc/music and change them if need.
However in my PI I also have quake 3 compiled and have bound 'q' key in menu for it Smile But including it into this image would increase size for probably nobody's needed game.
Reply
23-10-2014, 10:04 AM,
#6
RE: hacked dfreerdp
If you have some glicht or error on rendering add to config.txt: dispmanx_offline=1
Also videomemory at 128Mb is good Smile

Can you try to integrate it in Wayland/Maynard desktop? Smile
http://www.raspberrypi.org/preview-the-u...d-desktop/
Reply
23-10-2014, 11:31 AM, (This post was last modified: 23-10-2014, 11:32 AM by Sand Brow.)
#7
RE: hacked dfreerdp
Did I correctly understand that dispmanx_offline forces offscreen buffer drawing that is periodically blit'ed to main video memory? If so - its possible to do also by changing rdp startup script - just replace -f argument with --direct-flip, - effect will be so all paints will go to invisible (system RAM) DirectFB surface that will be blit'ted to video memory after paint finished. In most cases this reduces performance, but in some rare cases it even faster - for example in case of massive output to some console window that involvess lot of scree-to-screen blittings.
I didn't do anything about wayland, however 'official' freerdp master has some wayland client in sources: https://github.com/FreeRDP/FreeRDP/tree/...nt/Wayland but I dont know if it already working..
Reply
14-12-2014, 01:12 PM,
#8
RE: hacked dfreerdp
Hi, I couldnt get port redirection working with both silentroom and neither rpitc X. I need LPT redirection from /dev/usb/lp0. It says rdpdr.so not found which is true, file does not exist in filesystem.

Performance is really great, but due to this I am still stuck with rdesktop.

Could you provide this lib, or update silentroom/Gibbio could update rpitc Smile ?
(Did you set usb printer support in kernel?)

Thanks
Reply
23-12-2014, 06:05 PM,
#9
RE: hacked dfreerdp
after a bit of googling, I found following discussion:

https://github.com/FreeRDP/FreeRDP/issues/1598

which mentions that cmake from "apt-get install" does not support monolithic building and 2.8.10 or higher version has to be used. Could you guys provide fixed binary?

Thanks, Martin
Reply
25-12-2014, 10:28 PM,
#10
RE: hacked dfreerdp
After whole day I managed to get it working Big Grin

No libs should be needed when using following CMAKE parameters:

-DMONOLITHIC_BUILD=ON -DBUILD_SHARED_LIBS=OFF

but when I do that, dfreerdp still asks for plugin libs Sad

Plugins for RPiTC release X are in attachment, I also have ones for armhf, but didnt test them yet.


Attached Files
.zip   plugins-armel.zip (Size: 47.39 KB / Downloads: 8)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)