Atomic I/O letters column #163

Originally published 2014, in PC & Tech Authority
(in which Atomic magazine is now a section)
Reprinted here April 10, 2015
Last modified 10-Apr-2015.
 

Window droppings

Something I've always wondered but never asked about: Why do crashed programs leave trails on the desktop?

You know - either there's a window leaving overlapping copies of itself behind as you drag it around, or there's a window that's not really there any more but sort of blocks anything else from updating that area of the screen properly. I've seen this in a million versions of Windows, but I think not recently. Why does it happen?

Jere

Trail of crash windows
Thanks to mrdoob.com/lab/javascript/effects/ie6/, this computer-history landmark will never be forgotten. See also mrdoob.com/lab/javascript/effects/solitaire/!

Answer:
This has to do with the kind of "window manager" an operating system uses.

A "compositing" window manager, like the evocatively-named "Desktop Window Manager" that's been used by Windows since Vista, sits between the screen and all programs that want to display stuff on it. The manager listens to what the programs want, and to what the user is trying to do (like moving windows around, for instance). It then creates and updates the screen image based on all of that input, without being forced to do anything by anybody. The display a compositing manager creates can include fancy stuff like flip-book program switching; none of the programs need to know how to turn their window into a 3D perspective flipbook, the manager does it for them.

As long as a compositing window manager is itself healthy, no weird stuff like blank or trail-leaving windows from broken programs should make it to the monitor. It doesn't stop programs from crashing, but when a program does crash the window manager should be able to elegantly redraw that program's non-functional window in new places (and shapes, and sizes), without leaving garbage behind.

A "non-compositing" window manager, on the other hand, is the simpler kind that lets programs take care of drawing and re-drawing their windows themselves. They generally do this via functions built into the operating system - every program doesn't contain specific code for what its maximise/minimise boxes and scroll bars and so on should look like - but if you drag Program A's small window across Program B's large window, either or both of those programs and the OS functions that dumbly do their bidding have to be conscious and responding to hails. If one or more component in the screen-drawing committee isn't working, the little window won't be drawn properly, and/or the parts of the bigger window or desktop it obscured won't be re-drawn properly.

Because the whole desktop interface doesn't have any real underlying similarities with the physical-documents-on-a-physical-desktop that it's designed to resemble, broken programs and/or delinquent window managers can allow windows to leave trails, or other windows to go blank and become unmovable, or all or part of a window that's meant to be "behind" another to be visible "in front" instead. Compositing window managers, used by all of Microsoft and Apple's OSes for some time now, keep this weirdness at bay.

 

Religious conversion

I recently switched from Firefox to Chrome in Windows 7 x64 Very Professional Etc, and almost everything is fine. The only thing that is not fine is that I can't make Chrome the default browser. Whenever some piece of software tries to open something in a browser, I always get Firefox again. (Well, except for some awful business software I've got that seems to have Internet Explorer hardcoded in it, but I don't expect you to fix that. Jesus couldn't fix that.)

Everybody else seems to be able to set a damn default browser. Why can't I?

Gabriel

Answer:
Congratulations! You are not using your computer stupidly!

(Actually, there are a few other ways this could happen, but a little correspondence nailed down this cause.)

Changing the default browser is not something a standard limited Windows user account is able to do. It's a relatively minor system setting, but it's still a system setting, with significant possibilities for malicious action if it's subverted. If the currently-logged-in user account can change the default browser, then malware inadvertently run by the logged-in user can change it too, and quietly swapping in a whole monkeyed-with browser allows malware-creators some gorgeous criminal opportunities.

When you install Chrome while logged in as a restricted user rather than as an administrator, you get it installed to your own user profile, and can't set it as default.

To change this, then presuming you know the administrator login for your computer, just uninstall Chrome, then right-click the Chrome installer (the little ChromeSetup.exe program that downloads the rest of Chrome when you run it...) and select Run As Administrator, and give it the admin username and password.

Now you'll get the "normal", default-browser installation - for all user accounts - that those of us who foolishly run as admin all the time have.

 

Vivaldi = Van Halen

Some of my MP3s are quiet, and some of them are loud. I like random play for background music at home, but if I turn Albinoni up until I can hear it and Judas Priest is next in the playlist, it's... an alarming contrast.

Is there a way to iron out everything's relative loudness?

B.

Doing something awful with MP3Gain
The audiophile-practical-joke possibilities of MP3Gain have only just occurred to me.

Answer:
There are a few ways.

The generic audio-engineering term for something that smooths out volume changes is a "compressor". They're routinely used to keep the volume of radio stations steady, and to squeeze all perceptible dynamic range out of a distressing amount of modern music.

You can get compressor plug-ins for various music players. You could also batch-process all of your MP3s through a compressor in an audio-editing program like Audacity (which is free), but this is not a great idea because now they'll be compressed forever. They'll also be re-compressed, in the lossy-MP3-audio-encoding sense, inescapably losing some data. If you're making CDs to play in your car, though, compressing the audio before writing it to disc can be quite helpful.

And then there's "normalisation", which changes the maximum volume of a given audio file to a given value. Most digital popular music these days has a high maximum volume, as high as it can be set without clipping, and often a bit higher still. It's still very easy, however, to find audio files whose maximum volume is far lower than this, and if you random-play low-max-volume music along with high-max-volume music, the latter will vastly out-shout the former. Normalisation doesn't change the ratio between the volumes of the loud and the quiet parts of a given piece of music; it just sets the highest volume to a given value.

There are a couple of ways to normalise the volume of compressed-in-the-MP3-sense audio files without losing any data by recompressing it. First, there's the "ReplayGain" pseudo-standard, which adds a little data to the file header - not touching the actual audio - which tells compatible players how much to turn the volume up, or down, for that file. There's also MP3Gain, which does modify the data but in a lossless, perfectly reversible way, and which has a clever overall-loudness algorithm that figures out how much you can boost each individual file, or all the files that make up an album or symphony, without any chance of distortion.

That last situation - albums and symphonies - is the only good reason not to MP3Gain your whole MP3 library. If you've got a symphony, say, with a loud first movement and a quiet second and a loud third, and they're all in one audio file, then normalising it won't make the volume ratios any different. The different movements of a symphony are often encoded into separate audio files, though, and blindly normalising all of them will then make the quiet movement much closer in volume to the loud ones. Some people don't mind this at all, and it remains a good idea for listening in places with lots of background noise - while jogging, or in the car, say. But if you want to normalise audio without losing the intended volume contrast between separately-encoded parts of one overall piece of music, you have to use something like MP3Gain that can normalise them all together.

 

Don't worry, it's supposed to smoke

I have a shiny new GeForce 770, replacing poxy onboard graphics. I have discovered that the 770 needs a couple of extra power plugs to run it, which my computer's 500W PSU does not provide. I've got several spare 4-pin drive power plugs, though, and you can get cheap adapters that can turn drive power plugs into all of the special video power plugs.

I am clever enough to buy and plug in those adapters. I am also clever enough to know that those adapters do not magically make my PSU actually able to provide enough power to run this card the size of a skateboard. Is it acceptable to give it a try and buy a new PSU if the old one doesn't cut it, or is this likely to blow something up?

Finn

Answer:
Yes, it is possible to damage the PSU, the video card, or various other components by overstressing your power supply. What will probably happen if the PSU isn't up to the task, though, is just that the computer will hang, or the PSU will turn itself off.

The full Thermal Design Power for a GeForce GTX 770 is 230 watts, and there are factory-overclocked versions that can draw more. The PC PSU market is also hideously debased. Off-brand PSUs are commonly rated completely fictitiously, and even brand-name units are not necessarily able to reliably deliver their full rated current on any rail.

(Note that the Thermal Design Power is the most power a device can be expected to draw over any length of time; it's the amount of heat from that device that the cooling system has to be able to handle. Peak power consumption can be higher, and real-world power consumption is often quite a bit lower. When you're just using 2D desktop applications, all 3D-accelerated graphics cards will consume far less than their TDP.)

A new, real 500W PSU will probably be OK with your new video card, provided you don't have a fire-breathing overclocked CPU to run at the same time. Most cheap PSUs with a "500W" sticker on them will not be good enough, though. Any proper brand-name PSU from 500 watts on up should come with the PCIe power plugs natively hanging off it.

PSUs with enormous capacity have existed since before PCIe did, though; if you've got an old PSU with, say, a genuine 750-watt rating, then adapting its drive plugs into PCIe power plugs may work fine. Especially if you use one of the adapter cables that has two "Molex" sockets leading to just one four- or six-pin video-card power plug. Those adapters cost about the same approximately nothing as do adapters with only one Molex socket.

 

CCed to Child Protective Services

So my delectable kid just kept herself silently busy for a while jamming a pen into the vent hole in the side of my laptop, which offers direct access to the thin copper fins of the heat sink. The part of the heat sink visible through the vent now looks like a forest that several tanks have driven through.

When I have finished drowning my daughter in the toilet, is there any chance that I can just straighten the fins out again and be OK?

Ellie

Answer:
Yeah, you'll probably get away with that. The fin-straightening, I mean, not the infanticide.

Laptop heat-sinks are often on the end of a heat pipe, a sealed tube containing a liquid that boils at the hot end, on the chips in the middle of the computer, and condenses at the cool end, where the heat-sink and fan are, taking the heat with it. If the tube is ruptured, the heat transfer won't work any more and your laptop will run hot.

(Modern auto-throttling CPUs can often survive with this sort of reduced cooling. if you're not stressing the computer, then even if its cooling is horribly compromised, it'll probably still be OK running at its minimum possible clock speed. It is also possible to inexpensively purchase replacement heat-pipes and cooling fans for many laptops - people on eBay sell parted-out laptops all the time, and those second-hand parts are usually fine. A laptop with dead fan bearings that sound as if they're grinding coffee can probably be brought back to full functionality, if you've got a few basic hand tools and a downloaded service manual. It can be quite easy to replace your laptop's cooling components, or... not.)

Fortunately, it's not easy to damage a laptop heat pipe without dismantling or grossly damaging the laptop itself. So your problem is probably limited to the bent fins. You may even be able to get them acceptably straight again without taking the laptop apart, by levering them back with a paring knife or nail file. The heat sink probably won't be a lot longer than it's wide, though, so take care not to stab right through the heat sink and further into the innards of the computer.

 

Other letters columns

I/O #1
I/O #2
I/O #3
I/O #4
I/O #5
I/O #6
I/O #7
I/O #8
I/O #9
I/O #10
I/O #11
I/O #12
I/O #13
I/O #14
I/O #15
I/O #16
I/O #17
I/O #18
I/O #19
I/O #20
I/O #21
I/O #22
I/O #23
I/O #24
I/O #25
I/O #26
I/O #27
I/O #28
I/O #29
I/O #30
I/O #31
I/O #32
I/O #33
I/O #34
I/O #35
I/O #36
I/O #37
I/O #38
I/O #39
I/O #40
I/O #41
I/O #42
I/O #43
I/O #44
I/O #45
I/O #46
I/O #47
I/O #48
I/O #49
I/O #50
I/O #51
I/O #52
I/O #53
I/O #54
I/O #55
I/O #56
I/O #57
I/O #58
I/O #59
I/O #60
I/O #61
I/O #62
I/O #63
I/O #64
I/O #65
I/O #66
I/O #67
I/O #68
I/O #69
I/O #70
I/O #71
I/O #72
I/O #73
I/O #74
I/O #75
I/O #76
I/O #77
I/O #78
I/O #79
I/O #80
I/O #81
I/O #82
I/O #83
I/O #84
I/O #85
I/O #86
I/O #87
I/O #88
I/O #89
I/O #90
I/O #91
I/O #92
I/O #93
I/O #94
I/O #95
I/O #96
I/O #97
I/O #98
I/O #99
I/O #100
I/O #101
I/O #102
I/O #103
I/O #104
I/O #105
I/O #106
I/O #107
I/O #108
I/O #109
I/O #109
I/O #110
I/O #111
I/O #112
I/O #113
I/O #114
I/O #115
I/O #116
I/O #117
I/O #118
I/O #119
I/O #120
I/O #121
I/O #122
I/O #123
I/O #124
I/O #125
I/O #126
I/O #127
I/O #128
I/O #129
I/O #130
I/O #131
I/O #132
I/O #133
I/O #134
I/O #135
I/O #136
I/O #137
I/O #138
I/O #139
I/O #140
I/O #141
I/O #142
I/O #143
I/O #144
I/O #145
I/O #146
I/O #147
I/O #148
I/O #149
I/O #150
I/O #151
I/O #152
I/O #153
I/O #154
I/O #155
I/O #156
I/O #157
I/O #158
I/O #159
I/O #160
I/O #161
I/O #162
I/O #163
I/O #164
Dan's Data letters #1
Dan's Data letters #2
Dan's Data letters #3
Dan's Data letters #4
Dan's Data letters #5
Dan's Data letters #6
Dan's Data letters #7
Dan's Data letters #8
Dan's Data letters #9
Dan's Data letters #10
Dan's Data letters #11
Dan's Data letters #12
Dan's Data letters #13
Dan's Data letters #14
Dan's Data letters #15
Dan's Data letters #16
Dan's Data letters #17
Dan's Data letters #18
Dan's Data letters #19
Dan's Data letters #20
Dan's Data letters #21
Dan's Data letters #22
Dan's Data letters #23
Dan's Data letters #24
Dan's Data letters #25
Dan's Data letters #26
Dan's Data letters #27
Dan's Data letters #28
Dan's Data letters #29
Dan's Data letters #30
Dan's Data letters #31
Dan's Data letters #32
Dan's Data letters #33
Dan's Data letters #34
Dan's Data letters #35
Dan's Data letters #36
Dan's Data letters #37
Dan's Data letters #38
Dan's Data letters #39
Dan's Data letters #40
Dan's Data letters #41
Dan's Data letters #42
Dan's Data letters #43
Dan's Data letters #44
Dan's Data letters #45
Dan's Data letters #46
Dan's Data letters #47
Dan's Data letters #48
Dan's Data letters #49
Dan's Data letters #50
Dan's Data letters #51
Dan's Data letters #52
Dan's Data letters #53
Dan's Data letters #54
Dan's Data letters #55
Dan's Data letters #56
Dan's Data letters #57
Dan's Data letters #58
Dan's Data letters #59
Dan's Data letters #60
Dan's Data letters #61
Dan's Data letters #62
Dan's Data letters #63
Dan's Data letters #64
Dan's Data letters #65
Dan's Data letters #66
Dan's Data letters #67
Dan's Data letters #68
Dan's Data letters #69
Dan's Data letters #70
Dan's Data letters #71
Dan's Data letters #72
Dan's Data letters #73
Dan's Data letters #74
Dan's Data letters #75
Dan's Data letters #76
Dan's Data letters #77
Dan's Data letters #78
Dan's Data letters #79
Dan's Data letters #80
Dan's Data letters #81
Dan's Data letters #82
Dan's Data letters #83
Dan's Data letters #84
Dan's Data letters #85
Dan's Data letters #86
Dan's Data letters #87
Dan's Data letters #88
Dan's Data letters #89
Dan's Data letters #90
Dan's Data letters #91
Dan's Data letters #92
Dan's Data letters #93
Dan's Data letters #94
Dan's Data letters #95
Dan's Data letters #96
Dan's Data letters #97
Dan's Data letters #98
Dan's Data letters #99
Dan's Data letters #100
Dan's Data letters #101
Dan's Data letters #102
Dan's Data letters #103
Dan's Data letters #104
Dan's Data letters #105
Dan's Data letters #106
Dan's Data letters #107
Dan's Data letters #108
Dan's Data letters #109
Dan's Data letters #110
Dan's Data letters #111
Dan's Data letters #112
Dan's Data letters #113
Dan's Data letters #114
Dan's Data letters #115
Dan's Data letters #116
Dan's Data letters #117
Dan's Data letters #118
Dan's Data letters #119
Dan's Data letters #120
Dan's Data letters #121
Dan's Data letters #122
Dan's Data letters #123
Dan's Data letters #124
Dan's Data letters #125
Dan's Data letters #126
Dan's Data letters #127
Dan's Data letters #128
Dan's Data letters #129
Dan's Data letters #130
Dan's Data letters #131
Dan's Data letters #132
Dan's Data letters #133
Dan's Data letters #134
Dan's Data letters #135
Dan's Data letters #136
Dan's Data letters #137
Dan's Data letters #138
Dan's Data letters #139
Dan's Data letters #140
Dan's Data letters #141
Dan's Data letters #142
Dan's Data letters #143
Dan's Data letters #144
Dan's Data letters #145
Dan's Data letters #146
Dan's Data letters #147
Dan's Data letters #148
Dan's Data letters #149
Dan's Data letters #150
Dan's Data letters #151
Dan's Data letters #152
Dan's Data letters #153
Dan's Data letters #154
Dan's Data letters #155
Dan's Data letters #156
Dan's Data letters #157
Dan's Data letters #158
Dan's Data letters #159
Dan's Data letters #160
Dan's Data letters #161
Dan's Data letters #162
Dan's Data letters #163
Dan's Data letters #164
Dan's Data letters #165
Dan's Data letters #166
Dan's Data letters #167
Dan's Data letters #168
Dan's Data letters #169
Dan's Data letters #170
Dan's Data letters #171
Dan's Data letters #172
Dan's Data letters #173
Dan's Data letters #174
Dan's Data letters #175
Dan's Data letters #176
Dan's Data letters #177
Dan's Data letters #178
Dan's Data letters #179
Dan's Data letters #180
Dan's Data letters #181
Dan's Data letters #182
Dan's Data letters #183
Dan's Data letters #184
Dan's Data letters #185
Dan's Data letters #186
Dan's Data letters #187
Dan's Data letters #188
Dan's Data letters #189
Dan's Data letters #190
Dan's Data letters #191
Dan's Data letters #192
Dan's Data letters #193
Dan's Data letters #194
Dan's Data letters #195
Dan's Data letters #196
Dan's Data letters #197
Dan's Data letters #198
Dan's Data letters #199
Dan's Data letters #200
Dan's Data letters #201
Dan's Data letters #202
Dan's Data letters #203
Dan's Data letters #204
Dan's Data letters #205
Dan's Data letters #206
Dan's Data letters #207
Dan's Data letters #208
Dan's Data letters #209
Dan's Data letters #210



Give Dan some money!
(and no-one gets hurt)