Category Archives: linux

On this page:

Cintiq 12WX on Ubuntu Jaunty with ATIconfig

After far too much pain and suffering, I got my tablet to work again. Culprit: the switch to an ATI graphics card threw my config out of whack.

Section "ServerLayout"
        Identifier     "Default Layout"
        Screen      0  "aticonfig-Screen[0]-0" 0 0
        Screen         "aticonfig-Screen[0]-1" RightOf "aticonfig-Screen[0]-0"
        InputDevice    "stylus" "SendCoreEvents"
        InputDevice    "eraser" "SendCoreEvents"
        InputDevice    "pad"
EndSection

Section "Files"
EndSection

Section "Module"
        Load  "glx"
EndSection

Section "ServerFlags"
        Option      "DontZap" "True"
        Option      "AutoAddDevices" "False"
        Option      "Xinerama" "on"
EndSection

Section "InputDevice"
 Identifier  "cursor"
        Driver      "wacom"
        Option      "Mode" "Absolute"
        Option      "Device" "/dev/input/wacom"
        Option      "Type" "cursor"
        Option      "USB" "on"                  # USB ONLY
EndSection

Section "InputDevice"
        Identifier  "stylus"
        Driver      "wacom"
        Option      "Mode" "Absolute"
        Option      "Device" "/dev/input/wacom"
        Option      "Type" "stylus"
        Option      "USB" "on"                  # USB ONLY
EndSection

Section "InputDevice"
        Identifier  "eraser"
        Driver      "wacom"
        Option      "Device" "/dev/input/wacom"
        Option      "Type" "eraser"
        Option      "USB" "on"                  # USB ONLY
EndSection

Section "InputDevice"
        Identifier  "pad"
        Driver      "wacom"
        Option      "Device" "/dev/input/wacom"
        Option      "Type" "pad"
        Option      "USB" "on"                  # USB ONLY
EndSection

Section "Monitor"
        Identifier   "aticonfig-Monitor[0]-0"
        Option      "VendorName" "ATI Proprietary Driver"
  Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
EndSection

Section "Monitor"
        Identifier   "aticonfig-Monitor[0]-1"
        Option      "VendorName" "ATI Proprietary Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
EndSection

Section "Device"
        Identifier  "aticonfig-Device[0]-0"
        Driver      "fglrx"
        Option      "OpenGLOverlay" "off"
        Option      "OverlayOnCRTC2" "1"
        Option      "DesktopSetup" "clone"
        Option      "VideoOverlay" "on"
        Option      "EnableMonitor" "crt1,tmds1"
        BusID       "PCI:1:0:0"
EndSection

Section "Device"
        Identifier  "aticonfig-Device[0]-1"
        Driver      "fglrx"
        BusID       "PCI:1:0:0"
        Screen      1
EndSection

Section "Screen"
        Identifier "aticonfig-Screen[0]-0"
        Device     "aticonfig-Device[0]-0"
        Monitor    "aticonfig-Monitor[0]-0"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes    "1600x1200"
        EndSubSection
EndSection

Section "Screen"
        Identifier "aticonfig-Screen[0]-1"
        Device     "aticonfig-Device[0]-1"
        Monitor    "aticonfig-Monitor[0]-1"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes    "1280x800"
        EndSubSection
EndSection

I also had to manually calibrate my Wacom tablet.

xsetwacom set pad StripLDn "CORE KEY  Minus"
xsetwacom set pad StripLUp "CORE KEY  Plus"
xsetwacom set pad Button4 "core key  Del "
xsetwacom set pad Button3 "core key space "
xsetwacom set pad Button2 "CORE KEY n"
xsetwacom set pad Button1 "CORE KEY p"
xsetwacom set stylus Screen_No "1"
xsetwacom set stylus topy "361"
xsetwacom set stylus TopX 29500
xsetwacom set stylus BottomY 22000
xsetwacom set stylus TopY 0

Last bit of weirdness: the pad buttons only work if I’m also touching the scroll strip. It took me ages to figure that out.

How to extract just the audio from Sametime Unyte recordings, on Linux

I use Sametime Unyte for web conferences at work. Unyte allows you to record your teleconferences (slides and audio), and you can download a ZIP containing Flash video after your session.

I usually extract the audio track and publish that as a separate MP3 so that people can listen to it. I can also have the audio file transcribed. The audio track from Sametime Unyte is of lower quality than my voice recorder, but it’s a good backup and it captures both sides of the phone conversation.

Here is one way to extract the audio using Linux:

for FILE in *.swf; do ffmpeg -i $FILE -ab 64k $FILE.wav; done

Then you can concatenate all the WAV files:

sox *.wav all.wav

Then you can use Audacity to edit the resulting file.

Cintiq 12WX, OpenSuse 11.0, and much pain and suffering

Let that be a lesson to me: Always blog solutions to problems. The cost of doing so is not just time wasted solving things again, but also the frustration of knowing I’d solved the problem before and if I had just taken a few extra minutes to share what I knew… GRR.

When I upgraded to OpenSuse 11 on the desktop at home, I forgot to back up my X11 configuration files: the Nvidia-Twinview-Cintiq12WX configuration I’d laboriously pieced together from fragments on the Internet and lots of troubleshooting.

ARGH.

Anyway, here it is, so I don’t lose it again: my xorg.conf:

Section "ServerLayout"
    Identifier     "Layout[all]"
    Screen         0 "Screen0" 0 0
    InputDevice    "Keyboard[0]" "CoreKeyboard"
    InputDevice    "Mouse[1]" "CorePointer"
    InputDevice    "stylus"   "SendCoreEvents"
    InputDevice    "eraser"  "SendCoreEvents"
    InputDevice    "pad"
    Option         "Clone" "off"
    Option         "Xinerama" "off"
EndSection

Section "Files"
    InputDevices   "/dev/gpmdata"
    InputDevices   "/dev/input/mice"
    InputDevices   "/dev/input/wacom"
    FontPath       "/usr/share/fonts/misc:unscaled"
    FontPath       "/usr/share/fonts/local"
    FontPath       "/usr/share/fonts/75dpi:unscaled"
    FontPath       "/usr/share/fonts/100dpi:unscaled"
    FontPath       "/usr/share/fonts/Type1"
    FontPath       "/usr/share/fonts/URW"
    FontPath       "/usr/share/fonts/Speedo"
    FontPath       "/usr/share/fonts/PEX"
    FontPath       "/usr/share/fonts/cyrillic"
    FontPath       "/usr/share/fonts/latin2/misc:unscaled"
    FontPath       "/usr/share/fonts/latin2/75dpi:unscaled"
    FontPath       "/usr/share/fonts/latin2/100dpi:unscaled"
    FontPath       "/usr/share/fonts/latin2/Type1"
    FontPath       "/usr/share/fonts/latin7/75dpi:unscaled"
    FontPath       "/usr/share/fonts/baekmuk:unscaled"
    FontPath       "/usr/share/fonts/japanese:unscaled"
    FontPath       "/usr/share/fonts/kwintv"
    FontPath       "/usr/share/fonts/truetype"
    FontPath       "/usr/share/fonts/uni:unscaled"
    FontPath       "/usr/share/fonts/CID"
    FontPath       "/usr/share/fonts/ucs/misc:unscaled"
    FontPath       "/usr/share/fonts/ucs/75dpi:unscaled"
    FontPath       "/usr/share/fonts/ucs/100dpi:unscaled"
    FontPath       "/usr/share/fonts/hellas/misc:unscaled"
    FontPath       "/usr/share/fonts/hellas/75dpi:unscaled"
    FontPath       "/usr/share/fonts/hellas/100dpi:unscaled"
    FontPath       "/usr/share/fonts/hellas/Type1"
    FontPath       "/usr/share/fonts/misc/sgi:unscaled"
    FontPath       "/usr/share/fonts/xtest"
    FontPath       "/opt/kde3/share/fonts"
EndSection

Section "Module"
    Load           "glx"
    Load           "type1"
    Load           "extmod"
    Load           "dbe"
    Load           "freetype"
    Load           "vbe"
    Load           "ddc"
    Load           "i2c"
    Load           "bitmap"
EndSection

Section "ServerFlags"
    Option         "AllowMouseOpenFail" "on"
    Option         "Xinerama" "0"
    Option "AutoAddDevices"  "False"
EndSection

Section "InputDevice"
    Identifier     "Keyboard[0]"
    Driver         "kbd"
    Option         "Protocol" "Standard"
    Option         "XkbLayout" "us"
    Option         "XkbModel" "microsoftpro"
    Option         "XkbOptions" "ctrl:nocaps"
    Option         "XkbRules" "xfree86"
EndSection

Section "InputDevice"
    Identifier     "Mouse[1]"
    Driver         "mouse"
    Option         "Buttons" "9"
    Option         "Device" "/dev/input/mice"
    Option         "Name" "Razer Diamondback Optical Mouse"
    Option         "Protocol" "explorerps/2"
    Option         "Vendor" "Sysp"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    Driver         "wacom"
    Identifier     "cursor"
    Option         "Mode" "Absolute"
    Option         "Device" "/dev/input/wacom"
    Option         "Type" "cursor"
    Option         "USB" "on"                  # USB ONLY
    Option         "ScreenNo" "0"
    Option         "TwinView" "horizontal"
    Option         "TVResolution"  "1280x800,1600x1200"
EndSection
Section "InputDevice"
    Driver         "wacom"
    Identifier     "stylus"
    Option         "Mode" "Absolute"
    Option         "Device" "/dev/input/wacom"
    Option         "Type" "stylus"
    Option         "USB" "on"                  # USB ONLY
    Option         "ScreenNo" "0"
    Option         "TwinView" "horizontal"
    Option         "TVResolution"  "1280x800,1600x1200"
EndSection
Section "InputDevice"
    Driver         "wacom"
    Identifier     "eraser"
    Option         "Device" "/dev/input/wacom"
    Option         "Type" "eraser"
    Option         "USB" "on"                  # USB ONLY
    Option         "ScreenNo" "0"
    Option         "TwinView" "horizontal"
    Option         "TVResolution"  "1280x800,1600x1200"
EndSection
Section "InputDevice"
    Driver         "wacom"
    Identifier     "pad"
    Option         "Device" "/dev/input/wacom"
    Option         "Type" "pad"
    Option         "USB" "on"                  # USB ONLY
    Option         "ScreenNo" "0"
    Option         "TwinView" "horizontal"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "DELL"
    ModelName      "D1626HT"
    DisplaySize     388    291
    HorizSync       30.0 - 96.0
    VertRefresh     50.0 - 160.0
    Option         "dpms"
EndSection

Section "Device"
    Identifier     "VideoCard"
    Driver         "nvidia"
    VendorName     "NVidia"
    BoardName      "GeForce 6800 GT"
    Option "TwinView" "true"
    Option "MetaModes" "1600x1200,1280x800"
    Option "SecondMonitorHorizSync"   "31-107"
    Option "SecondMonitorVertRefresh" "50-75"
    Option "TwinViewOrientation" "LeftOf"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "VideoCard"
    Monitor        "Monitor1"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
    Option "SecondMonitorHorizSync"   "31-107"
    Option "SecondMonitorVertRefresh" "50-75"
    Option "TwinViewOrientation" "LeftOf"
    Option "MetaModes" "1600x1200,1280x800"
    Option "TwinView" "on"
EndSection

Getting back to the xorg.conf above was a bit of a pain. First I needed to get the nvidia drivers working again, which was a matter of adding the repository and downloading the RPMs. Then I needed to get the dual-monitor setup. I was running into all sorts of problems with it, and I must’ve tried configuring TwinView from scratch at least five times. Then I noticed I had an xorg.conf.twinview in my home directory, so I copied that and used it as a basis. Progress! The screen on the Cintiq started working as a proper screen again.

I had been having problems with the wacomcpl in OpenSuse 11 (Error: unknown device “stylus” or it is currently a core device), so I recompiled the drivers from the Linux Wacom Project. While trying to recompile the driver, I discovered that the kernel-source installed on my system… didn’t have the source files. Pfft.

After much poking around, I threw up my hands and downloaded the kernel source code that matched my system, copied the appropriate config file from /boot as the kernel source code directory’s .config, and started “make oldconfig; make”.

After make had set up the directory tree, I switched back to the linuxwacom drivers and ran “./configure –with-kernel= –enable-wacom –enable-hid –enable-evdev –enable-usbmouse –enable-modver –enable-xsetwacom > log”. Fortunately, make and make install proceeded without incident. (After all the false starts I’ve had today, I was glad at least something worked.)

Then it was a matter of more TwinView poking around to get the tablet confined to just one screen instead of being mapped to two. With a lot of fiddling, I finally got it to work.

Now it’s Sunday evening and I’m grumpy from an entire afternoon spent dealing with hardware issues, so I’m in no mood to write our annual updates. I’ll probably feel much better after the Chicken Maryland we’ve planned for dinner, though. =) And after some cat cuddling. Cats are nice and warm.

All that griping aside, I’d still rather use Linux than Microsoft Windows for stuff like this. =)

TCP window scaling, or zomg the Internet works for me again

Sites such as aircanada.com, pcfinancial.ca, and (horror of horrors!) torontopubliclibrary.ca had gotten _unbearably_ slow on Linux.

Here’s how I fixed it (as root):

echo 0 > /proc/sys/net/ipv4/tcp_window_scaling

I love you, Ubuntu forums.

Switching to Ubuntu

Switching my laptop to Ubuntu took much less time and effort than I thought it would take. I couldn’t resize my existing partitions, so I formatted my data partition and made my swap partition smaller. This gave me about 6.5GB of space for the base Ubuntu system. My /home directory was already on a separate partition, and the other partitions had my installations of Microsoft Windows and Redhat Enterprise Linux.

Reusing my /home partition made it really easy to get up and running. I’ve also symlinked a few shared directories such as /usr/src and /usr/local. End result: a system that’s pretty much like my RHEL system, but much more current.

Hooray!

Rumor has it that Dragon NaturallySpeaking works under WINE

That would be _just_ awesome. Wine Application DB – Viewing App: Dragon Naturally Speaking 9

I wonder if it will let me program in Emacs through dictation?

UPDATE: Darn! I have Dragon NaturallySpeaking 9.5, which does not work. Boo. Back to VMWare, then…