Laptop Testing

From FreekiWiki
Jump to: navigation, search

The Laptop Testing shelf is located in the far corner of the room from the entrance. There are a handful of ethernet cables for booting to the network, as well as a few long power strips for charging batteries. When you put a system on the Testing shelf, MAKE SURE YOU KEEP ITS AC ADAPTER WITH IT (even for Battery tests)!

Memtest

After a laptop has been deemed fit for building out, we want to ensure the memory installed is still good. Hence, Memtest.

A laptop successfully completes Memtest if it makes 2 passes without error. Periodically check on the systems running Memtest to see if any errors are reported. If so, make note of where in memory the errors occurred. Occasionally, you can infer which stick is bad based on where the error occurred, and save a stick of RAM. Consult your Instructor if you have any questions.

STEPS NOTES AND DETAILED DESCRIPTION
Install the proper amount of RAM Check the specs on the whiteboard and confirm with your Instructor that the appropriate amount of RAM is installed. You should only be running Memtest on the following types of laptops:
  • FG-PDX
  • Low-end
  • Mid-grade
  • High-end

As-Is machines go straight to the Store after being outfitted.

Run Memtest Depending on the system, there are a couple approaches we can take:

Boot from Network

  1. Try and confirm the laptop can boot to network by investigating its BIOS. Occasionally you will have to explicitly enable a Network Boot or PXE option,
  2. Securely connect an ethernet cable to the laptop and reboot. Usually, you can specify a Network Boot by hitting F12 while the system POSTs. If this doesn't work, you might have to move the Network Boot option first in the Boot Order,
  3. Once you see Free Geek's Net Boot menu, select Memtest86+ from the list,
  4. Confirm that Memtest is actively running and reporting the correct amount of memory and update the Keeper Label.

Boot from HDD

If you've already installed an imaged hard drive, then Memtest is available on the local disk. Follow these steps:

  1. Power on the laptop and, immediately after it POSTs, hold down the Shift key,
  2. If done correctly, you should see a message flash in the upper left corner of the screen that says GRUB loading... and a menu shortly after that. If the system continues to boot into Ubuntu, you've missed the bootloader. Reboot the system and try again. The timing can be tricky and if you find yourself having trouble, ask your Instructor to demonstrate it for you,
  3. Once you see the GRUB menu, choose the Memory test (memtest86+) option,
  4. Confirm that Memtest is actively running and reporting the correct amount of memory and update the Keeper Label.

Boot from LiveCD

If the laptop you're working on doesn't support network booting and there isn't a hard drive available, you can try booting off of a LiveCD. There are a few available on the workbench, sometimes even a dedicated Memtest Boot CD. In general, once you boot from the CD, you should be presented with a list of boot options. Try and find Memory Test (memtest86+) in that list. If it's not there, try another boot CD. As always, if that doesn't work, consult your Instructor.

Troubleshooting Memtest

Memtest Freezes

Sometimes you'll get Memtest loaded onto a machine, blue screen and all, but it won't indicate any activity. The newer versions of Memtest are incompatible with certain older chipsets in laptops. The work-around we have available is to use an earlier version. Unfortunately, this is only available on the Network at the moment.

  1. Follow the instructions under Boot from Network above up until the Net Boot menu,
  2. Select Other Memtest versions from the menu, and choose the earliest version available (usually something like 2.0.1.1),
  3. Confirm that Memtest is successfully running.

Misreported Available Memory

  • Confirm that Memtest is reporting approximately the amount of installed memory. If there is a large discrepancy (e.g., 384MB reported of 512MB installed), you may either have a bad stick of RAM, a bad DIMM slot, or the system may be claiming too much video memory. Reboot into BIOS and see about lowering the amount of memory dedicated to video if the latter. Otherwise, swap in a new stick or two.

Battery Test

Once an imaged hard drive has been installed in a laptop, we can test its battery. This can happen either before or after the laptop has been built out, but needs to occur before its QC.

STEPS NOTES AND DETAILED DESCRIPTION
Adjust the Power Settings These steps are covered under the Laptop Build Checklist:
  1. Boot up Ubuntu and log in,
  2. Select System >> Preferences >> Power Preferences
  3. Under On AC Power:
    • When laptop lid is closed: Blank Screen
  4. Under On Battery Power:
    • When laptop lid is closed: Blank Screen
    • When battery power is critically low: Shutdown
  5. Under General:
    • Notification Area: Always display an icon
  6. Click Close.
Make sure the Battery is Charged You can either hover your mouse over the Battery Icon on the top panel or, more reliably, type the following into a terminal:
$ cat /proc/acpi/battery/*/*

Note that some manufacturers use odd names for the batteries (e.g., C167A). If you get an error with the previous command, then the system you are working either doesn't have a battery installed, or cannot recognize the battery.

This will tell you how much charge the battery is rated to keep, as well as how much charge it had the last time it was full and what its current charge is at without attempting to guess how long the battery will last (Ubuntu is notoriously optimistic in its estimations). Here's some example output:

present:                 yes
design capacity:         56160 mWh
last full capacity:      49200 mWh
battery technology:      rechargeable
design voltage:          10800 mV
design capacity warning: 2460 mWh
design capacity low:     200 mWh
cycle count:		 0
capacity granularity 1:  1 mWh
capacity granularity 2:  1 mWh
model number:            42T5262
serial number:           35098
battery type:            LION
OEM info:                SANYO
present:                 yes 
capacity state:          ok
charging state:          charging
present rate:            0
remaining capacity:      47800 mWh
present voltage:         11243 mV

Here you can see the remaining capacity is just a little bit below the last full capacity, but that the battery is reporting charging at a rate of 0. This can be attributed to the natural degradation of the battery, and so this should be good to test.

Battery information will be represented with one of two units of measure: milliwatt hours (mWh), or milliamp hours (mAh). The difference is approximately a factor of 10. You can expect measurements in mAh to be four digits long, and measurements in mWh to be five digits long.

As batteries will frequently have maximum capacities far below their last full capacity, it is sometimes useful to try and infer how close to being fully charged the battery is. The GUI can be especially bad at predicting this, particularly with certain manufacturers (Dell, HP/Compaq, Toshiba). Usually, you can tell if a battery is nearing its maximum charge by virtue of it's present rate of charge:

  • If measured in mAh, a battery is nearing its maximum charge when its present rate falls below 800 mA,
  • If measured in mWh, a battery is nearing its maximum charge when its present rate falls below 10000 mW,

Bear in mind that sometimes the firmware will lie, and represent numbers that are not at all accurate. The above is primarily meant to be a way of gathering clues as to the health of the battery. Remain vigilant!

Running Batterytest There are two ways you can run a Battery Test:

Method 1: Playing a CD

  1. Find a music CD and insert it into the laptop,
  2. Open Rhythmbox, and select the CD in the left pane so that a track list appears in the right pane,
  3. Be sure to click the Repeat button (an arrow looping around to itself), and then click Play,
  4. Watch the laptop for a moment and ensure the CD is playing,
  5. Open a terminal and type batterytest
    • If you get any output from the above command, type rm ~/bat_mon into the terminal and run batterytest again.
  6. Unplug the laptop and put a Battery Testing label on it!
  7. Mute the laptop before moving on and update the Keeper label!

Method 2: While loop

  1. Open a terminal and type batterytest
    • If you get any output from the above command, type rm ~/bat_mon into the terminal and run batterytest again.
  2. Unplug the laptop and put a Battery Testing label on it!
  3. Open another terminal, and type the following:
$ while true ; do stress-test ; sleep 300 ; done

This will tell the computer to run a stress-test for 3 minutes, and then rest for 5 minutes until the battery dies.

Make sure that you leave the AC Adapter with the laptop on the shelf. This makes it easier to check the results of the battery test and move it along the production line.

Badblocks

Occasionally we'll get a laptop (especially netbooks) where it is exceedingly difficult to remove the hard drive, or the hard drive has an incompatible adapter with our imaging stations. When this happens, we can wipe the hard drive while it is inside of the computer and then install Ubuntu on it.

STEPS NOTES AND DETAILED DESCRIPTION
Adjust the Boot Order It is imperative that we not boot from the hard drive before it has been wiped. The first thing to do is boot the laptop and set the Optical drive and, if available, Network device first in the boot order.
Method 1: Disktest (a la Hardware Testing)
  • Boot to the network and choose LTSP -> Floe (disk testing)
  • A console environment will load on the machine and run some initial S.M.A.R.T. tests. Eventually, it will prompt you to confirm the serial and model numbers of the attached machine. Enter yes, then no, then yes, I want to test 1 drive(s). Bear in mind, you have to enter the above answers exactly in order to begin the disktest.
  • Disktest should now begin badblocksing the hard drive. If it fails at any point, the error output will appear on the screen and prompt you to hit Enter in order to shutdown the machine. See Hard Drive Testing for more information.
Method 2: Boot into a Live environment
  • If a Network Boot is available, you can select Debian Rescue at the bottom of the Netboot menu. This will load a console version of Debian onto the systems memory,
  • If you can't get the system to boot from the Network, try using a LiveCD (with an external Optical drive, if necessary). We only need a commandline, so as soon as the environment is loaded, drop to a console with Ctrl + Alt + F1,
  • Once you have a console up, type the following:
$ sudo badblocks -wvvf /dev/sda -c 1024
  • This will start writing arbitrary data to every sector of the harddrive, making five full passes with different patterns each time. Note that this procedure will take a long time (somewhere along 3-5 hours).