Categories

 

February 2010
M T W T F S S
« Sep    
1234567
891011121314
15161718192021
22232425262728

ATI Catalyst 9.9 / fglrx 8.650 Installation

When upgrading the fglrx driver, don’t get lazy about removing the previous version. Besides the old configuration possibly still in use after a reboot, you get serious memory leaks in Xorg caused by the ATI Catalyst driver that resemble the same leak you get when using the driver provided by envyng.

Removal and installation is really straight forward and there is only a few extra steps. I keep my drivers in separate folders for each version. All commands are displayed as if you were in the working folder for that driver and ONLY that driver version.

Generate the fglrx/catalyst drivers for your distribution
Supported distro’s found here.
sh ati-driver-installer-* --buildpkg Distribution/codename

Backup your xorg.conf (just in case, re-configuring xorg sucks!) and remove the previous fglrx drivers
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
sudo apt-get purge xorg-driver-fglrx fglrx-kernel-source fglrx-modaliases fglrx-amdcccle
# if /etc/ati still exists, remove it!
sudo rm -rf /etc/ati/

Now reboot and when restarting do not boot into the GUI. Xorg will be looking for your fglrx driver and it is now obviously gone, so you will either lock-up or it may recover nicely and allow you to enter into a low graphics mode. Either way, boot into a terminal window. On Ubuntu you can enter the recovery console.

Now from terminal install the new fglrx/catalyst driver
sudo dpkg -i xorg-driver-fglrx_*.deb fglrx-kernel-source_*.deb fglrx-amdcccle_*.deb

Now reboot from terminal and enter the GUI. You will have to reconfigure any settings you made in the previous Catalyst driver. fglrx/catalyst brightness, contrast, gamma howto.

If you happen to have any issues booting back into the GUI. Go back to the terminal and remove your previous xorg.conf. and follow these instructions for generating a new one.

A more detailed walk-through can always be found at http://wiki.cchtml.com/

Postfix catch-all. The proper way…

An issue I recently encountered with some mail servers was poor MTA reputation. Even though the servers were only used for corporate email, somehow their MTA is poor at senderbase, even though none of the IP’s are on a single RBL/SBL. This is partly due to Slicehost having bad IP blocks and the method they use for assigning IP’s to new slices. But I believe the issue can be resolved with good history.

I know that the servers are properly configured (because I set them up) and they are not an open relay. They reject mail correctly and SA/CAV are filtering mail correctly.

Without knowing the cause I took two approaches to resolve the issue. The first thing I did was change the RDNS for the machines. The second thing I did was setup a Postfix catch-all to cut down on outgoing mail from the machines. The servers each receive 30-60 or more email’s a minute to unknown users. This is a mere trickle compared to most mail servers, but enough.

It’s bad practice to setup a catch-all. But when you are not AOL, Microsoft, Google, etc, you have very little push and pull on the internet and can get blocked for adding to the spam. Some spammers are clever enough to purposely use other mail servers to reject mail and send that email to their intended recipient.

Anyway, after much research, not a single blog, howto or tutorial demonstrated how to setup a catch-all in Postfix correctly. Every method I read about caught ALL mail even if the intended recipient existed locally on the machine. One blog post I read said it would send the mail to the correct recipient before it redirected mail for the unknown user, which goes to show this guy did not test his configuration and even posted about it!

I eventually found my way by reading the postfix configuration documentation. This very simple method is a combination of two parameters you can add in /etc/postfix/main.cf

luser_relay = localuser@localdomain.com
local_recipient_maps =

luser_relay is the local user on the machine to catch all email that does not belong to an existing local user. luser_relay documentation.

local_recipient_maps is left blank to stop Postfix from checking if the user exists on the local machine. This is very important, without this line, Postfix will still reject the mail and send a bounce message. local_recipient_maps documenation.

After adding the above two lines to the configuration, apply the changes and restart Postfix in terminal.

service postfix reload
/etc/init.d/postfix restart

Evolution Mail 2.26.1 – Not deleting trash

After switching from windoz to Linux, I immediately started using Evolution Mail after being an Outlook user for many years. Evolution in many ways is better than Outlook besides being free, but there is a small issue.

Sometimes, somehow and someway the client loses sync with folders and this little bash script will fix the problem. I originally found this on the Ubuntu forums a few months ago.


#!/bin/bash
# see http://ubuntuforums.org/showthread.php?t=974536
cd $HOME/.evolution/mail
echo "Deleting .index(s)";
find -name "*.index" -exec rm {} \;
echo "Deleting .ev-summary(s)";
find -name "*.ev-summary" -exec rm {} \;
echo "Deleting .cmeta(s)";
find -name "*.cmeta" -exec rm {} \;
echo "Done.";

Adjusting Contrast, Brightness and Gamma on fglrx 9.5+

ATI has made a change in their fglrx catalyst drivers (9.5+) where setting the gamma in xorg.conf no longer works and is ignored when starting.

In my previous post I went over setting and making these adjustments. The previous methods for Contrast and Brightness remain. However for gamma, the only way and previously existing method is now using fglrx_xgamma.

In terminal;

fglrx_xgamma -c 0 -gamma .85

This setting will be immediately applied and also after restarting.

Howto prevent and block repeat failed connections to ssh with iptables

The following iptable entries will prevent and block repeat failed connections, but not permanently. This allows two new connections every 60 seconds. This is an effective way of blocking automated attacks you will see mostly from Chinese ISP’s.


iptables -A INPUT -p tcp -m tcp -m state -m recent ! -s 10.0.0.0/24 -i eth0 --dport 22 --state NEW --set --name DEFAULT --rsource
iptables -A INPUT -p tcp -m tcp -m state -m recent ! -s 10.0.0.0/24 -i eth0 --dport 22 --state NEW -j DROP --update --seconds 60 --hitcount 2 --name DEFAULT --rsource
iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT

Howto allow outgoing ftp connections in iptables

From terminal, execute the following;
sudo modprobe ip_nat_ftp ports=21
sudo modprobe ip_conntrack_ftp

sudo iptables -A FORWARD -m state --state ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -p tcp -m tcp -m state --dport 21 --state NEW -j ACCEPT
sudo iptables -A FORWARD -p tcp -m tcp -m state --sport 20 --state RELATED -j ACCEPT
sudo iptables -A FORWARD -p tcp -m tcp -m state --dport 1024:65535 --sport 1024:65535 --state RELATED -j ACCEPT

Fullscreen Video Playback, Jaunty 9.04, Xorg

If you’re having issues with fullscreen video playback, this may help. The issues may range from hard lock’s and crashes to poor performance and flickering. The flickering issues may not go away with this tweak, but performance should be better and crashes should stop.
Continue reading Fullscreen Video Playback, Jaunty 9.04, Xorg

Bash script to automate mounting and unmounting of nfs shares

This is a small script I wrote that automates creating a directory for the mount point and then mounts the nfs share on that diretory. It also accommodates removal when needed and unmount’s the nfs share and removes the directory that was created.

Continue reading Bash script to automate mounting and unmounting of nfs shares

Create ISO/Disk Image from DVD/CDROM on Linux

This is a quick guide to creating an ISO/Disk Image on Linux from your DVD or CDROM drive.
Continue reading Create ISO/Disk Image from DVD/CDROM on Linux

Xorg Memory Leak Fix for Jaunty 9.04 ATI Proprietary fglrx

Memory leak fixed on my sony vaio laptop with an HD3400 series. NOT completely, xorg will still leak over time (about 60mb over 8 hours and I think some of this memory is re-used for effects which will not increase the memory any further when opening, closing, etc). The change is DRASTIC compared to what I was seeing. Before this xorg would leak anywhere between 500-700mb over 4 hours of use.

Continue reading Xorg Memory Leak Fix for Jaunty 9.04 ATI Proprietary fglrx