Thinkpad x200 Tablett - Make buttons return acpi events

Hi there,
on my Thinkpad X200T I have some buttons for rotating the screen when I am in tablett mode. My problem is that these keys do not produce acpi events, but I get some keycodes (via xev). I know there is a way to fake keys from acpi events - but is there another way around? I want to get acpi events when i press these buttons. All the other buttons create acpi events, just these 3 buttons dont. Anyone know how to do?
Btw: I use the kernel module thinkpad_acpi.
I would also be happy if anyone comes up with another solution, i mean somehow this should be working...
Thanks!
Last edited by klump (2012-03-19 19:50:52)

Hi there,
on my Thinkpad X200T I have some buttons for rotating the screen when I am in tablett mode. My problem is that these keys do not produce acpi events, but I get some keycodes (via xev). I know there is a way to fake keys from acpi events - but is there another way around? I want to get acpi events when i press these buttons. All the other buttons create acpi events, just these 3 buttons dont. Anyone know how to do?
Btw: I use the kernel module thinkpad_acpi.
I would also be happy if anyone comes up with another solution, i mean somehow this should be working...
Thanks!
Last edited by klump (2012-03-19 19:50:52)

Similar Messages

  • [Solved] No sound (only headphones) on Thinkpad X200 Tablet

    A few years ago, I installed Arch on a Thinkpad X200 Tablet, and everything was fine until a few day ago the HD had to be replaced. I was happy with system and the only think I remember being a headache was the touchscreen.
    With the new HD, I decided to reinstall and not keeping config files, for a complete fresh start. One of the first things I did was setup sound, as it was really easy and worked just out-of-box with ALSA. After that, I installed some apps and the DE (Gnome this time, I've been previously working with only a WM, Awesome). I remeber even watching and listening a flash video with no problems.
    Today, I keep installing some tweaks: GDM, laptop-tools, HDAPS, setting a console font... and suddenly, I noticed sound was not working anymore. Looked at alsamixer, and everything looks fine. Booting on init level 3 the problem persists, so it's not a Gnome issue. I tried blacklisting the more recent modules and daemons, but no sound. I tried plugging some headphones, and hey, the headphones work!
    After reviewing the Arch wiki, Thinkwiki, googling, and trying several workarounds (most of them settings at modprobe.conf, and unmutting everything), I'm still with no sound, and very puzzled for the situation. I would greatly appreciate any help on this, or any clue to keep researching.
    $ lspci|grep -i audio
    00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)
    $ lsmod |grep snd
    snd_seq_dummy 1119 0
    snd_seq_oss 25232 0
    snd_hda_codec_conexant 35779 1
    snd_seq_midi_event 4568 1 snd_seq_oss
    snd_seq 41912 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
    snd_seq_device 4409 3 snd_seq_dummy,snd_seq_oss,snd_seq
    snd_pcm_oss 33950 0
    snd_mixer_oss 15366 1 snd_pcm_oss
    snd_hda_intel 18988 1
    snd_hda_codec 64796 2 snd_hda_codec_conexant,snd_hda_intel
    snd_hwdep 4804 1 snd_hda_codec
    snd_pcm 59496 3 snd_pcm_oss,snd_hda_intel,snd_hda_codec
    snd_timer 15687 2 snd_seq,snd_pcm
    snd_page_alloc 6053 2 snd_hda_intel,snd_pcm
    snd 43987 14 snd_seq_oss,snd_hda_codec_conexant,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer,thinkpad_acpi
    soundcore 4961 1 snd
    $ cat /proc/asound/modules
    0 snd_hda_intel
    29 thinkpad_acpi
    Last edited by Sachiel (2011-04-02 11:58:31)

    Hola joseperezc, thank you for the recommendations.
    Installing alsa-oss -> Nothing changes.
    pcspkr is loaded by default:
    $ lsmod |grep pcspkr
    pcspkr 1367 0
    I also tried blacklisting it, but no results.
    I also tried this conf:
    $ cat /etc/modprobe.d/alsa-base.conf
    options snd slots=snd-hda-intel
    alias snd-card-0 snd-hda-intel
    options snd-hda-intel model=auto
    options snd-hda-intel enable_msi=1
    But still no sound.
    Btw, atm I have:
    $ pacman -Qs alsa
    alocal/alsa-lib 1.0.24.1-1
    An alternative implementation of Linux sound support
    local/alsa-utils 1.0.24.2-1
    An alternative implementation of Linux sound support
    I also tried muting the SPDIF channels (I read that sometimes if they are enabled, the conflict with analog output), but no changes. And the sad thing is that it was working before... I'm thinking on uninstalling everything step by step...

  • [SOLVED] ACPI handler.sh no longer working (Thinkpad X60 Tablet)

    Hello there,
    I recently did a few updates on my system to reduce power usage and get hdaps working. For some reason one of these changes must have broken ACPID in some way so that what I wrote in handler.sh no longer has any effect when I e.g. press the configured buttons to lock my screen or shut down, but I have no clue which.
    I'm not really familiar with where ACPI and ACPID keeps all their logs either, and which parts in there might mean something for me. I don't even know how I can check if ACPI is running properly and just ACPID isn't, for instance (both are running thought, confirmed with ps -A).
    Here's what I can remember of what I did:
    -full system update
    -install cpufreq to redcude power usage with acpi_cpufreq
    -install HDAPS with Thinkpad driver, as described on the Wiki
    -tweak my laptop-mode settings, e.g. disable VGA output when in laptop mode
    -enable AHCI for my hard drive in kernel image and BIOS
    Would be great if you could help me troubleshoot this somehow, as I really don't have a clue on how to fix this. Here's some output that might be helpful for starters:
    cat /etc/acpi/handler.sh
    #!/bin/sh
    set $*
    case "$1" in
    button/power)
    #echo "PowerButton pressed!">/dev/tty5
    case "$2" in
    PWRF)
    #Power off
    shutdown -h now
    logger "ACPI action undefined: $2"
    esac
    ibm/hotkey)
    #echo "Display swiveled">/dev/tty5
    case "$2" in
    HKEY)
    case "$4" in
    00005009)
    #Swiveling down
    /bin/sh /etc/acpi/actions/swivel-down
    0000500a)
    #Swiveling up
    /bin/sh /etc/acpi/actions/swivel-up
    00001002)
    #Lock screen
    xscreensaver-command -lock
    #run_once xtrlock &
    00001004)
    #Standby button
    xscreensaver-command -lock ; s2ram
    00001005)
    #Network button
    /etc/rc.d/net-auto-wireless restart
    00001009)
    #Reboot
    shutdown -r now
    00007000)
    #WLan button switched
    /etc/rc.d/net-auto-wireless restart
    fi
    esac
    esac
    button/sleep)
    case "$2" in
    SLPB) echo -n mem >/sys/power/state ;;
    *) logger "ACPI action undefined: $2" ;;
    esac
    ac_adapter)
    case "$2" in
    AC)
    case "$4" in
    00000000)
    #laptop mode should take care of this alone!
    #/etc/rc.d/laptop-mode start
    00000001)
    #/etc/rc.d/laptop-mode stop
    esac
    *) logger "ACPI action undefined: $2" ;;
    esac
    battery)
    case "$2" in
    BAT0)
    case "$4" in
    00000000) #echo "offline" >/dev/tty5
    00000001) #echo "online" >/dev/tty5
    esac
    CPU0)
    *) logger "ACPI action undefined: $2" ;;
    esac
    button/lid)
    #echo "LID switched!">/dev/tty5
    case "$2" in
    LID)
    if [[ `cat /proc/acpi/button/lid/LID/state | awk '{print $2}'` = "closed" ]]
    then
    #run_once xtrlock &
    xscreensaver-command -lock
    fi
    esac
    logger "ACPI group/action undefined: $1 / $2"
    esac
    dmesg | grep acpi
    BIOS-e820: 000000007f6d0000 - 000000007f6df000 (ACPI data)
    BIOS-e820: 000000007f6df000 - 000000007f700000 (ACPI NVS)
    modified: 000000007f6d0000 - 000000007f6df000 (ACPI data)
    modified: 000000007f6df000 - 000000007f700000 (ACPI NVS)
    ACPI: RSDP 000f67c0 00024 (v02 LENOVO)
    ACPI: XSDT 7f6d11e8 0008C (v01 LENOVO TP-7J 00001140 LTP 00000000)
    ACPI: FACP 7f6d1300 000F4 (v03 LENOVO TP-7J 00001140 LNVO 00000001)
    ACPI Warning: 32/64X length mismatch in Gpe1Block: 0/32 (20090903/tbfadt-526)
    ACPI Warning: Optional field Gpe1Block has zero address or length: 000000000000102C/0 (20090903/tbfadt-557)
    ACPI: DSDT 7f6d1690 0D56F (v01 LENOVO TP-7J 00001140 MSFT 0100000E)
    ACPI: FACS 7f6f4000 00040
    ACPI: SSDT 7f6d14b4 001DC (v01 LENOVO TP-7J 00001140 MSFT 0100000E)
    ACPI: ECDT 7f6debff 00052 (v01 LENOVO TP-7J 00001140 LNVO 00000001)
    ACPI: TCPA 7f6dec51 00032 (v02 LENOVO TP-7J 00001140 LNVO 00000001)
    ACPI: APIC 7f6dec83 00068 (v01 LENOVO TP-7J 00001140 LNVO 00000001)
    ACPI: MCFG 7f6deceb 0003C (v01 LENOVO TP-7J 00001140 LNVO 00000001)
    ACPI: HPET 7f6ded27 00038 (v01 LENOVO TP-7J 00001140 LNVO 00000001)
    ACPI: SLIC 7f6dee62 00176 (v01 LENOVO TP-7J 00001140 LTP 00000000)
    ACPI: BOOT 7f6defd8 00028 (v01 LENOVO TP-7J 00001140 LTP 00000001)
    ACPI: SSDT 7f6f2603 0025F (v01 LENOVO TP-7J 00001140 INTL 20050513)
    ACPI: SSDT 7f6f2862 000A6 (v01 LENOVO TP-7J 00001140 INTL 20050513)
    ACPI: SSDT 7f6f2908 004F7 (v01 LENOVO TP-7J 00001140 INTL 20050513)
    ACPI: SSDT 7f6f2dff 001D8 (v01 LENOVO TP-7J 00001140 INTL 20050513)
    ACPI: Local APIC address 0xfee00000
    ACPI: PM-Timer IO Port: 0x1008
    ACPI: Local APIC address 0xfee00000
    ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
    ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
    ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
    ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
    ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
    ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
    ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
    ACPI: IRQ0 used by override.
    ACPI: IRQ2 used by override.
    ACPI: IRQ9 used by override.
    Using ACPI (MADT) for SMP configuration information
    ACPI: HPET id: 0x8086a201 base: 0xfed00000
    ACPI: Core revision 20090903
    ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
    ACPI: bus type pci registered
    ACPI: EC: EC description table is found, configuring boot EC
    ACPI: Interpreter enabled
    ACPI: (supports S0 S3 S4 S5)
    ACPI: Using IOAPIC for interrupt routing
    ACPI: EC: GPE = 0x1c, I/O: command/status = 0x66, data = 0x62
    ACPI: Power Resource [PUBS] (on)
    ACPI: ACPI Dock Station Driver: 3 docks/bays found
    ACPI: PCI Root Bridge [PCI0] (0000:00)
    pci 0000:00:1f.0: quirk: region 1000-107f claimed by ICH6 ACPI/GPIO/TCO
    ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
    ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.EXP0._PRT]
    ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.EXP1._PRT]
    ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.EXP2._PRT]
    ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.EXP3._PRT]
    ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCI1._PRT]
    ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 *11)
    ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 9 10 *11)
    ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 9 10 *11)
    ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 9 10 *11)
    ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 9 10 *11)
    ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 9 10 *11)
    ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 9 10 *11)
    ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 9 10 *11)
    PCI: Using ACPI for IRQ routing
    pnp: PnP ACPI init
    ACPI: bus type pnp registered
    pnp: PnP ACPI: found 11 devices
    ACPI: ACPI bus type pnp unregistered
    acpi device:01: registered as cooling_device0
    ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
    ACPI: Lid Switch [LID]
    ACPI: Sleep Button [SLPB]
    ACPI: Power Button [PWRF]
    i915 0000:00:02.0: power state changed by ACPI to D0
    ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
    ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
    ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
    ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
    ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
    ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
    ACPI: SSDT 7f6f1ccc 001FE (v01 PmRef Cpu0Ist 00000100 INTL 20050513)
    ACPI: SSDT 7f6f1f4f 006B4 (v01 PmRef Cpu0Cst 00000100 INTL 20050513)
    ACPI: SSDT 7f6f1c04 000C8 (v01 PmRef Cpu1Ist 00000100 INTL 20050513)
    ACPI: SSDT 7f6f1eca 00085 (v01 PmRef Cpu1Cst 00000100 INTL 20050513)
    ehci_hcd 0000:00:1d.7: power state changed by ACPI to D0
    uhci_hcd 0000:00:1d.0: power state changed by ACPI to D0
    uhci_hcd 0000:00:1d.2: power state changed by ACPI to D0
    ACPI: Thermal Zone [THM0] (56 C)
    ACPI: Thermal Zone [THM1] (59 C)
    ACPI: AC Adapter [AC] (on-line)
    ACPI: Battery Slot [BAT0] (battery present)
    thinkpad_acpi: ThinkPad ACPI Extras v0.23
    thinkpad_acpi: http://ibm-acpi.sf.net/
    thinkpad_acpi: ThinkPad BIOS 7JET29WW (1.14 ), EC 7JHT13WW-1.04
    thinkpad_acpi: Lenovo ThinkPad X60 Tablet, model 6363WDK
    thinkpad_acpi: WARNING: Outdated ThinkPad BIOS/EC firmware
    thinkpad_acpi: WARNING: This firmware may be missing critical bug fixes and/or important features
    thinkpad_acpi: ACPI backlight control delay disabled
    thinkpad_acpi: radio switch found; radios are enabled
    thinkpad_acpi: possible tablet mode switch found; ThinkPad in laptop mode
    thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness control, supported by the ACPI video driver
    thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
    Registered led device: tpacpi::thinklight
    Registered led device: tpacpi::power
    Registered led device: tpacpi::standby
    Registered led device: tpacpi::thinkvantage
    thinkpad_acpi: Standard ACPI backlight interface available, not loading native one.
    ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
    ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
    ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
    ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
    ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
    ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
    cat /var/log/acpid.log
    Feb 28 13:19:28 damnation acpid: exiting
    Mar 1 12:48:43 damnation acpid: starting up
    Mar 1 12:48:43 damnation acpid: 4 rules loaded
    Mar 1 12:48:43 damnation acpid: waiting for events: event logging is off
    Mar 1 12:48:44 damnation acpid: client connected from 1737[82:82]
    Mar 1 12:48:44 damnation acpid: 1 client rule loaded
    Mar 1 12:49:39 damnation acpid: client connected from 2523[0:0]
    Mar 1 12:49:39 damnation acpid: 1 client rule loaded
    Mar 1 12:49:56 damnation acpid: exiting
    Mar 1 12:49:56 damnation acpid: starting up
    Mar 1 12:49:56 damnation acpid: 4 rules loaded
    Mar 1 12:49:56 damnation acpid: waiting for events: event logging is off
    Mar 1 12:49:57 damnation acpid: client connected from 2523[0:0]
    Mar 1 12:49:57 damnation acpid: 1 client rule loaded
    Mar 1 12:50:01 damnation acpid: client connected from 1737[82:82]
    Mar 1 12:50:01 damnation acpid: 1 client rule loaded
    Mar 2 10:23:50 damnation acpid: client 2523[0:0] has disconnected
    Mar 2 10:23:50 damnation acpid: client connected from 2523[0:0]
    Mar 2 10:23:50 damnation acpid: 1 client rule loaded
    Mar 2 10:52:18 damnation acpid: client 2523[0:0] has disconnected
    Mar 2 10:52:18 damnation acpid: client connected from 2523[0:0]
    Mar 2 10:52:18 damnation acpid: 1 client rule loaded
    Mar 2 17:00:21 damnation acpid: client 2523[0:0] has disconnected
    Mar 2 17:00:21 damnation acpid: client connected from 2523[0:0]
    Mar 2 17:00:21 damnation acpid: 1 client rule loaded
    Mar 3 09:54:32 damnation acpid: client 2523[0:0] has disconnected
    Mar 3 09:54:32 damnation acpid: client connected from 2523[0:0]
    Mar 3 09:54:32 damnation acpid: 1 client rule loaded
    Mar 3 10:28:14 damnation acpid: exiting
    Mar 3 10:28:14 damnation acpid: starting up
    Mar 3 10:28:14 damnation acpid: 4 rules loaded
    Mar 3 10:28:14 damnation acpid: waiting for events: event logging is off
    Mar 3 10:28:15 damnation acpid: client connected from 2523[0:0]
    Mar 3 10:28:15 damnation acpid: 1 client rule loaded
    Mar 3 10:28:19 damnation acpid: client connected from 1737[82:82]
    Mar 3 10:28:19 damnation acpid: 1 client rule loaded
    Mar 3 10:37:44 damnation acpid: exiting
    Mar 3 10:37:44 damnation acpid: starting up
    Mar 3 10:37:44 damnation acpid: 4 rules loaded
    Mar 3 10:37:44 damnation acpid: waiting for events: event logging is off
    Mar 3 10:37:45 damnation acpid: client connected from 2523[0:0]
    Mar 3 10:37:45 damnation acpid: 1 client rule loaded
    Mar 3 10:37:49 damnation acpid: client connected from 1737[82:82]
    Mar 3 10:37:49 damnation acpid: 1 client rule loaded
    Mar 3 12:22:44 damnation acpid: exiting
    Mar 3 12:23:44 damnation acpid: starting up
    Mar 3 12:23:45 damnation acpid: 4 rules loaded
    Mar 3 12:23:45 damnation acpid: waiting for events: event logging is off
    Mar 3 12:23:46 damnation acpid: client connected from 3417[82:82]
    Mar 3 12:23:46 damnation acpid: 1 client rule loaded
    Mar 3 12:24:40 damnation acpid: client connected from 4287[0:0]
    Mar 3 12:24:40 damnation acpid: 1 client rule loaded
    Mar 3 12:24:55 damnation acpid: exiting
    Mar 3 12:24:55 damnation acpid: starting up
    Mar 3 12:24:55 damnation acpid: 4 rules loaded
    Mar 3 12:24:55 damnation acpid: waiting for events: event logging is off
    Mar 3 12:24:56 damnation acpid: client connected from 4287[0:0]
    Mar 3 12:24:56 damnation acpid: 1 client rule loaded
    Mar 3 12:25:00 damnation acpid: client connected from 3417[82:82]
    Mar 3 12:25:00 damnation acpid: 1 client rule loaded
    Mar 3 12:40:54 damnation acpid: exiting
    Mar 3 12:49:47 damnation acpid: starting up
    Mar 3 12:49:47 damnation acpid: 4 rules loaded
    Mar 3 12:49:47 damnation acpid: waiting for events: event logging is off
    Mar 3 12:49:49 damnation acpid: client connected from 3396[82:82]
    Mar 3 12:49:49 damnation acpid: 1 client rule loaded
    Mar 3 12:50:12 damnation acpid: client connected from 5224[0:0]
    Mar 3 12:50:12 damnation acpid: 1 client rule loaded
    Mar 3 12:50:59 damnation acpid: exiting
    Mar 3 12:50:59 damnation acpid: starting up
    Mar 3 12:50:59 damnation acpid: 4 rules loaded
    Mar 3 12:50:59 damnation acpid: waiting for events: event logging is off
    Mar 3 12:51:00 damnation acpid: client connected from 5224[0:0]
    Mar 3 12:51:00 damnation acpid: 1 client rule loaded
    Mar 3 12:51:04 damnation acpid: client connected from 3396[82:82]
    Mar 3 12:51:04 damnation acpid: 1 client rule loaded
    Mar 3 13:21:42 damnation acpid: exiting
    Mar 3 13:21:42 damnation acpid: starting up
    Mar 3 13:21:42 damnation acpid: 4 rules loaded
    Mar 3 13:21:42 damnation acpid: waiting for events: event logging is off
    Mar 3 13:21:43 damnation acpid: client connected from 5224[0:0]
    Mar 3 13:21:43 damnation acpid: 1 client rule loaded
    Mar 3 13:21:47 damnation acpid: client connected from 3396[82:82]
    Mar 3 13:21:47 damnation acpid: 1 client rule loaded
    Mar 3 13:22:21 damnation acpid: exiting
    Mar 3 13:22:21 damnation acpid: starting up
    Mar 3 13:22:21 damnation acpid: 4 rules loaded
    Mar 3 13:22:21 damnation acpid: waiting for events: event logging is off
    Mar 3 13:22:22 damnation acpid: client connected from 5224[0:0]
    Mar 3 13:22:22 damnation acpid: 1 client rule loaded
    Mar 3 13:22:26 damnation acpid: client connected from 3396[82:82]
    Mar 3 13:22:26 damnation acpid: 1 client rule loaded
    Mar 3 13:23:03 damnation acpid: client 5224[0:0] has disconnected
    Mar 3 13:23:03 damnation acpid: client connected from 5224[0:0]
    Mar 3 13:23:03 damnation acpid: 1 client rule loaded
    Mar 3 13:25:00 damnation acpid: exiting
    Mar 3 13:25:00 damnation acpid: starting up
    Mar 3 13:25:00 damnation acpid: 4 rules loaded
    Mar 3 13:25:00 damnation acpid: waiting for events: event logging is off
    Mar 3 13:25:01 damnation acpid: client connected from 5224[0:0]
    Mar 3 13:25:01 damnation acpid: 1 client rule loaded
    Mar 3 13:25:05 damnation acpid: client connected from 3396[82:82]
    Mar 3 13:25:05 damnation acpid: 1 client rule loaded
    Mar 3 13:29:52 damnation acpid: client connected from 21588[1000:100]
    Mar 3 13:29:52 damnation acpid: 1 client rule loaded
    Mar 3 13:30:27 damnation acpid: client 21588[1000:100] has disconnected
    Mar 3 13:36:15 damnation acpid: exiting
    Mar 3 13:37:54 damnation acpid: starting up
    Mar 3 13:37:54 damnation acpid: 4 rules loaded
    Mar 3 13:37:54 damnation acpid: waiting for events: event logging is off
    Mar 3 13:37:56 damnation acpid: client connected from 3419[82:82]
    Mar 3 13:37:56 damnation acpid: 1 client rule loaded
    Mar 3 13:38:28 damnation acpid: client connected from 4292[0:0]
    Mar 3 13:38:28 damnation acpid: 1 client rule loaded
    Mar 3 13:39:24 damnation acpid: exiting
    Mar 3 13:39:24 damnation acpid: starting up
    Mar 3 13:39:24 damnation acpid: 4 rules loaded
    Mar 3 13:39:24 damnation acpid: waiting for events: event logging is off
    Mar 3 13:39:25 damnation acpid: client connected from 4292[0:0]
    Mar 3 13:39:25 damnation acpid: 1 client rule loaded
    Mar 3 13:39:29 damnation acpid: client connected from 3419[82:82]
    Mar 3 13:39:29 damnation acpid: 1 client rule loaded
    Mar 3 13:44:09 damnation acpid: client connected from 4488[1000:100]
    Mar 3 13:44:09 damnation acpid: 1 client rule loaded
    Mar 3 13:45:42 damnation acpid: client 4488[1000:100] has disconnected
    Mar 3 13:58:17 damnation acpid: exiting
    Mar 3 13:58:17 damnation acpid: starting up
    Mar 3 13:58:17 damnation acpid: 4 rules loaded
    Mar 3 13:58:17 damnation acpid: waiting for events: event logging is off
    Mar 3 13:58:18 damnation acpid: client connected from 4292[0:0]
    Mar 3 13:58:18 damnation acpid: 1 client rule loaded
    Mar 3 13:58:22 damnation acpid: client connected from 3419[82:82]
    Mar 3 13:58:22 damnation acpid: 1 client rule loaded
    (are all these "client has disconnected" messages normal?)
    Last edited by Natanji (2010-03-07 11:03:54)

    I don't know if it works for everyone but i have just fixed the acpi rotate for my x60t
    /usr/bin/xrotate
    #!/bin/sh
    output=LVDS1
    if [ "$XROT_OUTPUT" ]
    then
    output=$XROT_OUTPUT;
    fi
    devices="stylus eraser"
    geomnbr=0
    xrandr=normal
    wacom=normal
    if [ "$1" == "-" ] || [ "$1" == "+" ] || ! [ "$1" ];
    then
    operator="$1";
    [ "$1" ] || operator='+';
    case `xrandr --verbose | grep "^$output " | sed "s/^[^ ]* [^ ]* [^ ]* ([^(]*) \([a-z]*\).*/\1/"` in
    normal) geom=0;;
    left) geom=1;;
    inverted) geom=2;;
    right) geom=3;;
    esac
    let geom=${geom}${operator}1+4
    let geom=${geom}%4
    else
    geom="$1"
    fi
    case $geom in
    1) wacom=CCW; xrandr=left ;;
    2) wacom=HALF; xrandr=inverted ;;
    3) wacom=CW; xrandr=right ;;
    *) wacom=NONE; xrandr=normal ;;
    esac
    echo "xrandr to $xrandr, xsetwacom to $wacom" >&2
    if xrandr --output "$output" --rotate "$xrandr"; then
    for device in $devices
    do
    xsetwacom set "$device" Rotate "$wacom"
    done
    fi
    #workaround for linuxwacom bug
    if [ "`xsetwacom get stylus Mode`" == '1' ]; then
    for decive in $devices
    do
    xsetwacom set stylus CoreEvent "off"
    xsetwacom set stylus Mode "off"
    done
    { sleep 1;
    for device in $devices
    do
    xsetwacom set stylus Mode "on"
    xsetwacom set stylus CoreEvent "on"
    done; } &
    fi
    /etc/acpi/thinkpad-swivel-up.sh       
    #!/bin/bash
    XAUTHORITY=/var/lib/gdm/\:0.Xauth DISPLAY=:0.0 /usr/bin/xrotate 0
    /etc/acpi/thinkpad-swivel-down.sh       
    #!/bin/bash
    XAUTHORITY=/var/lib/gdm/\:0.Xauth DISPLAY=:0.0 /usr/bin/xrotate 1
    The problem was that my acpid starts long before xorg.
    System:
    Thinkpad x60 tablet
    xorg 1.8
    acpid 1.0.10

  • [solved] Extra Thinkpad tablet hardware buttons not recognised

    Hi there,
    I am having a Thinkpad X200T which comes with additional tablet hardware buttons, such as for rotation.
    However, these buttons are not recognised. I just checked it with 'xev'. They do not generate a click event.
    Does anyone know how to enable these buttons?
    All information I have found so far was on the ThinkWiki which says that you have to map these scancodes to keycodes. However, I am wondering if there is no other way to directly enable them, such as by a module to be loaded.
    The buttons I am talking about are shown here: http://www.thinkwiki.org/wiki/File:X41_ … uttons.JPG
    Thanks!
    Last edited by orschiro (2013-06-26 06:39:55)

    Does the GNOME shortcuts manager conflict with setkeycodes and xbindkeys?  Can it set the buttons you mention itself?  I just can't grasp your reasoning; you may as well say "I have to send a package from London to New York by tomorrow morning, but I don't want to use air freight because I favor the train system."  If your favored solution doesn't work (or doesn't even exist), then relying on it is foolish.  I can understand that you might want some kind of "Pure GNOME environment" solution, but there very well might not be one.

  • Button/lid (no /proc/acpi/events?)

    I must be missing something obvious but it seem that when I close my laptop's lid, the button/lid section of handler.sh is not triggered. I have acpi running fine, it even seems that other events are successfully triggered (like ac_adapter), but not button/lid. Essentially I'm trying to run 'powersave -u' when I close the lid.
    Help please?

    Thanks for the reply. It seems like this might be part of a bigger problem though, because I don't seem to have a /proc/acpi/event. What I have in /proc/acpi are ac_adapter, battery, button, embedded_controller, fan, power_resource, processor, thermal_zone, and video.
    Also, when I start my computer, Arch says that the acpi daemon started successfully. But if I stop it (also successfully) and then try to start it again, it always fails with "acpid: can't open /proc/acpi/event: Device or resource busy".
    Here's some sample output from /var/log/acpid which doesn't seem to be very useful. The exiting lines are probably me manually stopping acpid, although it never starts up again unless I reboot..
    [Fri Feb 17 10:59:02 2006] starting up
    [Fri Feb 17 10:59:02 2006] 2 rules loaded
    [Fri Feb 17 10:59:07 2006] client connected from 2788[82:82]
    [Fri Feb 17 10:59:07 2006] 1 client rule loaded
    [Fri Feb 17 10:59:39 2006] exiting
    [Fri Feb 17 11:01:34 2006] starting up
    [Fri Feb 17 11:01:34 2006] 2 rules loaded
    [Fri Feb 17 11:01:39 2006] client connected from 2729[82:82]
    [Fri Feb 17 11:01:39 2006] 1 client rule loaded
    [Fri Feb 17 11:02:12 2006] received event "thermal_zone C176 00000081 00000000"
    [Fri Feb 17 11:02:12 2006] notifying client 2729[82:82]
    [Fri Feb 17 11:02:12 2006] executing action "/etc/acpi/handler.sh thermal_zone C176 00000081 00000000"
    [Fri Feb 17 11:02:12 2006] BEGIN HANDLER MESSAGES
    cat: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq: No such file or directory
    cat: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq: No such file or directory
    [Fri Feb 17 11:02:12 2006] END HANDLER MESSAGES
    [Fri Feb 17 11:02:12 2006] action exited with status 0
    [Fri Feb 17 11:02:12 2006] executing action "/etc/acpi/handler.sh thermal_zone C176 00000081 00000000"
    [Fri Feb 17 11:02:12 2006] BEGIN HANDLER MESSAGES
    cat: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq: No such file or directory
    cat: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq: No such file or directory
    [Fri Feb 17 11:02:12 2006] END HANDLER MESSAGES
    [Fri Feb 17 11:02:12 2006] action exited with status 0
    [Fri Feb 17 11:02:12 2006] completed event "thermal_zone C176 00000081 00000000"
    [Fri Feb 17 11:08:30 2006] exiting
    Now I'm really confused.

  • Javascript embedded in button pl/sql event handler not being executed

    Javascript calls not working from pl/sql button event handler. What am I missing? Are specific settings needed to execute javascript from pl/sql proceedures?
    Example: Want to toggle target='_blank' off and on in a button pl/sql event handler to open url call in new window & then reset when processing submit is done & the app returns to the form.
    portal form button's pl/sql submit handler:
    begin
    htp.p('<script language=JavaScript>') ;
    htp.p('this.form.target="_blank"') ;
    htp.p('</script>') ;
    PORTAL.wwa_app_module.set_target('http://www.oracle.com') ;
    htp.p('<script language=JavaScript>') ;
    htp.p('this.form.target="_blank"') ;
    htp.p('</script>') ;
    end ;
    Putting the following in the button's javascript on_click event handler works great:
    this.form.target='_blank'
    to force opening new window with a call in the button's submit pl/sql code via:
    PORTAL.wwa_app_module.set_target('http://www.oracle.com') ;
    but then the target='_blank' is left on when the submit is done & we return to the form.
    putting the above javascript as a function (called fcn_newpage) elsewhere (e.g., after form opens) & calling in the submit pl/sql with
    htp.p('fcn_newpage') ;
    also doesn't work.
    Metalink thought this was an application issue instead of a bug, so thought I'd see if anyone knows what's going wrong here. (Portal 9.0.4.1)

    thanks for your discussion of my post.
    Please clarify:
    "htp.p('fcn_newwindow') sends a string":
    What would you suggest the proper syntax for a function fcn_newwindow() call from a pl/sql javascript block that differs from
    htp.p('<script language="Javascript">') ;
    htp.p('fcn_newwindow');
    htp.p('</script>');
    or more simply
    htp.p('fcn_newwindow') ;
    More generally, what I'm trying to figure out is under what conditions javascript is executed, if ever, in the pl/sql of a button (either the submit or custom event handler, depending on the button).
    I've seen lots of posts asking how to do a simple htp.p('alert("THIS IS TROUBLE")') ; in a pl/sql event handler for a button on a form, but no description of how this can be done successfully.
    In addition to alerts, in my case, I'd like to call a javascript fcn from a pl/sql event handle that would pass a URL (e.g., http://www.oracle.com) where the javascript fcn executed
    window.open(URL). The API call to set_target(URL) in pl/sql has no ability to open in a new window, so calling that is inadequate to my needs and I must resort to javascript.
    Its clear in the PL/SQL of a button, you can effect form components since p_session..set_target & p_session.get_target set or get the contents of form components.
    So to see if javascript ever works, I tried to focus on something simple that only had to set what amounts to an enviromental variable when we returned to the form after a post. I chose to try to change the html value of TARGET from javascript in the PL/SQL button because it doesn't need to be implemented until we finish the post and return to the form.
    So I focused on a hack, setting this.form.TARGET='_blank' in the on_click event handler that forced every subsequent URL call or refresh of the form to be a new window. I then wanted to turn off opening new windows once I'd opened the URL call in a new window by setting TARGET='' in the portal form. I can achieve what I want by coding this.form.TARGET='' in the javascript (on_focus, on_change, or on_mousedown, ...) of every form component that might refresh the form. However, that is a ridiculous hack when a simple htp.p('<script>') ; htp.p('this.form.target=""') ; htp.p('</script>') ; at the end of the button's pl/sql event handle should do the same thing reliably if javascript ever works in the pl/sql event handler.
    If we didn't have access to form components through p_session calls, I'd assume it was a scope issue (what is available from the pl/sql event handler). But unless my syntax is just off, when, if ever, can javascript be used in a portal form's pl/sql event handler for a button?
    if I code a javascript funtion in the forms' pl/sql before displaying form:
    htp.p('<script language="JavaScript">') ;
    htp.p('function fcn_new_window(URL)') ;
    htp.p('window.open(URL)' ) ;
    htp.p('</script>') ;
    the function can be called from a button's on_click javascript event handler:
    fcn_new_window('http://www.oracle.com')
    but from the same button's pl/sql submit event handler this call doesn't work: htp.p('fcn_new_window("http://www.oracle.com")')
    So my questions remain: Is there other syntax I need, or does javascript ever work properly from the pl/sql of a form button's event handler? If it doesn't work, isn't this a bug that should be fixed by Oracle?
    I can probably figure out hacks to make things work the way I need, but executing javascript from pl/sql event handlers seems to be the expected way to affect portal html pages (forms, reports, ...) and it seems not to work as expected. I don't feel I should have to implement hacks for something as simple as calling a javascript function from pl/sql when almost every example I've found in metalink or the forums or Oracle Press's "portal bible" suggests using javascript from pl/sql via the utility htp.p() to effect web page components in portal.
    My TAR on the subject, while still open, returned the result basically: "We can reproduce your situation. Everything looks okay to us, but we can't explain how to use javascript where you want or point you to any documentation that would solve your problem or expain why it should not work the way you want it to. We don't feel its a technical issue. Why don't you post the problem on the portal applications forum."
    I'm hoping I'm just missing something fundamental and everything will work if I implement it a little differently. So if anyone sees my error, please let me know.
    by the way, not sure this is germain, but in reference to your comment:
    "redirections in pl/sql procedures give a peculiar result. in a pl/sql procedure, usually, portals give the last redirection statement and ignore anything else coming after it."
    if I try to raise an alert:
    htp.p('alert("you screwed up")');
    return;
    in a pl/sql event handler, it still doesn't raise the alert, even though its the last thing implemented in the event handler. But if I set the value of a text box using p_session..set_value_as_string() at the same spot, it correctly sets the text box value when I return to the form.

  • How to interpret acpi events?

    Hi.
    I installed acpid and with a little tweaking of the handler.sh I got the basic actions to be recognized. Now, how can i get a list, or something, of all avalible events and thay're explanation.  Whan i monitor the /var/log/messages.log i often get 'ACPI group/action undefined: processor / CPU0' or '... termal_zone / TZ1'. How can i find out what those events meen, and how i can use them.
    edit: BTW, i tested the fn key and it seems to work with a lot of keys, including the one for seting up the brightness of the monitor. Does that have something to do with acpid?
    Last edited by KRTac (2008-07-17 00:03:19)

    I don't know that there is any definitive source where you can look up the ACPI events, their parameters and what they mean. Perhaps the ACPI specification (http://www.acpi.info/spec.htm) might have some info, but its 600+ pages of very boring reading. Also note that different manufacturers will use different events. When I moved from a Dell to a ThinkPad I had to modify my ACPI scripts to change names of a number of events and parameters.
    Probably the best you could do is log every ACPI event, run tail -f on the log file and put the laptop through its paces, noting which events correspond to which actions. Try things like opening/shutting the lid (if its a laptop), press various Fn buttons, unplug and plug in the AC cord, run the battery down to zero, run the temperature up as high as you can. This is basically what I did when I first set up my custom ACPI scripts.
    Another thing you should do is look at other peoples ACPI scripts. That will give you ideas about how to use ACPI events. Look up your laptop on http://www.linux-laptop.net/ and scan through the configs to see if anyone set up ACPI scripts.
    Finally, the Fn keys may or may not have to do with ACPI. You can check this by logging ACPI events. My Thinkpad sends an event for every Fn combination. However, some combos have an action hard-wired so that ACPI is not needed. For example, the monitor brightness probably does not have to do with ACPI.
    Good luck.

  • Lenovo ThinkPad X200S Stuck ... !!!

    When I bought my Lenovo ThinkPad X200S, All my friends make fun on me they called me (idiot) because they are Fans for DELL and/or HP ….  They said that this Laptop look like Old style since they Create the first laptop in the world , they was proud with there laptops ,with a lot of Colored lights ,touch buttons ,cover Themes … etc
    But I was defending my Own laptop the Great (Lenovo ThinkPad X200S) , and I was telling them , (Guys , I bought the laptop form the Creators of the technology , IBM , the great Name, The History , I bought the Performance , Durability ,Genus Engineering ) , even how much I trust Lenovo , I gave me self the right to tell them that (Lenovo products , never Broke , and never stuck or let me down ) ….
    But, when I was trying to Stop my Bluetooth Device using (FUN + Radio Button) …..Ooops, the Laptop Stuck?!!!!!! , I was shocked!!!!! , it was like someone stabs me with a Knife in my back..!!! , if you want the Truth my friend make fun on me more and more , and I Toke my laptop home without even say good by …I was disappointed like never before .. !!!
    I tried more and more to do that again in home , and it was the same result , Even I found that when I try to Start OR Stop the Wi-fi from the Button at the lest side of the laptop , the same thing happening  90% from  my trying (laptop stuck again ) !!!!!!
    I try to format and install new windows 7 pro …
    I Install all the latest driver using (Thinkvantige system Update) …
    I install all Microsoft Updates …
    I install Norton internet security 2011  …
    I install thinkvantige toolbox latest Version …
    I make full hardware test , Everything  was fine !!! , no problems at all
    But, again, when I try to do the same thing, (Start or stop any radio device) using (Fun + Radio Button OR from the Wi-Fi Button at the left side) same thing happened again LAPTOP STUCK ….
    My laptop still under warranty till 31/3/2012 ….
    And now I have no place else to ask for Advice except here, so please lenovo Good Team, Help me
    my faith in you will never Change.
    Regards...
    Alaa Al-Allan

    My laptop info :
    Product: ThinkPad X200s 7466-3RG
    Operating system: Windows 7 professional 32 bit
    Original description: SL9400(1.86GHz), 4GB RAM,120GB 5400rpm HD, 12.1in 1280x800 LCD, Intel 4500MHD, 802.11bg wireless, Vodafone WWAN, Bluetooth, 1Gb Ethernet, Secure chip, Fingerprint reader, 4c Li-Ion, Windows 7 professional 32
    Warranty information
    Type:
    Model:
    Serial number:
    7466
    3RG
    xxxxxxx
    Status:
    Expiration date:
    Location:
    In warranty
    2012-03-31
    SWEDEN
    Regards,
    Alaa Al-allan
    Moderator Note; s/n edited for members own protection

  • X200 Tablet Stylus Tracking Problem

    I have a very strange issue on just one of my X200 Tablets (I have several in production at the school I support). When the teacher is using his tablet while projecting and flips the screen into the tablet orientation, the tracking of the stylus inverts on both axis, so a movement of the stylus UP on the screen tracks the cursor DOWN on the display, and LEFT tracks as RIGHT.
    This persists as long as he projects, but as soon as he unplugs the VGA cable, it begins to track normally again.
    The BIOS is up to date (as of this posting) as is the: video driver, display driver, presentation director, tablet button drivers and digitizer firmware. And this is the model without a multitouch display.
    ANY thoughts on this would be very helpful, as I have never seen anything like this! Thanks,
    -Beebop.

    Hibbidybeebop,
    That's interesting.. Will try to recreate this.   Are you running Vista or XP?
    What version of Presentation Director are you running?
    I received your PM - if you could send me another with the system type and serial number from the bottom of one of these units and also your contact information (name, phone, and the school system) in that private message it will be helpful. 
    We can look into this and will post suggestions / solutions back to the forum for the benefit of all, but I want to ensure you are receiving the level of support that you should as this issue has been open for more than a month here.
    Best regards,
    Mark
    ThinkPads: S30, T43, X60t, X1, W700ds, IdeaPad Y710, IdeaCentre: A300, IdeaPad K1
    Mark Hopkins
    Program Manager, Lenovo Social Media (Services)
    twitter @lenovoforums
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • Acpi events

    Hello, i have a thinkpad laptop
    all of my /etc/systemd/logind.conf lines are commented out.
    the ACPI events my laptop generates are still handled by something, i.e when i close the lid, the screen goes off, power button does what it should, etc
    I read that the logind.conf file is responsible for the actions that will be run by systemd when certain acpi events occur. so:
    1. what triggers these actions even though my logind.conf is empty? does systemd have some defaults?
    2. how can i debug all the acpi events that occur?
    TY!

    orschiro wrote:Tested with xev.
    Test with something that listens to *ACPI* events
    You'll need to check what systemd is doing with ACPI these days - it used to be simply /etc/acpi/handler.sh

  • X200 Tablet - Wacom Pen Blue Screen of Death on Windows 7

    Hello...hopefully someone can help & point me in the right direction...I have a Lenovo x200 tablet PC (Stylus Only Version) - and recently installed Windows 7 Professional (64bit)
    The OS install went perfectly...Once installed, I did all the Systems Updates for Windows 7, including all the updates for Lenovo using System Update 4.01.....However, I have an issue that I cannot seem to figure out...
    PROBLEM # 1
    The biggest issue I now face is, whenever I put the Digitized Pen next to the Tablet Screen within 2 seconds I get the 'Blue Screen of Death'....and it automatically Reboots....This ONLY happens when I touch the Pen to the screen....
    I uninstalled the 'Wacom Drivers' - within the Device Manager, which i assume were installed by the system update(s)....After, uninstalling the issue of the 'Blue Screen' from happening when the pen touches the screen is gone.....However, I have no way of being able to use the Pen...it does not show any cursor or inking....Is there a specific DRIVER that I should be installing on my own to make this work properly - without getting the 'Blue Screen of Death' each time?....I really need some guidance on this issue. 
    PROBLEM # 2
    My Second issue, which is suddenly occured after day 2 of installing updates is the Lenovo System Update 4.01 -- Suddenly, after working on day 1 - now, whenever i try to 'Check New Updates' i get a popup that says "An error was detected with the Package catalog for your system on the System Update Server. Please contact the Support Center".
    I called techical support on the phone - and they made it seem like this was not their problem and they could not help me...The odd thing is, that this was working before, and now all of sudden it doesnt work...
    If someone can please advise me on what to do, especially with the Pen Driver problem, I would greatly appreciate it....Thanks!
    Solved!
    Go to Solution.

    **FIXED IT** TWICE!
    I've been messing with this on multiple machines at my school.
    I was getting the BSOD, "no tablet installed" all that good stuff.
    I installed this, that and the other thing.
    After testing another machine, I read something in the BSOD that caught my attention.
    It mentions resetting the cache of the BIOS. I wasn't sure what that meant, or how to do it.
    But I was able to get into the BIOS (F1 on the Lenovo splash screen) and I just tapped F9 (load default Bios options -paraphrasing) Then I hit ESC- it prompts to save the settings, agree and let the computer continue to boot.
    I was able to test the Pen at the login screen. Just repeated this process on another X200 computer and it worked again.
    Try it.
    Good luck!

  • The book who I selected doesn't move to the right in CheckedListBox and the reason is that I can't make an return.his code is good just for first user who I selected

    Imprumut = loan
    I have 6 tables: 
    I have one combobox(from where I select utilizatori(users)) and 2 CheckedListBox(Between first box and second box I have 2 buttons:imprumuta(loan) and restituie(return))
    This c# code works just for first user: Utilizator, but something's not good. When I add new utilizator(user) and select it,  the loan will be add in my SQL DataBase, but... the book who I selected doesn't move to the right in CheckedListBox and the reason
    is that I can't make an return
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using MySql.Data.MySqlClient;
    namespace proiect
        public partial class Imprumut : Form
            MySqlConnection con = new MySqlConnection("DataSource=localhost;UserID=root;database=biblio1");
            //stabilim conexiunea
            MySqlCommand comUser;//interogarea pe baza careia umplem comboBox
            MySqlDataAdapter adaptu;
            DataTable userT = new DataTable();
            MySqlCommand cmdCarti;//interogarea pe baza careia umplem checkListBox
            MySqlDataAdapter adaptCarti;
            DataTable CartiTabel = new DataTable();
            MySqlCommand cmdCartiImprumutate;//interogarea pe baza careia umplem checkListBox
            MySqlDataAdapter adaptCartiImprumutate;
            DataTable CartiImprumutateTabel = new DataTable();
            public int UserId
                get
                    return Convert.ToInt32(user.SelectedValue.ToString());
            void Completez_Combo_User()
                try
                    comUser = new MySqlCommand("SELECT n.userid, CONCAT(n.UserName) as UserN FROM users n left join userroles us on n.userid=us.userid left join roles r on r.roleid=us.roleid WHERE r.roleid='3'",
    con);
                    adaptu = new MySqlDataAdapter(comUser);
                    adaptu.Fill(userT);
                    user.Items.Clear();
                    user.DataSource = userT;
                    //DataTable din care sunt preluate datele pentru ComboBox user
                    user.ValueMember = "UserID";
                    //Valoarea din coloana UserID nu se afiseaza in combobox
                    user.DisplayMember = "UserN";
                    //Eelementele afisate in combobox, preluate din concatenarea mai multor coloane
                catch (Exception ex)
                    MessageBox.Show(ex.Message);
            void Completez_CheckList_Carti()
                try
                    cmdCarti = new MySqlCommand("SELECT BookID, CONCAT(title, ' ', ISBN,' ',author)as date_carte FROM books WHERE NumberLeft > 0 ORDER BY BookID", con);
                    adaptCarti = new MySqlDataAdapter(cmdCarti);
                    adaptCarti.Fill(CartiTabel);
                    imp.Items.Clear();
                    //carti.DataSource=null;
                    imp.DataSource = CartiTabel;
                    //DataTable din care sunt preluate datele pentru ComboBox carte
                    imp.ValueMember = "BookID";
                    //Valoarea din coloana BookID nu se afiseaza in combobox
                    imp.DisplayMember = "date_carte";
                    //Eelementele afisate in combobox, preluate din concatenarea mai multor coloane
                catch (Exception ex)
                    MessageBox.Show(ex.Message);
                void Completez_CheckList_Cartires()
                    try
                        cmdCartiImprumutate = new MySqlCommand(string.Format("SELECT b.BookID, CONCAT(title, ' ', ISBN,' ',author) as date_carte FROM books b inner join userbooks ub on ub.bookid = b.bookid
    WHERE ub.userid = {0} ORDER BY BookID", UserId), con);
                        adaptCartiImprumutate = new MySqlDataAdapter(cmdCartiImprumutate);
                        adaptCartiImprumutate.Fill(CartiImprumutateTabel);
                        res.Items.Clear();
                        //carti.DataSource=null;
                        res.DataSource = CartiImprumutateTabel;
                        //DataTable din care sunt preluate datele pentru ComboBox carte
                        res.ValueMember = "BookID";
                        //Valoarea din coloana BookID nu se afiseaza in combobox
                        res.DisplayMember = "date_carte";
                        //Eelementele afisate in combobox, preluate din concatenarea mai multor coloane
                    catch (Exception ex)
                        MessageBox.Show(ex.Message);
            void Inregistrez_imprumut_in_BD()
                int useridu = Convert.ToInt32(user.SelectedValue.ToString()); //useridu = id book
                int bookidi;
                try
                    DateTime azi = System.DateTime.Now; //  Data imprumutului
                    DateTime atunci = termenul.Value;   //  Data restituirii
                    MySqlTransaction tranzactie = con.BeginTransaction();
                    MySqlCommand adaugImpr = new MySqlCommand("INSERT INTO bookshistory(UserID, BookID,BorrowDate) VALUES(@UserID, @BookID, CAST(@BorrowDate as datetime))", con);
                    MySqlCommand scadCarti = new MySqlCommand("UPDATE books SET numberleft=numberleft-1 WHERE bookid=@bookid", con);
                    MySqlCommand adauga_userbooks = new MySqlCommand("INSERT INTO userbooks(userId,bookID)VALUES(@userID,@bookID)", con);
                    adauga_userbooks.Transaction = tranzactie;
                    adaugImpr.Transaction = tranzactie;
                    scadCarti.Transaction = tranzactie;
                    try
                        foreach (int i in imp.CheckedIndices)
                            imp.SelectedIndex = i;
                            bookidi = Convert.ToInt32(imp.SelectedValue.ToString());
                            MessageBox.Show(bookidi.ToString());
                                     //bookidi va fi id-ul cartea bifata, pe rand din checklistBox
                                     //Inregistrez in tabela imprumut
                            adaugImpr.Parameters.AddWithValue("@UserID", useridu);
                            adaugImpr.Parameters.AddWithValue("@BookID", bookidi);
                            adaugImpr.Parameters.AddWithValue("@BorrowDate", azi);
                            adaugImpr.ExecuteNonQuery();
                            adaugImpr.Parameters.Clear();
                            adauga_userbooks.Parameters.AddWithValue("@userID", useridu);
                            adauga_userbooks.Parameters.AddWithValue("@bookID", bookidi);
                            adauga_userbooks.ExecuteNonQuery();
                            adauga_userbooks.Parameters.Clear();
                                    //Scad numarl de carti disponibile pentru cartea imprumutat
                            scadCarti.Parameters.AddWithValue("@bookid", bookidi);
                            scadCarti.ExecuteNonQuery();
                            scadCarti.Parameters.Clear();
                        tranzactie.Commit();
                    catch (Exception ex)
                        tranzactie.Rollback();
                        string message = ex.Message;
                        if (ex.Message.ToLower().Contains("duplicate entry"))
                            message = "Una dintre carti mai exista deja";
                        MessageBox.Show(message);
                catch (Exception ex)
                    MessageBox.Show(ex.Message);
            void Inregistrez_restituire_in_BD()
                int useridu = Convert.ToInt32(user.SelectedValue.ToString()); //useridu = id book
                int bookidi;
                try
                    DateTime azi = System.DateTime.Now; //  Data imprumutului
                    DateTime atunci = termenul.Value;   //  Data restituirii
                    MySqlTransaction tranzactie = con.BeginTransaction();
                    MySqlCommand modificIstoric = new MySqlCommand("UPDATE bookshistory SET returndate = @returnDate WHERE userID = @userID AND bookID = @bookID", con);
                    MySqlCommand adaugCarti = new MySqlCommand("UPDATE books SET numberleft = numberleft + 1 WHERE bookID = @bookID", con);
                    MySqlCommand sterge_userbooks = new MySqlCommand("DELETE  FROM userbooks WHERE userID = @userID AND bookID = @bookID", con);
                    sterge_userbooks.Transaction = tranzactie;
                    modificIstoric.Transaction = tranzactie;
                    adaugCarti.Transaction = tranzactie;
                    try
                        foreach (int i in res.CheckedIndices)
                            res.SelectedIndex = i;
                            bookidi = Convert.ToInt32(res.SelectedValue.ToString());
                            MessageBox.Show(bookidi.ToString());
                            //bookidi va fi id-ul cartea bifata, pe rand din checklistBox
                            //Inregistrez in tabela imprumut
                            modificIstoric.Parameters.AddWithValue("@UserID", useridu);
                            modificIstoric.Parameters.AddWithValue("@BookID", bookidi);
                            modificIstoric.Parameters.AddWithValue("@returnDate", termenul.Value);
                            modificIstoric.ExecuteNonQuery();
                            modificIstoric.Parameters.Clear();
                            sterge_userbooks.Parameters.AddWithValue("@UserID", useridu);
                            sterge_userbooks.Parameters.AddWithValue("@BookID", bookidi);
                            sterge_userbooks.ExecuteNonQuery();
                            sterge_userbooks.Parameters.Clear();
                            //Scad numarl de carti disponibile pentru cartea imprumutat
                            //adaugCarti.Parameters.AddWithValue("@bookid", bookidi);
                            adaugCarti.Parameters.AddWithValue("@bookid", bookidi);
                            adaugCarti.ExecuteNonQuery();
                            adaugCarti.Parameters.Clear();
                        tranzactie.Commit();
                    catch (Exception ex)
                        tranzactie.Rollback();
                        MessageBox.Show(ex.Message);
                catch (Exception ex)
                    MessageBox.Show(ex.Message);
            public Imprumut()
                InitializeComponent();
                try
                    con.Open();
                catch (Exception ex)
                    MessageBox.Show(ex.Message);
                Completez_Combo_User();
                Completez_CheckList_Carti();
                Completez_CheckList_Cartires();
                //selecteaza_carti_utilizator();
                //  Initializez termenul din dateTimePicker la data de peste 15 zile fata de data sistemului
                termenul.Value = System.DateTime.Now.AddDays(15);
            private void imprumuta_Click(object sender, EventArgs e)
                Confirmare c = new Confirmare("Confirmati imprumutul?");
                DialogResult dr = c.ShowDialog();
                if (dr == DialogResult.Yes)
                    try
                        Inregistrez_imprumut_in_BD();
                        MessageBox.Show("Imprumutul a fost inregistrat");
                        //Dupa inregistrarea imprumutului o parte din carti nu mai sunt disponibile pentru imprumut
                        //Reincarc in CheckList cu Carti noua lista cu carti ramase dupa imprumut
                        //Pentru asta "resetez" datele din dataTable cartiT (sursa pentru carti.DataSource)
                        CartiTabel.Clear();
                        adaptCarti.Fill(CartiTabel);
                        CartiImprumutateTabel.Clear();
                        adaptCartiImprumutate.Fill(CartiImprumutateTabel);
                    catch (Exception ex)
                        MessageBox.Show(ex.Message);
                if (dr == DialogResult.No)
                    MessageBox.Show("Imprumutul NU a fost inregistrat");
                    imp.ClearSelected();
                    //deselecteaza cartea selectat
                    foreach (int i in imp.CheckedIndices)
                        imp.SetItemChecked(i, false);
                    //debifeaza cartile bifate
                //if (imp.CheckedItems.Count > 0)
                //    //res.Items.Clear();
                //    foreach (string str in imp.CheckedItems)
                //        res.Items.Add(str);//adauga in partea cealalta, imprumuta
                //    while (imp.CheckedItems.Count > 0)
                //        imp.Items.Remove(imp.CheckedItems[0]);
            private void restituie_Click(object sender, EventArgs e)
                Confirmare r = new Confirmare("Confirmati restituirea?");
                DialogResult dr = r.ShowDialog();
                if (dr == DialogResult.Yes)
                    try
                        Inregistrez_restituire_in_BD();
                        MessageBox.Show("Restituirea a fost inregistrata");
                        //Dupa inregistrarea imprumutului o parte din carti nu mai sunt disponibile pentru imprumut
                        //Reincarc in CheckList cu Carti noua lista cu carti ramase dupa imprumut
                        //Pentru asta "resetez" datele din dataTable cartiT (sursa pentru carti.DataSource)
                        CartiTabel.Clear();
                        adaptCarti.Fill(CartiTabel);
                        CartiImprumutateTabel.Clear();
                        adaptCartiImprumutate.Fill(CartiImprumutateTabel);
                    catch (Exception ex)
                        MessageBox.Show(ex.Message);
                if (dr == DialogResult.No)
                    MessageBox.Show("Restituirea NU a fost inregistrata");
                    res.ClearSelected();
                    //deselecteaza cartea selectat
                    foreach (int i in imp.CheckedIndices)
                        res.SetItemChecked(i, false);
                    //debifeaza cartile bifate
                if (res.CheckedItems.Count > 0)
                    foreach (string str in res.CheckedItems)
                        imp.Items.Add(str);
                    while (res.CheckedItems.Count > 0)
                        res.Items.Remove(res.CheckedItems[0]);
            private void button2_Click(object sender, EventArgs e)
                con.Close();
                this.Close();
            //private void selecteaza_carti_utilizator()
            //    res.Items.Clear();
            //    MySqlCommand selectcart = new MySqlCommand("select title from books,userbooks where userbooks.userid='" + user.SelectedValue.ToString() + "' and userbooks.bookid=books.bookid", con);
            //    MySqlDataReader reader = selectcart.ExecuteReader();
            //    try
            //        while(reader.Read())
            //            res.Items.Add(reader["title"]);
            //    catch(Exception ex)
            //        MessageBox.Show(ex.Message);
            //    finally
            //        reader.Close();

    Hello Vincenzzo,
    This issue seems to be a window form UI implemented related issue, for this i suggest that you could ask it to the windows form forum:
    http://social.msdn.microsoft.com/Forums/windows/en-US/home?forum=winforms
    The current forum you posted to is used to discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • High performanc​e SSD for my X200 Tablet

    Hi,
    I have the X200 Tablet 7450 ERG. Preinstalled in the computer is a Samsung SSD 64GB disk - but I have found no information about the form factor of the disk, and I am uncertain about what disk to get as replacement due to that (so it fits perfectly inside the machine). Just after installing the nessecarily programs and functions I use, and having a minimum of storage place for the most recent files I work on - I am left with 5-7GB of storage...
    What disk can I get to increase the storage AND performance of my machine. If battery time is a little shorter, I don't care, and price don't scare me too much either.
    Technical performance (as high as possible speed under all conditions without lag) and 128GB+ storage is a requirement.
    Looking forward to get your recommendations!
    Regards,
    OA
    Solved!
    Go to Solution.

    I was in your exact situation.  I liked having an SSD, but found the small size to be rather painful.  I now have an OCZ Vertex 120GB SSD installed in my X200 Tablet.  I also have Intel SSDs in my desktops.  I know there is a 250GB OCZ, and a 160GB Intel.  Both are very, very fast, and both can be installed in the X200T.  An advantage that the latest OCZ Vertex and Intel drives have is that they have TRIM support, which helps mitigate the performance degradation issue you see in SSDs, at least under Windows 7.
    Both were easy to install, although the OCZ needed a firmware update.  The X200T did not play nice with the firmware update software, and I had to drop it into my desktop to do that.
    The only problem with replacing the Samsung SSD, at least the one I received, is that it's a 1.8" disk, with the appropriate mounting bracket.  Why Lenovo chose that form factor is beyond me, because the drive bay can fit a 2.5".  I was not able to find a suitable drive bracket for a 2.5" disk on Lenovo's site, but I found one relatively easily on EBay, and I assume if you call Lenovo you can order the correct part over the phone.  While I was waiting for the it to arrive, I made do with a folded piece of paper wedged in under the drive to hold it in place.  Sad, i know, but I couldn't wait, and it worked.
    If you don't want to deal with the drive bracket, Intel also makes 1.8" versions of their SSDs, which as far as I know perform just like their 2.5" equivalents.  They are a bit hard to find, though.

  • I can scroll down web pages with my Lenovo ThinkPad X200. I could, but then I got some updates and it doesn't work. I can scroll fine with an external mouse. I just can't use the "scroll controls" on my laptop. Any ideas why? It's frustrating!

    When I got my machine two years ago and loaded Firefox, I could scroll with the red button that's on the keyboard of the Lenovo ThinkPad x200. Then, a few months ago, Firefox was updated. Not sure which version. And, now I can't scroll. The keypad scroll works in MS Windows programs. It just doesn't work in Firefox. I can't get anywhere with the options so I'm stuck for now. (The scrolling works in Internet Explorer). So, I think it's something that going on with FireFox not with my computer.

    Hi there,
    When I inspect your site in browser tools, I'm getting 404 errors from your page:
    [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (jquery-2.0.3.min.map, line 0)
    [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (edge.4.0.0.min.map, line 0)
    BarnardosIreland wrote:
    I would have thought that publishing should give a complete package that doesn't need any further edits to the code and can just be directly ftp'ed to the web - is this correct?
    In general, you are correct - but also your server does need to be properly configured (and those errors above lead me to think it may not be) to serve the file types that your uploading - but it could be something else entirely. Can you zip up your composition folder, upload it to your Creative Cloud files, set it to share, and then post a link here so I can download it? If you'd rather not share it publicly, can you PM me with a link to your composition files?
    Thanks,
    Joe

  • Button catches the Event only on the second click

    Hi Experts,
    I am new to adobe forms and facing a very strange problem. I have 2 buttons on my interactive form "SUBMIT" & "APPROVE" , now the problem is whenever i load my application(Webdynpro ABAP) for the first time and click any of the 2 buttons the event
    ONSUBMIT of the ui element Interactive form is not caught(control doesnt reach the event) , but when i click any of these buttons from  the second time the control reaches the breakpoint successfully.
    I donot understand where i am going wrong , is there some java script that needs to be written in the initialise event of the buttons to make them trigger the event from the first click itself.
    Thanks In Advance,
    Chaitanya.

    Hi Chintan,
    Thanks for your replies, there wasnt any specific reason for using check field buttons was just experimenting with the component.
    Script in the Click event for button 1:
    // DO NOT MODIFY THE CODE BEYOND THIS POINT - 802.20071213024549.437972.422152 - SubmitToSAP.xfo
                          ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");
                          // END OF DO NOT MODIFY
    Script in the Click event for button 2:(i am setting a flag when it is clicked)
                        var ref3 = xfa.resolveNode("xfa.record.APPROVE");
                        var ref2 = xfa.resolveNode("xfa.record.APPROVE").value;
                           ref3.value = "X";
                          // DO NOT MODIFY THE CODE BEYOND THIS POINT - 802.20071213024549.437972.422152 - CheckFields.xfo
                          ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");
                          // END OF DO NOT MODIFY
    Version of ALD : 8.1
    Adobe Reader :  8.
    Should there be some code written in the initialize event of the button ?
    Thank you for your help so far,
    Chaitanya.

Maybe you are looking for

  • Upgrade to 6.2 or 6.5

    Does anyone plan to upgrade to 6.5? Also, would we need a second License if we were going to install Essbase on a test box and a production box??Michael

  • Join SolarMetric at the 2005 JavaOne Conference, June 27-30, 2005

    Folks, if you are attending JavaONE, let us know. We'd love to meet up with you in San Francisco. We will be in booth #301 and you can see us at a variety of technical sessions and BOFs: TS-3403 Java Data Objects in Action by SolarMetric's CTO Patric

  • How do I download photos from iPhone

    How do I download photos from iPhone

  • Aperture won't import DNG files with my adjustments from LR

    When I export my images from LR2 as DNG and import them into Aperture3, although they look fine in the import window, when I view them in projects they have lost all the modifications I put into them. I then tried to import them as TIFF 16 which work

  • Questions about use of InfoObjects

    Hi, I am generating profiles uisng the ODSs, and i have a question about the mapping: For IO 0TCTNIOBJNM, I am mapping it to 0HIER_NODE for text node . What should these be mapped to? What are these supposed to be? 0TCTIOBJNM 0TCTNODE Thanks Will