Jesper's Blog

Windows 7 on Sony Vaio - Brightness / Sleep problem

by Jesper 24. August 2009 13:48

I have been running Windows 7 RTM on my Vaio (VGN-Z21WN) since it was released on MSDN, and everything has been working pretty smooth – except for an annoying problem with the display driver.
If I installed the NVIDIA driver (the Vista 32 bit driver from Vaio’s support site), the brightness controls would not work (neither the FN keys nor the slider in Windows power settings).
If I removed the NVIDIA driver (leaving a “standard VGA driver” with a yellow exclamation mark in the device manager), the brightness controls would work fine, but then the computer sleep function no longer worked, and the computer would always hibernate instead of sleeping (when closing lid or pressing power button) – which is a lot slower but shutting down and restarting, and bad for my SSD.

Today I finally found a solution, which I thought I’d share here in case anyone else out there runs into the same problem (I googled a LOT for this, and found nothing).

With the NVIDIA driver installed, in the Windows Device Manager, right-click and disable the NVIDIA adapter (do not uninstall it – just disable it). Leave the Mobile Intel… adapter enabled:

Image1

AND in the Windows Services list stop and disable the NVIDIA Display Driver Service – otherwise the display adapter (Device Manager) will be re-enabled every time the computer is restarted:

Image2

I expect this configuration might be a problem if I ever need to connect an external monitor/projector (haven’t tried that yet), but then it should be simple enough to temporarily enable the NVIDIA display adapter.

Tags:

Super FDisk to the rescue

by Jesper 23. July 2009 00:04

Having heard so many good things about SSDs (solid state disks), a few months I decided to try one out on my laptop – a Dell M4400 at the time.
So I got a Patriot Warp v. 3 256GB SSD, backed up the old disk (a standard 7200rpm 250GB disk) and restored it to the new SSD.
This appeared to work very nicely at first (quiet, quick boot etc.), but soon the laptop started taking long breaks where it practically froze, apparently doing some kind of disk activity (as per the HD light).
This might have had something to do with the Intel controller SATA settings and some weird restore partition that the Dell laptop was born with, but I never figured it out and eventually put the original hard disk back in to get some work done. And the SSD ended up in the drawer :-(

Then last week at the local mall I came across this cute little Sony Vaio Z21 laptop – which I just had to have.
It is light (1,5 kgs), great screen (13.1” 1600x900), Core2 Duo 2.53GHz, and 4GB RAM, and looks great too.
The hard disk however was a bit slow - 5400prm standard. So this was a perfect opportunity to try the SSD again.

After a few failed attempts (blue screen of death) at installing Windows 7 RC on the Vaio / SSD, the Windows installer suddenly claimed that the computer had no hard disk at all.
I tried with Windows 7 RC, Vista, several older Windows versions, and various disk partitioning utilities, but none of them recognized the disk anymore.

After a lot of googling, I finally found “Super FDisk” from http://www.ptdd.com/. A free utility delivered as a downloadable ISO image for burning a bootable CD.
Visually it reminded me of the good old Windows 3.1 days, but it worked wonders!
After deleting some weird looking disk partitions using this tool, the SSD appeared to be reborn.
The Windows 7 RC installer now recognized the SSD, and installed flawlessly on the first attempt. I have been running this 3-4 days now as so far it has been great (writing this in Windows Live Writer on the Vaio).

So thanks very much to the Super FDisk people for making (and giving away) this brilliant tool!

Dell M4400
Dell M4400
Patriot Wapr v. 3 256gb
Patriot Warp v. 3 256gb
Vaio Z21
Vaio Z21
Vaio Z21
Vaio Z21

delete

Tags:

Software review

Springsteen in a great mood

by Jesper 9. July 2009 11:43

Went to a fantastic outdoor concert with Bruce Springsteen in Herning (Denmark) last night.
He rocked the place for 3 hours straight and looked like he could continue for twice that long – I almost felt sorry for the E-Street Band who got no breaks at all.

bruce_springsteen_little_steven

It had been a cloudy and rainy day right up to 20:15 when Bruce and the band went on stage and the sun broke through the clouds for a perfect evening with great music and atmosphere.

Thanks Boss!

Tags:

Music

New fiber Internet connection and new server

by Jesper 6. July 2009 12:49

We've always wanted to host our Internet servers from our own office. Besides from providing more control, security, and privacy, this is also just much easier and more convenient as we are constantly tweaking and developing our web-sites.
However, until now it hasn't been possible to get a decent business Internet connection in our location (Frederikshavn, Denmark). The best the phone companies could offer was ~5Mb/512Kb consumer grade ADSL.
So we've always been forced to host our web-sites in remote data centers - most recently in Kansas, USA.

So when a new player, BredbaandNord, offering fiber Internet connections turned up on the local scene this spring, we jumped at it.
A few weeks ago we got our 50Mb/50Mb business grade fiber connection installed, and just got done moving everything from Kansas to a brand new Dell PowerEdge T300 (Xeon Quad-core / 16GB RAM) running Windows Server 2008 64bit sitting right here in our attic.

Here are a few photos (click for larger versions):

Fiber coming into our building:

In our attic, this guy converts the fiber to Ethernet:


About 3 km (2 miles) from here, the other end of our fiber goes in this "hut" - the local hub:


Inside the hut, a technician is hooking up our fiber:


Hmmmm.... which one was it now?


Back in our attic, the new PowerEdge server is happily serving this blog and all our other web-sites:


And of course the server and fiber converter has one of these (battery) in case power should ever fail:

Tags:

.NET HttpListener Class - Weak documentation on Prefix formats

by Jesper 25. March 2008 17:48

Just thought I'd share this if someone else encounters the same problems I did trying to use this class.

The documentation for the .NET HttpListener class states that a Prefix host name + is similar to * without going into any further details.
There is actually a pretty big difference between the two.

There is also no mention of what happens when you specify an IP addresses as the host name (weak wildcard).

The full explanation is found in the MSDN documentation for the "HTTP Server API" under "UrlPrefix Strings".
See http://msdn2.microsoft.com/en-us/library/aa364698(VS.85).aspx

Tags:

.NET

intoDNS.com - a DNSreport.com alternative

by Jesper 21. February 2008 18:58

DNSreport.com is a great tool for quickly analyzing a domain name registration and setup.
I have personally used it for many years, and still use it almost daily to check various domain names etc.

However about a year ago DNSreport.com became a paid service.
I perfectly understand that they need to finance their servers etc. and I am happy to pay the membership fee, especially since I use it as much as I do.
But a lot of people were unhappy about this because they didn't use the service enough to justify paying for a membership, and there weren't any good alternatives around.

Simple DNS Plus users have often asked us to provide a similar service or tool - or if we knew of any alternatives.
We do provide several free on-line DNS diagnostics tools - see http://www.simpledns.com/addons.aspx#online
But nothing as comprehensive as DNSreport.com.

Today I stumbled on a web-site called "intoDNS.com" which provides a free domain name report very similar to DNSreport.com.
The site is still in beta but looks very promising.

So if you can't justify paying for DNSreport.com - check out http://www.intoDNS.com

Tags:

DNS

Smart Paster Add-In for VS2008

by Jesper 10. February 2008 17:59

Just noticed that my favorite add-in for VS2005, Smart Paster by Alex Papadimoulis, is now also available for VS2008.

With this add-in you can paste text from the Windows clipboard into the Visual Studio source code editor formatted as a comment, quoted string, or string builder code just by right-clicking and selecting "Paste As..." from the pop-up menu:

This is just a fantastic time saver.

However the VS2008 version of the add-in only came as source code and had no instructions for installing it.
So for anyone else looking for this wonderful add-in, here's the compiled version:
SmartPaster2008bin.zip (27.13 kb)

To install it, un-zip above to:
Vista/2008: C:\Users\<user-name>\Documents\Visual Studio 2008\Addins
Earlier Windows: C:\Documents and Settings\All Users\Shared Documents\Visual Studio 2008\Addins

Then restart Visual Studio 2008 and update settings for the Add-In in the Tools menu / Add-In Manager.

Tags:

.NET | Software development | Software review

Microsoft's Software Licensing and Protection Services (SLPS) - Not for 64 bit

by Jesper 8. November 2007 02:52

I am attending Microsoft's TechEd Developer conference in Barcelona this week (and having a great time).
One of the more interesting things (to me) that Microsoft is showcasing this year is a new product for ISVs called "Software Licensing and Protection Services" or "SLPS".
There has been 2 "breakout sessions" on SLPS, there are signs, flags, and posters advertising SLPS everywhere, and there are more "ask the experts" stands about SLPS than any other single topic here.

SLPS is a very interesting anti-cracking method involving a "unique virtual machine permutation" for each ISV or software title combined with a typical license activation server or service. For details see http://www.microsoft.com/slps

It seemed like a great product for a small ISV like us, and so I spent some time digging into this subject here at TechEd.
Microsoft sells SLPS through various resellers including PreEmptive - who combines this with their DotFuscator product.
PreEmptive also has a stand at the TechEd, and they offer a "challenge" where they add SLPS (and obfuscation) to an existing .NET executable to demonstrate how all this works.

PreEmptive gave me a very nice walk-through using one of the .NET based .EXE modules from our upcoming Simple DNS Plus v. 5.0.
The protected / license wrapped version worked very nicely during the demo on PreEmptive's computer, and following the demo they e-mailed me a copy of this to try on my own computer.
Unfortunately it did not work as well when I downloaded the file to my laptop later that evening - basically it just crashed.

This morning I attended another session about SLPS by Aidan T. Hughes (Development Manager for SLPS at Microsoft), and later in the day got a chance to talk to him personally about this - and show him the application crashing on my laptop.
It turns out that SLPS only works with 32 bit processes!
Since my laptop runs 64 bit Vista, and the .NET application was originally compiled for "Any CPU", it runs as a 64 bit process.
This worked just fine before SLPS was added. But with SLPS it crashes because it cannot load the 32-bit-only SLPS DLLs into the 64 bit process.
Quoting Aidan: "We haven't gotten many requests for 64 bit support, so this is not something we have tested a lot..."
Unfortunately he didn't give me much hope that this would be fixed in the near future - "we will look into this for future versions...".
His only suggestion was to re-compile the application for 32 bit (x86 CPUs).

Unfortunately that is a showstopper for us.
Many of our users have been asking about 64 bit for some time now.
All new CPUs from Intel and AMD are 64 bit capable (both companies have stands at TechEd and I checked with them both) and Microsoft's own flagship product Window Vista comes with both 32 and 64 bit versions in the same box.
So I am surprised that Microsoft would launch this new product without 64 bit support.

That said, I would like to thank the staff at PreEmptive and Microsoft's SLPS group here at TechEd for their great help and personal attention to this.

Tags:

.NET | Conferences | Software development | Software review

Building Simple DNS Plus v. 5

by Jesper 22. September 2007 02:50

We are just about ready to release the very first beta version of Simple DNS Plus v. 5.0.

That means that a lot of compiling, installer building, and testing is going on at the moment.
All in all, getting from source code to a complete "setup.exe" file involves 30+ steps of doing different things in different programs (compiling, obfuscating, packaging, signing, virus scanning, etc.) - all of which has to be repeated over and over as we correct bugs and fine tune everything.
Until yesterday this was a manual and painfully slow process.

Today I discovered "Visual Build Professional" from http://www.kinook.com

After playing with the trial version for only a few hours, I had our whole build process completely automated.
I just placed an order for the full version - this software program will save us so much time in the next critical beta testing period that it will pay for itself ($300) many many times over!

I know there are other automated build tools out there, but what really sold me on this one is that it has direct support for exactly the tools we use to build Simple DNS Plus v. 5.0:
- Visual Studio 2008 Beta 2 (http://www.microsoft.com/vstudio)
- Dotfuscator Professional Edition (http://www.preemptive.com)
- Advanced Installer (http://www.caphyon.com)
- Help & Manual (http://www.helpandmanual.com)

I was even able to include an automated a virus scan of each compiled .exe file and the final setup.exe via the command line tool that comes with Kaspersky Anti-Virus (http://www.kaspersky.com).

So now when we make a small change to the source code, we can then compile and package a new setup.exe file, and upload it to the web-server in just one step!!

The build process is of course only the final step - a number of other tools also play significant roles in creating Simple DNS Plus:

- SandDock (http://www.divelements.co.uk) - dockable/tabbed windows.
- dotTrace Profiler (http://www.jetbrains.com) - for profiling/optimizing.
- FogBugz (http://www.fogcreek.com) - for tracking bugs/ideas/suggestions.
- Axialis IconWorkshop (http://www.axialis.com) - for converting/creating Vista ready icons.
- Hexago / go6 client (http://www.go6.net) - for testing IPv6 features.
- SyncBackSE (http://www.2brightsparks.com) - for synchronizing folders and uploading websites.
- Mozy (http://www.mozy.com) - continuous remote backup of irreplaceable source files.
- Paint Shop Pro (http://www.corel.com) - my favorite imaging program.
- VMware Workstation (http://www.vmware.com) - for testing on different platforms.
- Reflector (http://www.aisto.com/roeder/dotnet) - for fine tuning .NET code.

We have tried many different tools in all these categories over the years, and I can highly recommend all of the above over any competitors that I know of.

For more on Simple DNS Plus v. 5.0 see http://www.simpledns.com/v50beta.aspx

Tags:

Simple DNS Plus | Software development

A smarter boot file for Simple DNS Plus v. 5

by Jesper 17. June 2007 02:48

Several new features in Simple DNS Plus v. 5 require a new way to store the DNS zone list on disk.

Previous versions use a standard DNS "boot" file – a plain text file listing each zone line by line.
This format is very simple for anyone to read and update, which is why we have stuck with it this long.
Version 5 however needs to store additional information for each zone and update this much more frequently, making a different storage form necessary.

All the data from the "boot" file is actually cached in memory while Simple DNS Plus is running, so theoretically we could just read in all the data at startup, update the data in memory while running, and then save it all back to a file at shutdown. Only problem is if the computer shuts down unexpectedly (looses power), then the latest changes would not be recorded, leaving a mess.
So we need an efficient way to keep a continuously synchronized copy of the data on disk.

Using a full scale database system such as MySQL or Microsoft SQL Server would be overkill for this.

I spent a few days evaluating lightweight embedded database systems (see previous blog entry), but ultimately decided that this was too slow and added too much overhead and complexity as well.

The solution I eventually came up with was a simple proprietary file structure specifically shaped around the unique data of the DNS zone list with a few design ideas borrowed from xBase.
We’ll call it the "Simple DNS Plus Zone Database" file format – or ".sdpzdb" files.
Simple DNS Plus will store the file position of each record (zone item) in memory eliminating the need for database indexes, and making updates/deletes extremely efficient.

While this provides a lot of benefits, there is one major downside; since the new file format is binary, it can’t just be opened and edited with notepad like the old "boot" file.
We believe that was an important "feature", and so we will do what we can to make it easy to work with the new format as well.

For starters we have put together a small "Zone Database Viewer" application to quickly browse the data.
This can also export the data to the old "boot" file format or a CSV file.

And we plan on providing a .NET library to access the file as a standard "system.data.DataTable" object.

One remaining issue we have to deal with is concurrent updates to the database from different processes. Both the GUI record editor module (editrecs.exe) and the main server module (sdnsmain.exe) can update the zone list – potentially at the same time.
We can solve this either by using file locks, or possibly having all updates go through the main server module. The later would turn Simple DNS Plus into a simple database server, which may open up some other interesting possibilities…
We haven’t decided which way to go just yet. 

Tags:

Simple DNS Plus | Software development

About the author

Jesper G. Høy - Professional software developer & amateur photographer. Lives in Frederikshavn, Denmark. Founder and director of JH Software

Recent posts

Recent comments

Comment RSS

At work

Visual Studio 2010

At play

My Camera

License