Skip to main content

Loblaws Click & Click - My First Experience (Review)

The last few weeks as I have been leaving my local Loblaws I have seen ads all over talking about Click & Collect.  I don't know what this is, but in my usual apathetic fashion I ignore it and move on with my life. The last time I went grocery shopping I see a video while I'm waiting in line - my interest is piqued. "Can it really be that easy?" I ask myself with a moderate amount of glee.  I love these sorts of "innovations" - shopping online is great - it's easy, comfortable, gives me time to think, and, best of all, I don't have to deal with random people (no offense random people, I'm sure you're very nice!). The website is set up a bit like Netflix with horizontal scrolling food options.  Each "aisle" has its own page with categories within the aisle shown.  Only a subset of each category is shown and you can delve deeper to see all the possibilities.  You can also search for specific items instead of clicking th

External Monitor for Lenovo W530 Running Linux Mint 17

Update: As of January 4, 2015 this no longer works for me.  I updated and something broke.  Getting the error "[36741.873484] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) NVIDIA(GPU-0): EVO Push buffer channel allocation failed".  Hopefully this is still helpful to some out there however.

Well, I have some exciting news - after 2 years of messing around with trying to get my Optimus enabled videocard to work with an external monitor in Linux, I have finally found the right combination of blog posts to make it work.

My setup:

  • Lenovo W530
  • NVIDIA Quadro K1000M videocard
  • Linux Mint 17 (which is based on Ubuntu 14.04 I believe)

Credit:

  • scyth and his or her blog post on from December 19, 2013
  • Lucas and his blog post from May 23, 2014
  • the commentors of the aforementioned blogs for changes and scripts

Preliminaries:

So, as scyth mentions one of the ways that you can get an external monitor setup to work with an Optimus card is to go into your bios and just disable Optimus, turn the setting to "Discrete".  In our case, we'd like to be able to have increased battery life when not plugged in, so first we are going to:
  • enable the Optimus technology and
  • enable Optimus OS Detection
in the Display section of bios.

NVIDIA drivers:

Next, we install the latest NVIDIA drivers (I installed 340, I believe 346 is available as of Dec 2, 2014):

 sudo add-apt-repository ppa:xorg-edgers/ppa   
 sudo apt-get update   
 sudo apt-get install nvidia-340  

Install bumblebee:

 sudo add-apt-repository ppa:bumblebee/stable  
 sudo apt-get install bumblebee bumblebee-nvidia bbswitch-dkms  

Scyth recommends a reboot - probably a good idea!

Configure bumblebee:

Set the following parameters in your /etc/bumblebee/bumblebee.conf

 KeepUnusedXServer=true  
 Driver=nvidia  
 KernelDriver=nvidia-331  
 PMMethod=none (find this one in two locations in the file)  

Then edit /etc/bumblebee/xorg.conf.nvidia to look like:

 Section "ServerLayout"  
   Identifier  "Layout0"  
 EndSection  
 Section "Device"  
   Identifier  "DiscreteNvidia"  
   Driver    "nvidia"  
   VendorName  "NVIDIA Corporation"  
   BusID     "PCI:01:00:0"  
   Option    "ProbeAllGpus" "false"  
   Option    "NoLogo" "true"  
 EndSection  

 Up until now I have been copying step for step from scyth's post.  In this next part we will be compiling a tool called intel-virtual-output which seems to be the reason this wonderful external monitor business is possible!

Install Tools:

First we will ensure we have the right tools:

 sudo apt-get install xorg-dev git autoconf automake libtool xutils-dev  

You likely will not need git, however I included it because that's what I did when I did my own setup.

Intel Driver Update:

Second - you will need to update your xf86-video-intel driver (2.99).  Ubuntu 13.10 is supposed to come with this, however I ended up updating xserver-xorg-video-intel through the package manager (Menu -> Package Manager -> Quick Filter search for the above, double click, "apply").  I did this because I could not get the intel-virtual-output tool to compile and thought this might be the reason - likely not necessary, but didn't hurt either for me.

Next in this step I followed Lucas' directions and downloaded the source from https://01.org/linuxgraphics/downloads, choosing the latest "xf86-video-intel" - 2.99.911 for me.  Then configured and compiled the source.

 tar -xvf xf86-video-intel-2.99.911.tar.gz  
 cd xf86-video-intel-2.99.911/  
 ./configure  
 make  
 sudo make install  

Ensure that the intel-virtual-output command is available in bash (using tab-complete to check).  If not, you will need to copy this file (located in "tools" of the current directory) to /usr/bin.

Install Primus:

The last thing that I needed to do was install primus - I was getting an error (something about "no bridge"?) when I tried to start the external monitor without primus.

 sudo apt-get install primus  

Go Time!

Finally - plug in a monitor and fire up that discrete videocard!

 sudo modprobe bbswitch  
 sudo tee /proc/acpi/bbswitch <<<ON # will need after turning off the first time  
 optirun true  
 intel-virtual-output  
 mate-display-properties  

The mate-display-properties was to turn on the external monitor and position it correctly.  You may not need the second line if this is the first time connecting an external monitor since last reboot.

Save Power When Mobile:

Lastly, when disconnecting the external monitor we will want to turn the card off for power savings:

 PID=$(ps ax | grep Xorg | grep :8 | grep -v grep | awk '{print $1}')  
 if [ ! -z $PID ]; then  
     sudo kill -15 $PID  
 fi  
 sudo rmmod nvidia  
 sudo tee /proc/acpi/bbswitch <<<OFF  
 mate-display-properties  

The credit for the top 4 lines goes to Krzysztof Suszyski and his github gist: https://gist.github.com/cardil/10533170.

You can substitute the first line for a ps ax | grep Xorg followed by a sudo kill -15 <process id found> and ignore the if-statement.  These are in script form that I use now however.  The mate-display-properties here was so that we could turn off the external monitor - my install seemed to think that there was still another screen there even after everyone was "turned off".  This might be an indication that something didn't turn off correctly I suppose, but I haven't checked the battery life yet.

That *should* be it.  If something went wrong, cross-reference with scyth and Lucas' blogs.

Comments

Post a Comment

Popular posts from this blog

Loblaws Click & Click - My First Experience (Review)

The last few weeks as I have been leaving my local Loblaws I have seen ads all over talking about Click & Collect.  I don't know what this is, but in my usual apathetic fashion I ignore it and move on with my life. The last time I went grocery shopping I see a video while I'm waiting in line - my interest is piqued. "Can it really be that easy?" I ask myself with a moderate amount of glee.  I love these sorts of "innovations" - shopping online is great - it's easy, comfortable, gives me time to think, and, best of all, I don't have to deal with random people (no offense random people, I'm sure you're very nice!). The website is set up a bit like Netflix with horizontal scrolling food options.  Each "aisle" has its own page with categories within the aisle shown.  Only a subset of each category is shown and you can delve deeper to see all the possibilities.  You can also search for specific items instead of clicking th

Abortion In the US and Canada

I saw a post about abortion recently, specifically relating to Planned Parenthood, and I decided to do some digging. Basic Info: The basic stats in the United States are staggering: 50% of pregnancies are unplanned [ 1 ] 40% of unplanned pregnancies result in abortion [ 1 ] which means: 20% of all pregnancies result in abortion  [ 1 ] In terms of absolute values - ~730,000 [ 2 ] or ~1 million [ 1 ]  abortions were performed in 2011 depending on the reporting source Nearly 30% of women in the US will have had an abortion by the time they are 45 [ 1 ] Tying in with Planned Parenthood for a moment - they provided around 330,000 abortion procedures in 2012 [ 3 ] and the 2011 figures I saw were similar. Looking at the numbers in Canada (where I live) it turns out that they are very similar to the United States; in 2011 there were 92,524 abortions performed [ 4 ] and around 380,000 births [ 5 ], so ~20% of pregnancies in Canada result in abortion I stopped digging for C

Baking with David (Bread!)

This last weekend I decided that I should do some baking and expand my kitchen horizons.  I thought a great idea would be to bake some banana bread, however due to an unexpected freezer issue, the bananas that had been patiently waiting for someone's tender loving touch thawed and turned into a giant mess. So, I decided that maybe I should start my baking career with something a little easier - non-banana bread! (although I have since been told that banana bread is probably easier to make). I used  this bread recipe  because it looked the most simple and some of the other ones I was looking at required a mixer, which I don't have at this point. Gather up all the ingredients (I am missing the salt in this picture): Put all the dry stuff in a bowl. Warm up the butter (margarine), water, and milk. Mix it all together (vigorously if you're like me and don't have a mixer :( ).  Then you let it rise! (the balsamic vinegar was sadly my rolling pin... )