RSS feed
  • Howto Replace a Screen Invertor on a Dell Inspiron 1520

    I have a Dell Inspiron 1520 which started to get a whining noise right under the DELL logo below the screen right in the middle. It would change pitch depending on how bright the screen was set at. I replaced the inverter which cost me $15 on ebay. The process was fairly simple but I took more things apart and made things generally more difficult on myself than I needed. Here is the most simple way to repair your inverter on a Dell 1520 Inspiron laptop.

    • Remove the plate covering the power button and numlock/capslock keys. This can be done by twisting a screwdriver under the little slot on the top right hand side of the cover.
    • Remove the frame around the screen. Do this by removing the 6 little pads and and stickers covering the screws to remove the frame from the screen. There is one in each of the corners and two near the center/top. Unscrew these screws. To remove the screen cover frame you will need to twist and pry a little bit near the hinges. Don't be afraid it does require some force.

      Once it is removed it should look like this:

      Screen with frame removed

    • With the frame off, remove the screws holding the screen to the lid. There are some that screw down from the top and other that screw into the side of the screen, just look around. Next, remove a couple screws holding the microphone/webcam board above the very top of the screen. This will allow you to safely move the entire screen and get to the inverter. Once you have done this, you can open your laptop lid all of the way so it is almost flat and move the screen and webcam board so they are flat on the keyboard. It should look like this:

      Screen and camera on keyboard

    • Replace the Inverter. At this point you should be able to easily get to the inverter which is between the hinges below the screen. There are two cables to unplug. One has a blue ribbon to pull on and the other a white connector to pull out.
    • Once you've switched them out, put everything back together and you're done.

    It took me a long time to realize that if I removed the screws to the microphone/webcam board it would move with the screen which led to lots of problems trying to get to the inverter while the screen was still attached to the lid. That is really the only trick.

    Good luck!

  • MySQL Permission Errors After Moving Datadir

    I wanted to make space on my root partition and so moved my mysql data dir to /home/mysql in /etc/mysql/my.conf and received the following errors:

    dwiel@dwiel:~$ sudo mysqld
    091111 20:39:16 [Warning] Can't create test file /home/mysql/dwiel.lower-test
    091111 20:39:16 [Warning] Can't create test file /home/mysql/dwiel.lower-test
    091111 20:39:16 [Note] Plugin 'FEDERATED' is disabled.
    mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
    091111 20:39:16 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
    091111 20:39:16 InnoDB: Operating system error number 13 in a file operation.
    InnoDB: The error means mysqld does not have the access rights to
    InnoDB: the directory.
    InnoDB: File name ./ibdata1
    InnoDB: File operation call: 'open'.
    InnoDB: Cannot continue operation.

    The problem was with apparmor. It was restricting mysql from reading and writing to /home/mysql. To correct this I edited the file /etc/apparmor.d/usr.sbin.mysqld and added:


    /home/mysql r,
    /home/mysql** rwk,

    to the end of the file. Then restarted apparmor:


    sudo /etc/init.d/apparmor restart

    and then restarted apache with no problem

  • Build tolua++ files with makefile

    Here is how you can have your makefile build your tolua++ .cpp and .h files for you. It should work for plain tolua also.

    TOLUA = tolua++5.1
     
    tolua_%.cpp tolua_%.h : %.pkg
    	$(TOLUA) -o $(@:%.h=%.cpp) -H $(@:%.cpp=%.h) $<

    this will generate tolua_file.cpp and tolua_file.h files from corresponding file.pkg files anytime they the .cpp or .h file is depended on somewhere else in the file. In my case I just added tolua_file.o to my list of objects. Here is the full makefile for the project which required this - for reference:

     
     
    # LINUX
    LIBLUA=lua5.1
    # MAC OSX
    #LIBLUA=lua
     
    # LDFLAGS=-arch x86_64
    OBJS = swarm.o group.o scene.o vmath.o tolua_group.o tolua_swarm.o tolua_vmath.o
    CXX = g++
    CXXFLAGS = -Wall -c -O2 `sdl-config --cflags`
    LDFLAGS = -Wall `sdl-config --libs`
    INCLUDES = -I./include -I/usr/include/lua5.1 -I/opt/local/include
    LIBS = -L./lib -lANN -lGL -lGLU -llo -ltolua++5.1 -l$(LIBLUA)
    TOLUA = tolua++5.1
     
    tolua_%.cpp tolua_%.h : %.pkg
    	$(TOLUA) -o $(@:%.h=%.cpp) -H $(@:%.cpp=%.h) $<
     
    %.o: %.cpp
    	$(CXX) $(INCLUDES) $(CXXFLAGS) -c $< -o $@
     
    # the executable
    swarm: $(OBJS)
    	$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
     

    download

  • JQuery + Greasemonkey

    Had to look around to figure out how to include jquery in greasemonkey. Should have just guessed this first; Just use the @require, and your standard jquery document ready code. Heres my template anyway.

     
    // ==UserScript==
    // @name           JQuery Template
    // @author         Zach Dwiel
    // @description    Provide a basic template for using jquery in greasemonkey
    // @include        *://*
    // @require        http://code.jquery.com/jquery-latest.js
    // ==/UserScript==
     
    $(document).ready( function() {
        // your jquery code here
    }