Showing posts with label lenovo. Show all posts
Showing posts with label lenovo. Show all posts

Thursday, 30 August 2012

Enabling external monitor on Lenovo W530 with Nvidia Discrete Graphics and Ubuntu Linux 12.04

I've recently acquired a Lenovo W530 laptop. It's nice. Running Ubuntu 12.04 and with 32GB of RAM and an SSD it builds Firefox with cold/empty caches in 14 minutes flat, which is pretty good!

It was a trial figuring out how to get the Nvidia graphics card and a second monitor working however. The current Ubuntu stable nvidia-current package doesn't include support for the Quadro K1000M chipset, and the official Nvidia drivers available from Nvidia.com didn't work for me, and left my libGL.so's missing when I uninstalled them.

I eventually figured out the steps to get a compatible Nvidia driver installed and displaying a second monitor:

1. Install the "X Updates" team's PPA, and install the latest Nvidia drivers, which supports the Quadro K1000M. In the terminal enter:
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current
2. Reboot. At the Lenovo BIOS screen press "Enter" to interrupt normal startup, F1 to enter BIOS setup utility. Change Config > Display > Graphics Device to Discrete Graphics. This means the hardware will attempt to use only the Nvidia graphics card, not the Intel integrated graphics. Press F10 to save and boot the computer.

3. Once you've booted up and logged in, to setup multiple monitors you'll need to run nvidia-settings from the terminal as root:
sudo nvidia-settings
Setup your displays in the "X Server Display Configuration" tab (you may need to "Detect Displays" first, and you probably want "TwinView" configuration). Once you've configured your displays, make sure you "Save to X Configuration File". When I saved my config file the path save was blank. If this happens to you, enter: /etc/X11/xorg.conf

3. (Updated 13 October 2012) Once you've booted up and logged in, you can use Ubuntu's "Displays" application to easily configure your secondary displays. Note that if you use nvidia-settings to write an xorg.conf (as I previously suggested) X won't detect when you unplug a monitor, and so when you unplug a monitor X may open windows on the monitor which is no longer connected, i.e. where you can't see them, which can be very inconvenient!

4. To get your hardware brightness keys working (i..e Fn+F8/F9), edit the /etc/X11/xorg.conf file as root:
sudo gedit /etc/X11/xorg.conf 
...and add the following line to the "Device" section for the "Quadro K1000M":
    Option         "RegistryDwords" "EnableBrightnessControl=1"
Log out/log back in and then your brightness keys should work!

4. (Updated 13 October 2012) To get your display brightness keys working (i..e Fn+F8/F9) you need to tell the Nvidia graphics driver to enable the brightness controls.

These days X automatically configures itself, so you can't just edit the xorg.conf file, you instead need to add a section to a file in /usr/share/X11/xorg.conf.d/ and X will include that section in the configuration that it automatically generates.

So to get the screen brightness keys working with your Nvidia graphics card, create a file in the xorg.conf.d directory, e.g:
sudo gedit /usr/share/X11/xorg.conf.d/10-nvidia-brightness.conf

Paste the following into the file:
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro K1000M"
    Option         "RegistryDwords" "EnableBrightnessControl=1"
EndSection
Log out and log back in, or reboot, or simply kill X with CTRL+ALT+BACKSPACE, or ALT+PrtSc+K, and your brightness keys should now work!

Caveat: I've only had a second monitor working on my VGA output, I'm looking forward to my mini-DVI adapter arriving so I can have a cripser DVI output. Hopefully that will Just Work....

Update 13 October 2012: a second monitor Just Worked with my mini-DVI adapter. I was able to get two external displays running off a docking station. Possibly the docking station could drive more, I haven't felt the need, three displays is enough for me!

And unfortunately my laptop refuses to boot with Discrete Graphics enabled, the Nvidia driver installed, and with virtualization enhancements enabled in the BIOS. Apparently it is possible with the help of the BumbleBee project however.

Update 13 October 2012: I was able to boot with virtualization enhancements enabled in BIOS if I specified the nox2apic kernel command parameter. I haven't done enough research to figure out whether disabling x2apic is a good idea or not.

Friday, 13 July 2012

Replacing Lenovo optical drive with second hard drive: The Lenovo adapter is disappointing

I recently ordered a Lenovo Serial ATA Hard Drive Bay Adapter III for my Lenovo T510 laptop. This can hold a hard drive, and replaces the DVD/CD-ROM drive in your laptop. This enables your laptop to run a second hard drive.

I've used my optical drive two, maybe three times since getting the laptop, so swapping it for another hard drive seems like a good trade for me.

The Lenovo drive bay itself works fine, but I'm still disappointed in Lenovo's product.

When installed, the drive bay looks like this:
Lenovo Serial ATA Hard Drive Bay Adapter installed in a Lenovo T510
The problem here is that there's a gap of approximately 3mm (~0.12 inches) between the top of the drive bay and the ceiling of the optical disk cavity. This means the drive bay can wobble vertically, so much so that I feel the need to tape it in place to stop it flopping around. This looks ridiculous.

Secondly, in order to install your hard drive inside the Lenovo drive bay, you need a hard drive cover. This is the metal cover that encases the hard drives shipping in Lenovo laptops. The covers normally have rubber bumpers/rails to stop the drive moving around. You need to take the bumpers off to install your drive into the hard drive bay.

The hard drive covers looks like this:

Lenovo hard drive cover

And with a hard drive in it, the hard drive cover looks like this:

Lenovo hard drive cover encasing a hard drive.

Note the screws. The drive bay has notches which the screws snap into, holding the drive securely inside the drive bay. Possibly the screws are the only important bit here; you probably don't actually need the drive cover to install the drive into the bay, just the screws since they're what hold the drive in place inside the drive bay.

The frustrating thing is that nothing on the Lenovo web site tells you that you need a drive cover to install a drive into the drive bay. My drive bay arrived and I had to loot my old laptop's drive cover in order to install a new drive into my current laptop.

And I also couldn't find the drive covers listed on Lenovo's web site. Presumably if you buy a laptop hard drive from Lenovo they come with this cover, and presumably Lenovo use this as a way to force you to buy all your laptop hard drives directly from Lenovo.

That's the sort of behaviour I'd expect from Apple, not Lenovo.

Thankfully Ann at IT was able to figure out how to order the drive covers separately. Thanks Ann!

Overall, the product was easy to install (once I had a drive cover) and works fine (apart from the wobble) but I'm still disappointed. Next time, I'll try one of newmodeus' Lenovo drive caddies:

Update 22 March 2015: This blog post now has a Russian translation;
Пост доступен на сайте softdroid.net: Замена оптического дисковода вторым жестким диском на Lenovo.