-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Aten iKVM support #408
Aten iKVM support #408
Conversation
It's a big PR, I feel that it might be easier to get a good overview for review if the pixelformat stuff was split to a different PR. Would that be possible? |
This shouldn't be a problem, we are heading away from IE9 support in general, you can see the discussion in #375. |
There are a few issues with this PR:
Thanks! |
Thanks this is something I can work with, however you will need to bear with me as I am not a JS coder. So
A passing observation. I cannot see readily any details on what needs to be done to contribute code to this project. No description of what standards need to be met, how to meet them, where to get reviews, expectations, etc etc. Folks like me do need a way to measure how much an investment is needed to offload code onto you. From my perspective it seems that following, the best I could, the existing coding style (with no ready documentation on a coding standard to hand, I am simple with how I tackle problems and "git grep -i '(coding|contrib)'" is my search tool!) was not good enough to meet the standards needed to make a pull request. |
Really, this is how simple I am:
You really need to tell folks like me:
I now get:
So according to the project, only the BGRX stuff failed, not surprising as I renamed the function. Easily fixed. Really folks, you need to set up 'package.json' to let people do "npm runtests" and the lark, and you need to have something grepable in the project covering this. 'git grep -i tests' comes up with nothing useful. |
About the unit testsHey, sorry about the trouble you faced with that. I know at the moments it's a bit frustrating, but we just started asking for unit tests with pull requests, so the process is a bit new. Adding in a document about contribution is a good suggestion; I'll add something like that shortly. For unit tests, there's no need to mock an entire ATEN iKVM server. That would be quite a bit work, I imagine. I suggest the following (I'll put something like this in the general contributing docs as well):
P.S. You actually can run About not using objectsIf you don't have time to test the performance impact, then it's fine to leave your code as it is. I suspect it will be fine, since like you said, _FBU is the same way. I think @kanaka has some numbers, though, so I can ask for his opinion (he's the one that gave the original recommendation). About the detection of when iKVM is in useThe way you currently do it (checking the RFB name) is fine. I was just a bit concerned about this: https://github.com/kanaka/noVNC/pull/408/files#diff-c22afee41ed3afeb3bc9e5aeb1757e40L954 -- we really should be sending back the supported client encodings in normal VNC mode, regardless of whether or not we're converting between pixel formats. In conclusion*: Thanks for all your work. I'm sorry if this was a frustrating process, and we'll try to improve the experience in the future. |
Thanks. I am busy this week so I doubt I will be able to find the time to jump back in on this, but hopefully a week on Monday, I will be able to. Unit TestsI'll give it my best shot. I might try doing the old/new ATEN 'auto-detection' and make sure it does not stomp on a tunnel/non-tunnel 'vanilla' TightVNC server. This is really the only place I can imagine ever this breaking things badly. The pixelformat code fortunately, once in, would probably just by its nature get regular exercising through day to day use. At the moment it is a NOOP, when the server supports noVNCs preference, but if it is not too much of a performance hit (how do we test this?) I recommend it is always run. This may though entail replacing Alternative Codepath for iKVMI can trivially whack a conditionally around that, however maybe something more akin to ContributionsAll simple folks like me need is a file at the top level of the project called "CONTRIBUTING" that details a checklist to run through before sending in pull requests and the expectations the project owners have before you are permitted to drop a pile of patches and the responsibility of maintaining them on them before disappearing into the ether. |
With regards the |
Did you get a chance to do any cleanup on this? |
Just started working on it all now. I have the fixed the existing unit tests and now just need to add:
Part of my work removed true_color altogether (replaced with "server will ignore noVNC preferred, so do convertColor"). I have to head out now, but should be able to work on this further tomorrow. |
Let me know when you're ready for me to merge this. |
So people can follow the 'unit tests' instructions, we need to make sure PATH includes the karma bin directory otherwise we see the following: ---- aclouter@stevemcqueen:/usr/src/aten-ikvm/noVNC$ npm test > [email protected] test /usr/src/aten-ikvm/noVNC > karma start karma.conf.js sh: 1: karma: not found npm ERR! Test failed. See above for more details. npm ERR! not ok code 0 ----
Okay, I think this is good, at least enough for folks to give it a whirl. Really need others to give this a test to see if they see anything strange visually due to the pixelformat'ing patch, I have tried a lot of combinations (BGR/RGBxxx with and without the convertColor flag enabled). The ATEN patch is non-intrusive and would only affect those using ATEN kit (of which they couldn't connect to before anyway). PixelformatN.B. side by side tested with Debian wheezy's tightvncserver and xtightvncviewer
ATEN iKVM
|
Excellent. I will test this a bit on my own as well when I get a chance. @kanaka , @samhed , @astrand : could you test out the pixelformat patches with whatever setups you have that use noVNC (standard VNC, VMs, etc)? If it works for multiple different people on several different target servers, I think it's safe to merge it. |
Hey @jimdigriz, I just had a couple comments on the pixelformat part. The first couple I can fix myself if you don't have time. |
The ATEN part LGTM 👍 |
Removing an element (tail end) seemed fast, it was when adding one that everything went down hill. Just my $0.02. What would have been nice is to use the whole ByteArray do-thingy (and internally use RGBX everywhere) so it could be passed straight to PutImage. I tried but your tests all failed as phantomjs does not support it.
Everything else looks to go via renderQ, so I just changed it to match.
The -7 on those values is so the same test data can be recycled for both 888 and 555 true color mappings. |
Ok. Those explanations seem fine for me. I'd still like to double check with @kanaka, but it should be fine. We plan to add support for just passing around a JS typed array, but that will have to wait until I have some free time ;-). Were you just planning on copying the input data 3 bytes at a time (for BGR data) into a BGRX ArrayBuffer? |
I toyed with .set(new Uint8ClampedArray(...)) which worked fine, but broke the tests in a way that would have involved (it seemed) tossing out phantomjs. There I had _convert_color() outputting always RGBX so that it could be blitted directly onto the canvas with no byte copying and avoiding those slow as molasses loops. The code, as it is, always puts things into a RGB ArrayBuffer which then the blit function in display.js fixes up to an RGBX array; before passing it into PutImageData(). This answer your question, or have I missed the point? |
Nope, that sounds good. |
Hello, we can provide some test systems for ATEN IPMI (Supermicro Servers) and would like to support your effort to implement it in noVNC. As you might know, IPMI is widely used on server systems and the java viewer is a pain in the a**. I personal want to get rid of that java viewer for better customer experience. We are also willing to spend some money to get this solved and if somebody can do it, we would be glad to push noVNC to IPMI / KVM Support. At the moment, it does not work in my test with X9SCM-F (other than stated) as it response "No supported sub-auth types!" Best Regards |
@MartinVerges : Hi! More testing would be great. I've been really busy over the past couple months, which is why I haven't gotten a chance to merge this yet. However, we are interested in getting the ATEN iKVM support in place, and I will endeavor to make some time in the next month to do one last set of checks before merging. |
I tested this with two supermicro X9SCL/X9SCM boards running IPMI firmware versions 3.15 and 3.19. It works well, expect for turning the screen on and off which makes (re-)booting a system annoying. I fixed the most obvious problems (expecting aten_len to be 10 while it is 0 when the screen is off with this board/firmware), but it now just hangs when the screen turns off. I can give you guys full access to the servers for development, just send me an email for details. |
@emmericp : you said that you fixed some things. Do you have a patch? Thanks! |
@DirectXMan12 the only change that actually helped somewhat is the following. I did not yet have time for a deeper dive into the code base, I'm still puzzled why it sometimes just seems to stop receiving data at all after changing the resolution.
|
@@ -330,9 +334,12 @@ var RFB; | |||
this._FBU.lines = 0; // RAW | |||
this._FBU.tiles = 0; // HEXTILE | |||
this._FBU.zlibs = []; // TIGHT zlib encoders | |||
this._FBU.aten_len = -1 // ATEN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing ;
here
FYI, I've made some fixes to the code (which preserving attribution, of course), and pushed them to a new branch. There's a new PR at #445 |
Tested over multiple Supermicro boards (as detailed in the sourcecode) but with the most recent offereing from Supermicro I still need to reverse engineer their new encoding. This code is good to go though and was tested with a regular local TightVNC to make sure I did not poouch the RGB<->BGR stuff in the Pixel Format work I had to do first.
This solves #385 and should start helping out for the work needed in #396
One gotcha, IE now much be version 10+ due to the pixel endian handling.