You are not logged in.

#1 2014-11-07 12:50:53

bstaletic
Member
Registered: 2014-02-02
Posts: 658

[SOLVED] Acpid prints an error on tty when switching from X

First of I am using Openrc and eudev. I set up acpi and noticed that it prints error (posted below) to tty. It also shows the error when I press ctrl+alt+F10 even though tty number 10 is not spawned. Everything seems to work, it is just anoyin gand gets in a way. The same error is not shown in terminal emulator running X.

The exact error:

acpid: client 1302[0:100] has disconnected.

I just noticed it prints this error every time I switch from X to tty. And it prints the error to that tty. So if I swithc 5 time to tty2 and 3 times to tty5, I'd see the mesage 5 times on tty2 and 3 times on tty3.

EDIT:

Dmesg:

dmesg | pt acpi                                                                                                               :(
:120:[    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
:121:[    0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x02] enabled)
:122:[    0.000000] ACPI: LAPIC (acpi_id[0x03] lapic_id[0x04] enabled)
:123:[    0.000000] ACPI: LAPIC (acpi_id[0x04] lapic_id[0x06] enabled)
:124:[    0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] high edge lint[0x1])
:254:[    0.123472] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
:280:[    0.189051] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
:281:[    0.189128] acpi PNP0A08:00: _OSC: platform does not support [PCIeHotplug PME]
:282:[    0.189198] acpi PNP0A08:00: _OSC: OS now controls [AER PCIeCapability]
:408:[    0.217413] acpi PNP0A08:00: Disabling ASPM (FADT indicates it is unsupported)

Acpi handler.sh:

#!/bin/bash
# Default acpi script that takes an entry for all actions

case "$1" in
    button/power)
        case "$2" in
            PBTN|PWRF)
                logger 'PowerButton pressed'
		poweroff # The only added line
                ;;
            *)
                logger "ACPI action undefined: $2"
                ;;
        esac
        ;;
    button/sleep)
        case "$2" in
            SLPB|SBTN)
                logger 'SleepButton pressed'
                ;;
            *)
                logger "ACPI action undefined: $2"
                ;;
        esac
        ;;
    ac_adapter)
        case "$2" in
            AC|ACAD|ADP0)
                case "$4" in
                    00000000)
                        logger 'AC unpluged'
                        ;;
                    00000001)
                        logger 'AC pluged'
                        ;;
                esac
                ;;
            *)
                logger "ACPI action undefined: $2"
                ;;
        esac
        ;;
    battery)
        case "$2" in
            BAT0)
                case "$4" in
                    00000000)
                        logger 'Battery online'
                        ;;
                    00000001)
                        logger 'Battery offline'
                        ;;
                esac
                ;;
            CPU0)
                ;;
            *)  logger "ACPI action undefined: $2" ;;
        esac
        ;;
    button/lid)
        case "$3" in
            close)
                logger 'LID closed'
                ;;
            open)
                logger 'LID opened'
                ;;
            *)
                logger "ACPI action undefined: $3"
                ;;
    esac
    ;;
    *)
        logger "ACPI group/action undefined: $1 / $2"
        ;;
esac

# vim:set ts=4 sw=4 ft=sh et:

EDIT2:
Workaround (far from ideal solution):
X recognizes the powerbutton as XF86Poweroff, sosetting a bindkey for poweroff workswhile I'm in X. Could this way of doing things be more violent on shutdown compared to acpid's way of doing it? Are the same scripts run at shutdown in bot cases (those that show in openrc's shutdown run level)?

Last edited by bstaletic (2014-11-07 19:59:44)

Offline

#2 2014-11-07 14:44:02

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] Acpid prints an error on tty when switching from X

You could remove the logging, it occurs twice in acpid's event.c:

acpid_log(LOG_NOTICE,
    "client %s has disconnected", p->origin);

Offline

#3 2014-11-07 15:17:27

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: [SOLVED] Acpid prints an error on tty when switching from X

Even though it is somewhat hackish, I'd be fine with it. Bu I've run into a problem.

I tried to extract the source and edit the relevant .c file (source was pulled using abs). But then I used makepkg and the package was .05MiB larger (so I thought verything is fine), yet after reboot the message still shows. How would I go about making this change?

Offline

#4 2014-11-07 17:36:23

progandy
Member
Registered: 2012-05-17
Posts: 3,883

Re: [SOLVED] Acpid prints an error on tty when switching from X

Did you do the makepkg steps correctly?
Download and extract: makepkg -o
Modify the source files.
Build and install: makepkg -esi


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#5 2014-11-07 18:56:41

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: [SOLVED] Acpid prints an error on tty when switching from X

@progandy
No I didn't. I did it without the e switch.
Your way worked ofcourse.

Offline

#6 2014-11-07 19:37:31

aaditya
Member
Registered: 2013-09-01
Posts: 174

Re: [SOLVED] Acpid prints an error on tty when switching from X

Hi bstaletic,

If I understand correctly, you are having some acpi errors (or do you mean acpid)..

Here are the packages my side:

$ pacman -Qs acpi
local/acpi 1.7-1
    Client for battery, power, and thermal readings
local/acpid 2.0.23-2
    A daemon for delivering ACPI power management events with netlink support
local/acpid-openrc 20141107-1 (openrc openrc-desktop)
    OpenRC acpid init script

I dont think I am having errors..

$ dmesg | grep acpi

(gives no output)

I use a display manager (lxdm) to start X.

Edit-

$ rc-status 
Runlevel: default
 dbus                                                                                                                     [  started  ]
 wicd                                                                                                                     [  started  ]
 netmount                                                                                                                 [  started  ]
 metalog                                                                                                                  [  started  ]
 acpid                                                                                                                    [  started  ]
 consolekit                                                                                                               [  started  ]
 cronie                                                                                                                   [  started  ]
 alsasound                                                                                                                [  started  ]
 local                                                                                                                    [  started  ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed
 xdm-setup                                                                                                                [  started  ]
Dynamic Runlevel: manual

Last edited by aaditya (2014-11-07 19:52:47)

Offline

#7 2014-11-07 19:57:18

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: [SOLVED] Acpid prints an error on tty when switching from X

Aaditya,

Thanks for showing interest in my issue, just tried installing vanilla acpid (the troublesome package) and acpi. Unfortunately the error message returned. And to calrify it is an error with acpid.

Well everything works, so I'll just remove the message from the source file as brebs suggested.

Offline

#8 2014-11-07 20:26:58

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] Acpid prints an error on tty when switching from X

bstaletic wrote:

it is an error with acpid.

No, "LOG_NOTICE" is not an error message.

And it's only you that's bothered by it being logged wink

Why is your logger, logging to the *terminal*, for you to be annoyed by it? Set up your logger properly wink

Offline

#9 2014-11-08 11:47:02

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 8,474

Re: [SOLVED] Acpid prints an error on tty when switching from X

Bstaletic,

i think that message may have very little to do with acpid / openrc / eudev , but a lot with the video driver you use.

I am using AMD open source drivers xf86-video-ati / KMS / openrc apg / startx and see no acpi errors at all on switching from graphics to tty .

Are you using open source driver or a proprietary video driver  ?

Last edited by Lone_Wolf (2014-11-08 11:47:49)


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#10 2014-11-10 00:15:55

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: [SOLVED] Acpid prints an error on tty when switching from X

Lone_Wolf,

Sorry for delayed answer. I'm using xf86-video-ati.

Offline

#11 2015-02-15 19:23:23

xanb
Member
Registered: 2012-07-24
Posts: 417

Re: [SOLVED] Acpid prints an error on tty when switching from X

I have similar problem:

When I switch to tty from X, I receive the same message. I use also openrc + eudev.
My dmesg is:

[xan@argonia ~]$ dmesg  | grep acpi
[    0.000000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x02] enabled)
[    0.130538] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[    0.175879] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
[    0.175927] acpi PNP0A08:00: _OSC: OS now controls [PCIeHotplug PME AER PCIeCapability]
[    0.176044] acpi PNP0A08:00: ignoring host bridge window [mem 0x000cc000-0x000cffff] (conflicts with Video ROM [mem 0x000c0000-0x000cebff])
[    0.176050] acpi PNP0A08:00: [Firmware Info]: MMCONFIG for domain 0000 [bus 00-3f] only partially covers this bridge
[xan@argonia ~]$ 

I have a HP Chromebook 14.


Owning one OpenRC (artoo way) and other three systemd machines

Offline

#12 2015-02-17 14:41:31

xanb
Member
Registered: 2012-07-24
Posts: 417

Re: [SOLVED] Acpid prints an error on tty when switching from X

If you install rsyslog, then it disappears. It is written just in the log.


Owning one OpenRC (artoo way) and other three systemd machines

Offline

Board footer

Powered by FluxBB