SATA controller, blurry photography and competition

    A few days ago, an English user with the nickname mdickie registered on the KolibriOS forum and complained that the mouse did not work in his Dell Latitude C640 laptop: board.kolibrios.org/viewtopic.php?f=4&t=2389 . Since we recently had support for USB (in particular, USB mice), our founder Mario_Z logically suggested that mdickie was using some old version, and advised him to download the latest nightly build and check on it . The assumption of Mario_Z turned out to be true - in the nightly assembly the mouse worked, but something else broke :

    It works with the latest build,
    Thanks
    EDIT: It freezes slower.
    Unfortunately, the user was not laconic ( either English is not his native language ), so for some time we found out what exactly was wrong , asking leading questions, until the picture became clear:
    I mean it needs a little more time to freeze the mouse.
    Oh yes, the whole system freezes. The Keyboard and the clock aren't working.
    Here I already guessed that the reason for the freeze is most likely the SATA IDE driver , which Mario_Z is currently developing . At the moment, KolibriOS has a native driver only for the PATA controller , and support for the SATA controller in IDE mode is carried out only through the BIOS, which introduces 2 limitations:
    1. Access to disks through the BIOS “crutch” is very slow, so you can’t watch a movie from such a disk in KolibriOS - it will go jerky. The speed of copying files is also unacceptable - you can have lunch while copying a large file.
    2. Some drives without a driver are not visible at all in the system.

    In view of this, at the moment we are writing 2 SATA drivers (in parallel):

    Both drivers have one unpleasant feature - to hang up the system tightly in case of any emergency situation - and then logs are required to see the disk configuration and try to find out the cause of the hang. This is exactly what happened with mdickie , and so I asked him to attach the logs. Naturally, when the entire system freezes, it will not be possible to copy the logs directly from KolibriOS to a text file, and in such cases we ask you to photograph the log from the monitor screen onto a smartphone or camera, and post the photo on our forum. And here we go to the second part of the article.

    To write the log to a text file (like dmesg on Linux ) we have the BOARD utility, which also displays the last few lines of the log in its window. When the system freezes, the visible part of the log is usually not enough, and copying the entire file is not possible, as I said above. It remains only to duplicate the entire log on the screen, and then photograph it, and for such purposes we have the option on the start screen:



    The functionality for duplicating the log on the screen itself was written by CleverMouse , but I can be proud that my assembler knowledge was enough to arrange this functionality as an option for the start screen * (before that, manually recompiling the KolibriOS kernel was required to enable or disable this functionality, which is often too difficult for new users of the project).

    *We often informally call this screen " blue screen ", similar to the Windows , but, of course, nothing to do with the BSOD ( " the Blue Screen of Death " / " Blue Screen of Death " ), our start-up screen does not (except for color). Even more likely, it is the exact opposite of the blue screen of Windows - there the blue screen announces the “end of life”, and with us, on the contrary, the beginning :-)

    So, I asked mdickie to enable the C option on the “blue screen” and attach the resulting log . What he did, only instead of a photograph, he rewrote the text manually :
    ========= tmpdisk 0.45 =========
    trying to add disk
    10% of free RAM will be used, new Disksize: 50MB
    operation completed successfully
    K: Attach Interrupt 11 Handler 80BA2F04
    Unfortunately, his answer could not help us in any way, although the result was quite expected. The fact is that although the log is displayed on the screen, it is simultaneously with the drawing of other programs (for example, “icons”), and if the drawing event occurs after the log output event (as it was in our case), then the log part is simply overwritten in the video memory, since other images are drawn on top of it (in the file, of course, the entire log is saved, but the file cannot be pulled out, as mentioned above).

    Since I myself have already encountered a similar problem repeatedly, I found a solution - disabling the launch of all programs except the kernel is guaranteed not to overwrite the log on the screen. In KolibriOS have an analog startup the Windows , or /etc/init.d the Linux: after loading the kernel, it launches the LAUNCHER program , which reads one line from the AUTORUN.DAT file , and launches the programs written there (with optional parameters). Moreover, in KolibriOS, both the desktop itself, and the icons, and the background image are launched precisely from AUTORUN.DAT , and are not part of the kernel. Thus, all that was needed was to add on the start screen the ability to disable the LAUNCHER call after loading the kernel. Encouraged by the fact that I was able to add the option of duplicating the log to the screen, I also added the option to disable LAUNCHER (under the letter D in the photo of the blue screen above).

    Therefore, I asked the usersimultaneously enable log duplication on the screen and disable LAUNCHER loading :
    Unfortunately it's only part of the log, so it won't help us.

    Please turn on option C and simultaneously turn off option D on blue screen . This will boot KolibriOS without starting the desktop at all, but only display the debug log. Please try to make a photo this time. Don't worry about small font - we should be able to understand it. The mouse should still move, so first of all, try to move it for a longer time and see that it doesn't get stuck (let us know if it still does).
    This request was finally successful - we were presented with a photo of the full log (below I bring it in a reduced size): The



    user warned me that the photo looks bad, but I presumptuously wrote to him (translated from English above): " Do not be afraid about the small font - we can make it out . " Looking at the photo, I realized that I underestimated the user's ability to take bad photos (or overestimated their ability to disassemble them) - the photo was specifically “blurred”, so it was almost impossible to make out. I advised the user how to try to solve the problem of freezing (and get a text log instead of a blurry photo), but he apparently got tired of it, and hedecided to wait until KolibriOS became more stable .

    So, you didn’t have to rely on getting any more information from this user, and it is very desirable to solve the freezing problem (but for this you need to get a clear photo of the log). And then I remembered about programs for recovering blurry images (one of them, SmartDeblur , the author even advertised several times on Habré).

    I downloaded for trial 2 versions of SmartDeblur (the last free and last paid with the trial version), as well as the Blurity program found on the Internet , which openly considers itself better than SmartDeblur in the comparison section :

    After playing with the manual settings and using the automatic improvement method where it was, I still could not get a normal result. The best photo that came out of me was obtained using manual tuning in SmartDeblur v.2.2 with the following parameters:



    The result is shown in the photo below (you can open the photo in a new window using RMB, and then it will open in its original size). I don’t know whether my hands are completely crooked, or all these programs in their commercials / website use specially made test photos that are well restored, or this photo is from the category of those that no existing program can recover cannot, but the fact remains: I could not get a good result.

    UPDATE:YUVladimir (author of SmartDeblur ) gives an explanation in the comments why all the programs give poor quality: habrahabr.ru/company/kolibrios/blog/192558/#comment_6710828



    Therefore, I decided to announce a contest - any reader of Habr can try to improve the original blurred photo using any blurry image recovery programs (it’s not necessary to use one of those that I brought in - I’m sure there are many more). You can post an improved photo either in the comments on this post, or on our forum in the original threaduntil September 17, 2013 24:00 GMT. You need to attach instructions to the photo (a screenshot is better), which program, which version and what settings to use in order to achieve such a result.

    The top 10 photos, according to the developers of KolibriOS , will be put to a vote on Habré. The author of the photo with the most votes will be awarded with a branded flash drive and a T-shirt with the KolibriOS logo (including forwarding to the address indicated by the winner). Good luck

    Bonus - a prize of 1000 rubles to the first one to tell Mario_Z correctly how to solve the problem of freezing: board.kolibrios.org/viewtopic.php?f=1&t=2343&start=120#p51072(the solution itself is optional; just a hint is enough). Tips can be written both here in the comments and on our forum .

    Also popular now: