[SOLVED]Enable ACPI

Hi,
I have a relativly easy problem with my macbook, but I couldn't find an answer anywhere else:
I have installed acpi, acpid and added acpi=on to the kernel line in grub. At startup is says, that acpi is starting. But it doesn't do anything, there is no directory like /etc/acpi(/actions). I have created these directories and created 2 files there, as described in the macbook article, specifically files for suspend to ram and backlight control. The macbook-backlight program works manually, but when I disconnect the power cord it does not automatically dim the light. The automatic suspend-to-ram doesn't work either.
I guess the problem is, that acpi is not running correctly or has not been configured correctly.
Any ideas?
Last edited by coragonis (2008-10-18 22:26:51)

The scripts in /etc/acpi won't call themselves and the kernel will certainly not do that, that's what daemons are for. I suggest you take a look at acpid.

Similar Messages

  • [SOLVED] Missing acpi hwmon sysfs interface on Eeepc 1000H

    Hi,
    I am running a fresh install using Linux 3.15.8-1-ARCH kernel on Asus Eeepc 1000H and there is a problem with the detected thermal sensors.
    After configuring sensors using sensors-detect (yes to all answers, full detection), I only get this:
    $ sensors
    coretemp-isa-0000
    Adapter: ISA adapter
    Core 0:        +4.0°C  (crit = +90.0°C)
    eeepc-isa-0000
    Adapter: ISA adapter
    fan1:         970 RPM
    It misses the acpitz-virtual-0 corresponding to the acpi thermal zone which temperature can be read in /sys/class/thermal/thermal_zone0/temp and with "acpi -t" command.
    Unfortunately, the temperature reported by coretemp-isa-0000 sensor is wildly wrong, and cannot be used to drive fancontrol, whereas the acpi temperature is correct.
    I checked that hwmon, thermal_sys, coretemp and eeepc_laptop modules are loaded.
    I also tried to add /etc/sensors.d/EeePC-0123456789 as said in https://forums.archlinux.fr/topic14506.html (french):
    chip "acpitz-virtual-0"
      label temp1 "temp1"
      compute temp1 @-20,@-20
      label temp2 "Core 0"
      compute temp2 @-20,@-20
    but I am not able to get the desired output of sensors -u. all I get is that:
    $ sensors -u
    coretemp-isa-0000
    Adapter: ISA adapter
    Core 0:
      temp2_input: 2.000
      temp2_crit: 90.000
      temp2_crit_alarm: 0.000
    eeepc-isa-0000
    Adapter: ISA adapter
    fan1:
      fan1_input: 980.000
    I also tried to install acpi-eeepc-generic from AUR, but unsurprisingly, it did not change anything.
    All I can tell about former behaviour is that I had no problem running sensors and using fancontrol with Xubuntu 12.04 which uses 3.2.0 kernel.
    Can someone give me a clue of what is going on here about missing acpitz-virtual-0 sensor ?
    Best regards,
    archer38
    Last edited by archer38 (2015-06-03 14:53:13)

    The computer is now broken, so marking thread as solved even if the issue has not been really solved.

  • [solved] Enable Invert in KWin

    Hi all,
    I want to invert colors on my desktop using the effects in KWin. I am running Arch 64bit and I have installed the kde-meta-kdeaccessibility meta package. Under Desktop Effects I cannot enable the Invert effect. Is this a hardware limitation or do I need some other package?
    glxinfo | grep -iE '(shad)|(string)'
    server glx vendor string: SGI
    server glx version string: 1.2
    client glx vendor string: Mesa Project and SGI
    client glx version string: 1.4
    OpenGL vendor string: Tungsten Graphics, Inc
    OpenGL renderer string: Mesa DRI Mobile Intel® GM45 Express Chipset GEM 20091221 2009Q4
    OpenGL version string: 2.1 Mesa 7.7
    OpenGL shading language version string: 1.20
    GL_ARB_fragment_program, GL_ARB_fragment_program_shadow,
    GL_ARB_fragment_shader, GL_ARB_framebuffer_object,
    GL_ARB_seamless_cube_map, GL_ARB_shader_objects,
    GL_ARB_shading_language_100, GL_ARB_shading_language_120, GL_ARB_shadow,
    GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_ARB_window_pos,
    GL_EXT_shadow_funcs, GL_EXT_stencil_two_side, GL_EXT_stencil_wrap,
    from 'sudo lshw'
    *-display:0
    description: VGA compatible controller
    product: Mobile 4 Series Chipset Integrated Graphics Controller
    vendor: Intel Corporation
    physical id: 2
    bus info: pci@0000:00:02.0
    version: 09
    width: 64 bits
    clock: 33MHz
    capabilities: msi pm vga_controller bus_master cap_list rom
    configuration: driver=i915 latency=0
    resources: irq:27 memory:f4000000-f43fffff memory:d0000000-dfffffff(prefetchable) ioport:1800(size=8)
    Last edited by drsjlazar (2010-02-23 08:58:56)

    I have submitted a bug report on the KDE bug tracker. Here is a link for anyone interested: https://bugs.kde.org/show_bug.cgi?id=228090
    Hope they sort this out soon.
    [edit] it has been marked as an upstream issue. I'm marking this thread as solved as there is no resolution in sight.
    Last edited by drsjlazar (2010-02-23 08:58:21)

  • [SOLVED] Enabling debug for ath9k in compat-drivers-patched from AUR

    Wireless card: TP-LINK TL-WN951N. lspci says that it is an Atheros AR5416 adapter [AR5008].
    Some background: I'm having the same issues as the OP in this thread, which references this bug report. The problem is that I get a 2000 ms ping every 30 seconds. So 2 seconds of inactivity every 30 seconds. I have the same wireless PCI card, as well. I need to fix this, because it's making online gaming impossible. I should also note that the card is working just fine in Windows 8, however. I am using net-auto-wireless. I have tried using wicd, enabling ath9k's nohwcrypt option, toggling the card's power save, installing the latest compat-drivers-patched from the AUR, toggling different settings in my motherboard's BIOS, and removing the antennae from the card. But nothing has made a significant difference.
    I think I'm really close now. I just have to disable ANI. But in order to do that, it seems that I need to enable debugging for ath9k. But this means that I need to either recompile a custom kernel, or somehow enable debug for ath9k in compat-drivers-patched from the AUR. I'd prefer the latter, as that means that I will have a more bleeding-edge driver. That, and I won't have to touch the kernel as much. What I want is described on this page. But it seems too complicated to me. Please let me explain.
    I've installed things from the AUR before, as mentioned above, and have properly configured my makepkg.conf for my system. So I'd like to use the CFLAGS and such that I've set. I don't understand how everything works in the PKGBUILD; I don't have much experience with sed and awk and regular expressions, and haven't done much shell scripting at all. It seems that at some point in the PKGBUILD, I need to enable debugging for ath9k before it is compiled. Apparently on the last page I linked to, I need to add:
    export CONFIG_ATH_DEBUG=y
    export CONFIG_ATH9K_DEBUG=y
    export CONFIG_ATH9K_DEBUGFS=y
    to some config.mk file. I can only get access to the config.mk file after I install the package with pacman. I've tried adding those lines to my /etc/profile file, and checked, after a reboot, with "set", that those variables are indeed set. But the thing is, with these variables set in /etc/profile, when I run makepkg, makepkg fails with an error 2. I tried again and got the same error. I removed those lines from my /etc/profile, rebooted, tried makepkg again, and everything worked. So putting those lines in my /etc/profile is not the solution, and I feel like I'm doing something very stupid. What am I doing wrong?
    I should also note that I've tried to read the wiki page on compiling a custom kernel using ABS, but it seems to just say "get your custom configuration files" and then just continue (so it assumes that I should already be familiar with the configuration part). The PKGBUILD and Creating Packages wiki pages also seem to be a little... too advanced for me at this point in time.
    So how do I enable debugging for ath9k in compat-drivers-patched from the AUR? I'd prefer to stick with only editing the PKGBUILD and using makepkg, if possible.
    I've really tried to search the web and the arch forums on how to fix this problem myself, but alas, it seems that I need help this time. I greatly appreciate your time for reading my long post.
    UPDATE:
    I've made a lot of progress. I ended up removing the AUR package with pacman by invoking "pacman -Rsn compat-drivers-patched".
    Instructions for [almost] success: First, download compat-drivers-patched from AUR. Then move it to the "builds" directory (or "local", if using ABS). Extract the tarball. After the new directory is created, cd into it. Now here's the important part: run
    $ makepkg -so
    Then cd into src, cd into the directory inside src, then edit the config.mk file. Make sure these lines are uncommented (or created, if not already there):
    export CONFIG_CFG80211_DEBUGFS=y
    export CONFIG_MAC80211_DEBUGFS=y
    export CONFIG_ATH_DEBUG=y
    export CONFIG_ATH9K_DEBUG=y
    export CONFIG_ATH9K_DEBUGFS=y
    (source)
    Now run "cd ../.." to go back up two directories. Now run:
    $ makepkg -e
    # pacman -U <file that was produced>
    And I ran "mkinitcpio -p linux" just in case, but I'm not sure if that is necessary at all. I'm... not touching the kernel, right?
    Now I ran:
    echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/disable_ani
    But bash would say that the file or directory doesn't exist. Even if I prepend it with "sudo", I get the same results. I was only able to get the command to work if I logged in as root. I even put the line in my /etc/profile. The 2000 ms ping every 30 seconds is now GONE. HOWEVER! If I reboot and log in as a normal user, the problem is there again. If I reboot and log in as root, the problem is gone. If I then log out and then log back in as a normal user, the problem does not come back.
    So really, I can avoid the problem if I first log in as root, log out, and then log back in as a normal user. But this is a great inconvenience. I would much prefer if I could just log in as a normal user right after boot, and have everything working.
    Now, how do I get the command to automatically run at boot as root (without me having to log in as root), and work?
    UPDATE 2:
    I got it working. Putting the line in /etc/profile is not the solution. I created a custom systemd .service file.
    Put this into /etc/systemd/service (name it "disable_ani.service"):
    EDIT: Wow. I made a glaring typo here. It should be /etc/systemd/system/disable_ani.service
    [Unit]
    Description=disable_ani
    [Service]
    Type=oneshot
    ExecStart=/bin/sh -c "echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/disable_ani"
    [Install]
    WantedBy=multi-user.target
    Then make sure to "sudo chmod 755 /etc/systemd/service/disable_ani.service", since root owns this file.
    Then run "sudo systemctl enable disable_ani.service".
    EDIT: It has been brought to my attention that there is a much simpler way than creating a custom service.
    Using a tmpfile:
    /etc/tmpfiles.d/disable_ani.conf
    w /sys/kernel/debug/ieee80211/phy0/ath9k/disable_ani - - - - 1
    Done.
    Now ANI is persistently disabled between boots, even if I log in as a normal user right after boot.
    Thanks for reading.
    Last edited by vyu223 (2013-03-12 10:20:19)

    So zsh is telling you that the command didn't work, since it claims that there is no such file or directory. I had a lot of trouble with getting the echo command to work, as well. I found that if out of these lines:
    export CONFIG_CFG80211_DEBUGFS=y
    export CONFIG_MAC80211_DEBUGFS=y
    export CONFIG_ATH_DEBUG=y
    export CONFIG_ATH9K_DEBUG=y
    export CONFIG_ATH9K_DEBUGFS=y
    If the first and second line above were not uncommented in the config.mk file, I couldn't leave the last line above uncommented as well, or else makepkg would fail and give me an error. So originally I had only the 3rd and 4th lines above uncommented/inserted in my config.mk. With that configuration, I could not get the echo command to work, no matter what. Have you uncommented or inserted all of the above 5 lines into your config.mk?
    After making sure all of the above 5 lines were in my config.mk, the echo command still didn't work, even if I preceded the command with sudo, or entered a su session. Bash would tell me that there was no such file or directory. I found that if I actually logged out of my normal user, and then logged back into the computer as root, the command would work. If your shell does not give you any feedback (particularly, "no such file or directory"), then the command worked. In order to get the command to run every time the computer boots, I used a systemd service, so that the command is issued as root. For some reason, it doesn't work if you put the command into /etc/profile.
    Oh, and it would probably be helpful to mention that for the compat-drivers-patched package from the AUR, the PKGBUILD checks to see what your _selected_drivers variable is before compilation. If you set _selected_drivers=ath9k, your compile times will be much shorter.

  • [SOLVED] enable Ctrl+Alt+L to lock?

    I just installed and configured gnome after moving from ubuntu on my netbook, and I always used Ctrl+Alt+L to lock my workstations. How can I enable this in Arch? I installed the xscreensaver package based on a tip I found elsewhere, but that doesn't seem to do anything. Thanks!
    Last edited by pythonscript (2012-05-27 13:42:32)

    If you use gnome-screensaver, launch "Keyboard Shortcuts" in your preferences menu and change the shortcut.
    If you want to use xscreensaver see http://justlinux.com/forum/showpost.php … ostcount=7.
    Or you could have just spent a minute googling.
    Last edited by Stebalien (2010-06-20 20:52:45)

  • {Solved} Enable webkit in Konqueror?

    Hey all
    I'm wondering how to enable webkit in Konqueror. Not sure where to begin.
    I'm running a self compiled qt 4.5 with webkit enabled. I have libwebkit installed. I'm wondering if I have to compile kdelibs/kdebase from abs and somehow enable webkit? I have played with Arora, it works fine but I'm wanting to use Konqueror...any ideas? I'm quite comfortable compiling kde from source if need be, just not sure which package to do, and exactly how to enable webkit. I'm not that familiar with cmake options. I'm not using kdemod and would prefer not to. Help?
    Thanks!
    J
    Last edited by LaoTzuTao (2009-03-13 16:45:36)

    You need the webkit kpart for konqueror, its in kdemod-playground, theres also 'webkit-kpart-svn' in aur (not sure if its the same thing).

  • [solved] enable trim on ssd

    this link from the wiki says i should edit my /etc/fstab in order to enable trim on my ssd.
    this is my /etc/fstab
    # /etc/fstab: static file system information
    # <file system> <dir> <type> <options> <dump> <pass>
    # UUID=6b44daaa-610c-4f23-a632-569d091e4d43
    /dev/sda1 / ext4 rw,relatime,data=ordered 0 1
    should i replace 'rw,relatime,data=ordered' with 'defaults,noatime,discard' or appent 'discard' to the options?
    Last edited by aldoiljazi (2013-09-18 19:42:05)

    @ploub, thanks!
    another thing i want to make sure is trim support for my ssd. i have this one. the 64gb version.
    i don't seem to find a certain source online, even the sandisk's page doesn't mention anything.
    is there a test i can run?
    edit: it does support trim, just for reference i used "hdparm -I /dev/yourssd" as root and i got:
    Data Set Management TRIM supported (limit 8 blocks)
    somewhere in the output.
    Last edited by aldoiljazi (2013-09-18 19:41:42)

  • [solved] /proc/acpi/thermal_zone/: No such file or directory

    i want to monitor my laptop temperature with conky but i get 
    Conky: scandir for /proc/acpi/thermal_zone/: No such file or directory
    does anyone know what i must install in order for it to work?
    Last edited by red-guy (2011-03-21 17:05:00)

    red-guy wrote:also, why do you even bother posting if it's not to help?
    Because :
    stlarch wrote:You are just expected to try to help yourself first. Then, when you've exhausted every effort ask. It's the Arch way. The wiki is your best friend.
    And also because as forum moderator, we have to keep the boards as clean as possible. For you the problem might be new, but for many users here, they have seen these types of threads many times which have also been answered over and over again and also documented in the wiki. The wiki is a resource that has been created by the collective efforts of the Arch users - present and past. Make use of it.
    As a general rule, if you have an issue, search the wiki, then the internet, then the forums for similar threads and if you still have problems then post a thread detailing what attempts you have made in order to fix the problem. That way, people don't give you options that you have already tried and know that they don't work.
    In addition, please go through the forum rules to familiarize yourself with the basic rules and policies of the Arch forums.

  • [SOLVED] proc/acpi/button/power missing

    I have been unable to trigger an event when the power button is pressed on my laptop.
    # uname -a
    Linux julia 3.0-ARCH #1 SMP PREEMPT Tue Aug 30 08:53:25 CEST 2011 x86_64 AMD Turion(tm) 64 X2 Mobile Technology TL-50 AuthenticAMD GNU/Linux
    acpid version 2.0.10-2, started through rc.conf as daemon.
    dbus is active, HAL is not installed.
    # tail -f /var/log/messages.log
    Sep 6 14:48:03 localhost -- MARK --
    Sep 6 15:08:03 localhost -- MARK --
    Sep 6 15:28:03 localhost -- MARK --
    Sep 6 15:36:02 localhost acpid: client 1328[0:100] has disconnected
    Sep 6 15:36:02 localhost acpid: client connected from 2084[0:100]
    Sep 6 15:36:02 localhost acpid: 1 client rule loaded
    Sep 6 15:48:03 localhost -- MARK --
    Sep 6 16:08:03 localhost -- MARK --
    Sep 6 16:28:03 localhost -- MARK --
    Sep 6 16:48:03 localhost -- MARK --
    Sep 6 16:59:43 localhost logger: PowerButton pressed: PWRF
    # acpi_listen
    button/power PWRF 00000080 00000002
    That output indicates the power button is recognized by the kernel, but it have no idea what i should put in /etc/acpi/handler.sh to shutdown the laptop when the powerbutton is pressed.
    Last edited by Lone_Wolf (2011-09-07 12:02:23)

    button/power PWRF 00000080 00000002
    These are the arguments passed to the handler script ($1 to $4).
    handler.sh from acpid package:
    case "$1" in
    button/power)
    #echo "PowerButton pressed!">/dev/tty5
    case "$2" in
    PBTN|PWRF) logger "PowerButton pressed: $2" ;;
    *) logger "ACPI action undefined: $2" ;;
    esac
    Replace the logger "PowerButton [...]" command (which is responsible for the message.log line you quote) with a shutdown invocation.

  • [SOLVED]Enable ttyS*

    I have installed archlinux on an embedded pc with 4 serial ports. I am trying to use the serial ports for a little project, but I ran into some problems.
    I cannot actually use any port besides ttyS0.
    All 4 ports have a RX and TX led.
    When I issue the following command :
    echo 1 > /dev/ttyS0
    I see the TX led of the first port flash and the command finishes, but if I try the same with ttyS1 - 3 nothing happens on the leds, and the command just hangs. Do I need to enable the other ports somehow in archlinux? All four ports work out of the box with fedora core 3 on the same machine.
    dmesg |grep ttyS
    serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
    serial8250: ttyS2 at I/O 0x3e8 (irq = 4) is a 16550A
    serial8250: ttyS3 at I/O 0x2e8 (irq = 3) is a 16550A
    Any ideas?
    Last edited by starthis (2009-03-26 18:15:09)

    The box I'm using is an advantech UNO-2170. According to the documentation the IRQ for ttyS2 & ttyS3 should be 10, but it was 3 & 4.
    According to the documentation this is only set correctly on fedora core 2 and above.
    So after executing
    setserial /dev/ttyS3 irq 10
    setserial /dev/ttyS2 irq 10
    everything behaves as expected
    So bottom line, I should of rtfm before bothering anybody else
    Last edited by starthis (2009-03-26 18:15:58)

  • [SOLVED] enable apache ssl to use httpS at will for any vhost

    Hi,
    I have enabled ssl on my apache install without a problem by including the file httpd-ssl.conf in my http.conf.
    I have tested access by trying to access my phpmyadmin install by going to my site: https://example.com/phpmyadmin
    However, when trying to use a vhost with https, it doesn't work, I get redirected to a default page (first configured vhost) as https.
    If I modify the vhost like this, adding 443:
    <VirtualHost *:80 *:443>
    </VirtualHost>
    I get an error "(Error code: ssl_error_rx_record_too_long)".
    If I just add to the vhost config file instead like this:
    NameVirtualHost *:80
    NameVirtualHost *:443
    SSLStrictSNIVHostCheck off
    then I still only get the default site, but not my vhost site under ssl.
    Any pointers on getting this to work? I want to be able to universally add an "s" to "http" for any vhost whenever I feel like it to encrypt traffic...
    Thanks!
    EDIT: Here's the solution I found. I disabled ssl on apache by commentingout the httpd-ssl.conf-Include directive in httpd.conf.
    Then I installed stunnel and pointed it to my server key and certificate and enabling https connections to forward to port 80 on localhost.
    One gotcha to look out for was to put "https: ALL" into the /etc/hosts.allow file as stunnel apparently uses this to decide whether a client can connect.
    Last edited by awayand (2011-04-24 12:10:46)

    Apache is already listening on 443, otherwise it wouldn't work at all when I access https://example.com/phpmyadmin. My problem is that instead of responding by serving the requested vhost, apache serves only the default vhost page. For example, https://x.example.com, https://y.example.com, https://z.example.com all serve my default page at https://example.com instead of the corresponding vhost. Any idea as to what to configure so that apache serves the requested vhost under https?
    EDIT: clarification
    Last edited by awayand (2011-04-23 04:39:02)

  • [SOLVED]Enable vdpau in Totem

    Dear Arch Users,
    I use nvidia GT 520 graphics card with vdpau configured correctly as suggested by Arch wiki however i see high cpu usage(60-70%) while playing hd movies on totem player, while mplayer consumes 30% cpu with vdpau enabled i prefer totem over mplayer but high cpu usage is the issue.I suspect totem is not using nvidia hardware acceleration , please suggest how do i enable vdpau in totem.
    Also while using gnome-mplayer with mplayer-vaapi or mplayer2 as backend it often says gnome-mplayer not responding do you want to force quit/wait if it select wait then i am unable to use the slider and i have to kill it from command line.Please suggest if anyone faced this type of issue and suggestions.
    Thanks.
    Last edited by aja (2013-08-06 02:58:05)

    According to the wiki
    To take full advantage of the hardware decoding capability of your video card you will need a media player that supports VDPAU or VA-API.
    Totem is not one of the listed examples. What makes you think it supports vdpau?
    Also saying that you correctly configured something according to the wiki is your interpretation. It is easy to misunderstand or to make a mistake. Don't interpret. Post what you did: commands issued, output returned.
    For the gnome-mplayer issue I suggest you start by inspecting the logs.
    Last edited by cfr (2013-08-06 02:15:11)

  • [SOLVED] Enabled AHCI - Arch won't boot

    I have switched the SATA preference to AHCI from IDE in the BIOS. Now Arch refuse to boot with following warning:
    ERROR: device '/dev/sda2' not found. Skipping fsck.
    ERROR: Unable to find root device '/dev/sda2
    [rootfs /]#
    I have checked the WIKI and it has a remedy with 'mkinitcpio'; looks outdated. I have also found about adding one moule to initrd with mkinitrd on the www. However, I am not sure and need some guidance regarding this.
    By the way, I dual-boot with Ubuntu and it booted just fine after the switch to AHCI.
    Thanks.
    Last edited by fantab (2013-04-21 22:27:38)

    Thanks guys I fixed it from Ubuntu with 'chroot'. I added "ahci" to MODULES in /etc/mkinitcpio.conf and ran mkinitcpio.
    I can boot Arch now.
    Do I have to re-install the kernel? Do I have to add "ahci" to mkinitcpio.conf at every kernel upgrade and run mkinitcpio? Or am I OK.
    Out of curiosity, regarding 'fallback image', how is it "even simpler"? Would love to know, for future reference, any pointers?
    Last edited by fantab (2013-04-21 21:39:57)

  • [Solved] Enable "CONFIG_DEVTMPFS_MOUNT"?

    Hello,
    just read the announcement on the main page and on the udev readme it says:
    The /dev directory needs the 'devtmpfs' filesystem mounted
    So does thie mean that setting
    CONFIG_DEVTMPFS=y
    is not enough and that I should also set
    CONFIG_DEVTMPFS_MOUNT=y
    ? It isn't set in the arch default kernel and I haven't had any issue without it so far, despite reading that it is needed, for example here. So can anybody tell me if I need this option or not and why it works in arch until now without it?
    Greetings
    matse
    //Edit: And could the "bug" described in my last link even affect the latest arch iso, since when I tried booting with it my cd-drive wasn't found and I had to set manually a symlink from /dev/sr0 to the place where the script was looking for it? (I remember that it worked with an older iso without this symlink I assume this was an older udev version prior 166).
    //Edit2:
    I should read the description more precisely...
    This option does not affect initramfs based booting, here the devtmpfs filesystem always needs to be mounted manually after the roots is mounted.
    So I assume that an arch script mounts this filesystem (as it is not in the defauls fstab?)
    Last edited by matse (2012-01-30 02:27:14)

    Apache is already listening on 443, otherwise it wouldn't work at all when I access https://example.com/phpmyadmin. My problem is that instead of responding by serving the requested vhost, apache serves only the default vhost page. For example, https://x.example.com, https://y.example.com, https://z.example.com all serve my default page at https://example.com instead of the corresponding vhost. Any idea as to what to configure so that apache serves the requested vhost under https?
    EDIT: clarification
    Last edited by awayand (2011-04-23 04:39:02)

  • [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

Maybe you are looking for