How to check DMA mode on SATA drives (Tip)

Posted on October 3rd, 2007

This is just a short hint because I had some problems about finding out how to do it when I tried to use hdparm and sdparm for it. I wanted to find it out because I had some problems with it on the laptop and just wanted to check at the workstation to be sure it’s activated and that I am not loosing performance for nothing…

As hdparm is meant for IDE drives only, although it can read some data from Sata drives it lacks support for setting or reading the DMA mode (which is of course quite logical as the DMA mode is set or activated by the bios).

Thinking about it I remembered that if it is set by the bios itself it should give some output in dmesg while sata_nv or your equivalent chipset’s sata module is loaded.

So the solution is quite simple and straight forward. We grep the output of dmesg for DMA

dmesg |grep DMA

This should show something like that:

  DMA             0 ->     4096
  DMA32        4096 ->  1048576
  DMA zone: 56 pages used for memmap
  DMA zone: 1399 pages reserved
  DMA zone: 2544 pages, LIFO batch:0
  DMA32 zone: 7108 pages used for memmap
  DMA32 zone: 512796 pages, LIFO batch:31
forcedeth: using HIGHDMA
NFORCE-CK804: 0000:00:06.0 (rev f2) UDMA133 controller
    ide0: BM-DMA at 0xd000-0xd007, BIOS settings: hda:DMA, hdb:DMA
    ide1: BM-DMA at 0xd008-0xd00f, BIOS settings: hdc:DMA, hdd:DMA
hda: 160836480 sectors (82348 MB) w/1794KiB Cache, CHS=16383/255/63, UDMA(100)
hdc: ATAPI 40X DVD-ROM CD-R/RW drive, 2048kB Cache<4>hdc: drive side 80-wire cable detection failed, limiting max speed to UDMA33
sata_nv 0000:00:07.0: Using ADMA mode
ata1: SATA max UDMA/133 cmd 0xffffc2000031c480 ctl 0xffffc2000031c4a0 bmdma 0x000000000001d400 irq 22
ata2: SATA max UDMA/133 cmd 0xffffc2000031c580 ctl 0xffffc2000031c5a0 bmdma 0x000000000001d408 irq 22
ata1.00: ATAPI: TSSTcorp CDDVDW SH-S203B, SB00, max UDMA/100
ata1.00: configured for UDMA/100
sata_nv 0000:00:08.0: Using ADMA mode
ata3: SATA max UDMA/133 cmd 0xffffc2000031e480 ctl 0xffffc2000031e4a0 bmdma 0x000000000001e800 irq 21
ata4: SATA max UDMA/133 cmd 0xffffc2000031e580 ctl 0xffffc2000031e5a0 bmdma 0x000000000001e808 irq 21
ata3.00: ATA-7: SAMSUNG SP2504C, VT100-41, max UDMA7
ata3.00: configured for UDMA/133
ata4.00: ATA-7: SAMSUNG SP1614C, SW100-27, max UDMA7
ata4.00: configured for UDMA/133

As one can see, the DMA mode is activated by all SATA devices.

Linux Kernel 2.6.22 released | Linux Kernel 2.6.22 veröffentlicht

Posted on July 9th, 2007

Today the Linux Kernel 2.6.22 got released. It includes a new wlan-stack with support for a lot of new cards/chips and also a new firewire stack.

You can find a really good summary (in german) on heise-open or if you need one on english on kernelnewbies.

Linux is sexy btw ;) so far, stay tuned

Linux Bodypainting

netwmpager config for dark wallpapers / backgrounds

Posted on June 14th, 2007
I just switched from a bright wallpaper to a black one and needed to fix some colors. One programm looking quite bad in the default config was netwmpager which I use as pager.

I tried to keep the look of the default color set and by just switching the colors from blue a blue tone to a grey one. Here is the result:

netwmpager

and here is the color part of the config which is located in /home/user/.config/netwmpager/config:

# — colors –

active_desk_color = “rgb:87/87/87″
inactive_desk_color = “rgb:2b/2b/2b”
win_border_color = “rgb:0/0/0″
grid_color = “rgb:ff/ff/ff”

active_win_color = “rgb:8a/8a/8a”
active_win_font_color = “rgb:0/0/0″

inactive_win_color = “rgb:f6/f6/f6″
inactive_win_font_color = “rgb:0/0/0″

popup_color = “rgb:e6/e6/e6″
popup_font_color = “rgb:0/0/0″

insert/replace the existing color settings and enjoy a more black netwmpager ;)

setting volume at boot with amixer

Posted on May 10th, 2007

On my IBM Thinkpad X31 I had the little annoying problem that every time I rebooted my volume was completely muted. It’s no real problem because setting it with alsamixer is just a matter of seconds but it’s just really annoying…

The solution is called amixer and also part of the alsa utilities and should be installed on your system. It’s an commandline tool to set the volume and unmute the different mixers.
After reading through the manpage I figered the following to be what I wanted

amixer set Master 100% unmute && amixer set PCM 70% unmute

Just add it to your /etc/conf.d/local.start so it is applied on bootup

echo "amixer set Master 100% unmute && amixer set PCM 70% unmute" >> /etc/conf.d/local.start

and your volume settings will be set now at boot.

Hf

btw: I don’t know why on my workstation the volume is saved on reboot and on my Thinkpad X31 its not but as long as setting volume at bootup works now with amixer I won’t complain ;)

Flash on AMD64 without 32bit binary with nspluginwrapper

Posted on May 8th, 2007
Some time ago I read about nspluginwrapper on gentoo-portage and now finally tried if it works. With this little programm it should be able to wrap 32bit plugins with 64bit browsers, so you don’t need to chroot oder install 32bit binarys. It’ some kind of ndiswrapper but for all kind of browser plugins. At the moment it supports:

  • Acrobat Reader (5.0.9, 7.0.1)
  • DejaVu Libre (3.5.14)
  • Flash Player (7.0, 9.0)
  • Linux JPEG 2000 (0.0.2)
  • Mplayerplug-in (2.80, 3.25)
  • Real Player (10.0.5)
  • ICA Citrix Client
  • Most important for me is the flash plugin, especially for music in youtube or on sites like mixupload. It’s also possible to watch/hear that stuff without flash, I know that, but with flash it’s kind of faster and if I like it I can still download it the way I used to before having flash on 64 bit ;)

    The installation is really easy and straight, so let’s go:

    First you need to emerge nspluginwrapper.

    emerge -av nspluginwrapper

    If you are running a stable gentoo system you will need put it in package.keywords as it’s still in testing (it’s running really fine here so try it)

    echo net-www/nspluginwrapper >> /etc/portage/package.keywords

    Now as an example we will try installing the flash plugin with

    emerge -av netscape-flash

    and tell nspluginwrapper to scan and install the existing plugins with

    nspluginwrapper -v -a -i

    Now there should be something like that in your about:plugins screen and flash should work fine. For example a youtube video.

    nspluginwrapper on amd64nspluginwrapper with youtube video


    design: makequick.com | modificashuns and bugfixes by jesse
    bottom