Thursday, August 30, 2007

channels.conf for Hotbird

This channels.conf file has a channel for most of the transponders (is that the right word) on Hotbird (13 East). I import this in to MythTV then do a "Full scan of all transponders" and that loads in a bunch of channels.

Mediatel:10949:v:0:27500:5001:5011:7401
Tele Lumiere:10949:v:0:27500:5101:5111:7402
Adjara TV:10949:v:0:27500:5401:5411:7405
Suryan Radio:10949:v:0:27500:0:5711:7448
IRN:10949:v:0:27500:0:5811:7449
Sun KTV:10949:v:0:27500:5901:5911:7450
ANB:10949:v:0:27500:6101:6111:7452
Sun TV +442083356780:10949:v:0:27500:6401:6411:7455
Al Mustakillah:10949:v:0:27500:6501:6511:7456
Cartoon Network:10949:v:0:27500:6601:6611:7457
DMC TV:10949:v:0:27500:6801:6811:7459
Prime TV:10949:v:0:27500:7001:7011:7461
Tapesh 2:10949:v:0:27500:7101:7111:7462
IRIB:12437:h:0:27500:7901:7901:7901
AlJameela:11013:h:0:27500:355:611:1379
AlJazeeraEng:11034:v:0:27500:1714:1420:1430
MITV:11054:h:0:27500:8025:57:58
Pentagon:11096:h:0:27500:8:810:800
ArianaAfgan:11117:v:0:27500:14612:7101:7111
ANN:11137:h:0:27500:7324:3524:3644
AlJazSport:11179:h:0:27500:4910:5303:5304
AlJazKids:12558:v:0:27500:9362:2821:2822
BBCWorld:12597:v:0:27500:8204:163:92:
AldiyarSat:10723:h:0:29900:4623:1010:1210
AlHiwar:10949:v:0:27500:7456:6501:6511
BBCWorld2:11334:h:0:27500:5:516:690
IPN:11411:h:0:27500:14206:2942:2947
BBCWorld3:11431:v:0:27500:25:516:690
OmidEIran:11470:v:0:27500:10:257:260
OmanTV:12654:h:0:27500:7:1760:1720
Med1Sat:12673:v:0:27500:8:2050:2051
BBCArabic:11727:v:0:27500:13919:6781:6782
DubaiTV:11747:h:0:27500:9501:4130:4131
IqraaTV:12015:h:0:27500:474:520:730
CCTV4:12149:v:0:27500:7224:224:225
CCTV4Test:12169:h:0:27500:355:516:690
Kurdsat:12207:h:0:27500:116:1151:1152
AlHurra:12225:v:0:27500:190:5060:5020
VOA:12225:v:0:27500:295:4760:4720
AbuDhabiTV:12380:v:0:27500:3004:3024:3034
AlAlam:12437:h:0:27500:7915:165:90

MythTV .xsession and irxevent file for Myth

By now I'm sure my imaginary reading are tiring of my constant MythTV related ramblings probably good that they are imaginary then (they are also all hot girls)...




Anyway here's my MythTV account .xsession. It has a work around for a bug in the Nvidia driver (that puts a blue border round overlay videos), runs an xterm in the background (in the unlikely event that you need to fix the amazingly stable MythTV) and runs irxevent (which processes Infrared signals and throws out key presses). Finally it runs mythwelcome (a program which runs the mythtv frontend):

#!/bin/bash
xvattr -a XV_COLORKEY -v 66048
metacity&
xterm&
./irxevent --daemon ~/irxevent.conf
mythwelcome


Here's the irxevent.conf I use with MythTV (and the lirc.conf I previously posted):

begin
prog = irxevent
button = keyChanUp
repeat = 3
config = Key Up CurrentWindow
end

begin
prog = irxevent
button = keyChanDown
repeat = 3
config = Key Down CurrentWindow
end

begin
prog = irxevent
button = keyPower
config = Key Escape CurrentWindow
end

begin
prog = irxevent
button = Menu
config = Key M CurrentWindow
end

begin
prog = irxevent
button = MenuUp
repeat = 3
config = Key W CurrentWindow
end

begin
prog = irxevent
button = MenuRight
repeat = 3
config = Key D CurrentWindow
end

begin
prog = irxevent
button = MenuDown
repeat = 3
config = Key S CurrentWindow
end

begin
prog = irxevent
button = MenuLeft
repeat = 3
config = Key A CurrentWindow
end

begin
prog = irxevent
button = keyPlay
config = Key KP_Enter CurrentWindow
end

begin
prog = irxevent
button = key0
config = Key 0 CurrentWindow
end

begin
prog = irxevent
button = key1
config = Key 1 CurrentWindow
end

begin
prog = irxevent
button = key2
config = Key 2 CurrentWindow
end

begin
prog = irxevent
button = key3
config = Key 3 CurrentWindow
end

begin
prog = irxevent
button = key4
config = Key 4 CurrentWindow
end

begin
prog = irxevent
button = key5
config = Key 5 CurrentWindow
end

begin
prog = irxevent
button = key6
config = Key 6 CurrentWindow
end

begin
prog = irxevent
button = key7
config = Key 7 CurrentWindow
end

begin
prog = irxevent
button = key8
config = Key 8 CurrentWindow
end

begin
prog = irxevent
button = key9
config = Key 9 CurrentWindow
end

begin
prog = irxevent
button = keyVolDown
config = Key F10 CurrentWindow
end

begin
prog = irxevent
button = keyVolUp
config = Key F11 CurrentWindow
end

begin
prog = irxevent
button = keyPause
config = Key P CurrentWindow
end


lirc config for a random remote

Obviously this isn't going to be useful for anyone but me. But I have this remote:





It's either from a Avermedia DVB-T receiver, a Twinhan DVB-T receiver or a Twinhan Starbox 2 DVB-S receiver. Anyway here's it's lirc config file which was a pain to create so I'm sticking it here in case I need it again. In order to create the config I needed to hold the remote right next to the receiver and cover it so no stray UV interfered with the signal. I used irrecord to record the button presses and create the config file. The following options were used:

irrecord  -f --device /dev/lirc/0 unknown1.conf


Here's the resulting config:


# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.8.2(default) on Thu Aug 30 16:02:47 2007
#
# contributed by
#
# brand: unknown1.conf
# model no. of remote control:
# devices being controlled by this remote:
#

begin remote

name unknown1.conf
flags RAW_CODES|CONST_LENGTH
eps 30
aeps 100

ptrail 0
repeat 0 0
gap 107774

begin raw_codes

name key1
9104 4366 693 438 672 439
692 433 668 464 671 438
694 433 668 464 671 439
693 1564 672 1565 694 1548
692 1566 671 1565 668 1574
694 1563 673 1564 667 1575
694 1563 673 438 694 432
691 440 673 437 694 432
668 464 673 437 694 432
668 1575 694 1563 674 1562
694 1548 694 1563 674 1564
667

name key2
9103 4368 691 440 671 438
694 434 692 439 671 438
694 433 692 440 671 437
694 1567 670 1565 693 1548
694 1565 671 1565 692 1548
694 1565 672 1566 691 1548
694 434 692 439 672 437
694 434 667 464 671 438
694 434 667 465 671 1565
692 1549 693 1565 672 1565
692 1548 694 1565 671 1565
693

name key3
9105 4362 692 440 673 437
694 432 692 439 672 439
692 435 692 439 671 439
693 1565 671 1565 692 1550
694 1563 672 1566 691 1550
694 1563 671 1566 692 439
674 1563 692 1550 694 432
693 438 671 440 694 431
692 440 671 1565 694 438
673 438 694 1563 673 1563
692 1550 694 1566 671 1563
692

name key4
9130 4341 694 432 694 437
672 439 694 432 668 464
671 439 694 432 668 463
672 1567 692 1548 692 1565
672 1567 665 1575 694 1565
671 1566 691 1549 694 1564
672 438 694 432 667 1575
694 432 694 437 674 436
694 434 666 466 671 1566
691 1549 694 433 692 1548
694 1565 672 1565 692 1548
694

name key5
9104 4367 691 438 671 440
692 434 692 439 672 439
692 433 693 439 669 442
691 1567 670 1568 691 1549
692 1568 668 1567 692 1548
692 1567 670 1567 692 1548
694 434 692 1548 694 1565
669 1568 691 440 669 440
692 435 691 439 672 1567
692 439 669 440 692 435
690 1551 692 1567 669 1568
691

name key6
9108 4361 671 438 694 434
692 439 670 439 694 434
693 438 669 440 692 435
692 1549 694 1565 671 1566
694 1546 694 1565 671 1566
694 1546 694 1565 671 1565
694 1546 694 1566 671 1565
694 1547 694 433 692 439
672 437 694 434 692 439
672 437 694 434 692 440
671 1565 694 1546 694 1565
672

name key7
9109 4363 669 440 694 431
694 438 672 439 692 433
694 438 645 466 692 434
694 1548 692 1565 645 1591
694 1548 692 1566 671 1565
694 1549 691 1565 672 1565
694 437 672 1565 694 1548
693 433 694 437 672 439
692 434 694 437 671 1567
692 439 671 439 692 1565
672 1565 694 1548 694 1563
673

name key8
9131 4339 693 434 692 440
671 437 695 433 668 464
671 438 693 434 668 464
671 1565 693 1547 694 1565
672 1565 667 1574 693 1566
671 1565 667 1573 694 1565
671 438 694 434 668 1572
694 1565 671 438 694 433
668 464 672 437 694 1565
671 1566 667 464 671 438
693 1566 671 1565 668 1573
694

name key9
9130 4341 692 434 694 437
672 439 692 434 693 438
671 440 692 433 695 437
671 1565 694 1549 692 1565
672 1565 694 1548 691 1566
671 1566 693 1549 694 1563
673 1563 695 436 674 1563
694 1548 694 432 694 437
672 439 692 434 694 438
671 1565 694 437 671 440
692 1565 671 1565 695 1548
694

name key0
9107 4363 671 438 694 433
692 440 645 464 692 436
692 439 645 464 692 435
668 1572 694 1566 644 1592
695 1545 694 1566 671 1565
694 1547 693 1566 671 1565
694 437 672 1565 694 437
671 1566 694 437 672 437
694 434 692 440 669 1567
694 437 672 1564 694 438
671 1566 694 1546 694 1565
671

name keyRec
9104 4366 692 438 671 438
692 435 693 439 645 467
664 460 693 439 645 464
692 1567 669 1567 694 1549
692 1565 671 1566 693 1546
694 1565 672 1565 694 1548
692 434 692 439 672 437
694 1565 672 439 692 434
692 439 670 441 692 1565
672 1565 694 1548 692 434
691 1551 692 1566 670 1566
694

name keyFav
9109 4364 665 443 688 440
662 469 666 443 689 439
662 469 666 443 688 439
662 1579 690 1569 668 1569
688 1552 690 1569 667 1569
688 1552 691 1569 670 1566
688 1552 691 1568 668 441
691 1569 667 441 691 437
662 470 665 443 689 439
662 470 665 1571 688 443
666 1571 688 1553 689 1569
668

name keyRewind
9100 4368 661 470 666 445
686 439 662 470 666 445
686 439 662 469 666 445
687 1570 668 1569 662 1580
689 1569 667 1569 662 1580
688 1569 668 1571 660 469
666 445 687 439 661 470
666 445 686 439 662 1581
688 437 663 1580 688 1570
667 1569 661 1581 688 1569
667 1571 660 470 667 1572
659

name keyForward
9131 4340 689 439 662 470
663 446 688 439 662 470
665 443 689 439 662 470
666 1570 662 1578 688 1571
666 1571 662 1578 689 1571
665 1571 662 1578 688 440
662 1579 687 440 662 469
666 1570 662 470 665 443
689 439 662 1578 689 440
661 1579 688 1571 665 443
689 1571 665 1571 662 1579
690

name keyChanUp
9106 4365 664 445 684 441
661 473 662 446 685 441
634 498 664 447 684 443
632 1609 686 1573 664 1573
631 1608 687 1573 663 1573
632 1608 687 1573 663 1573
631 498 665 1574 632 498
663 447 685 443 607 524
662 447 685 443 629 1611
686 441 657 1584 686 1573
664 1573 607 1633 686 1573
663

name keyChanDown
9105 4363 665 445 687 439
662 469 667 444 687 439
660 472 665 445 687 439
662 1580 687 1571 665 1571
662 1580 687 1571 665 1571
661 1581 686 1571 666 445
686 1571 666 445 687 438
662 470 665 445 687 439
662 470 665 1571 662 470
666 1570 662 1581 686 1571
667 1569 662 1580 689 1568
668

name keyVolUp
9126 4343 686 441 660 471
664 445 686 442 658 473
664 446 686 441 658 473
664 1573 660 1580 686 1573
664 1573 658 1582 686 1573
664 1572 658 1583 686 442
660 1580 686 1573 663 1573
632 1608 687 441 658 474
664 445 686 1573 663 445
687 441 660 471 664 445
686 1573 664 1574 631 1608
688

name keyVolDown
9103 4369 659 472 663 445
687 441 660 471 664 445
687 441 660 472 663 446
686 1573 665 1571 660 1581
687 1571 666 1571 660 1580
689 1570 666 1571 660 471
664 1573 659 472 664 1572
660 472 664 445 688 440
660 471 666 1571 659 472
663 1573 660 472 663 1574
659 1581 688 1572 664 1571
660

name keyPlay
9102 4367 688 443 668 443
688 437 664 468 667 443
689 438 663 468 667 443
688 1570 667 1569 688 1554
689 1569 668 1568 690 1552
688 1569 668 1569 688 443
668 443 688 1570 667 443
688 1569 667 444 688 437
664 468 668 1569 688 1554
688 437 664 1578 689 438
663 1579 688 1569 667 1569
689

name keyRecall
9101 4368 688 443 667 444
687 438 664 467 668 443
688 438 664 467 668 443
688 1569 668 1569 690 1552
688 1569 668 1569 690 1552
690 1567 667 1570 690 441
667 1569 690 1552 691 1567
669 442 688 437 664 468
667 443 689 1569 669 441
689 437 664 467 668 1569
691 1551 691 1567 669 1567
690

name keyStop
9128 4343 688 438 662 469
665 445 687 439 662 470
668 443 688 437 662 470
668 1570 662 1579 688 1568
668 1572 686 1553 689 1571
665 1571 686 1555 687 438
664 1578 688 440 661 1580
687 1571 666 443 689 439
659 470 667 1572 686 445
665 1571 687 443 667 443
689 1571 665 1571 687 1554
688

name keyPause
9127 4341 689 438 661 470
666 443 690 438 661 470
668 441 691 437 662 469
666 1571 688 1552 690 1569
667 1569 689 1552 690 1569
668 1568 688 1553 690 437
662 470 667 1570 687 1552
690 438 662 469 668 1569
688 444 667 1571 690 1554
690 433 661 469 668 1570
687 1554 688 438 662 1580
688

name keyMute
9102 4367 688 443 667 441
691 437 664 468 665 443
691 437 664 467 669 441
690 1569 667 1570 689 1552
688 1569 668 1569 691 1551
689 1569 667 1569 690 441
668 441 690 438 663 468
668 1568 691 441 668 443
688 437 664 1579 690 1567
669 1567 691 1551 691 435
664 1579 690 1567 670 1566
691

name keyCancel
9106 4364 666 443 688 440
662 469 666 443 688 440
662 469 641 468 663 464
662 1579 690 1569 666 1571
688 1552 690 1569 665 1572
688 1552 690 1569 667 441
689 439 664 1576 690 1569
668 441 689 440 661 470
665 444 687 1571 668 1569
688 443 666 443 688 1571
668 1569 688 1552 690 1570
666

name keyCapture
9127 4343 689 438 664 467
666 443 688 440 662 469
666 443 688 440 662 469
666 1571 688 1552 690 1569
668 1568 689 1552 690 1569
668 1568 689 1552 690 437
664 468 667 1570 688 443
668 1568 689 443 667 1569
689 443 667 1569 688 1553
690 437 689 1552 690 437
688 1553 690 437 688 1552
690

name keyPreview
9107 4363 667 441 691 437
665 467 667 442 690 437
664 468 665 443 690 438
664 1576 690 1569 668 1569
688 1552 691 1568 668 1569
688 1552 690 1570 667 441
690 438 663 468 668 1568
689 443 667 442 690 1569
668 441 690 1569 667 1570
688 1551 691 437 664 1577
690 1569 668 441 690 1569
668

name keyEPG
9106 4365 663 445 687 441
660 472 664 445 686 441
660 472 664 444 687 441
660 1581 686 1573 663 1573
660 1580 689 1571 665 1571
661 1579 688 1571 666 443
686 442 660 1580 688 1571
665 1571 660 472 663 445
687 441 660 1580 689 1571
665 443 687 441 660 472
664 1572 660 1581 687 1571
666

name keyRecList
9106 4363 668 443 688 437
662 470 665 445 689 437
662 470 665 445 687 441
660 1580 688 1572 665 1571
686 1555 687 1571 666 1571
660 1580 688 1571 666 443
689 439 660 1580 688 440
659 470 666 445 688 439
660 472 663 1573 660 1581
688 439 660 1581 688 1571
665 1571 660 1581 688 1571
665

name keyTab
9104 4367 668 464 645 463
668 460 668 463 645 464
668 460 667 464 645 464
668 1591 646 1591 668 1573
667 1591 645 1592 693 1547
667 1592 645 1592 694 437
645 464 667 460 668 464
645 464 667 460 668 464
646 462 668 1592 645 1591
694 1546 670 1590 645 1591
695 1545 668 1592 644 1592
694

name keyTeletext
9102 4367 694 438 645 464
669 458 669 462 645 464
671 458 668 463 644 466
666 1593 643 1592 694 1548
667 1590 646 1591 694 1548
667 1590 647 1590 695 1546
668 1590 647 1589 697 1546
667 458 670 462 646 465
667 458 669 462 647 464
668 458 669 462 645 1592
694 1548 668 1590 646 1590
696

name keyPower
9105 4366 669 462 618 493
665 460 670 462 645 466
666 460 667 464 645 466
665 1592 618 1618 670 1572
640 1618 618 1618 670 1573
639 1618 618 1618 669 462
646 1591 670 1573 638 487
669 1573 639 487 669 462
645 466 666 1592 618 492
666 460 669 1573 639 487
669 1573 639 1618 645 1592
669

name keyFullScreen
9106 4363 669 439 692 437
665 466 643 466 667 460
666 465 644 467 664 462
666 1576 691 1567 669 1567
692 1551 689 1567 670 1567
692 1550 690 1568 668 1568
692 439 669 1568 692 1550
690 436 665 466 670 1567
691 440 669 441 691 1567
669 441 691 436 665 1577
690 1568 668 442 690 1567
669

end raw_codes

end remote


Fascinating!

My LIRC startup script

For lirc compiled from source version 0.8.2. For Debian Lenny with serial lirc device, goes in /etc/rc2.d/S99lirc. You also need to load the lirc_dev module, add it to /etc/modules to load it automatically.

#!/bin/bash
setserial /dev/ttyS0 uart none
setserial /dev/ttyS1 uart none

/sbin/modprobe lirc_serial
/usr/local/sbin/lircd --device /dev/lirc/0 /etc/lircd.conf

Wednesday, August 29, 2007

Making a program automatically restart

Mythbackend crashes a lot, well at least until you get your configuration stable (which has never happened to me). To create a usable system I wanted to configure myth to restart automatically when it crashes. Here's how I did it. First locate the mythbackend binary, mines in /usr/bin (Debian Lenny, debianmultimedia.org install). Rename it to mythbackend.real. Create a file in the same directory called mythbackend.run with the following contents:

#!/bin/bash
myvar=0
while [ $myvar -ne 10 ]
do
echo $myvar
mythbackend.real
myvar=$(( $myvar + 1 ))
done


Make sure it's executable. This script runs our renamed mythbackend ten times in a row (we're only going to restart mythbackend 10times). Then create a file called mythbackend with the following contents:

#!/bin/bash
mythbackend.run&


Again make it executable. This just fires off our mythbackend.run script in the backround. So there you go!

Lazy mans udev fixed device names

One of the constant annoyances of USB devices under Linux is that they don't get assigned fixed names. In my case I have two USB digital TV receiver cards, one for satellite and another of digital terrestrial. They can be accessed though the device directories: /dev/dvb/adapter0 and /dev/dvb/adapter1. However you never know which will be which and in order for MythTV to work correctly they need to fix these. For example adapter0 must always be the DVB-T and 1 the DVB-S. There is a long and complicated explanation of how to modify the udev rules to do something not entirely unlike this here: http://mythtv.org/wiki/index.php/Device_Filenames_and_udev
however, I can't figure out how to get it to work in my case (dvb devices have a more complicated directory structure) so I made this quick hack.


First you need to make sure that udev no longer maps your DVB cards to /dev/dvb/adapter0/1 but rather /dev/dvb/adapter_real0/1. On Debian you can do this by modifying /etc/udev/rules/udev.rules changing the line that reads:

KERNEL=="dvb*",                 PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \
NAME="%c"


to:

KERNEL=="dvb*",                 PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter_real%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \
NAME="%c"


Now create an rc script to assign the fixed device names and place it somewhere in your startup directories. In my case I needed to make it start before mythbackend so I created the file /etc/rc2.d/S23dvbsyms (remember to make it executable) with the following contents:

#dvbs
if [[ `udevinfo -a -p /class/dvb/dvb0.frontend0 | grep UDST702X -c` == "1" ]]
then
echo "DVBS is adapter 0"
ln -s /dev/dvb/adapter_real0 /dev/dvb/adapter1
fi

if [[ `udevinfo -a -p /class/dvb/dvb1.frontend0 | grep UDST702X -c` == "1" ]]
then
echo "DVBS is adapter 1"
ln -s /dev/dvb/adapter_real1 /dev/dvb/adapter1
fi

#dvbt
if [[ `udevinfo -a -p /class/dvb/dvb0.frontend0 | grep VP7041 -c` == "1" ]]
then
echo "DVBT is adapter 0"
ln -s /dev/dvb/adapter_real0 /dev/dvb/adapter0
fi

if [[ `udevinfo -a -p /class/dvb/dvb1.frontend0 | grep VP7041 -c` == "1" ]]
then
echo "DVBT is adapter 1"
ln -s /dev/dvb/adapter_real1 /dev/dvb/adapter0
fi


udevinfo -a -p /class/dvb/dvbX.frontend0 dumps a bunch of information about the device, including product codes. I then grep for these and create a symlink to the real device accordingly. You can find the class path to use with udevinfo with:

udevinfo -a -p $(udevinfo -q path -n /dev/video0)


Where /dev/video0 is the device your after in /dev. One you've put these scripts in place the devices will get fixed names as boot. Of course this doesn't help much if you are plugging in and removing devices but it's a hack that works well enough for me.

Sunday, August 26, 2007

dvb-usb-vp702x-02.fw

This is the firmware file for a Twinham Starbox 2 USB DVB-S receiver. For some reason it's not on the linuxtv website. It's closed source, and I'm probably not allowed to distribute it. However you'll need it if you want to get a Twinham Starbox working under linux. Here is it: http://www.gamesrant.com/linuxjunk_pics/dvb-usb-vp702x-02.fw

Saturday, August 25, 2007

Nvidia TV Out xorg.conf

The following xorg works with my TV. It outputs to the TV ONLY (no dual display stuff):

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder3) Wed Jun 13 18:39:30 PDT 2007

Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection

Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
EndSection

Section "Module"
Load "dbe"
Load "extmod"
Load "type1"
Load "freetype"
Load "glx"
EndSection

Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 30.0 - 50.0
VertRefresh 60
EndSection

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
Option "TVOutFormat" "Composite"
Option "TVStandard" "PAL-I"
Option "ConnectedMonitor" "TV"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "640x480"
EndSubSection
EndSection


Nvidia driver installation on Debian Lenny 2.6.21-2

Using the Nvidia driver installer you get the error:

   FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'para
virt_ops'


This basically means Linux people don't like you compiling non-GPL code against the kernel. I guess that's fair I blame Nvidia. Anyway from what I understand it's all being put back so we can install evil code nice an easily in 2.6.22. But for now you need to patch some of the kernel build scripts. Here's a list of instructions for Debian, bastardised from the Redhat version at: http://www.nvnews.net/vbulletin/showthread.php?t=87541:

apt-get source linux-image-2.6.21.2-686
cd linux-2.6-2.6.21/
cd scripts
cd mod
vi modpost.c

# delete the lines reading:
#if (!mod->gpl_compatible)
# check_for_gpl_usage(exp->export, basename, exp->name);

make mk_elfconfig
make empty.o
cat empty.o | ./mk_elfconfig FORCE > elfconfig.h
gcc modpost.c file2alias.c sumversion.c -o modpost.new
cp modpost.new /usr/src/linux-headers-2.6.21-2-686/scripts/mod/
mv /usr/src/linux-headers-2.6.21-2-686/scripts/mod/modpost /usr/src/linux-headers-2.6.21-2-686/scripts/mod/modpost.old
mv /usr/src/linux-headers-2.6.21-2-686/scripts/mod/modpost.new /usr/src/linux-headers-2.6.21-2-686/scripts/mod/modpost

sh NVIDIA-Linux-x86-100.14.11-pkg1.run --extract-only
cd NVIDIA-Linux-x86-100.14.11-pkg1
cd usr/src/nv
make module
PARAVIRT_OPS=`grep "D paravirt_ops" /boot/System.map-2.6.21-2-686 | colrm 9`
ld -m elf_i386 --defsym paravirt_ops=0x$PARAVIRT_OPS -r -o nvidia.ko nvidia.o nvidia.mod.o
cp nvidia.ko /lib/modules/2.6.21-2-686/kernel/drivers/video/
modprobe nvidia
dpkg-reconfiugre xserver-xorg


You will also need to install the X11 nvidia driver the easiest way to do this is to run the nvidia installer with the "--no-kernel-module" flag ie:


./nvidia-installer --no-kernel-module


Then update your xorg.conf (you can use nvidia-xconfig to do this for you). It appears to be working... but I'm now trying to get it configured to do TV Out...

Friday, August 17, 2007

error: cannot compute sizeof (char) with configure

I received the error "cannot compute sizeof (char)" from a configure script when using the Pathscale compiler. Turned out I was using pathcc (I guess the c compiler) instead of pathCC (I guess C++).

Tuesday, August 7, 2007

Resuming a crashed scp transfer

Mercilessly robbed from here: http://joen.dk/wordpress/?p=34

scp doesn't have a resume option, so continue the transfer with rsync:

rsync --partial --progress source dest


This isn't encrypted like scp though, in order to do that you need to tell rsync to use ssh as it's shell. The following example uses rsync to transfer a file over ssh with ssh running on a nonstandard port on localhost (like you might setup with a tunnel):


rsync --partial --progress --rsh="ssh -p 2250 " -r  MyDirectory new@localhost:/media/stuff

Monday, August 6, 2007

iPod Shuffle 2nd Gen USB Dock pinout

yea, not Linux related but it is junk!

For USB I'm using the pin assignments from here. If your using this for anything important you might want to check I did it right....



Saturday, August 4, 2007

Nokia 770 Dual MMCs

Looks like the 770 will recognise 2 MMC cards connected to the MMC bus. However according to fanoush on the internettablettalk forum this may not be a great idea as: "they will run in legacy MMC mode (max 20MHz) and there may be bugs since this was never widely used." post here.



Anyway, here's how the wiring looks. Obviously if you intend to do this you need to figure out how to mount everything:





dmesg output:





and mounting:





again, this is currently with the stock tablet 2006 kernel. I also tried with an SD card and an MMC, that didn't appear to work, only the SD card to recognised (the other card didn't appear in dmesg). I've not yet tested how stable this is, just mounted the cards to check it works in principle.

Thursday, August 2, 2007