Showing posts with label fix. Show all posts
Showing posts with label fix. Show all posts

Tuesday, 5 November 2019

Monitor Stuck in Interlaced Mode?

Sorry for the very long delay between posts, I am just incredibly busy... But, here's a problem I've just had to solve and I thought worth coming to these pages for... Ever had a screen stuck in interlaced mode?

So my monitor is an Asus MX27AQ, really nice screen, but I was part of Alpha testing of a game at the weekend and it had set the game into what appeared to be 1920x1080@60hz interlaced mode.  I have NO idea why the game did this, but it was all testing and work in progress, they had a report and I closed the game.

But, it left my screen stuck in a strange way, it wasn't interlaced it had gone back to progressive, but it was at 59hz not 60, no matter what I did with drivers or windows display settings it was stuck at a lower refresh rate, selecting 60hz just resulted in no change and the "Do you wish to keep these changes"... Nothing was happening, either accepting them or reverting them.

And the horizontal pixel clock seemed to be off, now I could not change this setting, either in the screen controls, windows display controls nor by removing and reinstalling the display driver nor graphics card driver, even removing all the settings seemed to leave the screen still in this situation... I reset it, re-powered it, disconnected reconnected... I did everything physical and software related.

Absolutely frustrated I then delved a bit deeper, and inside the nVidia display settings I found "Create Custom Resolution", you can get to it on your own nVidia card via their menu...




The key thing for me was to create an invalid resolution, so I just changed progressive to interlaced...


And hit that "Test" button at the bottom.

The screen went on the fritz immediately, but only for 15 seconds as I didn't accept the changes and the screen righted itself.

Properly righted itself, all the settings came back, the pixel clock skew was gone and I could see 60hz and select it for the display again.

I think this was a case of the screen itself holding onto some setting maybe on its own firmware... I'm totally guessing... and in kicking it again via the nVidia driver I cleared the bad settings out.

But, the did persist, over power cycles, over reboots, over removing and replacing the drivers and even taking the screen to another PC (in my case a laptop) I even changed from a Display Port cable to an HDMI cable.  The only thing to sort it out was the bad custom resolution and letting the display return to "normal".

Wednesday, 8 March 2017

Development : Visual Studio Giving False Reports of Missing Symbols

I have just run across an issue which has me slightly baffled... Sending the build down to my automated server and it started coming back as failed, panic ensued, so that I started to then do builds on my local Visual Studio instance... (which is VS2013). 

Now, this code is perfectly working, has been fine, released and tested for... Since about 2011.

This is how the error shows up...


Taking a closer look...


We can see there are suddenly a bunch of unresolved externals, specifically the definitions of a bunch of functions.

There is NOTHING wrong with this code, indeed, the work around to get a build to complete is to comment out any one of these functions....


Rebuild, and it now fails on that specifically missing function body.


Finally, re-enable the code and do a further rebuild... and everything completes perfectly...


Consulting the internet about this one, as everyone here has drawn a blank, and one person suggests that this is a miss-match between the Byte set setting of the project (Multi-byte) and any libraries being Unicode.  However, I have no third party libraries... The mystery only deepens.

A full fresh check out of the code, still fails, a full clean fails, a rebuild fails, rebooting the machine has failed.  None of the fixes has made a difference, and more problematic is that the failure happens sporadically.

Wednesday, 7 September 2016

Software Engineering : Building Cryptozoidberg (Boolberry)

I recently received a request via YouTube to help a fellow programmer out, they were having issues building this library against the boost libraries... https://github.com/cryptozoidberg/boolberry

The problem essentially is the lack of transparency in CMake when it looks for boost with it's "FindBoost" functionality, because neither he, nor I build boost with CMake.  I personally don't use or like CMake, I do use make however, and am happy to look around in the make files.

So, I did... And there's nothing specifically wrong with this makefile, but it is insisting on looking for boost within the system, not the version built by yourself.

My Solution therefore has been:

sudo apt-get install libboost-all-dev
sudo apt-get install git
sudo apt-get install cmake
cd ~
mkdir c++
cd c++
git clone //https://github.com/cryptozoidberg/boolberry.git
cd boolberry
make -j4

(Note, replace 4 here with as many cores as your PC has available!  More cores will speed this build up, and it will take a long while)

And this works fine:


As you can see.  However, I did this from my main build machine, which has a whole bunch of additional and historic settings.  Which is the most common pitfall for others coming to build your software later, they lack these customisation's.

My build environment: Ubuntu 16.04 Desktop, with the i3 Window Manager (just open a terminal), and I have installed gcc (sudo apt-get install gcc).  These are the only steps before running the above script in a terminal window.

I therefore decided to perform a full clean setup of this system in a new Ubuntu 16.04 (64bit) VMware Virtual machine.

From this, I realise I needed to explain how to install the boost libraries, how to set up cmake and how to get git working before the build would work....

You can see this whole process below, please accept my apologies that this was recorded on an extremely slow internet connection, it got smushed during recording over the mobile link, and I've not had chance to re-shoot or edit the video.



As you can see however, the build worked perfectly.

To Muhmad whom asked for this, you'll find the Donate page at the top right!

Monday, 23 May 2016

Disable Caps Lock in Windows - Without hacking and without Registry Editing!

I'm back from tinkering, trying to help some poor unfortunate souls... Like old64goat, whom advise removing the caps lock key as a way to stop it operating... And then Lloyd here has actually broken his keyboard, and recommends you take your key off... Guys, if you remove your caps-lock key, all you have is a BROKEN KEYBOARD!

So, just calm down, calm down, everything will be okay, I'm going to explain everything to help you out... Lloyd, the "noise" thing... I cover that... And to all, read on, because there is of course a better solution.

I'm not saying this is an easier solution, because it's not, it's complex and all about configuring software, but there are No HACKS!  No Hammers! And No Needle Nosed Pliers required!

Best of all however, your keyboard can remain fully functional, other people can come and use your machine without being absolutely frustrated at your having acted like some kind of keyboard mohel.

Before I start however, I'd like to shout out to vwestlife as he pointed this one out, and I recently caught up with all this very interesting coverage and made me aware of this world of keyboard destruction.

The Video
From my live stream of the 23rd May 2016... Read the full solution below, this video is very rough & ready...


Unacceptable Sound Solution
So, what can you do to sort his problem out?... Go down to the start menu and type just the word "Keyboard" without any ENTER key, just the word and watch what comes up...


I've highlighted the first and simplest one which can help with the caps lock problem...

"Change How Your Keyboard Works"

Now, if you're not a touch type-expert and are constantly looking down at your keyboard, rather than at the screen, this can really help you hear if you've hit the caps-lock key... Lloyd, that's for you!

Simply go into that option and turn on the  option to hear a tone whenever the caps-lock key is pressed, now if you have speakers, or headphones on, you can hear a passing impression of an old Pong machine whenever you press the caps-lock key!!!


However, that just might drive you stark raving mad after a while, and since Lloyd posted his rant in 2009, I'm sure he's pretty much sick to his hind teeth of his machine beeping like this, if he ever found this solution out.

Unacceptable Horrible Hackery Solutions
And as I made mention, there are horrible, trickster hackery tricks to go into the bowels of the Windows Registry and unmap the caps lock key, however, this pretty much going to do the same as taking the key off, but worse, because it's removing the functionality for all users, and unlike with pushing the key back on, there's not a quick and simple way to undo the change!

Plus some applications you do actually need the caps-lock key!

DO NOT HACK, DO NOT HAMMER, DO NOT PRY YOUR KEYS!

Acceptable Solution
There is a much better, though more complex, software solution... If you go back to the start menu and now type "region", you'll be able to see "region & language"...


Selecting it opens this box:


And you can immediately see the tab at the top about the keyboard and languages, we're going to be coming into this later, remember this page!


Then we see this intriguing "Change Keyboards" control.  What can we do in there?  Well, we can see there's a way to add other language keyboard layouts, and if we add them, the language bar becomes available to switch between language and layouts.


However, ALL the layouts in there have the CAPS lock key set to  modulate the letter key codes, what we need is a new language/layout we can add, which does not respond to the caps-lock key.

Unlucky for us we have to create this layout... Luckily though Microsoft provide the "keyboard layout creator", which we'll now need to download & install from this link:


Install that and open it, you'll get a program looking like this:


Of course you can install your own keys now, clicking on each one, toggling it... etc... Play about, but all we want to do is create a clone of our favoured layout, for me this is "English (United Kingdom)", so from the file menu we can load that existing layout:



And it's presented to us...


We don't want to change any keys at this time, but we do want to change the properties to give the keyboard layout we're creating a name so we can spot it.

So, open the Project menu and select properties...


You'll get the default values...


Change them... so I'm going with this....


And just save this new layout project file...


You'll get a file, where-ever you saved it, looking like this...


Open it in Notepad, or whatever text-editor you favour...

Click to zoom in!

This looks like a lot of information, but whatever text editor you're using TURN OFF WORD WRAPPING!!!!!

And you'll see these columns in the center... the third column is "caps".

This column tells the keyboard controller (when is uses this mapping) what to do with a key when the VK_CAPITAL key code is received.  We want all the keys to do nothing, and some already do - such as the number keys.

Those keys already ignoring caps have zero's int his column, so we need to edit the letter keys to do nothing when caps is pressed, change any 1's or 5's you see in that column, especially against the a-z keys to a zero....

Click to zoom in!

Save the text file, and now re-open that "klc" file in the Layout Creator application from Microsoft again... I did this by right clicking on the file and selecting "open with"...

Don't touch anything, don't twiddle any values!!!!  If you do, the creator takes liberties and can change things back in your klc file.

Just go back into "project" and select "Build DLL and Setup package"...


The application will now try to validate the keyboard and you will be told (hopefully) that the verification succeeded, but that there were warnings, you can view the result I got...


Here...

Click to zoom in!

Those warnings tell you pretty much that everything worked as we expected, the CAPS LOCK is not set between 'a' and 'A'... etc... that's what we want to see!!!

When the DLL is built you can open the folder straight away...


And doing so, we see we have a bunch of msi and a setup executable...


Install the setup executable...


You will see that the name I entered in the properties is the window title, so this is "United Kingdom - NoCaps"....

Go back into the region & languagages menu, the keyboard again, and this time when you look you should see either... "United Kingdom - NoCaps", but more likely it just says "United Kingdom - Custom".  Select to enable them!  Anything new, this is a little sketchy, but this is Microsoft not what you've done.

Now, because you have more than one keyboard layout available in the languages, the language bar should show up...

Click to zoom in!

In that you can pull it down to select the "NoCaps" version!!!

Doing so in an editor now, I find caps lock has no effect!!! Exactly what people have been looking for.  And this only affects the capslock key, you can still get capital letters using shift!

You're Not hacked anything... Not been in to the guts of the registry, and best of all, you can uninstall it later... or deploy the same keyboard layout to any version of windows you like (above windows Vista at least).

And, best of all, you can just go back to the language bar and select the original standard "United Kingdom" default layout, and the caps lock is back on and working!

There are other options to let you select between key layouts on the fly too, so you can opt into and out of the NoCaps version at the press of a key combination... The default being "Left ALT + Shift", search your windows for "Text Services and Input Languages".

Sunday, 22 May 2016

Dell 2950 Server - Fan Modification - Part 3

This is the software side of modifying my Dell Poweredge 2950 (Model II) servers to be much quieter.

It WORKS!  But please beware, THERE ARE POTENTIAL RISKS IN ALTERING YOUR BMS FIRMWARE, IF YOU ARE READING THIS, IT IS ADVICE ONLY, ALL AND ANY ACTIONS YOU PERFORM ARE AT YOUR OWN RISK!  Just because it worked for me, doesn't mean you will be successful.

Part 1, shows how I added 47ohm 0.5watt resistors to the power (red cables) on each of the four internal fans.  I'm yet to modify the power supply fans, but I will.

Part 2, is my success video recorded at 3am last night when I was very tired, and had everything working.

And this, Part 3 is to cover my complete solution in how to do the software (BMC) firmware flashing.


The Centos Linux OS was used for the change, specifically the older version 6.4, downloaded from Oxford University here http://mirror.ox.ac.uk/sites/mirror.centos.org/6.7/isos/i386/CentOS-6.7-i386-LiveCD.iso.

This was burned to a DVD ROM, and as you can see in the image, I had to re-fit a DVD into the server as I have three servers, but only one DVD drive... DOH!

Next, I booted into Text Mode, so when the boot menu appeared from the DVD, I pressed Escape before the auto boot timed out, and selected to boot in Text mode.  Once booted, the login is "root", with no password.

My first command is to ensure the ipmi tools are installed, python, wget and rpm are on that image, but for completeness to the source material I include them in the installation:

sudo yum install freeipmi freeipmi-tools openipmi ipmitools python wget rpm

Once complete you can check the ipmi sensors are working with:

ipmi-sensors

You will get a huge list of all the sensors on the board.

Next you need to download the BMC firmware, to anywhere on the machine, you don't need any storage, the Live CD boot you're using will work fine just with RAM in the server!.. So no worry about overwriting any disks or data!

wget http://downloads.dell.com/esm/BMC_FRMW_LX_R202152.BIN

Once this has downloaded, you need to make it executable

sudo chmod +x ./BMC_FRMW_LX_R202152.BIN

Now make a directory as root:

sudo mkdir bmc

And extract this firmware you've downloaded into that path:

sudo ./BMC_FRMW_LX_R202152.BIN --extract bmc

And change into that directory:

cd bmc

Now we need the path script, but as we're in a directory created with sudo, we need to also run wget with sudo:

sudo wget http://projects.nuschkys.net/downloads/dell-adjust-fan-thresholds.py

And make this executable:

chmod +x dell-adjust-fan-threaholds.py

To then extract the values from the firmware and edit them, we run the script against the payload dat file:

./dell-adjust-fan-thresholds.py payload/bmcflsh.dat

This will extract a load of information, then ask you how many fans, or what model to edit, for the 2950, with four system fans and two power supply fans, I selected option 3.  To give me six fans to modify.

It lists each fan and their threshold value, so now select the fan by entering it's number, so try 1 first.  Then enter a number, now if I recall the default 2250 threshold is a value of 25.  I tried various values, but the best I found to modify for the resistors I'm using was 22, this gives a new minimum RPM of 1650 for the fans.  And I never saw any fan drop below 1800 RPM.

23 is 1750 RPM as a threshold, but I thought that too close to the lowest RPM I'd observed before starting this software mod.

So, 1 through 6 all selected and 22 entered for each, you then write this file back with the 'w' command.  This will repack the payload/bmcflsh.dat file with your new values.

Armed with this modified dat file you therefore need to flash the firmware, THIS IS THE STEP WHICH CAN BRICK YOUR MACHINE, PROCEED AT YOUR OWN RISK!!!

We're still in the bmc folder created before, so change nothing after altering the payload with the script, and you type:

sudo LD_LIBRARY_PATH=./hapi/opt/dell/dup/lib:$LD_LIBRARY_PATH ./bmcfl32l
 -i=payload/bmcflsh.dat -f

And as you can see in my full video coverage, this worked for me.

I hope this helps, below are the references I went to, but I must have read about 15 different posts, dozens (if not hundreds) of the comments to piece this together.  The biggest problems I had from other posts was understanding the problems using Ubuntu and other distros, they don't work.  There are problems with the libstdc++ libraries, and then the i686 installation and all manner of hoops and tricks I tried.

Centos 6.4 i386, is the only live DVD image I've been able to use... and this all work easily.

The main instructions I followed were from Martin Denizet, however, even his post has issues and it not clear how to get the right distribution.

I also tried to follow RatzBlog, but was thwarted at every step by the OS's I was using, even trying to use Centos 6 didn't work with his instructions.

Monday, 30 September 2013

WarThunder - Patch 1.35 - Economy Fixed!

The latest patch of War Thunder... Hmmm... Yes... Yes....

THEY FIXED IT

*cough* sorry, I got a little excited there, yes after walking away at 1.28/1.29 with the terrible changes they made to the economic model, I've been back with 1.35 and I've made a profit.  I've even lead the score board a couple of times, and I've had fun doing it.



I've bought the new BF109E-1, which complements my German Fighter line where I'd rather have been using the Do-17's than try to use the BF110, or the Italian shite.


I've also upgraded a couple of my British crates with all their upgrades, as I can afford to, and from 250,000 lions at the start of the weekend, I spend down to around 95,000 and I've played only a handful of games and got back up to 200,000.  I consider this a miraculous turn around.

And its made the game fun again.

The visuals are just as good, though on the latest build I am seeing some horizontal tearing as I'm scanning the camera around, but then this is the first time I've run WarThunder on this rig with Windows 7, it used to run flawlessly on Vista on the same hardware, but I've not even bothered mucking about with the settings (yet).


The other new plane I bought is the Spitfire IIa, new in line, and I took it up for a spin on the Battle of Britain Event Mission, now I posted my Spit Mk I success as a youtube video some time ago, however, things did not go as swimmingly in the brand new - low crew skilled - Spit IIa.  No, I climbed to altitude in the usual way and then got bounced by four 109's of various models, the final blow going to a BF109E-1, but I managed to take one with me even with a shredded wing.  Dowding would have been proud - well, perhaps not, but I tried.


Thursday, 18 July 2013

Disabling the Java Updater

I've had a annoying moment with the Oracle Java Updater, we have a system which though not using Java can run applications using Java, our system however is all seamless, there's no desktop and it boots into a managed environment for display.  Trouble was the base disk we have had had the java update enabled, so about 50 seconds after starting the desktop changed to an Administrative mode asking for permission to update Java.... SIGH!

So this morning I've spent about half an hour figuring out a fix, because we can't seem to remove the Java update service.  No problem, lets change the setting to disable it... So I fire up explorer, and there is the java Updater in the system task tray...



See, there it is... And you can right click on it and access the Properties...


And hey look, there's an option to NOT do updates... Lets select that....



Oh look, an apply button, I'm not a rookie, so I'll click that for good measure.... and then OK...



*Whistle*... *humm*... So lets go back in there and see what its done...


Holy mother fucking god the setting is back on... Thank's Larry, this is really good stuff...

How you actually this off, is to disable the whole updater/deployment tool... So go into your User AppData directory, so my username is "Xel" so the path is: C:\Users\Xel\AppData.  This is a hidden folder, but just type it in to the start box, so if you're "judy"... C:\Users\Judy\AppData, and now we can go into: "LocalLow" and then "Sun" (yes Oracle fuck up the installer and still have the balls to name the folder "Sun").

Next you go into "Java" and then "Deployment"... Now we're past the gravy and against the meat, you should see a file called "deployment.properties"... Open that in a text editor and change the "deployment.javaws.jre.0.enabled=" from "true" to "false" so it looks like this:

deployment.javaws.jre.0.enabled=false

And reboot, now the deployment tool won't even start - let alone bug you or update the java runtime.