Archive for the ‘Linux’ Category

Hopefully the last RC of the Gedit LaTeX Plugin available

Saturday, November 21st, 2009

This is probably the last release candidate for the 0.2 release of the LaTeX Plugin for Gedit. There are a lot of bug fixes making life easier for the TeX author ;)

Gedit LaTeX Plugin with embedded PDF preview

Gedit LaTeX Plugin with embedded PDF preview

LaTeX

  • fixed crash in LaTeX validator
  • warn instead of crash on \include{file.tex} (2749624)
  • implemented user dictionary and improved spell checking configuration (2792874)
  • removed duplicates from latex.xml (2869574)
  • implemented template support (Save As Template and new from template)
  • fixed DVI forward search issue (2884708)
  • improved New LaTeX Document dialog (2897797)
  • fixed the Choose Master Document dialog (2898996)
  • improved the embedded PDF preview (2839668)

BibTeX

  • fixed crash in BibTeX parser
  • fixed exception in bibliography style preview

Tools

  • tool keyboard shortcut may be configured again
  • fixed serialize error when saving tools (2892971)

Common

  • the file extensions activating LaTeX or BibTeX features may now be configured (key LatexExtensions in preferences.xml) (2818067)
  • improved debug output format
  • fixed encoding issues with config files
  • fixed special-character-in-urls issue (2794805)

Give it a try!

Gedit LaTeX Plugin in Ubuntu 9.04

Friday, May 1st, 2009

Thanks to the efforts of Andrea Gasparini the Gedit LaTeX Plugin is now available in Ubuntu 9.04 (Jaunty Jackalope). Currently version 0.2rc1 is available as gedit-latex-plugin in the package management of the distribution.

Thanks Andrea ;)

Gedit LaTeX Plugin 0.2 RC1 available

Friday, January 9th, 2009

I’m happy to announce the first release candidate for the 0.2 branch of the Gedit LaTeX Plugin:

Architecture

This release features a new generic plugin base layer. It abstracts from the details of gedit and gtksourceview providing a clean base for the TeX-specific parts. This new architecture makes it easier to fix bugs and develop new features.

Base

LaTeX

BibTeX

  • rudimentary BibTeX code completion
  • maximum file size for BibTeX parser may be configured (fixes 2149254, 2149189)

And a lot of minor issues have been fixed (2238342, 2031271, 2002630, 1913496, 1911116, 1880327, 1818707, 1820138).

So give it a try and have fun ;)

Ubuntu packages for the LaTeX Plugin

Sunday, March 30th, 2008

Thanks to Andrea Gasparini there’s now an Ubuntu package for the Gedit LaTeX Plugin, see https://edge.launchpad.net/~ubuntu-it-dev/+archive. You can download it directly from http://launchpadlibrarian.net/12896227/gedit-latex-plugin_0.1.3.1-2%7E0ubuntuitdev1_i386.deb.

Sadly we will not see it in the official repositories until the next release because the ones of Hardy Heron are already frozen.

Gentoo Linux on the MSI S270

Saturday, June 2nd, 2007

I got myself the 12,1″ notebook S270 from MSI. As Linux is the best choice to me, I’ve chosen to equip this black beauty with a Gentoo installation. These pages explains how to basically install the system. In addition I’ve collected some experiences and hints for the configuration.

Hardware details

AMD Turion 64 MT-30
Lancaster | Sockel 754 | 1.600 MHz | 800 MHz HyperTransport (HT800) | 64 + 64 KB L1 | 1.024 KB L2 | MMX, Extended 3DNow!, SSE, SSE2, SSE3, AMD64, PowerNow!, NX-Bit | 22 W TDP
512 MB RAM
SO-DIMM | DDR333 | PC2700
ATI Radeon Xpress 200M + Mobility Radeon X300 IGP
OHCI USB 1.1 | EHCI USB 2.0 | DDR400 | PCI Express x16 | UltraDMA/133 2 vertex units | 4 pixel pipelines | 350 MHz GPU clock | 0,13µm Low-K | PCI-Express | 64-Bit memory interface | PowerPlay 5.0 | SmoothVision 2.1 | SmartShader 2.0
Toshiba MK8025GAS
80 GB | UltraDMA/100 | 8.192 KB cache | 4.200 rpm
Realtek RTL8139 Fast Ethernet Adapter
InProComm IPN 2220 Wireless LAN Adapter
IEEE 802.11b/g
Ricoh R5C522 OHCI IEEE 1394 Controller
Ricoh RL5c476 II CardBus Bridge
SD/MMC
SiW Bluetooth Adapter

Partitioning and file systems

Partitioning

As usual on Linux, we need a swap and the root file system. We don’t need boot partitions anymore as boot loaders have advanced quite a bit. First of all, I’m setting up an extended partition with 60 GB, so that I can install a further operating system later on. I’m creating the two partitions as logical partitions inside the extended one. The swap should be about 30% greater than the system’s memory to be able to use Suspend2. Disk space is plentiful, so 1 GB swap should be enough. The rest is used for root.

File systems

For the root file system I’m using the powerful ReiserFS. See here for a survey of several file systems.

fstab

The configuration above results in the following /etc/fstab:

/dev/hda6    /           reiserfs    noatime,notail         0 1
/dev/hda5    none        swap        sw                     0 0
proc         /proc       proc        nodiratime             0 0
shm          /dev/shm    tmpfs       nodev,nosuid,noexec    0 0

Basic system setup

32-bit vs. 64-bit

If you don’t exceed the address space of 4 GB and don’t have use for the more precise arithmetic, then 64-bit computing will not provide any impovement. I’m setting up a 32-bit system to avoid the memory oberhead produced by a 64-bit one (many objects stored in memory are 64 bits wide). Memory is a precious resource, especially in case of a notebook.

make.conf

In 32-bit legacy mode, the Turion 64 acts just like an Athlon XP with SSE3, so the /etc/make.conf looks like this:

CFLAGS="-march=k8 -O2 -pipe -msse3 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}
MAKEOPTS="-j2"
ACCEPT_KEYWORDS="~x86"
USE="..."
LINGUAS="de"

X11

Sadly, the X.org open source driver for Radeon GPUs does not support the PowerPlay feature and is unable to make use of the DRI in case of the X300. So I’m using ATIs proprietary driver.

Setting the VIDEO_CARDS variable

Your /etc/make.conf file must contain the following to prepare the X.org server for the fglrx driver:

VIDEO_CARDS="radeon fglrx vesa"

Kernel configuration

The kernel must be able to load modules and support MTRRs. The AGPgart driver must be compiled as a module and the DRM should be deactivated. PCI-Express is needed, too:

Loadable Module Support --->
  [*] Enable loadable module support
    [*] Module unloading

Processor type and features ---><br/>
  [*] MTRR (Memory Type Range Register) support

Bus options (PCI, PCMCIA, EISA, MCA, ISA) --->
  --- PCI support
    [*] PCI Express support

Device Drivers --->
  Character Devices --->

    [M] /dev/agpgart (AGP Support)
      [M] ATI Chipset
    [ ] Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)

Proprietary ATI driver

The driver itself and some extra tools must be installed:

$ emerge ati-drivers ati-drivers-extra

The tool can be used to display all options…

$ /opt/ati/bin/aticonfig --help | less

…and then write a new configuration

$ /opt/ati/bin/aticonfig --initial --input=/etc/X11/xorg.conf

Of course, the driver has to be selected in your /etc/X11/xorg.conf, for details see Downloads.

Wireless LAN

Wireless tools and DHCP client

First of all, the tools necessary for establishing any wireless connection and a DHCP client must be installed:

$ emerge wireless-tools dhcpcd

W-LAN driver

The kernel does not provide a driver for the integrated InProComm IPN2220, so I’m using the NDISWrapper. Bodo only describes the 64-bit installation and the 32-bit driver that comes with the notebook is incompatible with the NDISWrapper. I’ve found out that many Acer notebooks use the IPN2220 and so their W-LAN driver works fine.

$ emerge ndiswrapper
$ ndiswrapper -i neti2220.inf
$ ndiswrapper -l

lists all installed drivers. To activate the NDISWrapper, the according module has to be loaded with

$ modprobe ndiswrapper

To do so automatically, you can add the module to /etc/modules.autoload.d/kernel-2.6.

The S270 may also come with a RaLink RT2500 wireless chipset. If you have such a device, you can skip the installation of NDISWrapper and do

$ emerge rt2500

This driver creates the device node ra0 instead of wlan0.

Establish a connection

$ iwconfig

displays the configuration of the wireless interfaces,

$ iwlist wlan0 scan

scans for access points,

$ iwconfig wlan0 essid "ESSID"

connects to access point ESSID and

$ dhcpcd wlan0

fetches the network information from the DHCP server.

Automating things

You may then set up a runlevel script for the interface and activate it on boot:

$ cd /etc/init.d
$ ln -s net.lo0 net.wlan0
$ rc-update add net.wlan0 default

You propably have to change /etc/conf.d/wireless. See here for details.

4k kernel stack

The NDISWrapper forms a thin layer around the Windows driver and therefore needs a kernel stack of 8k minimum. Accordingly, the kernel must not be compiled with the 4k stack feature activated – unless you can do without the W-LAN adapter.

Power management

CPU

The processor features the PowerNow! technology (and Cool’n'Quiet respectively), meaning that core voltage and clock can be throttled. Therefor, the right kernel driver has to be selected and control be given to a userspace application:

Power management options (ACPI, APM) --->
  [*] CPU Frequency scaling --->
    Default CPUFreq governor (userspace) --->

    <*> 'performance' governor
    <*> 'powersave' governor
    --- 'userspace' governor for userspace frequency scaling
    <*> 'ondemand' cpufreq policy governor
    <*> 'conservative' cpufreq governor
    --- CPUFreq processor drivers
    <*> AMD Opteron/Athlon64 PowerNow!

Now, we need a daemon handling the frequency scaling for us:

$ emerge cpufreqd
$ rc-update add cpufreqd default

W-LAN

The W-LAN adapter may also be put into an energy-saving mode. You can add the command to /etc/conf.d/local.start:

$ iwconfig wlan0 power on power max period 3

This instructs the adapter to sleep after 3 seconds of inactivity.

Save even more energy

There may be a lot more possibilities to save power, but I think that most of them are too complicated or just in vain.

Hardware sensors

At the moment, the CPU temperature (per ACPI Thermal Zone) and the hard disk temperature (per S.M.A.R.T.) can be monitored. To access the Thermal Zone, a special kernel driver is needed:

Power management options (ACPI, APM) --->

  ACPI (Advanced Configuration and Power Interface) Support  --->
    [*] ACPI Support
      <*> Processor
        <*> Thermal Zone

After that, you can read the temperature in /proc/acpi/thermal_zone/THRM/temperature or let an applet do this for you (e.g. the sensors-applet). A small tool called hddtemp can be used to obtain the hard disk’s temperature:

$ emerge hddtemp
$ hddtemp /dev/hda
/dev/hda: TOSHIBA MK8025GAS: 47°C

Suspend-to-Disk

Hibernating works fine with the Suspend2 patch (which is now called TuxOnIce). Here you find more detailed information in on that. I’ve just concluded the essential steps here.

Setup

There are Kernel sources already patched. Besides the patch, they are equal to the official Gentoo sources.

$ emerge suspend2-sources

To avoid problems, the USB driver and the NDISWrapper module should be unloaded before hibernating. The hibernate script may assume that (/etc/hibernate/common.conf):

UnloadModules ndiswrapper ohci_hcd ehci_hcd

In addition, the proprietary ATI driver needs more pages – 7,500 will suffice:

ProcSetting extra_pages_allowance 7500

The kernel has to know where the memory image resides and where to store it, so you have to pass resume2=swap:/dev/hdaX at boot (see GRUB configuration in Downloads).

Hard disk performance

The hard disk performance may be increased by tweaking some parameters with hdparm. To make these settings permanent, you can store them in /etc/conf.d/hdparm and add hdparm to your boot runlevel with

$ rc-update add hdparm boot
hda_args="-W0 -u1 -c1 -d1 -K1 -A1 -m16"
-W0 disables write-caching as recommended for journaling filesystems
-u1 permits the driver to unmask other interrupts during processing of a disk interrupt
-c1 enables 32-bit IDE I/O support
-d1 enables DMA
-K1 enables the driver to retain -APSWXZ parameters over a soft reset
-A1 enables read-lookahead
-m16 sets sector count to 16 for multiple sector I/O (IDE Block Mode)
The S270 may also come with a WD Scorpio hard disk. It seems that this drive doesn’t understand the -K switch.

Prelinking

Though prelinking is nothing specific to this notebook, I just want to mention it here as it may really speed up the system. When you run an application, shared libraries need to be loaded and references resolved. Prelink carries out this dynamic linking and stores the results in the executable. See the here for details.

MMC/SD card reader

Since Kernel 2.6.17, there should be a driver for the Ricoh RL5C476 II CardBus controller. Just issue

$ pmount /dev/mmcblk0p1 mmc

after you’ve inserted the SD card to mount it to /media/mmc. The device name may vary, just take it from the output of

$ cat /proc/partitions

Further Reading

Gedit LaTeX Plugin appeares in LinuxUser magazine

Friday, April 20th, 2007

The LaTeX plugin is mentioned in the current edition of LinuxUser, a famous German linux magazine. It is said to be the most sophisticated plugin for gedit ;)

See the online version of the article