Saturday 28 July 2012

Forcing G.DMT Modulation on a DGN3500


ADSL2/2+ doesn't work very well for lines with high attenuation as it spreads the downstream channel across higher frequencies than those used by ADSL1.
Higher frequencies are more sensitive to attenuation than lower frequencies causing a drop in noise margin. You may see a slower sync rate or even disconnects if it's severe.

Most ISP's default to ADSL2/2+ modulation. Sky made a move to ADSL2/2+ a year or two ago and I saw a drop from 6000kbps to 3000kbps on the downstream due to it.
Luckily due to the efforts of individuals and online communities, it's possible to force the DG834GT to use ADSL1 modulation bringing back the speeds lost when using ADSL2/2+.
I bought the DGN3500 to replace the DG834GT as I needed a gigabit ethernet router & modem. After browsing the webui, telnet, GPL sources, and various forums; I concluded the DGN3500 could not have its modulation forced. Few weeks ago I decided to backup my settings and perform a factory reset on the router as a recent update botched my port forwarding settings. I noticed something in the configuration file:

[30004]"DSL Mode"=MMODE

MMODE meaning multimode. So I re-configured my router, backed up my settings to netgear.cfg, and edited that line to

[30004]”DSL Mode”=GDMT

To force ADSL1 modulation.
And it works :)

Monday 26 March 2012

Cleaning the Windows Driver Store

Starting with Windows Vista, the driver store is a trusted collection of inbox and third-party driver packages. The operating system maintains this collection in a secure location on the local hard disk. Only the driver packages in the driver store can be installed for a device.

When a driver package is copied to the driver store, all of its files are copied. This includes the INF file and all files that are referenced by the INF file. All files that are in the driver package are considered critical to the device installation. The INF file must reference all of the required files for device installation so that they are present in the driver store. If the INF file references a file that is not included in the driver package, the driver package is not copied to the store.
---

Nvidia, ATI and Intel driver packages can be a few hundred megabytes big as they are typically "unified" driver packages supporting a whole range of different devices. Additionally they release updates very often. As each driver is installed the driver store can grow to become quite large in size.

1 way to clean them is a laborious command line method which I won't talk about.
A much easier way is using this program http://driverstoreexplorer.codeplex.com/
It must be ran as Administrator to work properly.

Sunday 5 February 2012

rTorrent & Screen Upstart 1.3 (Updated)

Upstart script for rTorrent for Upstart 1.3 (and older?)
Upstart 1.4 supports setting uid and gid so we can use that instead of start-stop-daemon or sudo or su to correctly track the process id using expect daemon and tell it to send the proper kill signal (for rTorrent is SIGINT)

So what do we do for Upstart 1.3?
Well, we're forced to use either start-stop-daemon or sudo or su to start a process as another user. Even with expect daemon it always tracks the wrong process id and in my case causes shutdown to freeze as it tries to kill a process that doesn't exist.

My solution is to start a job that cleanly kills (by sending a SIGINT) rTorrent when you'd expect it to. In my case runlevels [016]

#rtorrent-start.conf

description     "rTorrent - ncurses BitTorrent client based on LibTorrent"

start on (local-filesystems and net-device-up IFACE=eth0 and runlevel [2345])
stop on runlevel [016]

console none

exec start-stop-daemon --start -c <user> --exec /usr/bin/screen -- -dmUS rtorrent /usr/bin/rtorrent
##

#rtorrent-stop.conf

description "Correctly ensure rTorrent shuts down gracefully"

start on runlevel [016]

console none
task

script
 if [ -f /home/ <user> /.rtorrent/rtorrent.lock ]; then
   kill -s 2 $(cat /home/ <user> /.rtorrent/rtorrent.lock | awk -F+ '{ print $2 }')
   rm -f /home/ <user> /.rtorrent/rpc.socket
 fi
end script
##

.lock file cleaning should be left for rTorrent as it usually removes it when correctly killed. If an old .lock file remains its a clear indicator that rTorrent did not correctly shutdown.
Won't hurt to remove the socket file though (if you use it). Saves adding it in .rtorrent.rc

UPDATE:
I've recently had some issues with UDP trackers and DHT causing some torrents to not start downloading at all even when the swarm is healthy. I've since given up on rTorrent and have started using Deluge, which is nice and compact with a sweet web gui.

Thursday 2 February 2012

Xorg modelines for LG 32LC46

Xorg modelines for LG 32LC46 as reported by its EDID because Intel can't parse the data completely (so it misses some refresh rates and resolutions). Had to plug this in to my old HTPC with an Nvidia ION to get this (with startx -- -logverbose 6)

HorizSync 28.0 - 67.0
VertRefesh 50.0 - 75.0

Modeline "1920x1080@60p" 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
Modeline "1920x1080@50p" 148.50 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
Modeline "1920x1080@30p" 89.01 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
Modeline "1920x1080@25p" 74.25 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
Modeline "1920x1080@24p" 74.16 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
Modeline "1360x768@60p" 84.75 1360 1432 1568 1776 768 771 776 798 -hsync +vsync
Modeline "1280x768@60p" 80.14 1280 1344 1472 1664 768 771 778 798 -hsync -vsync
Modeline "1280x720@60p" 74.25 1280 1390 1430 1650 720 725 730 750 +hsync +vsync
Modeline "1280x720@50p" 74.25 1280 1720 1760 1980 720 725 730 750 +hsync +vsync
Modeline "1024x768@75p" 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
Modeline "1024x768@70p" 75.00 1024 1048 1184 1328 768 771 777 806 -hsync -vsync
Modeline "1024x768@60p" 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
Modeline "800x600@75p" 49.50 800 816 896 1056 600 601 604 625 +hsync +vsync
Modeline "800x600@60p" 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync
Modeline "720x576@50p" 27.00 720 732 796 864 576 581 586 625 -hsync -vsync
Modeline "720x480@60p" 27.00 720 736 798 858 480 489 495 525 -hsync -vsync
Modeline "640x480@75p" 31.50 640 656 720 840 480 481 484 500 -hsync -vsync
Modeline "640x480@60p" 25.17 640 656 752 800 480 490 492 525 -hsync -vsync

These caused issues
Modeline "1920x1080@60i" 74.18 1920 2008 2052 2200 1080 1084 1094 1124 +hsync +vsync Interlace
Modeline "1920x1080@50i" 74.25 1920 2448 2492 2640 1080 1084 1094 1124 +hsync +vsync Interlace

EDID in hex

00ffffffffffff001e6db77576230400
0911010380462778ead9b0a357499c25
11494ba56e00314045406140d1c00101
010101010101023a801871382d40582c
4500c48e2100001e1b2150a051001e30
48883500bc862100001c000000fc0033
324c433436200a2020202020000000fd
00324b1c430f000a2020202020200166
020321f14e021101031213041405211f
202210230907078301000065030c0020
00011d00bc52d01e20b8285540c48e21
00001e011d007251d01e206e285500c4
8e2100001e011d80d0721c1620102c25
80c48e2100009e8c0ad090204031200c
405500c48e210000184e1f008051001e
3040803700bc882100001800000000bc