2009-11-16

Linux on a Fujitsu U810 - Upgrade to karmic koala

Yesterday I was brave enough to upgrade my reliable jaunty to an unpredictable karmic, so here are my results so far:

- touchscreen driver - works ok

I just reinstalled it just typing, with the latest version,

make clean
make
sudo make install

and it worked OK


- external monitor - I'm having some issues:

Update: also read this update

*) in order to have the monitor work, I have to plug it once ubuntu is started (was ok on jaunty)

*) my monitor is 1920x1200, the maximum I get is 1360x768 (was ok on jaunty)

I have just opened a bug in the video-intel group at xorg, https://bugs.freedesktop.org/show_bug.cgi?id=25115


- suspend/resume - works ok!

- fujitsu buttons driver (fjbtndrv) - works ok

- webcam - works ok!

33 comments:

  1. Thanks for the drivers.

    T1010 here. I have some issues with the precision (I try to calibrate, but still goes up to 16px away near the corners). And the buttons don't work...

    Anyway, it's much better than nothing!

    Salud!

    ReplyDelete
  2. Is your webcam working? Mine hasn't with a clean 9.10 installation

    ReplyDelete
  3. Hi Elliot,

    I haven't tried yet. I'll check later today, tomorrow or during the weekend, and I'll post an update here, so keep tuned.

    I had it working ok with 9.04, I even made some changes to the driver to rotate the image, otherwise appeared top-bottom, so I think there'll be no problem with that.

    HTH

    ReplyDelete
  4. Hi! Would it be possible to use these touch screen drivers in Mandriva 2010? I ask since Mandriva has native support for the graphics (GMA500 aka Poulsbo) of the Fujitsu u820 (and Ubuntu has not...).

    / Anfanglir

    ReplyDelete
  5. Hi Anfanglir,

    this driver is distribution agnostic, so there should be no problem just performing the installations steps in any linux distro.

    If you find any trouble, just write back and I'll try to help.

    HTH

    ReplyDelete
  6. HTH,

    Any luck on that webcam? Looks like I might be one of the lucky ones :)

    Elliot

    ReplyDelete
  7. Hi zmiq2,
    I'm trying to use your driver on Centos. The driver loads in linux but do you if I'm suppose to see evdev loaded as well in /var/log/Xorg.0.log (so far the touchscreen does not respond)
    I appreciate the help,

    NMW

    ReplyDelete
  8. Elliot,

    I've been a little lazy this weekend, haven't tested the webcam yet ..... but keep tuned, I'll sure do it soon !

    ReplyDelete
  9. nmw,

    the driver should work in centos. Here is my Xorg.0.log where is loading the touchscreen:

    (II) config/hal: Adding input device Fujitsu Component USB Touch Panel
    (**) Option "SendCoreEvents" "on"
    (**) Fujitsu Component USB Touch Panel: always reports core events
    (**) Fujitsu Component USB Touch Panel: Device: "/dev/input/event6"
    (II) Fujitsu Component USB Touch Panel: Found 3 mouse buttons
    (II) Fujitsu Component USB Touch Panel: Found x and y absolute axes
    (II) Fujitsu Component USB Touch Panel: Configuring as mouse
    (**) Option "Emulate3Buttons" "false"
    (II) Fujitsu Component USB Touch Panel: Forcing middle mouse button emulation off.
    (**) Option "Emulate3Timeout" "50"
    (**) Fujitsu Component USB Touch Panel: YAxisMapping: buttons 4 and 5
    (**) Fujitsu Component USB Touch Panel: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
    (II) XINPUT: Adding extended input device "Fujitsu Component USB Touch Panel" (type: MOUSE)
    (**) Fujitsu Component USB Touch Panel: (accel) keeping acceleration scheme 1
    (**) Fujitsu Component USB Touch Panel: (accel) filter chain progression: 2.00
    (**) Fujitsu Component USB Touch Panel: (accel) filter stage 0: 20.00 ms
    (**) Fujitsu Component USB Touch Panel: (accel) set acceleration profile 0
    (II) Fujitsu Component USB Touch Panel: initialized for absolute axes.


    Do you see anything related to Fujitsu USB Touch Panel in your log file?

    ReplyDelete
  10. Hi Elliot,

    webcam works as expected, even better, since the image is not upside down!!

    Read this post which I have updated with instructions on how to have the webcam working.

    ReplyDelete
  11. Hi zmiq2,

    Here's what I got:
    I have the a fujitsu fdi file in /etc/hal policy folder. (http://staff.osuosl.org/~bkero/fujitsu_usb_touchscreen.fdi)
    I have the module loaded (I can see it with lsmod)
    I have the evdev driver installed
    Nothing in the X log file shows evdev or fujitsu
    How do I know if the HAL and X are finding a match?

    nmw

    ReplyDelete
  12. Hi nmw,

    at this point, we have two options:

    - we debug using the comments on the blog

    - you allow me to remote login to your computer, and I debug in-place

    I have done the second option with 2 other people, and it worked the best to iron out this strange situations.

    I understand you may have security concerns about letting me login into your computer with root access, but I certainly don't have the time to fiddle in other people's computers unless to sort this driver !

    If you choose option 1, it'll take longer and sometimes we'll have many misunderstandings, but it's doable. Then next step should be to make sure that the fdi file is located in the proper place:

    - I have looked at the file, and seems ok to me; I understand it's the one being shipped by my package

    - the matching is done via the following line:

    match key="info.product" contains="Fujitsu Component USB Touch Panel"

    can you please type:
    # dmesg | grep Fujitsu | grep USB

    - by default, the usb touchscreen is handled by the usbhid module, so when you load the fujitsu_usb_touchscreen module it doesn't find anything. One thing that the package does is install a small init script, that should be run at every startup, that does the following:

    rmmod usbhid
    modprobe fujitsu_usb_touchsree
    modprobe usbhid

    since the usbhid module is usually compiled in the kernel, ans takes preference. If you type those sentences by hand, to see if they work, take care since type rmmod usbhid will also disable any usb mouse or keyboard! Better make a script and run the script.

    I hope I make myselff clear, so don't hesitate to try and write back whether it works or not!

    ReplyDelete
  13. Trust is not an issue but I'm behind a corporate firewall. What I can do is send a virtual image (using virtual box) and then you can look inside. Can you work inside a VM?

    ReplyDelete
  14. Hi zmiq2,
    Just realized a vm may not have touchscreen hardware but you could see my setup. Let me know your thoughts. I may be able to go home to get this thing working.
    Regarding the commands:
    [root@localhost ~]# rmmod usbhid
    ERROR: Module usbhid does not exist in /proc/modules
    [root@localhost ~]# modprobe fujitsu_usb_touchscreen
    [root@localhost ~]# modprobe hid
    FATAL: Module hid not found.
    [root@localhost ~]# modprobe usbhid
    FATAL: Module usbhid not found.
    [root@localhost ~]#

    I don't have the usbhid or hid module (I think it was renamed at one point). I'm running 2.6.18.

    Thanks,

    nmw

    ReplyDelete
  15. Forgot that one:
    [root@localhost ~]# dmesg | grep Fuji | grep USB
    hiddev96: USB HID v1.00 Device [Fujitsu Component USB Touch Panel] on usb-0000:00:1d.0-2

    ReplyDelete
  16. Hi zmiq2,
    If I do a lsusb I don't see the device.

    [root@localhost ~]# lsusb
    Bus 001 Device 008: ID 413c:2002 Dell Computer Corp. SK-8125 Keyboard
    Bus 001 Device 001: ID 0000:0000
    Bus 001 Device 004: ID 0409:0050 NEC Corp.
    Bus 001 Device 005: ID 9710:7830 MosChip Semiconductor MCS7830 Ethernet
    Bus 001 Device 006: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x Composite Device
    Bus 001 Device 007: ID 413c:1002 Dell Computer Corp. Keyboard Hub
    Bus 003 Device 001: ID 0000:0000
    Bus 004 Device 001: ID 0000:0000
    Bus 002 Device 001: ID 0000:0000
    Bus 002 Device 003: ID 0430:0530 Sun Microsystems, Inc.
    Bus 002 Device 002: ID 046d:c016 Logitech, Inc. M-UV69a/HP M-UV96 Optical Wheel Mouse

    Here's what lshal has to say:
    udi = '/org/freedesktop/Hal/devices/usb_device_430_530_noserial_if0_hiddev'
    info.linux.driver = 'usbhid' (string)
    info.udi = '/org/freedesktop/Hal/devices/usb_device_430_530_noserial_if0_hiddev' (string)
    input.x11_options.TapTimer = '10' (string)
    input.x11_options.MoveLimit = '4' (string)
    input.x11_options.emulate3buttons = 'false' (string)
    input.x11_options.MaxY = '3940' (string)
    input.x11_options.MaxX = '3827' (string)
    input.x11_options.MinY = '266' (string)
    input.x11_options.MinX = '124' (string)
    input.x11_options.SendCoreEvents = 'True' (string)
    input.x11_options.ReportingMode = 'Raw' (string)
    input.x11_driver = 'evdev' (string)
    hiddev.application_pages = {'Unknown page 0xd0004'} (string list)
    hiddev.product = 'Fujitsu Component USB Touch Panel' (string)
    linux.device_file = '/dev/hiddev0' (string)
    linux.subsystem = 'usb' (string)
    linux.hotplug_type = 2 (0x2) (int)
    hiddev.device = '/dev/hiddev0' (string)
    info.product = 'Fujitsu Component USB Touch Panel' (string)
    info.capabilities = {'hiddev'} (string list)
    info.category = 'hiddev' (string)
    info.parent = '/org/freedesktop/Hal/devices/usb_device_430_530_noserial_if0' (string)
    linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0' (string)
    linux.sysfs_path = '/sys/class/usb/hiddev0' (string)

    nmw

    ReplyDelete
  17. Hi again,
    I need to read up on how to install drivers from source in Mandriva, it seem to work quite differently compared to Ubuntu. For example the command "make" is not recognised. I have since installed "make" from the repos but other required stuff seem to be missing still. I'll report back if I'll make any progress.

    peace / Anfanglir

    ReplyDelete
  18. @nmw

    looking at your comments, I clearly see that the problem is that the usbhid module 'controls' the touchscreen before the fujitsu_usb_module does, as it is detailed in:

    info.linux.driver = 'usbhid' (string)


    So all you have to do is make the fujitsu touchscreen avoid getting controlled by usbhid.


    I'd suggest:

    try1:
    as root
    rmmod fujitsu_usb_touchscreen
    rmmod hiddev
    modprobe fujitsu_usb_touchscreen
    modprobe hiddev

    try2:
    post the results of
    lsmod | grep hid

    and we'll see how to remove the offending module


    If I could remotely connect, then all this 'hacking' would be faster, but I understand your words.

    ReplyDelete
  19. @anfanglir

    in order to install this driver from source, you need to install:

    development environment
    - gcc - c compiler
    - make/automake tools - scripts and stuff to make all work

    linux source headers
    - linux headers for your current linux kernel version

    and that would be all!

    ReplyDelete
  20. Hi zmiq2,
    I think hiddev is not a module on my distro.
    lsmod | grep hid:
    hidp 23105 2
    l2cap 29505 10 hidp,rfcomm
    bluetooth 53925 5 hidp,rfcomm,l2cap
    Furthermore:
    modprobe hiddev
    FATAL: Module hiddev not found.

    It may be that it's compiled into the kernel but I don't know of a way to figure that out.
    Is there a way to modify the policy file such that it tells the HAL to use your module instead of hiddev?

    nmw

    ReplyDelete
  21. Hi nmw,

    can you please post the result of

    lsmod

    thanks

    ReplyDelete
  22. Hi zmiq2,
    According to the HAL spec it's not possible to override previously set properties. See
    http://webcvs.freedesktop.org/hal/hal/doc/spec/hal-spec.html?view=co&pathrev=HEAD#spec-device-info

    nmw

    ReplyDelete
  23. Hi zmiq2,

    Thanks for your time.

    fujitsu_usb_touchscreen 13980 0
    mcs7830 22928 0
    mii 9409 1 mcs7830
    autofs4 29253 2
    hidp 23105 2
    rfcomm 42457 0
    l2cap 29505 10 hidp,rfcomm
    bluetooth 53925 5 hidp,rfcomm,l2cap
    sunrpc 145405 1
    cpufreq_ondemand 12493 1
    acpi_cpufreq 13897 1
    nls_utf8 6209 1
    loop 18761 2
    dm_multipath 24909 0
    scsi_dh 11713 1 dm_multipath
    scsi_mod 142229 1 scsi_dh
    video 21193 0
    hwmon 7365 0
    backlight 10049 1 video
    sbs 18533 0
    i2c_ec 9025 1 sbs
    i2c_core 23745 1 i2c_ec
    button 10705 0
    battery 13637 0
    asus_acpi 19289 0
    ac 9157 0
    ipv6 267361 18
    xfrm_nalgo 13381 1 ipv6
    parport_pc 29157 0
    lp 15849 0
    parport 37513 2 parport_pc,lp
    joydev 13313 0
    snd_hda_intel 427153 1
    snd_seq_dummy 7877 0
    snd_seq_oss 32577 0
    snd_seq_midi_event 11073 1 snd_seq_oss
    snd_seq 49585 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
    testmgr_cipher 6849 0
    snd_seq_device 11725 3 snd_seq_dummy,snd_seq_oss,snd_seq
    testmgr 52337 1 testmgr_cipher
    aead 11841 1 testmgr
    crypto_blkcipher 17601 1 testmgr
    crypto_algapi 22849 3 testmgr,aead,crypto_blkcipher
    snd_pcm_oss 42817 0
    crypto_api 12609 5 xfrm_nalgo,testmgr,aead,crypto_blkcipher,crypto_algapi
    arc4 6209 2
    snd_mixer_oss 19009 1 snd_pcm_oss
    iwlagn 94553 0
    pcspkr 7105 0
    iwlcore 89925 1 iwlagn
    mac80211 138057 2 iwlagn,iwlcore
    snd_pcm 72133 2 snd_hda_intel,snd_pcm_oss
    sdhci 21337 0
    cfg80211 30793 3 iwlagn,iwlcore,mac80211
    mmc_core 27457 1 sdhci
    snd_timer 24517 2 snd_seq,snd_pcm
    snd_page_alloc 14281 2 snd_hda_intel,snd_pcm
    snd_hwdep 12869 1 snd_hda_intel
    snd 55749 11 snd_hda_intel,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_hwdep
    soundcore 11553 1 snd
    serio_raw 10693 0
    cp2101 15941 0
    usbserial 33065 1 cp2101
    dm_raid45 67145 0
    dm_message 6977 1 dm_raid45
    dm_region_hash 15681 1 dm_raid45
    dm_mem_cache 9537 1 dm_raid45
    dm_snapshot 22885 0
    dm_zero 6209 0
    dm_mirror 24265 0
    dm_log 14657 3 dm_raid45,dm_region_hash,dm_mirror
    dm_mod 63225 11 dm_multipath,dm_raid45,dm_snapshot,dm_zero,dm_mirror,dm_log
    ext3 125001 2
    jbd 57065 1 ext3
    uhci_hcd 25421 0
    ohci_hcd 24553 0
    ehci_hcd 33869 0

    ReplyDelete
  24. Hi nmw,

    - what is clear is that in centos the usbhid module is compiled into the kernel, so it loads before the module fujitsu_usb_touchscreen, and so usbhid gets control of the device

    - if your kernel is >2.6.13, there's something you can try:

    always as root:

    1) type

    # lshal -u `hal-find-by-property --key info.product --string "Fujitsu Component USB Touch Panel"`


    2) notice the line similar to this:
    linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/input/input14/event13' (string)


    3) find which module is controlling the device:
    cd /sys/bus/usb/drivers

    and look inside each directory here, looking for an entry that links to the path detailed before, in my sample,

    ../../../../devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0

    - from this point on, let's supose you found that reference in /sys/bus/usb/drivers/baddriver

    - from the sample I'm showing you, the device id is "3-1:1.0"

    4) unbind the device from the old module

    as root, just type:

    # echo -n "3-1:1.0" > /sys/bus/usb/drivers/baddriver/unbind

    5) now, load the fujitsu driver

    rmmod fujitsu_usb_touchscreen
    modprobe fujitsu_usb_touchscreen


    6) look at dmesg to see if the module has found the touchscreen

    # dmesg | grep fujitsu_usb_touchscreen

    or just look at the final lines of dmesg output

    Hope that works!!

    ReplyDelete
  25. Thanks a lot, all except the lights works fine on mi u810...

    ReplyDelete
  26. Hi zmiq2,
    So I did as you instructed. Used unbind to relinquish the hardware from OS given driver and then did a modprobe at which point I got a kernel panic and the system froze. There's a kernel stack which you may be interested in. I also have modified your code to compile against the kernel part of Centos 5.7 (can I post that somewhere for you to look at?)
    For now I think I can either try to compile a kernel without hid build-in or I can try to debug the module (in a vm or with a kernel-debug, which I have no real experience for)

    What do you think?

    nmw

    ReplyDelete
  27. Hi nmw,

    - the driver is not distribution specific, so I really don't understand what is causing so many issues

    - yes, please, post here the diff, or sent it by email to my email address, and I'll see what adaptations you have done

    - the method I told you to unbind to relinquish the hardware, and modprobe later is also distribution agnostic and a documented feature, not a hack, so it should work for you. I tested it in my computer without any issues

    - my current option would be that you send me the changes you made, and I'll evaluate it and test it in my computer, to see if those are provoking the panic

    - another option would be that you let me remote connect, to see whether the problem ....

    Regards

    ReplyDelete
  28. My bad, I got confused with some earlier work. I started with a u810 older version before I understood you had a fujitsu one available.

    nmw

    ReplyDelete
  29. Hi nmw,

    so? is it working now?

    Regards

    ReplyDelete
  30. Never mind my previous post. I did change the code. Here the patch:
    http://sites.google.com/site/nmwnohup/files/usb.patch?attredirects=0&d=1

    When loaded it will cause a kernel panic

    ReplyDelete
  31. Does anybody know how to make autorotate and/or buttons work on a T1010 with Karmic? I tried fjbtndrv-2.0.1 and fjbtndrv-2.1.0 but no luck.

    ReplyDelete
  32. @nmw

    I looked at your patch and.

    - I understand you had to make those changes before compiling was giving you problems. Is that the case? What errors do no-modified compiling gives you?

    - I understand you are using an old kernel, and that's why you had to make those adaptations. Am i right? What kernel version are you using?

    - I think that the kernel panic is due to the changes in pointers stuff, so I'd suggest you to review them; also, since this driver is based on the acecad touch tablet driver, take a look at acecad.c driver

    HTH

    ReplyDelete
  33. @gcai

    sorry, I cannot help here since I don't own a T1010, nor I'm not the owner of the fjbtn driver package.

    Have luck!

    ReplyDelete