Configuring External Monitors on Oracle Linux UEK4 Kernel on Lenovo P70 ThinkPad





Summary

I will be speaking on Oracle in LXC containers at RMOUG Training Days 2017 this year.  I built a demo Oracle 12c 4-node ASM GNS RAC Flex Cluster on my Lenovo P70 running Oracle Linux 7 UEK4 kernel.  After all this was done I realized external monitor support was not configured for Oracle LInux 7 UEK4 kernel on my Lenovo P70.  This blog post is a brief guide to configure external VGA monitor support for Oracle Linux 7 UEK4 desktop on Lenovo P70 mobile workstation.

Background and Thoughts, Ramblings and So On

I really became despondent about this problem for days and even a couple of weeks.  I'm an Oracle DBA by profession and my auxiliary skills which have grown quite considerable unfortunately include very little work on configuring external monitors. I've done a ton of work learning about software defined networks, DNS, DHCP, LXC, storage, iscsi - they typical skillsets one develops if one is going to build Oracle from the ground up including all the networking and storage considerations.  But external monitors aren't usually required to implement a production system and so these skilsets around "nouveau" and "nvidia" and "xorg" tend to feel like one is trying to speak Klingon when one is not a Klingon and only become relevant when one has to give a presentation and one is running Oracle Linux 7 UEK4 as a desktop OS - not the most common setup I think most learned colleagues would agree. 

So I searched and searched for clues and found absolutely nothing on this.  For at least a couple of weeks.  I thought about doing a two-laptop solution such as running my Oracle in LXC setup on the Oracle Linux 7 laptop and then logging into it from an Ubuntu laptop (which has external monitor support out-of-the-box) but as I like to call myself a "problem-solver" (probably my only claim to fame) I really chafed at this clunky clugy inelegant solution.  So I kept searching and hoping I might stumble on a solution out there in cyberspace somewhere.

Finally, I did find a post that looked highly-relevant and more importantly looked detailed with steps.  Because I had already done alot of configuration on my demo setup for RMOUG TD17 including SLOB configuration, I was very skittish about trying to implement the solution on the as-built setup because as many of us who have mucked with Xorg and Graphics Level 5 settings have unfortunately discovered at the worst possible times, mistakes can make your desktop unloadable, and misconfigurations can be devilish hard to track down and correct, especially in this case when the guide in the first place seemed to be a "one-of-a-kind" "hail-mary-pass" step to begin with. 

Therefore, I built an entirely NEW Oracle Linux 7 environment (sans Oracle DB though) on another NVMe M.2 SSD and tried out the external monitor solution on that first to at least try to test out the whole procedure first and validate it before recklessly wrecking days of work on the actual system.  As many of us know from experience, even tests on similar or even "identical" pilot systems do not always preclude a failure or mishap when the actual system is mucked with, but such pilot system tests at least help to eliminate maybe 95% of the possible glitches, errors and reasons-for-seriously-considering-committing-suicide that such mucking can cause.

So I did the test and it was successful!  Voila!  Multiple monitor support for Oracle Linux 7 UEK4 running on Lenovo P70 mobile workstation hardware. One note is that so far, it only works for the VGA-connector type output.  I tried the HDMI and it did not work.  I will also shortly be testing to see if more than one external monitor can be supported.  At this point however, what has been achieved is a single external monitor connected over VGA in a configuration that allows mirrored or extended configuration of monitors.  It works very reliably with no flickering or issues etc.

Solution

The post that made this all possible is here at YoLinux. The steps were pretty straightforward on the pilot test. 

First though you have to download the correct code from Nvidia website here.  For the Oracle Linux 7 UEK4 64-bit system running on the Lenovo P70 that link is the download for the file that was successfully used.  They have other downloads for 32-bit systems etc and you can drill down to the download needed for your system from this link here.

The system is put in runlevel 3 and then the appropriate downloaded driver from NVIDIA is installed via a single command and the CLI which launches a terminal GUI that builds the required NVIDIA kernel modules and installs them.  Once that is done, be sure to go into BIOS and set "Display" option to "Discrete Graphics".  And that's it.  It is pretty easy to do and works very well.  Once this has been done, click on the "Settings" GUI on the Oracle Linux 7 desktop and open the "Displays" GUI and now instead of "Uknown Display" you will see your laptop display (on Lenovo P70 called "AU Optronics 17") and then whatever you have attached to the P70 externally. 

Once I was in runlevel 3 logged in as root I ran the following command (the kernel-source-path should match your running kernel) as shown below.

$ sh NVIDIA-Linux-x86_64-375.26.run -q --kernel-source-path /usr/src/kernels/4.1.12-61.1.25.el7uek.x86_64

Then just follow the simple prompts.  There are only a couple of them.  First one is to accept license terms from Nvidia and then there are one or two more "ok"  or "continue" type prompts. 

One other thing to be aware of is that I am currently using the following settings on my grub kernel line:  "rdblacklist=nouveau nouveau.modeset=0" which is discussed in more detail on my blog here.  I need to test if those settings are still necessary (I think that they are).  For now, everything works and I'm not mucking with it in any significant way until after RMOUG TD17. 

And That's it the steps are straightforward and they work.

Dock for P70

The Lenovo P70 mobile workstation does not come with a VGA port anymore.  To get an old-school VGA port you need the P70 dock (or it is also possible that a USB-to-VGA adapter on the P70 might work).  I will test an adapter and update this post.  If that works, it would mean that instead of buying a $200 P70 dock on Amazon you could instead buy a $30 USB to VGA adapter.  However, the P70 dock is a very nice item and that is an opinion from someone (me) who generally doesn't like docks much.  So I think it's worth it. 

Another point is that I have not tried Display Port yet which I will do and update this post.  Display Port is included with the basic laptop so that would be a built-in "free" no additional purchase required option.  And of course there are other combos which can be tested such as Thunderbolt3 with the laptop also has on board.  So there is quite a bit of additional testing to do to see how many additional displays can be hooked up and how which I will do my best to report back on and update here soon.


Comments