Tag Archives: Debian

[How To] Nouveau Dualhead Setup

Well I thought I’d have another play with Nouveau the open source driver for nVidia GPU’s, as it been a while since played around with them. Since the last time I played with Nouveau it was very buggy and unstable and 3D support was even worse, but I very surprised that there is some 3D support via Gallium3D.

Anyways this how I setup my xorg.conf for dual head setup with nouveau under Debian testing (wheezy):

Section "Monitor"
          Identifier   "monitor0"
          Option       "PreferredMode" "1920x1080_60.00"
EndSection

Section "Monitor"          
          Identifier   "monitor1"
          Option       "PreferredMode" "1440x900_60.00"
          Option       "RightOf" "monitor0"
EndSection

Section "Device"
    Identifier 	       "device0"
    VendorName         "nVidia Corporation"
    BoardName          "GeForce GT 220"
    Driver  	       "nouveau"
    Option  	       "Monitor-DVI-I-1" "monitor0"
    Option  	       "Monitor-VGA-1" "monitor1"
EndSection

Section "Screen"
    Identifier "screen0"
    DefaultDepth 24
      SubSection "Display"
        Depth      24
        Virtual 3360 1080
      EndSubSection
    Device "device0"
EndSection

Section "ServerLayout"
    Identifier 			"layout0"
    Screen 			    "screen0"
EndSection

At the moment I am very happy with Nouveau and going to keep using it till it borks it again :-)

Also if you not want to go through the hassle of xorg.conf you could run or put this in your session startup file, example this what I used for testing with ~/.fluxbox/startup

$ xrandr --output DVI-I-1 --mode 1920x1080 --pos 0x0 && xrandr --output VGA-1 --mode 1440x900 --pos 1920x0 &

The above does the same as the above xorg.conf configuration.

[How To] Compiling QSSTV 7.1 under Debian testing (wheezy)

Description:

QSSTV 7.1 is a program for receiving and transmitting SSTV and for receiving FAX. A lot of enhancement have been made since QSSTV version 5 and 6. It took me a while to come up with a new version due to my professional activities.
This is a beta version, and you can expect to find updates and bug fixes on a (not so) regular basis.

UPDATE Monday 21 May 10:49:52 CST 2012: QSSTV 7.1.7 is now available in the Debian repository for about a month now as of writing this

Getting the source:

wget http://users.telenet.be/on4qz/qsstv/downloads/qsstv_7.1.7.tgz

Installing the required software:

# apt-get install g++ libfftw3-dev qt4-qmake libqt4-dev hamlib-dev libasound2-dev

Compiling:

$ tar -xvzf qsstv_7.1.7tgz
$ cd qsstv_7.1.7
$ qmake-qt4
$ make

Optional:
you can either run QSSTV from it current location or you can install it system wide by

# make install

Notes:
The only problem I got with running QSSTV was it complaining about GTK+

$ ./qsstv 
QGtkStyle was unable to detect the current GTK+ theme.

But it can easily fixed by running

export GTK2_RC_FILES="$HOME/.gtkrc-2.0"

or you can just edit the Trolltech.conf file and change the line ‘style=GTK+‘ to ‘style=Cleanlooks

nano ~/.config/Trolltech.conf

Reference:
http://users.telenet.be/on4qz/qsstv/documentation/index.html

[How To] Compiling WSPR under Debian testing (wheezy)

Description:

WSPR implements a protocol designed for probing potential propagation paths with low-power transmissions. Normal transmissions carry a station’s callsign, Maidenhead grid locator, and transmitter power in dBm. The program can decode signals with S/N as low as -28 dB in a 2500 Hz bandwidth. Stations with internet access can automatically upload their reception reports to a central database called WSPRnet, which includes a mapping facility.

Installing the required software:

# apt-get install subversion python2.7-dev python-numpy python-imaging-tk python-pmw libportaudio2 portaudio19-dev libsamplerate0-dev gfortran cl-fftw3

Getting the source:

$ svn co http://svn.berlios.de/svnroot/repos/wsjt/branches/wspr

Compiling WSPR:

$ cd wspr
$ ./configure
$ make

Optional:
you can either run WSPR from it current location or you can install it system wide by

# make install

Notes:
I got an error about port audio 19 when running configure, example:

This program needs portaudio v19 to compile.
Please use --with-portaudio-include-dir= and
 --with-portaudio-lib-dir= to set the paths.
configure: error: Please check error messages and install missing packages.

but that is easily fixed by running configure like this:

$ ./configure --with-portaudio-include-dir=/usr/include --with-portaudio-lib-dir=/usr/lib/x86_64-linux-gnu

References:
http://wsprnet.org/drupal/node/2066
http://www.physics.princeton.edu/pulsar/K1JT/devel.html

Migration to new server

Well it happens every now and then that we have to upgrade our hardware to semi keep up with the times. In my case it was upgrading from a 533MHz fanless mini ITX system to a P4 3GHz machine to handle my firewall/gateway/routing/www/proxy/mail etc. Only real major problem I had been with ‘Dovecot‘ not being able to locate mail directories, which was strange as the 2 systems are an almost mirror copy of each other.

Jan 10 22:50:21 system dovecot: pop3(user): Error: user user: Initialization failed: mail_location not set and autodetection failed: Mail storage autodetection failed with home=/home/user
Jan 10 22:50:21 system dovecot: pop3(user): Error: Invalid user settings. Refer to server log for more information.

Turns out cause Dovecot v2 under Debian has gone to a multi conf setup I had to set the mail location in ‘/etc/dovecot/conf.d/10-mail.conf

mail_location = mbox:~/mail:INBOX=/var/mail/%u

Also the other to check is that the permissions of the mail directories are set to 700 and make the directory if needed:

# mkdir /home/user/mail
# chown user:user mail
# chmod 700 mail

Besides the above error, the rest the upgrade using the config file from the original system was pretty painless beside some clean up to get rid minor warnings in the syslog file. Well this has been my evening, and maybe the above info may help someone else with the same problem.

Oh and the other major thing to remember is to enable IP forwarding and enable the changes to the sysctl.conf

# sysctl -w net.ipv4.ip_forward=1
# sysctl -w net.ipv6.conf.all.forwarding=1
# sysctl -p /etc/sysctl.conf

As it sure does help with stable connectivity for other devices connection to the internets

Compile SD-PEX15022 (MCS9922) drivers for Debian

Recently I purchased a Syba SD-PEX15022 (MCS9922) PCI-e to Serial card for Amateur Radio radio control. Well the drivers that came on the CDRom would not compile and got heaps of errors, any ways after 30 mins or so of trolling the Internet for more update drivers which I found here and they compiled under the 3.0.0-1 kernel with no problems.

In case the drivers go a miss from the above ASIX link you can grab them from here:
MCS99xx_NoCascade_Linux_driver_v1.0.0.1

UPDATE 2011-12-28
As of the release of the 3.1 Kernel this card now works out the box, so no need to compile the drivers for it if running kernel 3.1 onwards.

Doing ‘lspci -v‘ shows – note the ‘Kernel driver in use:‘. Also the port assignment has change from ‘/dev/ttyF0‘ etc, back to ‘/dev/ttyS0‘ etc.

04:00.0 Serial controller: NetMos Technology PCIe 9922 Multi-I/O Controller (prog-if 02 [16550])
        Subsystem: Device a000:1000
        Flags: bus master, fast devsel, latency 0, IRQ 17
        I/O ports at e880 [size=8]
        Memory at fbffd000 (32-bit, non-prefetchable) [size=4K]
        Memory at fbffc000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>
        Kernel driver in use: serial

04:00.1 Serial controller: NetMos Technology PCIe 9922 Multi-I/O Controller (prog-if 02 [16550])
        Subsystem: Device a000:1000
        Flags: bus master, fast devsel, latency 0, IRQ 18
        I/O ports at ec00 [size=8]
        Memory at fbfff000 (32-bit, non-prefetchable) [size=4K]
        Memory at fbffe000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>
        Kernel driver in use: serial

[How to] Belkin 600VA UPS (F6S600auUSB) with NUT

I recently purchased a Belkin 600VA UPS for my 12V fanless Mini ITX system and Wireless AP to keep them running through brown outs. This is what I had to do to get the UPS to work with NUT under Debian.

UPDATE Monday 21 May 09:49:17 CST 2012: now that I have had a long enough power outage I can confirm that the beeps do get faster towards end batter life and about then the computer starts its shutdown process.

Set the correct permissions to access the UPS
Edit and add the following to /lib/udev/rules.d/52-nut-usbups.rules:

#  F6S600auUSB - blazer_usb
ATTR{idVendor}=="0665", ATTR{idProduct}=="5161", MODE="664", GROUP="nut"

Run the following to activate the newly set permissions for the UPS:

# udevadm trigger --action=change

Installing and configuring NUT to work with the newly connected Belkin UPS
Install NUT:

# apt-get install nut

Edit /etc/nut/ups.conf and add the following to the end of file:

[belkin]
driver = blazer_usb
port = auto

Edit /etc/nut/nut.conf and change the mode:

MODE=standalone

Edit /etc/nut/upsd.users and add the following users

[admin]
password = adm_pwd
action = SET
instcmds = ALL

[upsmon]
password = ups_pwd
upsmon master

Edit the /etc/nut/upsmon.conf and check the following is active and correct.

MONITOR belkin@localhost 1 upsmon ups_pwd master
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
NOTIFYFLAG ONLINE SYSLOG
NOTIFYFLAG ONBATT SYSLOG
NOTIFYFLAG LOWBATT SYSLOG
NOTIFYFLAG FSD SYSLOG+WALL
NOTIFYFLAG COMMOK SYSLOG
NOTIFYFLAG COMMBAD SYSLOG
NOTIFYFLAG SHUTDOWN SYSLOG+WALL
NOTIFYFLAG REPLBATT SYSLOG+WALL
NOTIFYFLAG NOCOMM SYSLOG
NOTIFYFLAG NOPARENT SYSLOG
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5

Start NUT daemon:

# invoke-rc.d nut start

Check for errors in logs:

# tail -f /var/log/daemons.log
# tail -f /var/log/messages

Check UPS status:

upsc belkin

Programming old Radios under Linux


As I primarily use Linux and I had to find an alternative way to program radios like Tait, Icom etc that have Dos based software to program them along with the need to have a serial port. Well after some trial and errors with various emulators like dosemu and wine, I found dosbox was able to do what I need to accomplish with accessing the radio via USB to Serial cable which you can buy cheap enough off of eBay.

Edit dosbox config file:

$ nano .dosbox/dosbox-0.74.conf

and alter the ‘serial 1‘ line to read:

serial1=directserial realport:ttyUSB0

Then you can run your dos program in terminal:

$ dosbox /location/to/you/dos/program.exe

PCManFM user mount ‘not authorized’

If you are like me and like to run a custom install of Debian with a lightweight setup with Fluxbox, SLiM, PCManFM, etc and you have problems with mounting USB devices such as flash drives etc and get the “Not Authorized” message in PCManFM under Debian, here is a workaround that should still work after upgrade, rather than editing ‘
/usr/share/polkit-1/actions/org.freedesktop.udisks.policy‘ itself, which does not last after software upgrade of udisks if I am not mistaken, but I sure someone will correct me if I am wrong ;-)

As root create:

# /etc/polkit-1/localauthority/50-local.d/55-storage.pkla

and add the following:

[Storage Permissions]
Identity=unix-group:plugdev
Action=org.freedesktop.udisks.filesystem-mount;org.freedesktop.udisks.drive-eject;org.freedesktop.udisks.drive-detach;org.freedesktop.udisks.luks-unlock;org.freedesktop.udisks.inhibit-polling;org.freedesktop.udisks.drive-set-spindown
ResultAny=yes
ResultActive=yes
ResultInactive=no

Polkit will automatically recognize the newly added file.

To make sure you have the ability to mount the USB devices, be sure to add yourself to the plugdev group

# usermod -a -G plugdev YOUR-LOGIN

Now logout and log back in for above to take effect if you just added yourself to the plugdev

Reference:
PCManFM – ArchWiki