All my geeky stuff ends up here. Mostly Unix-related

Archive for the ‘windows’ Category

Windows 7 network disconnections

with one comment

Problem: I have a Dell laptop under Windows 7 connected to a GBit LAN. The network link keeps disconnecting as soon as I leave the machine unattended for more than 10-15 minutes. This breaks down all connected network shares, running downloads, connected IM sessions. It also happens during Webex conf calls, Skype sessions, or any other activity during which I am actively using the computer but not touching any input device.

Re-connecting to the network takes about 30-60 seconds, time enough for the other connecting party to leave the conf call wondering why I shut them down.

After about a month of trial-and-error it seems I finally found a working solution, documented below in hope it might be useful to somebody else.

Attempt #1: change energy settings

If you leave a Windows box unattended for long enough everything shuts down on its own, especially on laptops. Editing power saving settings seemed like a first thing to do.

    Control Panel
        Hardware and Sound
            Power Options
                Edit Plan Settings

Switching to “Never go to sleep” did not have the intended effect: the machine effectively stayed awake but network was still lost. The only way I found to maintain Webex sessions alive was to random-click around in the browser to call up web pages and cause network activity.

Attempt #2: blame the network

Asked network admins about potential issues: seemed I was the only one suffering from random disconnections. Back to Windows.

Attempt #3: change network adapter settings

A copious amount of googling unearthed the fact that no matter what you choose for Power Plan Settings, a network card can still be turned off by the OS when it decides to. The only way to change that is to modify power management settings directly on network interfaces:

Open Network and Sharing Center
    Local Area Connection
            Configure (top-right)
                Power Management
                    [ ] Allow the computer to turn off this device to save power

Still no joy.

Attempt #4: update network card drivers

This is Windows after all: the first thing you do when you have issues is reboot the machine and if it was not fixed, update all your drivers.

Dell laptops have interesting stories to tell about drivers: there are the ones you find on Microsoft through Windows Update, and a whole other bunch available on Dell’s web site. That is: if you are patient enough to click through millions of pages designed as an incredible maze of incomprehensible references, dead links and serial numbers.

According to Windows all card drivers are up-to-date, which pushed me onto Dell’s web site for further software. Abandon all hope, ye who enters here.

Attempt #5: look for dedicated software from Dell

Couple of hours spent on the site entering serial numbers, downloading files named like A12017402941.exe in large quantities, installing them, rebooting the machine, to no avail. The laptop got a boatload of crapware installed but network still failed after a random interval between 10 and 15 minutes.

Attempt #6: mess up network settings

Turned off IPv6, switched the address to fixed vs DHCP, changed DNS servers, started/stopped Internet sharing, all of the above one by one and then together. These had no effect whatsoever.

Attempt #7: keep pinging

Will it change with constant network activity? I wrote a short Python script to ping a remote server every ten seconds and left it to run in background. Still no joy. It seemed the only way to keep things alive was to animate input devices, and I refused to resort to Fischer-Price technologies.

Attempt #8: fix autodisconnect in registry

More googling, more information about the mysteries of Windows network configuration. Found on Microsoft support site: fire up regedit and change the key in


Key name is autodisconnect, set by default to 15 minutes. Changed it to 65535 (0000ffff) seconds. It can also be temporarily changed from command-line by issuing:

net config server /autodisconnect:-1

It kinda worked for a couple of hours, and then not. Back to square one.

Attempt #9: voodoo

Still found on Google: somebody reported getting less trouble by changing a network card parameter you would normally never touch. Why not?

Open Network and Sharing Center
    Local Area Connection
                    Property: Link Speed & Duplex

Change value from Auto Negotiation to something corresponding to your LAN capabilities, e.g. 1.0 Gbps Full Duplex for a Gbit local network.

The network stopped disconnecting at that point. I have absolutely no idea which parameter or combination thereof changed this behaviour, but I can also safely say I do not give a damn as long as it works.

Written by nicolas314

Tuesday 22 May 2012 at 11:35 pm

My Windows boxes are self-upgrading machines

leave a comment »

About a year ago I bought a desktop machine for my son. I wanted something powerful enough for him to browse the web, read his e-mail, use gtalk, manage his music collection on his iPod and type documents for school work.  No need for games, we have another PC dedicated for the task. I purchased a Zotac box with an Atom processor and 1Gb of RAM, everything integrated and completely noiseless, for a bit less than 200 euros.

Most importantly, I wanted to spend the least amount of time doing sysadmin on his desktop so I naively decided to give Windows 7 a try. Little did I know…

Installing Win7 on the box was quite painless. The trouble began immediately after it got connected to the Net. “Windows is downloading updates” would take pretty much all CPU, RAM and bandwidth available, to the point that the mouse would hardly respond at all. I disabled every possibly useless service, removed disk indexing, disabled Aero, but the damn thing was still crunching updates full time for about an hour every time we would switch it on. Starting up iTunes would require a full 10 minutes of waiting and it was impossible to listen to music while managing an attached iPod.

We survived like this for about a year. Once a week, I would switch on the PC early in the evening and let it run its upgrade dance until late at night.  Since it was pretty much impossible to do anything else but watch the progress bars move slowly there was no point in being in front of the screen anyway.

Recently, Windows updates got to the point that I would need to leave the machine on for a full night to get it upgraded. But what really got me was the fact that after installing 36 new updates and a reboot, another 32 updates were waiting for installation, followed by a reboot, and then some more updates. And sometimes everything halted with a happy message congratulating me for having purchased a Microsoft mouse and please click Ok to continue with the zillion more updates, or asking me to confirm that the program “Windows update” was allowed to bring modifications to the system.

I wiped the disk off last week-end and installed Ubuntu. Things fly. My son’s iPod is completely managed and we can finally do something with the box. And it is a pretty fast desktop too!

Ok so that box was not spec’d enough for Windows 7? Interestingly I got the same story with our gaming PC: a one-year old quad-core machine with 4Gb RAM and a fast disk, which took a full night to update itself in several steps (reboot, click “yes” once in a while, reboot, wait). And of course the same story on a Windows 7 Virtual Machine I use at work, after which I completely disabled Windows updates.

Seems we have reached quite an extreme there. At any given point my Mac is reporting a Google daemon looking for updates to Google Earth and Chrome, an Apple daemon for iTunes, Safari and Quicktime, a Java daemon, a Blackberry daemon, an Adobe daemon, in addition to regular OS updates. We have reached the point where the only possible work you can do on these machines is sit down and look, and you cannot even leave the room! Everything stops at random intervals to ask you for a damn click.

From a security point of view I can only wholeheartedly agree with automatic updates, but going back one step I realize this is getting ridiculous. Did I really buy so many computers to dedicate them to maintaining themselves? Somehow it reminds me of the most useless machine ever.

I would not mind if this was limited to Windows but my Android smartphone can be quite a pain in the butt too, with daily update downloads running around 20-30 megs on average and a frozen phone for 10 minutes afterwards.  Did I mention my Mac ate more than a Gb of updates from Apple last week?

Good thing I am not running Debian unstable on my desktop anymore.


Written by nicolas314

Tuesday 28 June 2011 at 12:03 am

Open Windows, throw Mobile

leave a comment »

Windows Mobile device

Open Windows, throw Mobile

Today I was reminded that Windows Mobile is a disaster and switching on such a device can be a real pain.

I just wanted to check a feature on a Windows Mobile phone and retrieved the only one I have, hidden under several aging layers of lint in my bottow drawer. Battery is empty of course: I plug it into the charger, wait for a couple of minutes and switch it on. About 10 seconds later the damn thing starts making the loudest noises you could possibly imagine, mixing various alarms, emitting at full power without pausing. In a state of panic I start pushing all buttons randomly (everything that looks red), selecting menus, then pulling off the plug but nothing changes. The damn thing is still yelling at the top of its lungs and everybody in the office is converging towards me, wondering if this is a fire alarm or just a bad prank.

After twiddling with the controls for an eternity and resisting the urge to tear out the battery, the damn stuff finally stops… and starts again five minutes later. More panic, more frantic button-twiddling, and finally silence.

Looking up through the menus showed that the phone was programmed to deliver a daily alarm every day at 7.15am. The phone had not been turned on in more than a year and was dutifully delivering them all as soon as it got an opportunity to do so. I had to manually dismiss all alarms, deprogram the daily ring and switch off all sounds just to be sure this would never happen again.

Not just a question of bad software design. How could someone possibly program an alarm clock that catches up on alarms in the past? The sheer incompetence and lack of quality control that came with this software is just unbelievable.

I have to admit the phone itself looks like a joke: a tiny screen trying to faithfully reproduce a Windows XP home screen (and miserably failing at that, of course), a tiny keyboard boastering 5 switches per key in the most unconventional places, and abysmal usability in general. Typing a URL on this takes 5-15 minutes on average (for short URLs). The poor device dates from a time when it was obvious to everyone that Windows had won the war on smartphones without it ever being fought, like it had for desktops. Apple’s large R&D efforts on the iPhone showed the world that nothing replaces true engineering.

And yet the device is just 3 years old. Funny how fast things can change.

Written by nicolas314

Friday 25 February 2011 at 11:27 am

The upgrade disease

with one comment

It is getting harder and harder to simply use a computer due to a spreading disease that unfortunately affects all OS’s and major pieces of software: the upgrade disease.

Windows: at any moment there are countless processes living just for the sake of checking whether a piece of software is up-to-date or not. Last time I checked on a Windows box I saw:

  • Java update scheduler
  • Google update
  • Apple update
  • Blackberry software update

Cumulated, these processes use up to 100 Mbytes of memory and probably other resources like file descriptors and sockets, and of course CPU time. Most of them come with no option to turn off automatic updates and when they do, the update process may still live on but do nothing (looking at you, Java).

Windows update is also running in background at regular intervals, usually choosing the worst moment to interrupt my work. When it starts I can safely assume I will not be able to do anything on my PC for 15-60 minutes and will have to reboot one or more times. Oh joy!

Ubuntu runs UpdateManager at regular intervals too. Things would be fine if this bloody application did not use modal windows and steal my focus while I am typing something on a terminal. Half of the time I just happen to be hitting the Return key at the precise moment when the window appears, unwillingly triggering the upgrade process. CPU and network usage after that are just unbearable. I usually take a break at that point.

OSX is a bit friendlier: the upgrade manager pops up at some point asking for permission to install stuff and warning you when you need a reboot afterwards — at least the window is not modal. When you finally decide to run the upgrade you have to agree to endless pages of unlegible end-user license agreements for a frigging mp3 reader that you already bought with
the OS a few months back.

On Windows the situation is even worse if you take into account the inevitable anti-virus that continuously runs in background, keeping the CPU hot and eating away memory. I had at some point a corporate XP laptop running the IT-blessed anti-virus tools with such efficiency that it was just impossible to do anything else but watch the machine scan its disks
full-time. Remind me: why did I ask for a PC, again?

At some point it would be great to remind our friendly OS makers that some users care about actually doing something with their computers. Software developers: if you ever plan to add an auto-update feature on your code, try following these:

  • Do not impose a perpetually running process running in background just for updates. There are cron jobs for that kind of things. You could also check for newer versions when explicitly asked by the end-user.
  • Do not assume that because your software can find an Internet connection you are allowed to go download on your own several hundred megabytes of software upgrade. Sometimes I like to do something else with my bandwidth.

Eating away resources in background without notifying the user or even offering them some opt-out box is just plain rude. This is similar to a default Windows feature call pre-fetching where the OS thinks it is smart to start as many application as possible after booting, just in case the user chooses to run one. It took me easily 15 minutes after bootup of my XP laptop to be able to actually start doing stuff with it. The pre-loading of most commonly used applications had saturated memory (2Gb!!) and slowed everything to a crawl.

One last point about updates: I declare I have the right to refuse upgrading a piece of software. Upgrading vital pieces of software may just break something and I may not be interested in spending the rest of the day finding out how to repair it. The endless update and reboot reminders on Windows are driving me nuts.

Written by nicolas314

Sunday 17 October 2010 at 7:27 pm

Posted in osx, Ubuntu, windows

Tagged with