Information wants to be free...

Dell 2005FPW Display Resolution Fix

I have an old Dell 2005FPW LCD display from around 2005. I had some problems getting this to display the native 1680x1050 resolution in Linux. Instead it would always want to display 1280x1024, and everything would look ugly. The cause of this seems to be bad EDID data being sent by the monitor, because I managed to fix it by manually creating a EDID firmware file with a resolution of 1680x1050 and the refresh rate forced to 59Hz, instead of the more common 60Hz.

There is a nice piece of software here on GitHub to create EDID firmware files from X modeline configuration. I used this together with this handy Online modeline generator.

Here is the modeline generated from the online tool:

# 1680x1050 @ 59.00 Hz (GTF) hsync: 64.07 kHz; pclk: 144.55 MHz
Modeline "1680x1050_59.00" 144.55 1680 1784 1968 2256 1050 1051 1054 1086 -HSync +Vsync

I had to trim away the excess ".00" from the string, or else the EDID firwmare file would be too big, 131 bytes instead of 128 bytes, so this should be the actual input to the 'modeline2edid' tool in the EDID generator package:

Modeline "1680x1050_59" 144.55 1680 1784 1968 2256 1050 1051 1054 1086 -HSync +Vsync

For reference, here is a hexdump of the newly created EDID firmware:

00000000  00 ff ff ff ff ff ff 00  31 d8 00 00 00 00 00 00  |..1......|
00000010  05 16 01 03 6d 2b 1b 78  ea 5e c0 a4 59 4a 98 25  |....m+.x^YJ.%|
00000020  20 50 54 00 00 00 b3 00  01 01 01 01 01 01 01 01  | PT............|
00000030  01 01 01 01 01 01 77 38  90 40 62 1a 24 40 68 b8  |......w8.@b.$@h|
00000040  13 00 b5 11 11 00 00 1e  00 00 00 ff 00 4c 69 6e  |...........Lin|
00000050  75 78 20 23 30 0a 20 20  20 20 00 00 00 fd 00 3b  |ux #0.    ....;|
00000060  3d 3f 41 0f 00 0a 20 20  20 20 20 20 00 00 00 fc  |=?A...      ...|
00000070  00 31 36 38 30 78 31 30  35 30 5f 35 39 0a 00 e1  |.1680x1050_59..|

The file needs to be loaded by putting it in /lib/firmware/edid/ and adding this to the Linux boot kernel parameters:


After this, the resolution became correct in both the framebuffer console and X on the computer where I use this LCD display. The computer has a NVIDIA GeForce FX 5200 graphics gard with the "nouveau" driver in use.

Topic: Configuration, by Kjetil @ 02/04-2020, Article Link

NCR System 3330 Dallas RTC Mod

The Dallas DS12887 RTC inside my NCR System 3330 PC had died a long time ago. Unfortunately, this made the machine unbootable from the hard drive, since it would forget the hard drive settings on each restart. Instead of finding a replacement, like for the Commodore PC 30-III, I opted for the external battery modification instead. I got this working with just two regular AA 1.5V alkaline batteries, a huge success!

The initial error on every startup was as follows:

NCR Battery Power Lost

Fortunately, the Dallas RTC is a in a socket on this machine, easily extracted:

NCR Dallas RTC Extracted

To perform the mod, two sections of the case needs to be opened, which I did with a Dremel tool:

NCR Dallas RTC Dremeled

Afterwards, it's possible to solder on leads for a new battery:

NCR Dallas RTC with new battery leads

I installed a new 2xAA battery holder inside the case, connected to the RTC:

NCR Dallas RTC external battery

The machine is now working again, settings can be saved to CMOS and booting from hard drive is possible:

NCR Powered On

Topic: Repair, by Kjetil @ 14/03-2020, Article Link

Reverse SSH Tunnel Listener

The Reverse SSH Tunnel Launcher script I posted a while ago has some limitations. The worst part is that the tunnel is only open for 5 minutes, leaving too little time to get any work done. This is kind of by design, to prevent having these connections open and "live" when not in use.

The solution to this limitation is another small script, this time just hacked together as a Bourne shell script. Take a look:


while /bin/true; do
  if /bin/netstat -tln | fgrep > /dev/null; then
    ssh localhost -p 1337 screen -d -m ssh -v -R 1338:localhost:22 -N -p 22
    echo "New tunnel established!"
  sleep 10

This script will loop forever and wait for a socket to appear on the port (1337) opened by the original launcher. Once this happens, a new tunnel is created (on port 1338) in parallel which will persist forever through a screen session.

Topic: Scripts and Code, by Kjetil @ 02/02-2020, Article Link


This is a game project I have had lying around for many years, which I finally made into something usable. The initial idea was to make a side-scroller using the SDL library, and the project codename was "Strawman", so that just became the title as well.

The end result is a highly configurable yet simple game. The map data is stored in a text file and can be easily changed. The "game engine" itself is configured through a bunch of #define macros.

Here's a screenshot:

Strawman screenshot

And the corresponding part of the map data, rotated by 90 degrees on purpose, so adding more lines makes the map longer horizontally:

# P
###  #  CCC
###  #E CCC
###  #  CCC

        # CC
#       # CC
##      # CC

The source code is released under the MIT license and can be downloaded here.

Topic: Open Source, by Kjetil @ 01/01-2020, Article Link