ThinkPad T520/W520, NVIDIA, Wide Gamuts, and You!

Update: Linking to a better color profile below.

Update 2: I narrowed down the ACPI issues, and have a better solution.

I recently purchased a brand new, maxed out ThinkPad T520. My old laptop was 4 years old, and while I absolutely loved it (and still do!), an opportunity came up to get a T520 with a nice discount. So I took advantage of that. I like large screen resolutions, as I tend to have a few thousand windows on screen at any given point in time, so I went with the 1920×1080 option, and put Ubuntu Linux on it.

And let me tell you, for an Ubuntu-certified laptop, it sure didn’t work out of the box.


It took a lot of effort to get Ubuntu working, due to some hardware problems. The biggest issue was the display adapter. The T520/W520 (and I believe the T420, etc.) come with two graphics chipsets: An Intel something-or-other, and an NVidia 4200M. By default, this is in “Optimus” mode, meaning that the OS can essentially switch between the cards for performance/power savings reasons, depending on use.

Not surprisingly, this does not work on Linux.

Your system will try to use the Intel card. You won’t have any 3D, and try as you might, that NVIDIA card just will not work. It’s maddening, but there’s a solution. One with its own set of problems, but at least it gets you there..

The trick, it turns out, is to go into the BIOS, go into the video settings, and switch to “Discrete Graphics” and disable auto-detection of Optimus. Once you do this, your NVIDIA card will work! You’ll get 3D, and it’ll be fast and smooth and so wonderful.

If you can boot, that is.

Once I switched over, I found I could no longer boot. Now this was 4:30 in the morning and my brain stopped functioning, so I wasn’t making all the connections. All I know is that booting locked up, and when I went into recovery mode, I started seeing I/O errors on my brand new 160GB SSD. Figuring it was just my luck, I decided I’d call Lenovo in the morning and get a new one. If this sounds at all familiar, stay calm! It’s not your SSD, and your system is not hosed. It’s ACPI.

(Of course it’s ACPI… Nobody ever said it was the Year of the Linux Laptop.*)

Update: I previously said that passing acpi=off in grub would fix things. That disabled battery and other stuff, though. The new solution below is far better. Suspend/resume and brightness work!

So, to fix that, go back to Intel graphics, edit your /etc/default/grub file, and set GRUB_CMDLINE_LINUX_DEFAULT to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=noirq"

Unfortunately, you won’t get Suspend/Resume, and I think the battery monitor is busted, but you’ll get Hibernate. It’ll mostly work. Sometimes. It’s Linux, afterall.

I’m not sure if this is needed anymore, but you may also need to add this to the “Device” section in your xorg.conf:

Option "RegistryDwords" "EnableBrightnessControl=1"

Once you have a working X/Unity/Compiz/3D/Minecraft setup working, you may notice some problems with colors….

Wide Gamut

The T520/W520/T420/etc. line of ThinkPads have a new 95% Wide Gamut LED display. It makes everything all bright and nice. And it butchers your colors.

Applications that support color management should in theory compensate for this. Not all apps do, though. What bothered me was my web browsing experience. Every color was broken, and as someone who writes webapps, I needed accurate colors. I was about to throw out this laptop before I managed to figure out a solution.

Modern Ubuntus should come with a Color Profiles control panel under System -> Preferences. From here, you can load ICM profiles and get things working. That will solve some of your issues, so let’s start there. Note that this is in Ubuntu 11.04 (I think), but I’m running 10.10 (I thought originally 11.04 was the source of my problems), so for me I had to:

apt-get install gnome-color-manager

And here, I the Color Profiles applet was causing problems, and I couldn’t directly use it, so I installed dispcalGUI, which allowed me to load in a profile and install it into Color Profiles, and activate it.

On some site, I found a working color profile (ICM file). I don’t know where I originally found it, but you can download it here. Note that this is only tested on my 1920×1080 display, so YMMV.

I’m not confident that this profile is 100% correct, but it’s close. At least as far as I can tell.

You’re free to try that profile, but I found a better one which preserves the crispness of the display with the actual accuracy you’d want on the web. WordPress is even looking correct now.

NotebookCheck’s review of the ThinkPad W520 links to a color profile that works much better.

Firefox Color Profiles

Now, you’ll still notice problems with Firefox and Google Chrome. Chrome doesn’t seem to understand color profiles, but Firefox does. You just have to tweak it.

In Firefox, go to about:config. In there, search for gfx.color_management. Set gfx.color_management.mode to 1, and then set gfx.color_management.display_profile to the path of that ThinkPad ICM file I linked to earlier.

Restart Firefox. You should now see more or less correct colors!

Now it’s not perfect. The ThinkPad screen is very bright, and some things can get a bit washed out and perhaps slightly tinted. As I type this, I’m noticing that the WordPress UI is a bit off, and things blend together more than they should (lots of light grays on a bright screen). But it should be much better than it was!

If you use a T520/W520/T420/etc. and have other solutions or tips for color management on Linux, I’d love to hear about them! And hopefully this saved someone else hours or days of rage.

* Thanks to James Farwell for the “Year of the Linux Laptop” snark.

17 thoughts on “ThinkPad T520/W520, NVIDIA, Wide Gamuts, and You!”

  1. it should be noted that the the T520 is certified for “pre-install only”. This certification means that Canonical has worked with Lenovo to provide a custom pre-install image of Ubuntu for use in pre-installed sales of the laptop. The certification is not for stock Ubuntu that you can install yourself from public Ubuntu releases. Lenovo has chosen not to make that pre-install image available globally. When using Canonical certified hardware database you have to make sure you read the caveats. Not all of the “Ubuntu certified” hardware is expected to work with the public Ubuntu releases.


  2. Thanks Jef. That’s an important distinction, and one I overlooked. I wasn’t going by just that when I picked out this laptop. The overall compatibility looked decent. I was just a bit surprised by how much work was needed before it became usable 🙂

  3. not sure why you’d have no 3D with the intel graphics, the 3d driver should work fine.

    really optimus laptops are avoid at all costs for Linux, the manufacturers don’t care, and I haven’t seen Canonical throw development resources at fixing it.

    You’ll notice if running the intel you can’t access the digital outputs, at least with the Lenovo laptops you can still access the panel from the nvidia, one other optimus systems you can’t even do that.

    btw turning off acpi is probably going to make your laptop die on its as overheating.

  4. I’m sure if I poked at it enough, I’d get 3D working. Out of the box, it didn’t work. I was more focused on getting the nvidia drivers working.

    I’ve been paying close attention to the temperature sensors since setting this up. Seems safe so far, and the heat output has been minimal. Of course I’d ideally re-enable acpi, but that’s not an option as of right now.

  5. You may want to join the Linux Thinkpad mailing list to learn from the experience and expertise of others, including folks who write the code that allows Thinkpads to work on Linux.

  6. Hey, I’ve been thinking of upgrading my 5yo Toshiba laptop to a T520. So now I’m all ears for posts like this one. Especially since anything over the lowest resolution seems to come with that optimus thing. Thanks for sharing your experience.

    As for the Optimus technology – my personal impression of it is that it’s a pain in the neck. Last statement from Nvidia I found was that they have pledged themselves to not provide linux support for this thingie. Some community effort can be found here and there, but thanks to limitations in no chance for seamless switching between the two cards.

    A couple of relevant hybrid graphics links (in case you haven’t found them yet): (well it’s arch, but it’s still a nice wiki to take a look at)

  7. How would you suggest finding color profiles for laptops, for people who don’t have color-calibration equipment themselves? Search seems remarkably unhelpful, and gnome-color-manager doesn’t seem to include any built-in color profiles. Does a database exist somewhere? Could gnome-color-manager ship with one?

  8. I haven’t played with that screen neither with NVidia Optimus, but there are simple finetuning tips you can try with NVidia Settings: drop gamma to 0.9 or 0.8, tune “Digital Vibrance” to your liking.. for my NVidia Quadro NVS 140 there is also an option to choose a Color Space and Color Range, it’s useless for me but my card is old, you might have more choices.. Have fun with it! 😉

  9. @Anonymous: If I knew, it would have saved me a lot of trouble. I got lucky with some google searches, but I spent a LONG time looking. There really should be some online database…

  10. @Kamil: That’s what I was doing previously, but the colors were still so wrong that I was ready to send this back. I do graphics/web work as part of the projects I run, and needed more accurate colors than I could hope to get with gamma or digital vibrance correction. The color profile was the only solution that would work. Makes a world of difference! I don’t even need to touch the gamma now.

  11. Wide gamut monitors bend the colour primaries in a strong way to cover a larger colour space. Thus uncorrected colours look most often very strange. For instance red turns purple. The old style per channel gamma table calibration through VCGT is not sufficient as it can not compensate for the effect of changed primaries or saturation. The only solution for the Linux desktop is currently the CompICC Compiz-0.8.x plugin. It uses Oyranos and lcms for doing proper colour correction on the GPU.

  12. Thanks man, I am really struggling with this laptop and linux, ordering the FHD display was an error, the text is too small for my eyes, this tip has helped greatly!

  13. I also have a new T520 with 64-bit Ubuntu 11.10 on it and the 1600×900 display. Most works fine – I currently run nvidia discrete graphics, have compiz 3d effects and colors look good.

    But whether using the VGA or the Display Port, I can’t get the second monitor to appear. I’d gladly give up 3d if that’s what’s needed, as I use this machine primarily for work. (It would be sad to lose Rotate Cube, but so it goes.) Using the nvidia-settings app, I’ve tried running as separate X-windows with xinerama and with Twinview. I actually got Twinview to work once, but have not been able to recreate that experience. (If I ever get it working again, I’ll certainly save the xorg.conf!) Any ideas or pointers gratefully accepted!

  14. In the mean time Bumblebee 3.0 works and you can boot up on Intel while still being able to run specific applications like Google Earth via the nVidia driver.
    I’m using it in the beta-1 of Kubuntu 12.04 and it required only one tweak, I had to set AutoAddDevices to true in /etc/bumblebee/xorg.conf.nvidia.

    When on mains supply it is easy enough to change the BIOS setting to discrete and then you have all the goodness of nVidia including the option for an external screen.

    The Intel option is for one reason only and that’s to save battery life, typically a time you don’t use an external monitor.

  15. Color management is now also possible using the compiz-cms plugin. It will use the profile selected in gnome color manager as target and sRGB as source.
    By default Firefox windows are excluded though, but since the default behavior of FF is to map images with ICC to sRGB, and only those, i guess it should be ok to let compiz-cms map from there to the monitor profile.

    Regarding optimus it should be ok to use the intel chip for most desktop needs. The intel driver has gone through several major rewrites to increase performance the last couple of years. The latest iteration of this work, which includes an optional sna-mode that shows some promising results, was just released as version 2.20.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top