Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Configuring Xorg for dual screen, single wacom

  1. #1

    Configuring Xorg for dual screen, single wacom

    Hi, I've recently installed 10.04 on a dual screen machine. I use Twinview Via Nvidia drivers to stretch a single desktop across both monitors. As a result, drawing in GIMP becomes very difficult, as proportions are likewise stretched out. Under windows, I would simply configure the tablet and restrict it to a single monitor. But under Ubuntu 10.04, this has proven quite challenging. I've studied the question, and the obvious solution is to add the ScreenNo option to Xorg.conf. The problem is, Xorg.conf now seems a dated concept, no file being present by default under 10.04.

    I've tried to generate one using sudo Xorg -configure, but end up with:

    Fatal server error:
    Server is already active for display 0
    If this server is no longer running, remove /tmp/.X0-lock
    and start again.


    According to:

    https://wiki.ubuntu.com/X/Config

    I can simply write a simple xorg.conf file and Xorg will apply my script to the WACOM when loading. Trouble is, the one I've written up seems to be completely ignored. I'm rather inexperienced with xorg.conf, so perhaps I'm missing something in the file itself. Any advice?

    Thanks for any possible insight. Here's the .Conf file's content so far:

    Code:
    Section "InputDevice"
      Driver        "wacom"
      Identifier    "stylus"
      Option        "Device"        "/dev/input/wacom"    # USB ONLY
      Option        "Type"          "stylus"
      Option        "Tilt"          "on"
      Option        "USB"           "on"                  # USB ONLY
      Option        "Twinview"      "horizontal"
      Option     "ScreenNo" "0"
    
    EndSection
    
    Section "InputDevice"
      Driver        "wacom"
      Identifier    "eraser"
      Option        "Device"        "/dev/input/wacom"    # USB ONLY
      Option        "Type"          "eraser"
      Option        "Tilt"          "on"
      Option        "USB"           "on"                  # USB ONLY
      Option        "Twinview"      "horizontal"
      Option     "ScreenNo" "0"
    EndSection
    
    Section "InputDevice"
      Driver        "wacom"
      Identifier    "cursor"
      Option        "Device"        "/dev/input/wacom"    # USB ONLY
      Option        "Type"          "cursor"
      Option        "USB"           "on"                  # USB ONLY
      Option        "Twinview"      "horizontal"
      Option     "ScreenNo" "0"
    EndSection
    
    # This section is for Intuos3, CintiqV5, Graphire4, or Bamboo without touch
    Section "InputDevice"
      Driver        "wacom"
      Identifier    "pad"
      Option        "Device"        "/dev/input/wacom"    # USB ONLY
      Option        "Type"          "pad"
      Option        "USB"           "on"                  # USB ONLY
    EndSection

  2. #2
    Join Date
    Aug 2007
    Location
    Alsip
    Beans
    199
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Configuring Xorg for dual screen, single wacom

    Just to be sure, do you have the right file path? should be:
    Code:
    /etc/X11/xorg.conf
    Made my own xorg also, and learned the hard way that the 'x' does need to be capitalized.
    It's funny to think how underdeveloped the world is, really makes it easier for a developer to get ahead.

    Linux User: #461968

  3. #3
    Join Date
    Nov 2005
    Location
    Uppsala, Sweden
    Beans
    2,180
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Configuring Xorg for dual screen, single wacom

    Not sure what you mean when you say the proportions are stretched? With twinview both your screens should run at their native resolutions, and any program you run should still be at the normal proportions...

    Is that the entire xorg.conf?
    You need more than just the InputDevice sections to get xorg to use them.
    First, to generate a proper xorg.conf using the nvidia driver with twinview, run this command:
    Code:
    nvidia-xconfig -o ~/xorg.conf --force-generate --twinview --twinview-orientation="RightOf"
    This will place the new xorg.conf in your home directory so you can edit it before you move it to /etc/X11/.

    I would try this simple xorg.conf first without adding any lines for the wacom device. To try it, run:
    Code:
    sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak1
    sudo cp ~/xorg.conf /etc/X11/xorg.conf
    Then restart X (press Alt + Print screen + K).

    If the wacom device don't work as you like it, open up the xorg.conf in your home directory, add your InputDevice sections and make sure they are used by adding the same input devices to the ServerLayout section, which should look something like this (from a link on the page you linked to):
    Code:
    Section "ServerLayout"
            Identifier     "Default Layout"
            Screen 0 "Screen0"   0 0
    #        InputDevice    "Mouse0"    "CorePointer"
    #        InputDevice    "Keyboard0" "CoreKeyboard"
            InputDevice    "stylus"    "SendCoreEvents"
            InputDevice    "eraser"    "SendCoreEvents"
            InputDevice    "cursor"    "SendCoreEvents"    # For non-LCD tablets only
        InputDevice    "touch"     "SendCoreEvents"    # Only a few TabletPCs support this type
            InputDevice    "pad"   # For Intuos3/CintiqV5/Graphire4/Bamboo tablets
    EndSection
    Note that I don't have any wacom device, so I have no idea if you need to change anything else to get your specific device working. I have noticed that the automatic detection of mouse and keyboard works better than having a static configuration in xorg.conf, which is why I commented out the mouse and keyboard lines.

    And when you have made the changes, save the file and copy it to /etc/X11 with these commands:
    Code:
    sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak2
    sudo cp ~/xorg.conf /etc/X11/xorg.conf
    Then restart X (press Alt + Print screen + K).

    To go back to your original xorg.conf:
    Code:
    sudo cp /etc/X11/xorg.conf.bak1 /etc/X11/xorg.conf
    And to go back to the new one without the wacom configuration:
    Code:
    sudo cp /etc/X11/xorg.conf.bak2 /etc/X11/xorg.conf
    Last edited by jocko; April 25th, 2010 at 07:03 AM.

  4. #4

    Re: Configuring Xorg for dual screen, single wacom

    Wow, now I'm getting somewhere... sortof. I managed to get the Wacom to stop working, and to screw up xorg, but at least that means I'm messing with the right files now. I've started over with a fresh xorg.conf, and I'll keep tweaking it until I get things right.

    Thanks for the feedback you two, very helpful. That's why I love Linux, the community is simply awesome.

  5. #5
    Join Date
    Apr 2010
    Beans
    1

    Re: Configuring Xorg for dual screen, single wacom

    Wacom tablets used to be configured via HAL FDI files, but since Lucid dropped HAL I'm not entirely sure how to set it up properly. I can provide a hacky method which lets you set up the Wacom tablet for the screen with the top left of the tablet in though, if you're using the default XOrg config. Because I'm using a Bamboo1, that's what's in my commands. You can find the appropriate string to put in by running
    Code:
    xsetwacom --list -v
    And look for the device which contains the STYLUS.

    Run the following:
    Code:
    xsetwacom --get "Wacom Bamboo1" BottomX
    This gives you the X resolution of your tablet. I'll call this TX. Next you need the resolution of the virtual screen, which can be found by
    Code:
    xsetwacom --get "Wacom Bamboo1" SBottomX0
    I'll call this WX. Finally, let's call the actual X resolution of your primary screen SX.

    The hacky method is to set the X resolution of your tablet to be bigger than it actually is. This effectively causes the driver to map an out-of-bounds area to your second screen. The value you should set it to, AX is TX * (WX / SX). You might like to set it a little less than that to stop the cursor jumping to the first pixel on the second screen, but that's preference. Anyway, once you've got AX, set it with:
    Code:
    xsetwacom --set "Wacom Bamboo1" BottomX AX
    And repeat for the Y coordinates if necessary. The set commands will have to be run whenever you start using the tablet, so you might want to put them in a script. In theory it can be automated via a devicekit rule, but I've not yet got around to doing so.

  6. #6

    Re: Configuring Xorg for dual screen, single wacom

    Well, that solved my problem. I ended up with the following two commands, one for the stylus, one for the eraser:

    Code:
    xsetwacom --set "Wacom Intuos3 6x8" BottomX 35700
    xsetwacom --set "Wacom Intuos3 6x8 eraser" BottomX 35700
    As you suggested, I messed with the numbers to remove the edge of the second monitor. I've simply added both commands as start-up applications, and created some temporary shortcuts under system tools. Everything works fine, but not one to be satisfied with fine, I'm going to try and write a script that toggles between single and dual screen mode, and perhaps link it to a button on my tablet, allowing me to switch modes.

    Thanks

  7. #7
    Join Date
    Dec 2009
    Location
    Finland
    Beans
    22
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Configuring Xorg for dual screen, single wacom

    This

    xsetwacom --list -v
    Gives me this ->
    Code:
    Unknown command '--list'
    Usage: xsetwacom [options] [command [arguments...]]

  8. #8

    Re: Configuring Xorg for dual screen, single wacom

    What wacom are you using?

  9. #9
    Join Date
    Nov 2008
    Beans
    9,635
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Configuring Xorg for dual screen, single wacom

    Code:
    xsetwacom -v list

  10. #10
    Join Date
    Nov 2005
    Location
    Scotland
    Beans
    89

    Re: Configuring Xorg for dual screen, single wacom

    I would like to add my experience to this thread.

    I have two monitors, 1280x1024 to the left of 1920x1200. This results in a Twinview desktop of 3200x1200.

    My tablet is reported by xsetwacom --list as a "Wacom Volito2 4x5"

    After a bit of trial and error from reading this thread, I realised using the Screen_No parameter alters the calculation. I have created a revised formula that works for my setup:

    WX = Twinview Desktop X value
    SX = Monitor X value
    TX = Tablet X value (from xsetwacom --get "Wacom ..." BottomX)

    Code:
    Values to use Screen 0: 
    TopX = 0
    BottomX = TX - ( ( TX*(WX/SX) ) / 2 )
    
    Values to use Screen 1: 
    TopX = TX - ( ( TX*(WX/SX) ) / 2 )
    BottomX = TX
    This results in the following xsetwacom parameters to have the tablet track solely across my 1920x1200 monitor:

    Code:
    xsetwacom --set "Wacom Volito2 4x5" Twinview Horizontal
    xsetwacom --set "Wacom Volito2 4x5" Screen_No 1
    xsetwacom --set "Wacom Volito2 4x5" TopX 851
    xsetwacom --set "Wacom Volito2 4x5" BottomX 5104

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •