Press "Enter" to skip to content

Tag: ThinkPad T420i

Updates and changes to my ThinkPad T420i

While I haven't been doing much posting recently, I have been doing behind-the-scenes work on this website. The main thing was that I changed quite a few images from being hot-linked (when sites were okay with that) to being hosted; this was done after realizing some web filters were not blocking my website but were blocking a bunch of the images that were hosted off-site.

I've also made some substantive changes to my laptop: I am no longer dual-booting Scientific Linux and Windows 7, so no more posts about Linux and this computer. Instead, I am running Windows 7 on my laptop and running other operating systems in virtual machines inside of that (using VirtualBox). Most of the time I use Windows 7 as a guest (yes, on a Windows 7 host), but I do also use WatchOCR and Xubuntu. The reason why I virtualize Windows 7 on Windows 7 is so recovering from a catastrophic incident (e.g. computer stolen or destroyed) is quicker: just move the Windows 7 VM with all of my work on it to another computer and continue working.

Of course, simultaneously running 3 VMs is tough on a computer, so I upgraded to 16GiB of RAM. I specifically used 2x Centon 8GB DDR3-1333 (PC3-10666) 204-pin. The specific part number was R1333SO8192, pictured below. (RAM can be finicky, so I figure giving more details about what worked for me is better than too few. Also, the 8GB is what is on the package even though it should be 8GiB - I just don't want to be called out for inconsistency. </pedantic>)

I used two of these Centon sticks in my computer, and they seem to work great.
I used two of these Centon sticks in my computer, and they seem to work great.

I also replaced the hard drive with a Samsung 840 Pro 256GB SSD (MZ-7PD256BW). It works pretty well, and I utilize the whole disk encryption, though I don't really notice any benefits over my previous Intel SSD (other than increased capacity).

Of course, it's not all good news: with all of these changes to my computer, my battery life has taken a substantial hit. When it was new, I was comfortably getting 8 hours. Now, with battery capacity at 62% according to the ThinkVantage Toolbox, I'm getting about 2 hours. I'm not often away from a plug, but virtualizing OSes may not be such a great idea if you need long battery life. Or simplicity in many other ways - but my complex system works well for me.

(To help those using search engines, my ThinkPad T420i is model number 4177-CTO.)

Leave a Comment

"End" key not working

Part of my issue with getting CompizFusion to work was the lack of working keyboard shortcuts. For example, Expo (the OS X Expose-like feature) would work when my mouse was placed in the correct corner but not when using <super>-e (the "super" key is what the "Win" key is called on Linux). One recommendation I saw online was to create a file in one's home directory called .xmodmaprc which contains

keycode 115 = Super_L
add Mod4 = Super_L

Not only did this not fix my problem, but I later discovered that my end key no longer worked. Unloading this file from xmodmap (removing the file and logging back in) returned my end key to working status. Two things I didn't think to try at the time:

  • Would End+e trigger expo?
  • I have Third Level enabled, and super is the key to change levels... would this have an effect?

Those are questions for another time, but getting the end key working again was enough for now.

(This is my current, working xmodmap configuration:


[Doug@FLASHMAN-SL ~]$ xmodmap
xmodmap: up to 3 keys per modifier, (keycodes in parentheses):

shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)

Not sure what all it does, but it seems to get the job done.)

Leave a Comment

Backups (Part 1)

Background

I have suffered massive data loss twice in my life.

Once was in high school, and I knew backing up my files was a good idea. I bought a second hard drive. As I was about to copy my files onto it, someone tripped on the power cord and knocked the spinning hard drive containing all of my data onto the tile floor. Angry sounds ensued, and all my data was gone.

The second time was near the end of the my second-to-last semester of undergrad. I used a Macbook at the time and was using the encrypted file system option that came with OS X 10.6. One day, right before finals week (Murphy's Law), the computer just lost the ability to unencrypt it... leaving me with a massive, encrypted .sparsebundle that was essentially useless. Well, not essentially: actually useless.

Data Backups Are NOT Optional! 

From both major data losses I experience I had partial, unorganized backups. A DVD of homework here, a flash drive of music and movies there, but nothing cohesive. Nothing deserving of the name "backup". For about the past year, I've been regularly backing up my data. I prioritize backing up data now. I plan for it. If I upgrade the hard drive in my laptop, I'll only do so when I can afford to upgrade the backup drive as well. Internalizing the importance of backups is vital.

When I say that I've been regularly backing up my data, I mean backing up all of my files to an external hard drive (weekly for my desktop and monthly (worst-case scenario) for my laptop). The reason the laptop is monthly is, frankly, because using the external hard drive can be hard to remember. Moreover, the projects I work on regularly are copied at somewhat irregular intervals to flash drives and files emailed back and forth, so recent changes are often in several places. Not ideal, but I think that this system allows me to say "Yes, I do backup my data."

Or do I?

The current state of my backups

Right now I'm using the built-in "Backup and Restore" feature in Windows 7 and KBackup on Linux.

On Linux, I know that I'm just backing up my home directory and some configuration files I've edited. (Whenever I edit a configuration file, I copy it and the original to /root - this is included in the backups.)

The Windows 7 backup options seem to have some pros and cons (about which I could be mistaken). If a system image is created, ostensibly everything is backed up... but it can only be used in an all-or-nothing fashion. If individual files are backed up, they can be individually restored in the case of accidental deletion but are only useful individually. On my laptop in Windows I backup "files in libraries and personal folders for all users and system image". On my desktop I backup "All local data files". (I got my desktop before my laptop and initially shied away from the system image option because I thought it was akin to the System Restore Points introduced with Windows Me.)

Right now, at the start of my Ph.D. studies I feel pretty good about my responsibility with backing things up... but I will NOT lose my data again without a fight. I will not passively accept my backups as infallible.

The stress test

I decided to delete my data. To simulate a hard drive failure I used DBAN on my desktop: my hard drive was completely erased — just as if I had replaced it with a brand new one. I primarily use my desktop for Netflix, casual gaming (Morrowind, Minecraft, etc.), and browsing the internet; all of my teaching and research is done on my laptop. I checked reading my desktop backup on my laptop and was able to access the files through the Restore option: if everything went wrong, I could still recover what I wanted to. But what would everything going wrong look like?

I guess I should describe what I want from a backup solution at some point, and now is as good as any. My main purpose for backing up is to be there in the case of hardware failure or other major data loss event. I'm not too concerned with losing individual files (knock on wood) because I rarely delete anything, though being able to restore those would be a nice secondary goal. In a crunch, I would like to be able to open up the external hard drive enclosure, swap the backup drive for the original, and boot directly from the backup drive to continue working.

Previously I had created a Windows 7 Repair Disk, so I thought that booting from it would allow me to restore from my backup. While I think this would work, I wasn't able to test it. After the graphical system had loaded and the mouse worked I received Error 0x4001100200001012. I'm not sure what this error is, nor do I care at this point. After retrying it two or three times I gave up and concluded that the disk wasn't working. Lesson learned: always check your repair/recovery disks to make sure they work before you need them!

The Windows 7 Repair Disk didn't work, but I did have Dell Windows 7 System Restore Disks that I had previously checked. Basically the same thing, right?

Wrong. While these disks give me the option to restore my computer the factory image (which is what I expected them to do), that isn't my goal. After booting the Recovery Disk, I noticed that these disks also allow one to restore the computer from backups. Success! I thought naïvely. The disks seemed to only look for backups made with Dell's DataSafe software, not the Windows Backup and Restore feature. Lesson learned: don't assume options to restore backups refer to backups made with the system you use!

Fine, I begrudgingly thought. A full system restore to factory settings — at least that would get me to the Windows Backup and Restore software (and a usable computer). A few minutes and a disk change later and I was at Windows desktop. I opened the Backup and Restore feature and chose to restore all of the files from my external hard drive to their original locations on my desktop... and was immediately struck with the realization that the backup options I had been using for this were unsuitable for restoring all files at once. I had incorrectly chosen the individual-files only option. As it was copying the files, I had to choose to Copy and Replace all of the system files. I also ran into Error 0x80070020 indicating that the computer was trying to replace files currently in use. Not ideal. I had it skip those files and move on.

After all of the files finished copying there was a very clear problem: not all of the files copied. Essentially, all files related to installed applications weren't copied. While none of the data was lost, this backup did not allow me to quickly get up and running again as none of the programs I use work.

Moving forward

This stress test of my backup solution taught me that, while my data are sufficiently backed up, they are not as accessible as I would like. Not nearly so. In the end, it took several hours to get to this point which is both too slow and not where I want it to be.

My desired ability to boot from my backup in a crunch also implies that I should be able to read the files individually when the drive is mounted in another computer. This last point is key, because neither option that Windows Backup and Restore has allows this. Backing up files individually results in many individual zip files each containing many files without much clear organization. The system image option results in one large file which is difficult (impossible?) to use to access individual files. I had known about the latter situation before, but I learned the former during this ordeal. Lesson learned: always understand what the backup options actually mean!

I want to change my backup solution for both Windows and Linux. Essentially, I want to be able to clone the hard drive on a regular basis, but not maintain parity with my computer every minute. Keeping the backup identical to the original all the time (like RAID 1) doesn't allow me to restore files in the case of an accidental deletion (a secondary goal). At the same time, creating a clone of the hard drive every week would undoubtedly be a drain on system resources when dealing with large hard drives.

At the moment, I don't know my ideal backup solution, but I will keep looking for it and will post my findings. For now, I'll keep using Windows Backup and Restore and KBackup while having a better understanding of the very real pros and cons associated with them. A summary of my wants and lessons-learned are below.

What I want in a backup solution

  • Backup of my entire hard drive occurs regularly (but not a RAID 1 style mirror)
  • Backup is bootable
  • Backup is readable when mounted by another computer
  • Backup is created while the computer is in use (I would prefer to not have to use an external system to periodically mirror my hard drive)
  • Backup software is Free Open Source Software (technically this is optional, but I doubt I'll go with any solution that isn't open source)

Lessons learned

  • Always check critical media before it is needed
  • Always make sure the tools you have do what you think they do
  • Always make sure you fully understand the meaning and implications of the options you have selected
  • Testing your backup system before you depend on it is a good thing
1 Comment

Scientific Linux, ThinkPad, and WiFi

It's no secret that Linux doesn't have the same level of hardware support as Windows. In some cases, Linux systems can be run where Windows wouldn't dream of being installed. On the other hand, Windows has great support for many recent devices that Linux doesn't support (either in full or in part). The wireless device on my ThinkPad is:

[Doug@FLASHMAN-SL ~]$ lspci -nn | grep -i real
03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter [10ec:8176] (rev 01)

The appropriate driver for this (found from ELRepo.org) is kmod-r8192ce. I followed the instructions on the website to add ELRepo as a repository and then had it install kmod-r8192ce. After a restart, things seem to be looking good:

[Doug@FLASHMAN-SL ~]$ lsmod | grep 8192
rtl8192ce 51681 0
rtl8192c_common 45957 1 rtl8192ce
rtlwifi 71279 1 rtl8192ce
mac80211 423615 3 rtl8192ce,rtl8192c_common,rtlwifi

While this got the basic wireless working, things were not perfect. After connecting to any network, either secured or unsecured, I would be able to surf the web for a few minutes.... followed by nothing. The connection would just die after a few minutes (or seconds). When the connection would drop, my computer would still think I was connected, and disabling and re-enabling the network or disconnecting and reconnecting would not solve the problem. I had read that IPv6 sometimes can interfere with the network connectivity if it isn't being used (I am still on IPv4), so I appended ipv6.disable=1 to the kernel in my /etc/grub.conf file. Still not working great, but marginally better. Eventually, I began using a kernel from the 3.5 branch as opposed to the Scientific Linux 2.6 kernel. Together with the ipv6.disable=1, this seems to result in a solid connection.

Future goals

  • Whenever I update my kernel (and thus grub.conf file), a new kernel becomes the default... which is sometimes a 2.6 branch kernel. When I don't interfere with the start up, it can be frustrating when my internet dies again. I would like to have grub not change the kernel that I am running from 3.5 to 2.6. [Edit 2: For the time being, I am manually updating grub.conf after each kernel update.]
  • I need to check if ipv6.disable really offers benefits when used with the kernel version 3.5.
  • I'd like to figure out a way to display code snippets on wordpress. [Edit: It seems that this functionality is possible through wordpress plugins, but as my blog is currently hosted on wordpress.com it is not possible to use any. A medium-term goal of mine is to create a new website that includes this blog as a feature, so when that happens I'll re-edit this post to add in code snippets.] [Edit 3: I installed the SyntaxHighlighter Evolved plugin after moving to WordPress.org. Apparently, though, this feature is available on WordPress.com, though I didn't figure that out at the time. Of course, one could just use <pre> tags, which I had forgotten about.]
1 Comment

My ThinkPad specs

One of the primary focuses of this blog is going to be the technology (software/hardware/devices/etc.) that I use to be productive. The first few posts I assume will relate to software on my laptop (and fixing issues). Now, because laptop configurations vary considerably, I'm going to post everything I can about my computer so that if others experience similar issues there is a greater likelihood of finding the solution. I have more than one computer, so posts that are primarily concerned with this computer will be tagged with "ThinkPad T420i".

Lenovo ThinkPad T420i Hardware (Model 4177-CTO)

  • Processor: Intel Core i5-2430M processor (dual-core, 2.40GHz, 3MB Cache)
  • Memory: 8GB PC3-10600 1333MHz DDR3, non-parity, dual-channel capable (two 204-pin SO-DIMM sockets) (It may be possible to upgrade this to 16GB based on some things I've read (sources later), but it is currently listed as 8GB as the maximum memory.)
  • Chipset: Mobile Intel QM67 Express Chipset
  • Screen: 14" screen supporting 1600x900 resolution
  • Graphics: Intel HD Graphics 3000 (integrated)
  • Wireless: 1x1 11b/g/n, Wireless LAN PCI Express Half Mini Card, Intel Centrino Wireless-N 1000

Lenovo ThinkPad T420i Software

  • Microsoft Windows 7 Professional (64-bit)
  • Scientific Linux 6.2 (64-bit) (SL is a Red Hat Enterprise Linux clone)

I'm currently trying to switch to Scientific Linux as my primary operating system, so there will certainly be some posts about overcoming issues I've experienced with this (slow) transition. I'll keep this list updated with changes or additional information (or corrections) as I find them.

Below are a few documents I've found on the Lenovo support website which list detailed information about this computer (and related ones). I've posted them here because locating them wasn't obvious on the Lenovo website and, as products age and are no longer supported, the supporting documentation has a habit of disappearing.

1 Comment