Flashing Screen & Hyper-V in Windows 10


Alienware 17 R3

Flashing Screen & Windows 10

As of the time of writing this article, I have just received my new laptop. This system is to replace my primary HP laptop that died a few months ago after being in faithful service for over 10 years. Here’s what I got.

 

System Specifications

  • Alienware 17 R3
  • Microsoft Windows 10 Professional
  • Intel Core i7-6820HK (Quad-Core, 8MB Cache, Dynamically Overclocked up to 4.1GHz)
  • 32GB Dual Channel DDR4 2133Mhz (16GBx2)
  • 256GB PCIe SSD (Boot) + 1TB 7200RPM SATA 6Gb/s (Storage)
  • NVIDIA(R) GeForce(R) GTX 980M with 8GB GDDR5
  • 17.3 inch UHD (3840 x 2160) IGZO IPS Anti-Glare 400-nits Display (4K)
  • Intel 8260 2×2 802.11ac 2.4/5GHz + Bluetooth4.1
  • 8 Cell 92Wh Battery
  • Customizable RGB Keyboard
  • Xbox 360 Controller (Black)

Needless to say, I love it! I’ve been playing Fallout 4 on it with graphics set to Ultra and it doesn’t even break a sweat. The fan is barely audible during normal operation. It really kicks up when working hard, but that’s necessary to keep things cool and prolong component life. I loaded some software that I commonly use and everything was going well. That’s when it happened.

Screen Flickering

I was going to install a Linux VM and was deciding between the trusty old VMWare and Microsoft’s Hyper-V. I did some reading and saw that Hyper-V supports Ubuntu and has native CPU support, so I figured I’d give it a try. I added the Hyper-V components in Windows Features, as well as some other items I’d need for development work (IIS, ASP.NET support, etc.) and then restarted my system.

Upon coming up to the login, the screen started flashing / flickering. I thought it was strange, but maybe some things are still kicking off from the reconfiguration. Once I logged in though things got worse. There was a messed up bar flashing down the left side of the screen and the entire screen kept jumping and flickering. It looked for all the world like a hardware issue (cables loose, bad video card, bad screen, etc.).

At this point I was NOT happy! I thought, here I have a brand new $3,100 laptop (before discounts) that has failed on its 2nd day of use! However, I figured that it was far too coincidental that this happened immediately after I’d just made a software change, so I started uninstalling the components I’d just enabled. I removed them one at a time, rebooting after each uninstall. Of course I left Hyper-V until last since I figured it was the most likely software culprit. Nothing worked until I uninstalled Hyper-V. After that everything went back to normal and I haven’t had a problem since.

The Problem

Now keep in mind that I have a couple of decades of experience (just helping illustrate the following point) and to me this problem was IDENTICAL to a loose video component or cabling. It was so similar that had it occurred at any other time I would have sworn it was a hardware issue and would be pursuing a replacement right now. When I started researching this issue I found that this is in fact what others have done. I’m writing this article to hopefully clarify the source of the problem.

There are several resources online discussing various ways to troubleshoot this. However, what they all have in common is isolating software components to determine which is causing the problem. What this all really boils down to is software compatibility with Windows 10. Each of these resources takes a different approach to determining which piece of software or driver is not playing nice with Windows 10.

Apparently Microsoft knows about the problem and offers the following article to troubleshoot flickering in Windows 10.

Microsoft: Troubleshoot Windows 10 Screen Flickering

They suggest that either one of three software components and/or video drivers are typically to blame. The software packages that they specify can cause problems are Norton AntiVirus, iCloud and IDT Audio. If you have one of these Microsoft recommends removing them to see if that resolves the issue. The process for video card issues is a bit more involved but generally involves updating drivers and if you have multiple display adapters, isolating which is causing the problem by disabling them one at a time.

Other 3rd party articles provide different ways to achieve a similar main purpose… isolate the software component and disable or remove it.

Techdows – Turn off Windows problem and error reporting services

Windows Report – Isolate boot software components to determine which is causing the problem

Make Use Of – Basically a reiteration of Microsoft’s steps

In Summary

Long story short, it’s a simple software incompatibility. You just need to get to the bottom of which piece of software is causing it and remove or update it. For me it was Hyper-V, but for you it could be something else. Now keep in mind that this is not a means to fix actually broken or defective hardware. Using some common sense though you could probably determine the difference. If you just upgraded to Windows 10 or installed some software when the issue started then it’s probably a software issue. However, if your system has been running flawlessly for quite some time with no changes being made and then it starts, then chances are it’s hardware.

I hope this article helps you get to the bottom of whatever the cause might be!

[Update]

It turns out that this problem was due to an older BIOS version. After applying the latest update Hyper-V is working perfectly.

Guide to Building a Hackintosh


I came across this article on building a “Hackintosh”. According to the article “A hackintosh is simply any non-Apple hardware that has been made—or “hacked”—to run Mac OS X.”

Now I’m not a big Apple fan. I run mostly Microsoft technologies (yes, I’m a bit of a fan boy) and some Linux systems as well. However, as a technology person my goal is to learn as much as I can about everything I can. For that reason I’ve always wanted a Mac in my arsenal of systems.

Apple products are typically pretty expensive, especially for something I don’t use regularly. However, I’ve got plenty of PC clones laying around not doing much. This should allow me to use one of them.

Article on LifeHacker

http://lifehacker.com/the-always-up-to-date-guide-to-building-a-hackintosh-o-5841604

image

GPS Tracking is a Search!


 

GPS TrackerThe U.S. Supreme Court ruled today (March 30, 2015) that if the government puts a GPS tracker in any of your personal effects, it constitutes a search and is governed by the 4th amendment. This is a huge win for privacy, over-invasive government and personal freedom.

You can read more about the ruling in this ruling for Torrey Dale Grady vs. North Carolina.

http://www.supremecourt.gov/opinions/14pdf/14-593_o7jq.pdf

You can also read this article on the subject by The Atlantic.

http://www.theatlantic.com/technology/archive/2015/03/supreme-court-if-youre-being-gps-tracked-youre-being-searched/389114/

Remove Unwanted SameTime Statuses


The IBM® SameTime Connect client allows you to customize the messages that show when you’re in different statuses (e.g. available, away, in a meeting, etc.). However, the interface provides no way to remove any customized messages you’ve created unless you want to “Restore Defaults” and remove all of them.

These messages are stored in a simple XML format so they are easy to edit. When you want to remove a status follow this process.

  1. Open Command Prompt.
  2. Type echo %appdata% and press Enter.
  3. Note this location and use it in place of {ApplicationData} in the path below.
  4. Open Windows Explorer.
  5. Navigate to {ApplicationData}\Lotus\Sametime\.metadata\.plugins\com.ibm.collaboration.realtime.community.sametime
  6. Edit the community-config.xml file in a text-only editor such as Notepad.
    1. As always, if the file is important create a backup first.
  7. Delete the entire line corresponding to the message you wish to delete.
  8. Save the file.
  9. Exit and Restart SameTime.

Note: You should only use a text-only editor like Notepad. Editors like Microsoft Word add formatting and control information to the file. This could inadvertently cause the application to consider it corrupted.

NSA “Equation group” Puts Spyware in Hard Drive Firmware


NSA HQHere we go again! My previous article “10 Ways the NSA Spies on You” showed how the NSA has been listening and recording through your mobile phone for years (“Clapper Program”) whether it’s on or off. Of course U.S. District Judge William Pauley said in a 53 page ruling that it was legal as long as they do it to everyone.

Well the NSA never ceases to amaze me. Now Moscow-based security software maker Kaspersky Labs has found spyware hidden inside the firmware of hard drives made by most major manufacturers. Those found to contain the spyware include Western Digital, Seagate, Toshiba, IBM, Micron Technology and Samsung. Experts agree that the NSA would have required the source code for the hard drive’s firmware in order to embed the malicious program in it. That’s easy though. They say the Pentagon wants a bunch of hard drives, but the NSA has to review the source code for security purposes and bingo they have the source code.

Over 30 countries have been found to be infected with the spyware including Iran, followed by Russia, Pakistan, Afghanistan, China, Mali, Syria, Yemen and Algeria. The targets included government and military institutions, telecommunication companies, banks, energy companies, nuclear researchers, media, and Islamic activists.

This is now costing the US because foreign governments don’t want to purchase our hardware for fear it’s been corrupted with NSA spying technology. Peter Swire, one of five members of U.S. President Barack Obama’s Review Group on Intelligence and Communications Technology, said the Kaspersky report showed that it is essential for the country to consider the possible impact on trade and diplomatic relations before deciding to use its knowledge of software flaws for intelligence gathering. “There can be serious negative effects on other U.S. interests,” Swire said.

Russian researchers expose breakthrough U.S. spying program

C# WMI Tutorial


Overview

I recently had a project where I was writing an agent that would collect data from various servers on the network. I needed information like the server name, IP address, OS drive, free and total space on the OS drive, Windows folder and so on. In addition to this I also needed to be able to collect information on specific files on each server as well as registry information from particular registry keys on each server. This would all be consolidated into a database and referred to at a future date.

In order to gather this information I turned to using WMI (See Background & Terminology below) within a C# application. The problem is that none of the research I performed turned up very good information on how to use WMI within C# and what was available to gather from within WMI.

This tutorial will provide a step-by-step process to follow in order to use WMI. It will provide information about the tools you need, how to use them and finally how to code to get information from WMI.

Background & Terminology

This article deals with coding for and consuming WMI (Windows Management Instrumentation). WMI is a set of extensions Microsoft created to provide instrumentation (measurement) information from within Windows. However, WMI is a Microsoft-specific set of extensions that are actually built upon the WBEM (Web-Based Enterprise Management) and CIM (Common Information Model) standards developed by the DMTF (Distributed Management Task Force).

The WMI set of instrumentation comes pre-installed in all Windows 2000 or newer operating systems from Microsoft and can be downloaded for older OS’s like Windows NT, 95 and 98. It’s powerful because it can be utilized by languages like VBScript, PowerShell and .NET to manage the operating system and gather a wide variety of information on it.

WBEM Test Tool

You’re going to need to become familiar with a tool called WBEMTest. This tool is pre-installed, along with WMI, on Windows 2000 and newer operating systems from Microsoft. To run it do the following.

  1. Open Run dialog (Win+R, Start->Run, etc.).
  2. Type ‘wbemtest’ and click OK.

The following dialog will appear.

WBEMTest

There are three things we need to know before using this tool. First you must connect to a WMI repository in order to pull anything from WMI. The default namespace you’ll be using is generally “root\cimv2”. Also, similar to .NET there are classes and instances of those classes. The class itself only defines what type of information might be provided in any particular instance of that class. The instances contain the information itself. To more fully understand this we’ll run through some examples.

Example 1: Obtain Drive Information

  1. Open WBEMTest as noted above.
  2. Click Connect.
  3. Ensure the Namespace is set to “root\cimv2” and click Connect.
  4. Click Open Class.
  5. Enter “Win32_LogicalDisk” and click OK.
  6. Info:
    1. The Properties (middle) list shows the information you can obtain from each instance.
  7. Click Instances.
  8. Info:
    1. The list will show all instances of Win32_LogicalDisk (drives) on your system (C, D, E, etc.).
    2. Notice the list shows the “DeviceID” property is what is set to the drive letter.
    3. We will gather information on the C drive (DeviceID=”C:”).
  9. Click Close and Close again to get back to the main window.
  10. Click Open Instance.
  11. Enter “Win32_LogicalDisk.DeviceID=’C:'” and click OK.
  12. Info:
    1. The Properties windows now contains information for each property in the class as it relates to the C drive.
    2. Later we will obtain information in C# on one of these properties.
    3. We’ll need to note the class (Win32_LogicalDisk), the DeviceID (C:) and the property name we want (“FreeSpace”).

Example 2: Obtain Windows Information

  1. Open WBEMTest as noted above.
  2. Click Connect.
  3. Ensure the Namespace is set to “root\cimv2” and click Connect.
  4. Click Open Class.
  5. Enter “Win32_OperatingSystem” and click OK.
  6. Info:
    1. The Properties (middle) list shows the information you can obtain from each instance.
  7. Click Instances.
  8. Info:
    1. The list will show all instances of Win32_OperatingSystem on your system.
    2. Notice the list doesn’t show anything behind Win32_OperatingSystem other than the “@” sign.
    3. We will gather information on this default OS instance (@).
  9. Click Close and Close again to get back to the main window.
  10. Click Open Instance.
  11. Enter “Win32_OperatingSystem=@” and click OK.
  12. Info:
    1. The Properties windows now contains information for each property in the class.
    2. Later we will obtain information in C# on one of these properties.
    3. We’ll need to note the class (Win32_OperatingSystem) and the property name we want.

Get WMI Information in C#

Now we will code the two examples above in order to obtain the information from the properties we saw in the examples. We will start with example 1. In this example “Win32_LogicalDisk” is the class we’ll be looking at.

  • Create a new C# Console Application in Visual Studio.
  • Add “System.Management” to the project references.
  • Add a “using System.Management;” statement to the top of the Program.cs file.
  • Perform the remaining steps inside the Main method (or wherever you want it).
  • Define your query (what you want to return from WMI).
    var dskQuery = new SelectQuery("Win32_LogicalDisk", "DriveType=3");
  • Define your scope (what system you want to connect to and WMI path).
    var mgmtScope = new ManagementScope("\\\\COMPUTERNAME\\root\\cimv2");
  • Connect to WMI.
    mgmtScope.Connect();
  • Define a searcher for the query.
    var mgmtSrchr = new ManagementObjectSearcher(mgmtScope, dskQuery);
  • Call searcher’s Get method and loop through results.
    foreach (var disk in mgmtSrchr.Get()) {
  • Get the DeviceID of the current loop item and compare to the drive we want info on.
    var devId = disk.GetPropertyValue("DeviceID").ToString();
    if (!string.IsNullOrEmpty(devId) && devId == "C:") {
  • Get the value of the property we want (FreeSpace) and validate.
    var freeWmi = disk.GetPropertyValue("FreeSpace").ToString();
    var freeInt = 0;
    if (!string.IsNullOrEmpty(freeWmi) && int.TryParse(freeWmi, out freeInt)) {
    Console.WriteLine("Free Space on " + devId + " Drive: " + freeInt.ToString());
    }}
  • Close out the for-each loop.
    }

The second example is coded as follows in order to get operating system information from the single default instance. In this example “Win32_OperatingSystem” is the class we’ll be looking at.

  • Create a new C# Console Application in Visual Studio.
  • Add “System.Management” to the project references.
  • Add a “using System.Management;” statement to the top of the Program.cs file.
  • Perform the remaining steps inside the Main method (or wherever you want it).
  • Define your query (what you want to return from WMI).
    var osQuery = new SelectQuery("Win32_OperatingSystem");
  • Define your scope (what system you want to connect to and WMI path).
    var mgmtScope = new ManagementScope("\\\\COMPUTERNAME\\root\\cimv2");
  • Connect to WMI.
    mgmtScope.Connect();
  • Define a searcher for the query.
    var mgmtSrchr = new ManagementObjectSearcher(mgmtScope, osQuery);
  • Call searcher’s Get method and loop through results.
    foreach (var os in mgmtSrchr.Get()) {
  • Get the value of the property we want (Version) and validate.
    var osVer = os.GetPropertyValue("Version").ToString();
    if (!string.IsNullOrEmpty(osVer))
    Console.WriteLine("OS Version: " + osVer);
  • Close out the for-each loop.
    }

Summary

The only remaining thing left to do is to determine what all of the Classes are that you can gather information on. This site contains WMI Class Information by the type of information you want. Keep in mind security considerations when trying to open remote WMI repositories. You can find more about maintaining WMI Security here.

I hope this help you get the entire picture of how to find and consume WMI information.

Connecting to Integration Services Failed with “Access Denied”


Overview

Today, when trying to connect to my local SQL Server Integration Services instance for the first time I received an error message.

SSIS Error

It was a new installation of SQL 2012 so I didn’t know for sure that it was even running. I checked to verify that SSIS was actually installed and that the service was running. I also verified DCOM permissions for MsDtsServer100 and added myself to the Distributed COM Users group, even though I am a local administrator. Of course none of that worked.

However, after a little looking I was able to find some talk about User Account Control (UAC) potentially causing this issue. UAC is able to intercept requests for administrative access and ask you about them before they’re allowed or terminate them all together. In this case it was terminating the request and SSMS was returning an Access Denied message.

To fix this problem you have one of two options. First you can close SSMS then right-click the icon, selecting Run as Administrator, each time you want to run it and connect to SSIS. The second option is to disable UAC. Of course this poses additional security risks since you’ll no longer be notified of requests for administrative access. However, if you want to do this the instructions are below.

Disabling UAC

  1. Click Start and then Control Panel.
  2. Click User Accounts and then User Accounts again in the next window.
  3. Click the Change User Account Control settings link.
  4. Slide setting down to “Never notify” and click OK.
  5. Restart your system.