Saturday, February 28, 2015

Patience

Lately, I've had this annoying issue where Windows would resize my desktop and all open windows to my old monitor's resolution when waking from sleep. Normally, I wouldn't care, but this resolution roulette resulted in my desktop icons always being off by one. Constantly correcting them wasn't going to fly. It didn't help that my "restored" window sizes were off and tucked into the top left corner.

I tried sifting through the Registry to find keyvalues containing the old resolution and found a few promising entries. So, after making a backup, I changed them to the new resolution, rebooted, and...no dice. There were dozens more entries that matched the raw numbers, but the Registry is a big place and I'd rather not get lost in it and break something.

I figured the issue was Windows falling back to the old monitor's details when I killed my current monitor before my machine finished going to sleep. So, I left it on while my machine slept. The issue persisted.

Next up was uninstalling all old, unconnected hardware. Normally, Device Manager doesn't show disconnected hardware. However, Microsoft implemented a flag to force it to show: devmgr_show_nonpresent_devices. After setting this to 1 in an elevated command prompt window and launching devmgmt.msc, I expanded the Monitors category and removed my old monitor. This had a result, but not one I was hoping for. By removing the only other monitors it knew, I caused Windows to use its default, works-with-all resolution (640x480, I believe). Now, my icons were going every which way and my program windows were really out of whack.

Searching the Net for this issue resulted in a forum post claiming reinstalling graphics drivers. Okay. I grabbed the latest nVidia drivers and ran the installer. After hitting "Next" to proceed to selecting an installation type, the installer froze but didn't go unresponsive. So, I clicked "Next" again...only for it to register both clicks, go for a full installation, and install things I didn't want (GeForce Experience, Update Core, 3D Vision, etc).

Seeing this, I immediately killed the installer, but not before it had mucked with the graphics driver. Running the installer again demanded a restart of my machine to "complete" the previous install. Fine. A quick reboot later and the installer was more than happy to run. It did the little freeze again, but, having learned my lesson, I left it to its own devices (no pun intended). I carefully and deliberately chose "Custom install" and filtered out what I didn't want. So, naturally, it ignored my selections and installed everything.

A reboot later to apply the driver, I found all manner of services and processes bearing nVidia's name. These extra programs installed with the driver had entries in Programs and Features, so I thought I'd start with uninstalling GeForce Experience. I got the usual "Are you sure" and "Uninstall complete" messages and figured I should reboot to make sure it took effect. Nope. The process, files, and uninstaller entry were still there. I could run the uninstall as many times as I wanted and nothing would happen.

Having unselected PhysX from previous installs when versions matched, I'd observed that would result in uninstalling it instead of leaving it alone. Applying this logic to the rest of the packages, I figured unchecking them would uninstall them as well. Nope. Nothing uninstalled. It would run the installers for what I checked, but wouldn't uninstall what I unchecked. At one point, it didn't even detect those packages as installed.

So, I deleted the 32bit files for the GeForce Experience, realized it was a 64bit process, and deleted those too. I got the expected "Can't delete file in use" error, killed the offending process, and rebooted. That killed the process, but the uninstall entry for it was still present, functional, and giving me a placebo of an uninstall routine. I tried PhysX, Update.Core and the other entries, and they too wouldn't uninstall. Although, some did give a "I can't do that, Dave" message.

Another web search revealed uninstalling the devices via Device Manager would remove the lock and allow the software to uninstall. That didn't work. While the device was uninstalled, the driver remained in Windows' driver store. I tried removing them again and checked the box to remove them from my machine completely.

Upon reboot, the previous versions of the drivers came back, installed, and halted my progress again. Losing my temper, I killed all nVidia processes, forcibly killed Windows' driver installer, uninstalled the devices again (but didn't reboot), and proceeded to obliterate any and all driver package files in Program Files, Program Files x86, and the Registry. Reckless, yes, but I had a good idea of what to look for from mucking around Windows for so long (essentially entries in HKLM\System\CurrentControlSet\Services keys prefixed with "nv" that weren't related to motherboard chipset drivers, HKLM\Software\Nvidia Corporation, HKCU\Software\Nvidia Corporation, etc).

Yet another reboot later and nothing nVidia was running, except I still had nVidia service entries in the Windows Management Console. Three were missing their support data, but the GeForce Experience entry was still pulling info from somewhere. I've mucked with starting/stopping services in Windows from command line before, but there was a function I never bothered looking for: delete. So, I queried all services regardless of state, piped them to a text file (sc queryex type= service state= all > C:\services.log), looked for any DISPLAY_NAME entries containing "nVidia", grabbed their associated SERVICE_NAME, and deleted them using "sc delete SERVICE_NAME". To take care of the Uninstaller entries, I pulled up CCleaner and deleted them.

Incrementing my reboot count again resulted in a machine apparently free of what the GeForce Driver installer put on it. I had to put the driver back on (because not doing so would make my graphics card a pointless power draw), but to ensure I didn't wind up in the same situation, I employed a trick I learned last year: Delete things you don't want to install from the extracted driver package. Let it self-extract, kill the installer, go to the extracted location, and remove all files and folders you don't want the installer to detect (it's surprisingly flexible). This resulted in an install of what I wanted (Graphics driver, PhysX, and HD audio driver) and nothing else. I missed the Update.Core uninstaller entry on a previous reboot, but a quick summon of CCleaner took care of that.

To note: I had no real use for the additional software nVidia provides with drivers. I don't care about 3D vision, don't have a Shield, don't stream, and I use AfterBurner if I want to record gameplay. There was no real hatred toward the software packages. Now, I'm a bit miffed. Did the initial aborted install really put all nVidia software into this state? How could that pass test? If the abort wasn't the cause, how could non-functional uninstall routines pass test? Do they even test? Do they assume no one would ever want to uninstall their software and, therefore, that aspect doesn't need to be tested?

Now I wait to see if my machine goes bonkers or if my directed reckless removal was nice and clean. I'm not on it right now, so I still don't know if my blasted desktop is fixed or if Windows will continue to bounce between resolutions. Should this fail, I'll have to try HDMI and DVI as it could be DisplayPort causing a problem (I had to reset my monitor and the nVidia Control Panel as well as physically remove my old monitor to get rid of weird colors and artifacting on initial install).

Sunday, February 22, 2015

Well, it did work last time...

I tried getting back into 3d modelling again and my Student Version of 3ds Max 2011 gave me a nice little window: License Expired. Well, crap.

I've been using the Student License for it because I started while still in school (clearly). And, because of that, I made sure to never make money off what I made (i.e. donation links on Nexus). But now, I'm looking at having to spend nearly $4k (the cost of a perpetual license for 3ds Max) to open up my models again. Over 3x the cost of my PC. Awesome.

I'm not going to kid myself, my models weren't that great, but some part of me thinks having a donation link on the Nexus would have offset some of the cost. So, in an attempt to skirt this, I ran the Gmax installer I'd been holding onto since high school. A quick account creation and registration code later, I had a functional installation of Gmax ready to go, except for one thing: .MAX file import. A cursory websearch yielded one result: It was never done. Or, if it was, it's no longer available due to the required websites dying off. Double crap.

So, here I am, trying to think of something clever to gain access to my models again. The really annoying bit is the Sentinel Armor was in the rigging stage. I was tacking it onto the Skyrim skeleton and preparing it for an animation test. Naturally, there were quite a few erroneous bone weights to remove, but I was almost there. After that would have been weight sliding and a resize for the male bodies.

Now, there's a trial of 3ds Max I could use to give myself a short extension during which I covert everything I have into a Gmax compatible format. So that's an option. The more unsavory idea of creating and wiping VMs or native VHD Windows installs probably won't get me anywhere as license enforcement has moved to requiring an internet connection. I guess I could use the trial of the latest version once a year, but I'm not a fan of that idea.

This is bad planning on my part. I didn't write down or remember how long the Student License lasted for, so I didn't export everything when I had the chance (though, not having an expiration warning from Autodesk didn't help). I suppose I should write a note to myself to make sure I always export to common formats when using Student Licensed software, but since I'm no longer a student, that note would probably go to waste.

The current plan? Save up for a year while trying to figure something else out. At least I can still work on the texture.