Thursday 2 June 2016

KFA2 Geforce 1080 on Asus Sabretooth P67

I'm running a Asus Sabretooth p67 motherboard with the latest BIOS @3602. After installing my KFA2 Geforce 1080, it'll freeze on the BIOS screen and boot won't progress. Keyboard is also unresponsive.

After some tinkering with it, I noticed in the changelog for BIOS 3602
"4. Fixed Nvidia GTX 680 hang when runing with UEFI driver."

Thinking the 1080 might be affected by this bug, entering the BIOS and changing "PCI ROM Priority" to "Legacy ROM" fixes this issue.

Note that changing this while using the RAID functionality might cause your machine to become un-bootable until you revert the setting back. I hear the EFI RAID ROM uses different drivers. You might need to reinstall the OS.

So it sounds like newer graphics cards these days have both an EFI and "Legacy" ROM on them. Only difference noticed so far is that I don't get a higher resolution on the POST screen. My 580 didn't have an EFI ROM.

Hope this helps someone out there.

Saturday 30 March 2013

Tiny Tiny RSS init.d Script

Shamelessly taken from
http://tt-rss.org/forum/viewtopic.php?f=16&t=1135&start=15#p14282

I've finally switched to an upstart script for booting tt-rss with some minor modifications to create a lock folder before starting the service.

description "TT-RSS Feed Updater"
author "The Epyon Avenger <epyon_avenger on TT-RSS forums>"

start on started mysql
stop on stopping mysql

respawn

pre-start script

        if [ ! -d "/var/lock/tt-rss/" ]; then
                # be sure there is a /var/lock/tt-rss, even with tmpfs
                mkdir --mode 750 --parents /var/lock/tt-rss/
                chown www-data:www-data /var/lock/tt-rss/
        fi

end script


setuid www-data
setgid www-data

chdir /opt/tt-rss


exec php ./update_daemon2.php

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

Wednesday 28 December 2011

XBMC with External FFMPEG

I used to do this awhile ago on my HTPC. Its pretty slow building XBMC on an Atom CPU. I gave up building my own builds because I ended up running in to problems (segfaults etc). When I installed 10.04 I decided I didn't want to install various build dependencies and libraries on my HTPC
Now I want Hi10P support on XBMC. An XBMC build compiled to use external FFmpeg libraries is the only way to achieve that until XBMC developers update the internal libraries (due after Eden apparently)
I now build XBMC and FFmpeg in a VM using VMware Player (which features (since version 3.0) the ability to create new virtual machines YAY!). Configure switches have been customised for myself. YMMV.

XBMC Dependencies
sudo apt-get install git-core make g++ gcc gawk pmount libtool nasm yasm automake cmake gperf zip unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound2-dev python-sqlite libglew-dev libcurl3 libcurl4-gnutls-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbisenc2 libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libenca-dev libxt-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate-dev libmpeg3-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libmpeg2-4-dev libmicrohttpd-dev libmodplug-dev libssh-dev gettext cvs python-dev libyajl-dev libboost-thread-dev libplist-dev libudev-dev


Necessary for VAAPI
sudo apt-get install libva-dev


FFMpeg Dependencies
sudo apt-get install build-essential checkinstall git libx11-dev libxfixes-dev zlib1g-dev


Building FFMpeg
git clone --depth 1 -b release/0.9 git://source.ffmpeg.org/ffmpeg

./configure --disable-static --disable-debug --cpu=sse3 --target-os=linux --disable-muxers --enable-muxer=spdif --enable-muxer=adts --disable-encoders --enable-encoder=ac3 --enable-encoder=aac --disable-decoder=mpeg_xvmc --disable-devices --disable-ffprobe --disable-ffplay --disable-ffserver --disable-ffmpeg --enable-shared --disable-doc --enable-postproc --enable-gpl --enable-nonfree --enable-version3 --disable-vdpau --enable-pthreads --enable-pic --enable-hardcoded-tables --disable-demuxer=oss --disable-demuxer=jack --disable-muxer=oss --disable-demuxer=v4l --disable-demuxer=v4l2 --disable-altivec --disable-neon --disable-amd3dnow --disable-amd3dnowext --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-armvfp --disable-iwmmxt --disable-mmi --disable-vis --disable-dxva2 --enable-sram --disable-bsfs --enable-vaapi --disable-vda --disable-w32threads --disable-os2threads --disable-safe-bitstream-reader

make
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(./version.sh)" --backup=no --deldoc=yes --default
sudo ldconfig


Building XBMC
git clone git://github.com/xbmc/xbmc.git

sudo apt-get install libbluray rtmpdump

./configure --disable-debug --enable-vaapi --disable-crystalhd --disable-vdadecoder --disable-vtbdecoder --disable-openmax --disable-joystick --disable-rsxs --disable-projectm --disable-ccache --disable-pulse --enable-rtmp --disable-samba --disable-nfs --disable-afpclient --disable-airplay --disable-airtunes --disable-hal --disable-avahi --disable-webserver --enable-libbluray --disable-libusb --disable-libcec --disable-vdpau --enable-external-ffmpeg

make
sudo checkinstall --pkgname=xbmc --pkgversion="`date +%Y%m%d%H%M`-git" --backup=no --deldoc=yes --default

Updated:
Move to VAAPI and updated FFmpeg Git URL for 0.9 branch. Ubuntu 10.11