Bug 382592

Summary: sax2: bogus values for options in RawOption are written to xorg.conf
Product: [openSUSE] openSUSE 11.0 Reporter: Gary Ekker <gekker>
Component: SaX2Assignee: Marcus Schaefer <ms>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: ms, sndirsch
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: lshal output
setserial output
xorg.conf
x log
xorg.conf

Description Gary Ekker 2008-04-23 02:33:15 UTC
The tablet stylus doesn't do anything. this is with Beta1, not packages from your repo. I'll attach the files you requested.

- X config
- the X log
- lshal
- 'setserial -g /dev/ttyS*' and 'setserial -g /dev/wacom' (as root)

seterial -g /dev/wacom returns:

/dev/wacom: No such file or directory
Comment 1 Gary Ekker 2008-04-23 02:33:44 UTC
Created attachment 209755 [details]
lshal output
Comment 2 Gary Ekker 2008-04-23 02:34:05 UTC
Created attachment 209756 [details]
setserial output
Comment 3 Gary Ekker 2008-04-23 02:34:25 UTC
Created attachment 209757 [details]
xorg.conf
Comment 4 Gary Ekker 2008-04-23 02:34:41 UTC
Created attachment 209758 [details]
x log
Comment 5 Danny Al-Gaaf 2008-04-23 21:11:56 UTC
Does it help to call:

       /bin/setserial /dev/ttyS0 port 0x0200 irq 5 autoconfig

manually before X starts?

Could you please change these lines in /etc/X11/xorg.conf:

from: 
   "ForceDevice" "0x8a11b88"
to:
   "ForceDevice" "ISDV4"

and from:
   "MultiTouch" "0x8a111b0"
to:
   "MultiTouch" "off"

Btw. After setup everything in SaX2 (with the same errors in the xorg.conf) my X61 test machine work as expected.
Comment 6 Stefan Dirsch 2008-04-25 07:53:57 UTC
This looks definitely like a Bug in SaX2.

/usr/share/sax/api/data/cdb/Pens
#---------------------------------------------#
# TABLET PCs: Lenovo X61 TabletPC Eraser      #
#---------------------------------------------#
TABLET PCs:Lenovo X61 TABLET PC Eraser (SERIAL) {
 Device              = /dev/ttyS0
 TabletMode          = Absolute
 Driver              = wacom
 Protocol            = Auto
 TabletType          = eraser
 RawOption           = "ForceDevice" "ISDV4","MultiTouch" "off"
}

ends up in 

[...]
Option       "ForceDevice" "0x8a11b88"
Option       "MultiTouch" "0x8a111b0"

There is a typo in this file:

#---------------------------------------------#
# TABLET PCs: Lenovo X61 TabletPC Eraser      #
#---------------------------------------------#
TABLET PCs:Lenovo X61 TABLET PC Eraser (SERIAL) {
 Device              = /dev/ttyS0
 TabletMode          = Absolute
 Driver              = wacom
 Protocol            = Auto
 TabletType          = eraser
 RawOption           = "ForceDevice" "ISDV4","MultiTouch" "off"
}

#-----------------------------------------#
# TABLET PCs: IBM X41 TabletPC Stylus     #
#-----------------------------------------#
TABLET PCs:Lenovo X61 TABLET PC Stylus (SERIAL) {
 Device              = /dev/ttyS0
 TabletMode          = Absolute
 Driver              = wacom
 Protocol            = Auto
 TabletType          = stylus
 RawOption           = "ForceDevice" "ISDV4","MultiTouch" "off"
}

The second 'X61' should be 'X41'. Maybe this is already the fix?

Also strange in the xorg.conf:

Section "Module"
  Load         "extmod"
  Load         "glx"
  Load         "dbe"
  Load         "dbe"
  Load         "extmod"
  Load         "type1"
  Load         "type1"
  Load         "freetypeglx"
  Load         "extmod"
  Load         "dbe"
  Load         "freetype"
  Load         "freetypeglx"
  Load         "glx"
  Load         "type1extmod"
  Load         "freetype"
  Load         "dbe"
  Load         "type1extmod"
  Load         "glx"
  Load         "dbe"
  Load         "dbe"
  Load         "extmod"
  Load         "type1"
  Load         "type1"
  Load         "freetypeglx"
  Load         "extmod"
  Load         "dbe"
  Load         "freetype"
  Load         "freetypeglx"
  Load         "glx"
  Load         "type1extmod"
  Load         "freetype"
  Load         "dbe"
  Load         "type1"
  Load         "dri"
EndSection
Comment 7 Danny Al-Gaaf 2008-04-25 09:29:09 UTC
(In reply to comment #6 from Stefan Dirsch)
> There is a typo in this file:
> 
> #---------------------------------------------#
> # TABLET PCs: Lenovo X61 TabletPC Eraser      #
> #---------------------------------------------#
[..]
> #-----------------------------------------#
> # TABLET PCs: IBM X41 TabletPC Stylus     #
> #-----------------------------------------#
[...] 
> The second 'X61' should be 'X41'. Maybe this is already the fix?

It's only a typo in the comment, the rest of the entries should be okay.
Comment 8 Stefan Dirsch 2008-04-25 09:54:38 UTC
Correct. I didn't see the difference in TabletType.
Comment 9 Stefan Dirsch 2008-04-25 13:00:30 UTC
Let's assume fixing the options in xorg.conf fixes the issue. Reassigning therefore.
Comment 10 Marcus Schaefer 2008-04-25 14:12:35 UTC

*** This bug has been marked as a duplicate of bug 351627 ***
Comment 11 Danny Al-Gaaf 2008-04-25 14:18:45 UTC
I don't think that this solve the problem. Only this device is affected: 

    "Type" "cursor"

And this is IMO no problem. On my beta1 install on a X61 it works also with a
broken config.

Please wait with closing the bug until Gerry verified that changing the xorg.conf works for him.
Comment 12 Stefan Dirsch 2008-04-25 14:23:00 UTC
How can this be a duplicate of Bug #351627, when it still occurs with Beta1 and Bug #351627 was already fixed long before Beta1?
Comment 13 Marcus Schaefer 2008-04-25 14:37:22 UTC
I have tested this with the current code and I can setup the
correct sections. I have used the "TABLET PCs: Motion M1200" and
got all options "ForceDevice" "ISDV4","TopX" "297","TopY" "123"
set correctly. The mentioned problem that the value was set to
the pointer address was due to the qt4 port and has been fixed in
the duplicate bug. I don't know what you have tested but it has
all worked for me

if you don't accept it provide a test machine and a step by step
workflow to reproduce it.
Comment 14 Danny Al-Gaaf 2008-04-25 14:45:14 UTC
This report was about a IBM/Lenovo X60/X61. There is also a section for these devices, you can simply select there a device and generate a xorg.conf. Please don't forget to enable also the related pens in the dialog.
Comment 15 Gary Ekker 2008-05-02 01:06:18 UTC
Created attachment 211844 [details]
xorg.conf
Comment 16 Gary Ekker 2008-05-02 01:07:00 UTC
I fixed the xorg.conf, it still doesn't work. I had re-run sax2 since so I had to add back the tablet configuration with sax2. I'll attach the new xorg.conf.

Running        /bin/setserial /dev/ttyS0 port 0x0200 irq 5 autoconfig
before going to run-level 5 didn't help.

Comment 17 Marcus Schaefer 2008-05-02 08:13:31 UTC
in reply to comment #14: when I select the Lenovo X61 TABLET PC (SERIAL)
plus a pen for example I got:


Section "InputDevice"
  Driver       "wacom"
  Identifier   "Mouse[3]"
  Option       "Device" "/dev/ttyS0"
  Option       "ForceDevice" "ISDV4"
  Option       "InputFashion" "Tablet"
  Option       "Mode" "Absolute"
  Option       "Name" "Lenovo X61 TABLET PC (SERIAL)"
  Option       "OptionMultiTouch" "off"
  Option       "SendCoreEvents" "on"
  Option       "Type" "cursor"
  Option       "Vendor" "TABLET PCs"
EndSection

Section "InputDevice"
  Driver       "wacom"
  Identifier   "Mouse[5]"
  Option       "Device" "/dev/ttyS0"
  Option       "ForceDevice" "ISDV4"
  Option       "InputFashion" "Pen"
  Option       "Mode" "Absolute"
  Option       "Name" "Lenovo X61 TABLET PC Stylus (SERIAL)"
  Option       "OptionMultiTouch" "off"
  Option       "Protocol" "Auto"
  Option       "Type" "stylus"
  Option       "Vendor" "TABLET PCs"
EndSection


I'm sorry I can't reproduce this problem. Could you advise me with
a workflow to reproduce this ?

thanks
Comment 18 Stefan Dirsch 2008-05-06 11:07:19 UTC
I tested again with Beta2. SaX2 generates a correct xorg.conf now. Closing as fixed.