Giter VIP home page Giter VIP logo

kernelflut's Introduction

kernelflut

Connect a pixelflut screen as another (virtual) monitor. Set a monochrome background and drag windows onto it. Use your own WM as a pixelflut client.

usage

Usage:
  sudo kernelflut [options...] [HOST [PORT]]

Arguments:
  HOST            pixelflut hostname (default localhost)
  PORT            pixelflut port (default 1337)

Options:
  -a              use async i/o
  -b RRGGBB       occasionally blit every pixel except this one
  -c CONNECTIONS  size of pixelflut connection pool (default 8)
  -d WxH          scale down to width W and height H
  -o X,Y          move the top-left corner down by Y pixels and right by X pixels
  -s              increase SO_SNDBUF socket buffers by 2x (can pass multiple times)
  -p              do a performance test (time five screen updates)

building

You need to build and install the evdi kernel module, then build and install the evdi userspace library, then build and install kernelflut itself. This looks something like:

  1. make insmod to build and install the EVDI kernel module. This must be done on each boot.
  2. make evdi_install to build and install the EVDI userspace library. This only needs to be done once.
  3. make run to build and run kernelflut.

running

  • sudo kernelflut
  • open a display configuration tool for projectors or external monitors (I like lxrandr)
  • enable the (virtual) monitor and place it somewhere with respect to your other monitors
  • drag stuff to the new "screen" and you'll see it begin to send to pixelflut

troubleshooting

Can't run it?

  • is the evdi module loaded? it should be
  • is your kernel new enough for evdi? update it
  • is your kernel TOO new for evdi? try updating evdi, but beware this may break kernelflut. make update_evdi
  • have you fiddled with the kernel's DRM (direct rendering manager) subsystem? please return to mainline for now

Nothing happens/runtime errors?

  • are you using a displaylink USB-C dock? this could interfere because it also uses evdi. I don't own one so I have no clue

performance optimizations

When playing pixelflut, the bottleneck is almost definitely network transmission. You can try these things to optimize this:

  • Run tests with various options using the kernelflut -p flag. Without data, your performance is speculation. Control the testing environment—make sure traffic to the pixelflut server stays relatively constant during and across your tests. The best way to do this is by ensuring you're the only user. Beware testing against a local pixelflut server; because your machine is handling the load of the send and receive simultaneously, performance will decrease more quickly as a factor of traffic.
  • Blit to a smaller area using -d and -o options to kernelflut. Performance will improve dramatically.
  • Set a single, very bright solid color desktop wallpaper for the kernelflut virtual screen (#ff00ff works well) and register it with -b ff00ff (or whatever color you chose) when running kernelflut. This will refuse to send pixels of that color to pixelflut, which will avoid ever blitting your background to the screen. This can improve performance on very busy pixelflut displays, but will also cause windows to linger as you move them (win xp style).
  • Enable the kernelflut -s flag to increase system socket send buffer length. You can pass it multiple times, each time doubling the amount of memory allocated to each socket send buffer. Your system maximum is ignored. Beware extreme, difficult-to-track RAM usage! Consider decreasing the number of connections (-c) to compensate!
  • Increase or decrease the number of connections using the -c flag to kernelflut. Connections are established on program start.
  • Enable the kernelflut -a flag to enable asynchronous I/O. I don't think this is actually useful—let me know how it changes the performance on your system!

In case network is not the bottleneck, try:

  • disabling redshift
  • fiddling with your compositor: disable or enable it. Turn really fancy stuff off. Compton seems to work ok.

implementation

  • userspace application
  • connects to evdi (root required 🙁)
  • requests a virtual display and requests updates
  • sends changed pixels to pixelflut

todo

  • easier build
  • warn if uid != 0
  • pictures
  • multithreading with worker threads and shared memory

kernelflut's People

Contributors

jawsper avatar qguv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kernelflut's Issues

make insmod false

when I build this project on my ubuntu 20.04.
I have following error after I set the command "make insmod" or "sudo make insmod"

/home/eddie/桌面/kernelflut/evdi/module/evdi_drv.c:11:10: fatal error: drm/drmP.h: 沒有此一檔案或目錄
11 | #include <drm/drmP.h>
| ^~~~~~~~~~~~
"沒有此一檔案或目錄" mean can not find this file or this directory,
but I have install libdrm-dev library.
and I can build and install the latest evdi version from displaylink evdi repo.

I'm trying to use evdi module to develop application, but I can't link the .so file or the kernel module with my application.

so I found this evdi related project and trying to study it.

could you help me? or any idea can let me to study?

make insmod false

when I build this project on my ubuntu 20.04.
I have following error after I set the command "make insmod" or "sudo make insmod"

/home/eddie/桌面/kernelflut/evdi/module/evdi_drv.c:11:10: fatal error: drm/drmP.h: 沒有此一檔案或目錄
11 | #include <drm/drmP.h>
| ^~~~~~~~~~~~
"沒有此一檔案或目錄" mean can not find this file or this directory,
but I have install libdrm-dev library.
and I can build and install the latest evdi version from displaylink evdi repo.

I'm trying to use evdi module to develop application, but I can't link the .so file or the kernel module with my application.

so I found this evdi related project and trying to study it.

could you help me? or any idea can let me to study?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.