Fixing Stuck Pixels

Discussion in 'Computers and The Internet' started by quark, Dec 10, 2015.

  1. quark

    quark Parts Unknown

    Messages:
    1,322
    Likes Received:
    783
    Anyone have any tips on getting rid of stuck pixels?

    I've got a red one on my laptop... It's not very noticeable so it's no big deal. The only time I ever see it is if I deliberately look for it.

    Any help would be appreciated.
     
  2. Tyrsonswood

    Tyrsonswood Senior Moment Lifetime Supporter

    Messages:
    34,218
    Likes Received:
    26,321
    They say pushing in on the stuck pixel with a slightly blunted pencil or toothpick, not sharp enough to damage the plastic film but sharp enough to just effect that spot, and then turning on the monitor can fix this issue... (it has to be fully off, not sleep or hibernating.)

    I've only had this actually work twice.
     
  3. AceK

    AceK Scientia Potentia Est

    Messages:
    7,824
    Likes Received:
    960
    Try this code, it's supposed to "exercise" the pixels by alternating between white and black pixels, shifting them each scanline and inverting each frame. Liquid crystals can get a memory, but it's not permanent. This won't fix electrical problems, or burned transistors in the display though:

    save as lcdscrub.c

    /* IRQ42's LCD Pixel Scrubber. Run for at least 10 minutes, screens in severe
    * condition may need several hours. Do not stare at this if you have epilepsy
    *
    * Status information such as average framerate, and frame rendering times are
    * written to stderr, if you don't want to see all of that send it to /dev/null
    *
    * To escape the program, press ESC or, the 'q' key.
    */



    #include <SDL/SDL.h>

    #include <stdlib.h>

    #include <assert.h>

    #include <stdio.h>

    #include <unistd.h>



    #define HRES 1920

    #define VRES 1080

    #define FPS 60 // change this to 30 if you have bad tearing, or can't obtain 60fps,
    // even factors of monitor refresh rate may be better.


    int main(int argc, char **argv)

    {

    (void) argc;

    (void) argv;



    SDL_Surface *screen;

    SDL_Event event;

    Uint16 *raw_pixels;

    int x, y;

    int quit = 0;

    Uint8 pixel_mask = 0xFF;

    unsigned framecnt = 0;



    /* Init SDL */

    if (SDL_Init(SDL_INIT_VIDEO) != 0) {

    fprintf(stderr, "Unable to initialize SDL: %s\n", SDL_GetError());

    return EXIT_FAILURE;

    }

    /* Make sure SDL_Quit get's called when program exits */

    atexit(SDL_Quit);



    (void) SDL_ShowCursor(SDL_DISABLE);



    screen = SDL_SetVideoMode(HRES, VRES, 16, SDL_HWSURFACE |

    SDL_DOUBLEBUF |

    SDL_FULLSCREEN);

    if (screen == NULL) {

    fprintf(stderr, "Unable to set video mode: %s\n", SDL_GetError());

    exit(EXIT_FAILURE);

    }



    /* Get a pointer to the video surface's memory. */

    raw_pixels = (Uint16*) screen->pixels;



    while (!quit) {

    Uint32 t = SDL_GetTicks(); // time before frame draw

    /*MSG PUMP*/

    if (SDL_PollEvent(&event)) {

    switch (event.type) {

    case SDL_QUIT:

    quit = 1;

    break;

    case SDL_KEYDOWN:

    switch (event.key.keysym.sym) {

    case SDLK_ESCAPE:

    case SDLK_q:

    quit = 1;

    break;

    }

    break;

    }

    }



    SDL_LockSurface(screen);

    pixel_mask = ~pixel_mask;

    for(x = 0; x < HRES; x++) {

    for(y = 0; y < VRES; y++) {

    Uint16 pixel_color;

    size_t offset;



    pixel_color = SDL_MapRGB(screen->format,

    0xFF ^ pixel_mask,

    0xFF ^ pixel_mask,

    0xFF ^ pixel_mask);



    offset = ((screen->pitch >> 1) * y + x);

    raw_pixels[offset] = pixel_color;

    pixel_mask = ~pixel_mask;

    }

    pixel_mask = ~pixel_mask;

    }

    SDL_UnlockSurface(screen);

    SDL_Flip(screen);



    // assertion will fail after 49 days running d/t overflow

    assert(t < SDL_GetTicks());



    // FPS cap

    ++framecnt;

    if ((t = SDL_GetTicks() - t) < 1000 / FPS) {

    SDL_Delay((1000 / FPS) - t);

    } else {

    fprintf(stderr, "frame: %d, frame_time: %d, fps (average): %g, "

    "(t >= %d)!\n", framecnt, t,

    1000.0 / ((float) SDL_GetTicks() / framecnt), 1000 / FPS);

    }

    }



    exit(EXIT_SUCCESS);

    }




    Depends: libsdl1.2-dev. You will need to apt-get install this package on debian based distros.

    To build:

    gcc -olcdscrub -Werror -Wextra -std=c99 -pedantic lcdscrub.c -lSDL $(sdl-config --cflags --libs)
    sorry, no Makefile :/, but building isn't hard as long as you have the package mentioned above installed, that way you have the proper headers and can link it. then just run ./lcdscrub

    and sorry about all the blank lines in the code, the forum software put them there for some reason when I put code tags around it, and I'm too lazy to go through and remove them and risk screwing it up (if ur picky, you can run astyle on it, but the compiler won't care about the extra whitespace).
     
  4. relaxxx

    relaxxx Senior Member

    Messages:
    3,502
    Likes Received:
    743
    Or youtube...

    https://www.youtube.com/watch?v=ZjdrMuKpaCI

    Also, a fun way to piss your wife off.

    Also, I doubt these work for most stuck pixels.
     
  5. AceK

    AceK Scientia Potentia Est

    Messages:
    7,824
    Likes Received:
    960
    if any of them would it would be the program I wrote above. That's if it's due to liquid crystal memory, where the liquid crystal gets stuck in it's twisted state which is temporary (which mean that dark pixels are the ones that get burned in, opposite of CRT monitors where bright pixels cause phosphor burn in, which is permanent AFAIK).

    The way the program works is to rapidly twist, untwist the liquid crystals, in a specific pattern. Also, just a completely white screen for a few hours could help, as this will force the liquid crystals into their untwisted state, and eventually they lose their memory, but I doubt it would be as effective as my program as far as how quickly it could fix this (which isn't perfect, it leaks some memory, but it doesn't really matter because the OS reclaims it when the program terminates anyway ... fixing that would be easy, but like i say doesn't really matter as much as you think, lots of programs like web browsers leak a lot of memory *while running* ... eating up more and more memory until they're terminated ... this is also why this code isn't public so that people can point out and patch these things, I'd rather just do it myself before being seen by others and save myself the embarassment, ;p kek). I could be wrong slightly in some way, but I think most of what I've just said is mostly correct as I understand it, and liquid crystals I really don't understand too well, that's some crazy chemistry shit, I do know what liquid crystals are and how they block light by twisting when applied an electric potential.

    If the dead pixel is due to a hardware or electrical problem with the display, such as a burned out of defective transistor in the display matrix ... then no program sending any type of video signal can fix this, as the pixel is actually electrically broken and can't be changed by any signal, and only a new LCD panel can fix that (these things have many layers which can be peeled apart). Or RMA it.
     
  6. relaxxx

    relaxxx Senior Member

    Messages:
    3,502
    Likes Received:
    743
    Yeah, that's the problem, I think at least 95% of the time is is electrical. I do have a monitor with one stuck pixel I'll try fixing for kicks. If I remember the pixel is most obvious on a black screen and shows as a bright cyan spot. So that means the Green and Blue are stuck on. It might be cool if someone wrote a program that let you select the specific pixel to attack rather than brute force the whole screen. Also the specific color strips affected of the bad pixel. I could use a paint program and select the affected pixel and make an animation to attack just that pixel. Alternate black and cyan color, no need to attack the red crystals in my instance. I mean the crystals used in the red strip of that pixel. All the crystals are actually clear as you probably know.

    Basically an LCD screen is just a clear crystal suspension liquid trapped between two layers of thin glass. The glass has electric traces etched to charge specific areas, a small current flows through the crystals making them align. The alignment of the crystals causes any light going through them to get polarized. The light photons could be imagined as little bar magnets that can go through glass. The EM polarity of the crystals forces the photons to line up in order. Imagine dumping a box of loose dominoes through a grate and they came out all standing up in order on the other side. Then the light goes through a polarized film. The light that got polarized by the charged crystals lines up and goes through the film, the light from areas that were not charged do not line up and get blocked.
     
  7. AceK

    AceK Scientia Potentia Est

    Messages:
    7,824
    Likes Received:
    960
    "Brute forcing" the entire screen will hit all pixels including the one affected, the intent to "even out" all pixels so they have the same sensitivity.

    The program could be modified to target only certain subpixels (e.g. the red subpixel) ... not sure what the effects of that might be, it could be counterintuitive for all I know. But good luck trying to locate the exact location of a single pixel on a screen with 1920 * 1080 (2,073,600) pixels. You could maybe take a screenshot of the entire screen, then use an image editing program to locate the coordinates and get the coordinates of that pixel ... but, it probably won't show up on a screenshot, since the screenshot comes from the framebuffer, not the display itself ... so yeah good luck.
     
  8. relaxxx

    relaxxx Senior Member

    Messages:
    3,502
    Likes Received:
    743
    Well, it would have been really easy if I was on Win XP. I made an animated gif with one pixel switching green and black super fast. Black BG, about 40X30 resolution. Had it running in a small Chrome window and can slide it around my screen very accurately and spot on to the pixel. Except because it's close to the top edge, when I let go the stupid Windows 8 OS snaps the window back down. It's just a stuck green pixel BTW. So I did an 80X60 gif all green/black switching. It's on the spot and not big enough to give anyone seizures. I'm going to leave it overnight but I don't expect it will fix, about 4.5 hours so far. I don't see any point glitching the whole screen or any other color.
     
  9. AceK

    AceK Scientia Potentia Est

    Messages:
    7,824
    Likes Received:
    960
    Some monitors freak out when you send it a signal like that program does. I don't know the specifics but it's something to do with the way it's wired up electrically and it'll make the display tweak out and flicker because it can't handle a signal like that. Actually there's some static images even with specific patterns that will make some cheap monitors freak out.

    http://www.lagom.nl/lcd-test/

    usually if it's just one specific subpixel ... it's probably a dead transistor. This actually used to be pretty common and acceptable to have a few dead pixels in a display until they improved their fabrication process so they didn't have to throw away half of the displays they make cuz they fail quality assurance, and this was back when a 15" lcd monitor was like $1000.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice