Skip navigation.
Home

Linux

Xorg Gentoo Update - Fixing Fonts

Linux | WorkBlog

I just ran emerge update world which switched me from Xfree86 to Xorg. Went fairly smooth, except that some fonts weren't anti-aliased afterward. I followed the instructions in Howto Xorg and Fonts which seemed to do the trick. Primarily:

emerge freetype corefonts freefonts artwiz-fonts sharefonts \
  terminus-font ttf-bitstream-vera unifont

I did end up porting my XF86Config to the new xorg.conf based on xorg.conf.example, You can get it here. (however the only real change was the inclusion of more font paths, so it was mostly academic). Still if you have an IBM R40 with the ATI Radeon 7500 and a 1400x1050 display, and want the built in trackpoint to work simultaneous with a standard logitech usb wheelmouse, then the xorg.conf should work well for you.

It appears that keyboard repeat rate is slow, on first start I was asked whether to use X's keyboard startup or Gnomes. I chose Gnome's, so perhaps I just need to tweak settings. I decreased the delay between repeat, and increased the repeat rate to fastest, and it appears to help, but it slows down the repeat after about 5 characters.

I have updated this and other information on my Gentoo R40 Wiki page.

The Slowdown Problem: TCP Window Scaling and Linux 2.6.8

Linux | Networking | WorkBlog

About the same time as students came back to campus this year, I noticed that my internet connection speed was extremely slow on my gentoo linux notebook. Some websites wouldn't load, and ftp and http downloads never exceded 5KB/s and often were in a measurement not often seen anymore, bits/s. I thought, I know this is a heavy usage period on campus, but this is rediculous.

Well, after our network administrator reported that utilization was was not maxed on our campus partial ds3, I thought perhaps it was a router issue. I started trying different locations, other hosts on campus did not have this problem. I switched to wired, same problem. When others in the building also running linux, were not having the problem I began to suspect by box. But I get full speed at home? Whats the problem?

I did a dslreports speed test which came out rather bizarre, 3434 kbps up and 36 kbps down. :-? Thats two T1's upload speed and a pre 56K modem download speed folks. To which dslreports stated "Your upload speed is much faster than down.. have you tweaked?"

Since the problem was occuring regardless of interface, I began to suspect my kernel. I rebooted with an older 2.6.7 and whamo, the same file that was downloading at 5K/s completed at 200K/s. After the latest gentoo development-sources linux-2.6.8.1, didn't solve the problem I decided to google and found the answer.

The recent 2.6.8 kernels have enabled TCP Window Scaling by default. Window Scaling has been a technique used by cat burglars and the IETF since 1992, see RFC 1323. Basically, it allows for the dynamic setting of tcp window sizes beyond their early fixed limit of 64K to increase performance on the Internet with modern equipment. So why doesn't it work with Linux? Well the problem is not with Linux at all, other than the fact that they turned it on by default. Apparently many routers and packet firewalls are rewriting the window scaling factor during a transmission, instead of only during the initial handshake (SYN). This means that the sending and receiving side are assuming a different TCP window size. The result of this misnegotiation of protocol, is very slow successful traffic if at all.

This also explains why the problem is visible on some sending and receiving sites, because only devices behind the path of broken routers are affected. For instance, why my notebook worked fine from my house, or why I was able to get to some sites from on campus at full speed. Also apparently some routers are only mangling in one direction, which would explain that crazy speed test above.

The solution? Well, some of the linux developers are hoping that leaving the option enabled will force the issue, so that vendors will fix their routers. As for me, I was able to follow David S. Miller's suggestion to turn off the feature dynamically in the kernel.

The following command will disable the win scaling feature for the running kernel:

sysctl -w net.ipv4.tcp_default_win_scale=0

And the following command will make sure it gets set next reboot:

echo "net.ipv4.tcp_default_win_scale=0" >> /etc/sysctl.conf

In case you hadn't picked up on it, this is not a gentoo specific issue. Redhat fedora users, you might be affected as well, along with any other distribution using the recent stock 2.6.8 kernels. This LWN article is the only press I have seen about the problem. For a more complete discussion of the topic, here's the start of the thread on the Linux Kernel Mailing List. It would be nice if someone had a complete list of affected routers, some have mentioned openbsd and cisco.

Intel IPW2100 Wireless (Centrino) on Gentoo Linux

Linux | Wireless

Well I have finally tried the ipw2100 Open Source driver and it works quite well. Here are the instructions for getting started on Gentoo, Linux:

  1. First, in order to always get the latest version (including masked packages), I set an accept keyword in my /etc/portage/package.keywords You can simply create the file if it doesn't already exist. (This is the best way I have found to unmask an ebuild).
    # contents of /etc/portage/package.keywords

    net-wireless/ipw2100 ~x86
  2. If you haven't in a while make sure your synced up with the latest portage tree.
    emerge sync
  3. Install the software. If all goes well this will compile the kernel the module, and install the firmware from Intel.
    emerge ipw2100
  4. Load the new module.
    modprobe ipw2100

    You should see something similar to the following in your /var/log/messages

    ipw2100: Intel(R) PRO/Wireless 2100 Network Driver, 0.51
    ipw2100: Copyright(c) 2003-2004 Intel Corporation
    ipw2100: 0000:02:02.0: Detected at mem: 0xC0204000-0xC0204FFF -> e0914000, irq: 11
    eth1: Bound to 0000:02:02.0
  5. If you are connecting to a non WEP access point, then you should automatically associate on module load. You'll see the following in your /var/log/messages:
    eth1: Associated with 'apuwifi' at 11Mbps, channel 8
  6. If you didn't have it already, you'll want to also emerge "wireless-tools" which you'll need to manage your connection.
    emerge wireless-tools
  7. Use wireless-tools to set managed mode your wep key and essid
    iwconfig eth1 mode managed key YourSecretKey essid YourESSID
  8. If you don't already have one, create a eth1 init script, then start it up to load the interface and get a dhcp address
    cp /etc/init.d/net.eth0 /etc/init.d/eth1

    /etc/init.d/net.eth1 restart

At this point you should be all set. I haven't looked into the slickest way to start and stop the wireless if your using WEP. I generally start the wireless with a simple shell script.

#!/bin/bash
modprobe ipw2100
iwconfig eth1 mode managed key YourSecretKey essid YourESSID
/etc/init.d/net.eth1 restart

I tested with the gentoo-dev-sources-2.6.7-r11 kernel on an IBM R40 Thinkpad. So far I have found less problems than with the Windows driver with the ndisloader. The driver also supposedly supports WPA which I haven't tested.

Resources

Update 2005-06-15: I am now using the WPA functionality, but have not written up instructions.

RedHat refresh updates

Linux
We currently have 8 remaining production servers running non-enterprise versions of the Red Hat Linux operating system. Work is ongoing to refresh these to RHEL 3.

Intel Releases Linux Driver For Centrino WLAN

Linux | Wireless

From the, "Its about time dept..."

Intel Releases Linux Driver For Centrino WLAN - Werner Heuser writes "Finally Intel has made their different announcements about Linux support for the WLAN part of the Centrino technology become true. Though not yet officially announced an Open-Source driver with included firmware is available at SourceForge. The driver is still experimental and supposed to work with 2.4 Kernels as well as with 2.6 ones."

I have been running the Windows driver via the linuxantNDIS Loader in Linux since I got my Thinkpad R40. I'll have to give the native driver a go, and see how it works.

Update: According to the Todo list, the driver doesn't yet support WEP. I will definately be sticking with the Linuxant driverloader while keeping an eye on this project. LinuxAnt even supports WPA so they are way ahead.

LXer a new Linux News Site

Linux

Ran across a new Linux News site today. LXer, (pronounced Elexer).

Why another news site? Well this ones attempts to be unique according to the editor, who isn't new to the scene:

I am Dave Whitinger. I worked for Red Hat in 1997, and in 1998 I co-founded Linux Today with Dwight Johnson. After selling Linux Today to internet.com, I worked with Atipa in their web services department until everyone was laid off. For much of 2002, I worked for the good folks at LWN.net, helping them with business development issues after their unacquisition from TUCOWS.

I patiently waited for this day for a long time. January, 2004 marks an important milestone in my history with Linux news, and this is the month that I have been planning my re-entry into this field.

So what makes it different?

  1. Driven by an editor who knows and cares deeply about this community.
  2. Has a minimum of advertisements, and the few that it has should be relevant to Linuxers. Related to this is that the site should have a very clean and simple layout without any fancy graphics or formatting.
  3. Is frequently updated with useful and interesting stories, announcements, reviews, security alerts and editorials.
  4. Has a plethora of useful features to make access to the news easy in a variety of ways.
  5. Has easy community participation - discussion forums and moderated story submission.
  6. Has an open database - our news (including external links) that we are accumulating is available in XML format and readily accessible to anyone who wants it.

I have added LXer to the News Feeds on this site. Its articles will appear in the "Platforms" subject, as well by source.

XML feed