Linux, Troubleshooting

Installing Ubuntu Linux on the MSI GT780DX

Very recently I bought the MSI GT780DX Laptop from PC Case Gear as I was very impressed by its specs. Out of the box it was a beautiful machine and came with windows pre-installed. Pretty stock standard really but I wanted to dual boot linux on it; more specifically Ubuntu Linux. For those of you who do not know what Ubuntu Linux is I suggest that you take a look because it is a complete replacement for Windows and it is completely free (and I don’t mean “free but there is…”. No. I mean free and with no catches.) Please, just click the Ubuntu Linux post above if you have not done so and have a read; at the very least you will not understand why I am doing what I am doing until you do.

For this installation I used a Live USB which contained Ubuntu 10.4 which I immediately upgraded after the install.

This post does not focus on getting a full install working. It just focuses on the extras that I had to go through in the install process to make sure that it worked correctly. So these are the issues that I came across, in order, in the install process:

  • Backup Windows Completely first. All I will say is that when you boot into windows for the first time there will be a nifty tool there to make a complete snapshot of the entire OS. Use it and move it to another drive. (I will not talk about this point further; it should just be something you do naturally anyway.)
  • If you have a DXR as opposed to a DX (like me) then, according to various forums, you need to get rid of the RAID0 setup before you can install Ubuntu.¬†(I will not talk about this point further; you will need to find this information elsewhere. It is out there. And if you bought a computer with RAID0 on it then you are supposed to know what you are doing anyway.)
  • When you put in the boot CD/USB you cannot just hit “Install” straight away; first you must blacklist the nouveau kernel module.
  • Choose an appropriate partition size for Windows; I gave Windows 400GB. (I will not talk about this further; go here to learn more about dual booting Windows and Ubuntu)
  • Whenever I have mouse issues I use the special: sudo modprobe -r psmouse && sudo modprome psmouse

Blacklisting the Nouveau Driver

NVidia’s drivers are not open source; Nouveau is an open source project that attempts to rectify that. However, their support for newer graphics cards is somewhat flaky, especially in older installation USB’s. Therefore you will need to disable the Nouveau drivers before you continue with the install. The instructions are summed up well in this quote so start the Live USB and then when you get to the “Install Options Screen” just read this:
Righty-o, confirmed here. Something’s amiss with the nouveau module. Blacklisting it will let you boot, using fallback framebuffer instead. When booting, hit TAB to edit the boot parameters. Add this to the end of the line, but before the two dashes (“–“):
nouveau.blacklist=1

Then boot. You may see the screen go messy while you write because the line gets two wide to fit, but don’t worry, all is good. You may see a message complaining that nouveau does not have an option, “blacklist” or something like that, but it does, and it does work, and I think maybe that message should’ve read, “there’s no nouveau module to do ‘blacklist’ on” as the module isn’t loaded, and that’s probably what the complaint it about. It’s also what we want to happen ūüėČ

And that is all that there is to it. Once you have blacklisted the driver you should be able to install the rest of Ubuntu with no issues. When you finally have a working install make sure that you install nvidia-current by opening a terminal and:
sudo apt-get install nvidia-current
You will need the latest drivers to get your computer to work at its maximum potential.

Mouse Problems

Sometimes the mouse on this Laptop stops working; even if you press and re-press the disable mouse button. To get it to work again just restart the mouse kernel module:
sudo modprobe -r psmouse && sudo modprobe psmouse
After that you should notice your mouse become active again.

Conclusion

Ubuntu is an awesome operating system and it is pretty easy to install on this MSI Laptop. If you have any questions on what I did to get Ubuntu to dual boot with windows then please add it to the comments.
Linux, Troubleshooting

Installing keepass2 on Ubuntu Linux 11.10 to work in Google Chrome via KeepassHTTP

Keepass2 is a Password Manager for Linux (and other operating systems) that is awesome and can be made to autofill your passwords in your browser and still keep them all safe. All this functionality at your fingertips and you only need to remember one simple (and single) password. If you really want to see the full list of features for keepass then you can take a look at their list of features.

Keep in mind that this tutorial is performed on the following version of Ubuntu:

% cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.10
DISTRIB_CODENAME=oneiric
DISTRIB_DESCRIPTION="Ubuntu 11.10"

We also are trying to install the following software:

What should installation be like?

Being an Ubuntu user you would think that you could just open up a terminal and type in something like this to install keypass2 and keepasshttp:

 sudo apt-get install keepass2
 wget https://passifox.appspot.com/KeePassHttp.plgx
 sudo mv KeePassHttp.plgx /usr/lib/keepass2

But unfortunately that does not work. The plugin even fails to load.

How to actually install it

Installing keepass2 is actually markedly more complicated then that. This is the full set of instructions that you have to perform:

 sudo apt-add-repository ppa:jtaylor/keepass
 sudo apt-get update
 sudo apt-get install keepass2 mono-complete
 git clone https://github.com/pfn/keepasshttp.git /tmp/keepasshttp
 cd /tmp/keepasshttp/KeePassHttp
 sudo cp KeePassHttp.dll Newtonsoft.Json.dll /usr/lib/keepass2

And now it works exactly like it should. The important extras required to get it to work are, in order:

  • The addition of the jtaylor/keepass Personal Package Archive (PPA).
  • The extra installation of the mono-complete package.
  • The checkout of the git repository to get the KeePassHttp.dll and Newtonsoft.Json.dll library files instead of just using the plgx package file.
We will explain the requirements of those three extra steps in the following section if you really care. But at this point in time you should have keepass2 installed.

Why it is not currently like it should be?

Lets answer each of the three extra steps in a one by one fashion.

Why did we need to install the jtaylor/keepass PPA instead of the one provided and packaged by ubuntu?

Essentially the version of keepass2 was too low to be compatible with all of the latest bug fixes in keepasshttp. As you can see Ubuntu will be getting keepass version 2.18 in Precise Pangolin but in Oneric they only have version 2.16. But if you look here the latest version of keepasshttp requires version 2.17 of keepass as a minimum. That is why we installed a newer version of keepass from a PPA. This means that when you upgrade to Pangolin you can remove this PPA from your Software Sources.

Why did we need to install the mono-complete package?

If you do not install the mono-complete package and attempt to sync Google Chrome with keepass2 through ChromeIPass and keepasshttp then the Newtonsoft.Json.dll will crash with a nasty looking stacktrace. The way to solve this is to get all of the mono libraries.

Why did we need to put the .dll files in the keepass2 directory instead of the .plgx file for keepasshttp to start working?

Because putting the plgx file in the directory did not work for me and putting the .dll files in did. And you can take a look at what this guys says here for more information.

Interesting, Troubleshooting

Fixing the PhysX “Failed To Install” Error

Did your version of PhysX fail to install or have you tried to play a game and it errors out and closes due to an error that could be related to missing PhysX libraries? Maybe Wise Installer is claiming that you are missing some files (extensions .wsi / .msi)? Then you have come to the right place and I am going to give you some instructions that should hopefully solve your problem.

The Problem

Recently I had a moment of Nostalgia and bought Overlord II from the Steam store but to my dismay, upon startup it encountered an error and aborted the program. This was the error message that I encountered:

Microsoft Virtual C++ Runtime Library

Assertion failed!!

Program: C:Overlord IIOverlord2.exe
File: ..FxSDKSrcFxName.cpp
Line: 461

Expression FxFalse != removeResult

For information on how your programa can cause an assertion
failure, see the Visual C++ documentation on asserts

(Press Retry do debug the application – JIT must be enabled)

I had no idea what could be causing that problem so I looked it up online and discovered people that said it was due to a PhysX installation error; in the end it turns out that was the case but it took some clever steps to make sure that I properly fixed the problem. Here is the quick guide to solving the problem in a few steps as possible.

The Solution

This problem is usually caused by PhysX trying to get rid of the last installation before it upgrades and failing to do so because it was only a partial install. So to fix that first we have to reinstall/fix the version that was supposed to install properly and then move on to installing the version that you want to install. As one of the viewers of this page put it:

It’s a one step backwards, two steps forwards kinda situation.

Without any further explanation lets just jump straight into the steps:

Important: These steps apply to Windows 7 though they may work in Windows Vista.

Step 1: Discover what version of PhysX installed to your machine or what version your machine thinks it has installed.

To do this press the start button and type in “Programs and Features” and run it:

Open "Programs and Features"

Then once that is open wait for the list of installed items to populate (it may take some time or be instant depending on your computer) and then scroll down to “Nvidia PhysX”. The version number that is supposed to be installed will be present on the far right (click on the image to enlarge it):

Using Programs and Features to find the PhysX Version number.

So as you can see my currently installed version number is “9.11.1107” but yours will be different and that is the one you want because it will be important in the next section.

Step 2: Download the version of PhysX that should have installed correctly but did not.

Important: If you want an easy way to do this just use this simple little form I wrote: http://jsfiddle.net/robertmassaioli/k4y56/7/embedded/result/

This paragraph until Step 3 is now old and is only useful if the link breaks and you need to generate the url yourself. The correct way of doing this is to go to:

http://www.nvidia.com/object/physx-<version_number>-driver.html

Where you are supposed to replace <version_number> with the correct version that you discovered in the step above and then navigate to that url in your browser.

Note: If you did not manage to find the correct download (you get ‘File Not Found’ errors) then please google “physx <version_number>” to find the correct installer / executable for you to run in the next step.

Step 3: Fix the initial install of the program.

Run the program that you downloaded and you should get a screen that asks you to Modify, Repair or Remove the program. You want to select ‘Modify’ and click ‘Next’. If you do not get the screen shown below then you have downloaded the incorrect installer in step 2:

Once you have done that just keep selecting the next option and it should clean up your entire install and run successfully. If it does not then yet another problem has occurred and this guide may not be able to help you further. You may have some luck with an alternative solution that David Orders has suggested in the comments section.

Step 4: Install the latest version of PhysX

Now that you have fixed the installation of PhysX you are free to download and install the latest version of PhysX onto your machine. Go here to do so: http://www.nvidia.com/object/physx_system_software.html

Conclusion

That is all that there is to it. You should now have PhysX working correctly on your machine and be playing games and anything that you want in no time. If you continue to have problems then mention them in the comments to help other people that are trying to solve the same problem. I hope this helps.