You are not logged in.

#1 2013-12-17 14:34:00

labotsirc
Member
Registered: 2013-08-21
Posts: 108

When i close the lid and then I open, keyboard and mouse stop working

This is my problem.

Whenever i close the lid, go out for a while, then i come back and open it i can see the gnome lock screen but keyboard and mouse are dead. This happes always, and each time i have to do a forced shutdown by pressing the power button a couple of seconds. I would like the laptop to sleep when i close the lid, but to be able to wake up properly whenever i open it, just like every default laptop.

Some configuration files, they are all default, i have not touched them.

[cristobal@orion ~]$ ps -e | grep acpid
  307 ?        00:00:00 acpid
[cristobal@orion ~]$ cat /etc/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'
                ;;
            *)
                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:

This is the config of /etc/systemd/logind.conf

[cristobal@orion ~]$ cat /etc/systemd/logind.conf 
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# See logind.conf(5) for details

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#IdleAction=ignore
#IdleActionSec=30min

I can add that i have removed xhci_hcd (usb 3.0) module because my laptop does not work well with it. Instead, i just use ehci_hcd (usb 2.0) and i manage all my usb devices with this one. I am not sure if this has any relation to my problem.
Any ideas?

Last edited by labotsirc (2013-12-17 14:42:15)

Offline

#2 2013-12-21 15:39:21

labotsirc
Member
Registered: 2013-08-21
Posts: 108

Re: When i close the lid and then I open, keyboard and mouse stop working

OK i researched a little more and indeed the problem is related to having xhci_hcd removed. The proof of this is that I booted into the default arch kernel and wake up works properly. But I cannot use xhci_hcd for work, the reason of that is a long story and i dont want to go off-topic.
I disabled the acpid daemon so that systemd handles everything with logind but still the same problem. Something that caught my attention was the wakeup file.

[cristobal@orion ~]$ cat /proc/acpi/wakeup 
Device	S-state	  Status   Sysfs node
RP01	  S4	*disabled  pci:0000:00:1c.0
PXSX	  S4	*disabled
RP03	  S4	*disabled  pci:0000:00:1c.2
PXSX	  S4	*enabled   pci:0000:03:00.0
RP05	  S4	*disabled  pci:0000:00:1c.4
PXSX	  S4	*disabled  pci:0000:04:00.0
GLAN	  S4	*disabled
XHC	  S4	*disabled  pci:0000:00:14.0
HS01	  S0	*disabled
HS02	  S0	*disabled
HS05	  S0	*disabled
HDEF	  S4	*disabled  pci:0000:00:1b.0
PEG0	  S4	*disabled  pci:0000:00:01.0
PEGP	  S4	*disabled  pci:0000:01:00.0
PEGA	  S4	*disabled
PEG1	  S4	*disabled
PEG2	  S4	*disabled
PWRB	  S4	*enabled 

When i am on the default arch kernel, XHC is enabled.
When i boot into my kernel that i need, XHC is disabled which makes sense because i did not include xhci_hcd module in that kernel, just ehci_hcd.
My question is then why the EHC entry does not appear when i boot into the custom kernel?? how can i add it?

-----
UPDATE 1: I re-enabled acpid and used this script whenever the lid opens:

[cristobal@orion ~]$ cat /etc/acpi/scripts/lid-open 
(echo -n "lid open: " && date) >> /home/cristobal/acpi_lidopen ;
lsmod >> /home/cristobal/acpi_lidopen ;
echo "------------" >> /home/cristobal/acpi_lidopen

the script is called from /etc/acpi/handler.sh.
At least the modules are still there. Next to check is unbind/bind strategy

UPDATE 2: Used a script for pm-utils from http://askubuntu.com/questions/130562/u … er-suspend and tested with "pm-suspend" but it also does not work.
Any help welcome really...

Last edited by labotsirc (2013-12-21 17:10:32)

Offline

#3 2013-12-21 18:56:35

hibajugala
Member
Registered: 2013-01-12
Posts: 35

Re: When i close the lid and then I open, keyboard and mouse stop working

Do you use grub? For some reason I had this problem a year or two ago with ubuntu, and I changed an option in the grub config and it worked.
I have no idea what, how or why, as it was so long ago. But if you are using grub, maybe check out some threads on the ubuntu forums as that's where I found my solution.

Offline

#4 2013-12-21 19:51:08

labotsirc
Member
Registered: 2013-08-21
Posts: 108

Re: When i close the lid and then I open, keyboard and mouse stop working

hibajugala wrote:

Do you use grub? For some reason I had this problem a year or two ago with ubuntu, and I changed an option in the grub config and it worked.
I have no idea what, how or why, as it was so long ago. But if you are using grub, maybe check out some threads on the ubuntu forums as that's where I found my solution.

Yes i am using grub.
Did you mean this solution?
http://askubuntu.com/questions/361547/u … d-to-13-10

I tried it but unfortunately it did not work.

I think the problem really goes down to being able to make /proc/acpi/wakeup detect EHC...

Last edited by labotsirc (2013-12-21 19:52:43)

Offline

#5 2013-12-22 22:14:45

labotsirc
Member
Registered: 2013-08-21
Posts: 108

Re: When i close the lid and then I open, keyboard and mouse stop working

Does someone know if there is any script called when systemd suspends the system (on close lid) through logind? Similarly, is there any script called when i wakeup the laptop (open lid)?

Last edited by labotsirc (2013-12-22 22:15:24)

Offline

Board footer

Powered by FluxBB