You are not logged in.

#1 2024-07-17 15:06:13

drunktobi
Member
Registered: 2024-07-17
Posts: 11

when i closes the lid it gets shut down but i setted to do nothing

im using 80XL Lenovo ideapad 320-15IKB, with 6.9.9-arch1-1 kernel, using kde Plasma 6.1.2 , sddm , X11, i faced this few weeks ago but solved by acpi script with systemctl suspend , the script is -

#!/bin/bash
case "$3" in
  close)
    logger "Lid closed, suspending..."
    systemctl suspend
    ;;
  open)
    logger "Lid opened, resuming..."
    ;;
esac

but , suddenly this apeeared again it gets shut down when lid is closed but everything is setted to sleep or do nothing.
if you can , please help me, im new to arch.

Last edited by drunktobi (2024-07-18 11:12:04)

Offline

#2 2024-07-17 21:08:05

mesaprotector
Member
Registered: 2024-03-03
Posts: 112

Re: when i closes the lid it gets shut down but i setted to do nothing

Have you read this section of the wiki? https://wiki.archlinux.org/title/Power_ … CPI_events

What does your /etc/systemd/logind.conf look like? That's the recommended place to configure what the lid does.

Offline

#3 2024-07-18 06:03:31

drunktobi
Member
Registered: 2024-07-17
Posts: 11

Re: when i closes the lid it gets shut down but i setted to do nothing

look like this and  tried combination but no help

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.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file (or a copy of it placed in
# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in
# the /etc/systemd/logind.conf.d/ directory. The latter is generally
# recommended. Defaults can be restored by simply deleting the main
# configuration file and all drop-ins located in /etc/.
#
# Use 'systemd-analyze cat-config systemd/logind.conf' to display the full config.
#
# See logind.conf(5) for details.

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#UserStopDelaySec=10
#SleepOperation=suspend-then-hibernate suspend
#HandlePowerKey=poweroff
#HandlePowerKeyLongPress=ignore
#HandleRebootKey=reboot
#HandleRebootKeyLongPress=poweroff
#HandleSuspendKey=suspend
#HandleSuspendKeyLongPress=hibernate
HandleHibernateKey=ignore
#HandleHibernateKeyLongPress=ignore
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#RebootKeyIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodesMax=
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#StopIdleSessionSec=infinity

Last edited by drunktobi (2024-07-18 11:13:57)

Offline

#4 2024-07-18 06:29:26

seth
Member
Registered: 2012-09-03
Posts: 56,103

Re: when i closes the lid it gets shut down but i setted to do nothing

Please use [code][/code] tags. Edit your posts in this regard.

Lenovo has known issues w/ the lid and S3
1. Is there a parallel windows installation
2. what happens if you remove/disable the acpi script?
3. is the behavior dependent on the power supply (battery ./. wall outlet)
4. is there an UEFI update available?

https://bbs.archlinux.org/viewtopic.php?id=295464
https://bbs.archlinux.org/viewtopic.php?id=292867

Offline

#5 2024-07-18 11:19:32

drunktobi
Member
Registered: 2024-07-17
Posts: 11

Re: when i closes the lid it gets shut down but i setted to do nothing

1. yes , dual boot with windows 11.
2. the same problem , laptop gets shut down , script was working till yesterday, but suddenly stopped working.
3. yes , on battery and when plug is connected then also.
4.everything updated, and in bios there is no option available for lid action.

Offline

#6 2024-07-18 15:34:34

seth
Member
Registered: 2012-09-03
Posts: 56,103

Re: when i closes the lid it gets shut down but i setted to do nothing

1. yes , dual boot with windows 11.

3rd link below. Mandatory.
Disable it (it's NOT the BIOS setting!) and reboot windows and linux twice for voodo reasons.

Offline

#7 2024-07-18 15:42:20

drunktobi
Member
Registered: 2024-07-17
Posts: 11

Re: when i closes the lid it gets shut down but i setted to do nothing

3rd link do you mean this? "Disable Windows Fast-Start!"

Offline

#8 2024-07-18 15:53:48

seth
Member
Registered: 2012-09-03
Posts: 56,103

Re: when i closes the lid it gets shut down but i setted to do nothing

Yes.

Offline

#9 2024-07-18 20:36:32

drunktobi
Member
Registered: 2024-07-17
Posts: 11

Re: when i closes the lid it gets shut down but i setted to do nothing

didn't worked, or any other solution?

Offline

#10 2024-07-18 20:49:44

seth
Member
Registered: 2012-09-03
Posts: 56,103

Re: when i closes the lid it gets shut down but i setted to do nothing

Let's see what's actually going on (hopefully)
Please close the lid to shut the system down, boot and post your complete system journal for the current and previous boot:

sudo journalctl -b -1 | curl -F 'file=@-' 0x0.st
sudo journalctl -b | curl -F 'file=@-' 0x0.st

Offline

#11 2024-07-18 22:21:04

drunktobi
Member
Registered: 2024-07-17
Posts: 11

Re: when i closes the lid it gets shut down but i setted to do nothing

http://0x0.st/X9JG.txt
http://0x0.st/X9JD.txt

Last edited by drunktobi (2024-07-18 22:21:36)

Offline

#12 2024-07-18 22:50:59

drunktobi
Member
Registered: 2024-07-17
Posts: 11

Re: when i closes the lid it gets shut down but i setted to do nothing

http://0x0.st/X9yi.txt
http://0x0.st/X9y-.txt
this is after removing windows11 , now i dont have dualboot.
And https://wiki.archlinux.org/title/Power_ … _hibernate
in this link no3 point where it says

cat /sys/power/mem_sleep
[s2idle] shallow deep

mine is

cat /sys/power/mem_sleep
s2idle [deep]

and its all fine til lid is not closed after closing the lid it gets shut down.

Last edited by drunktobi (2024-07-18 23:00:13)

Offline

#13 2024-07-19 06:18:34

seth
Member
Registered: 2012-09-03
Posts: 56,103

Re: when i closes the lid it gets shut down but i setted to do nothing

Jul 19 02:55:37 abyss acpid[431]: skipping conf file /etc/acpi/events/lid.bak
…
Jul 19 02:56:04 abyss systemd-sleep[1117]: [28] INFO: # Pre-suspend hook
Jul 19 02:56:04 abyss systemd-sleep[1117]: [28] INFO: Previous state was: {'type': 'done', 'switch_id': '20240719T025538', 'current_mode': 'integrated'}
Jul 19 02:56:04 abyss systemd-sleep[1117]: [31] INFO: Switching option: bbswitch
Jul 19 02:56:04 abyss systemd-sleep[1117]: [31] INFO: Turning Nvidia GPU back on
Jul 19 02:56:04 abyss systemd-sleep[1128]: modinfo: ERROR: Module acpi_call not found.
Jul 19 02:56:04 abyss systemd-sleep[1117]: [85] INFO: Loading module bbswitch
Jul 19 02:56:04 abyss systemd-sleep[1117]: [91] INFO: Setting GPU power to ON via bbswitch
Jul 19 02:56:04 abyss kernel: bbswitch: enabling discrete graphics
Jul 19 02:56:05 abyss plasmashell[695]: org.kde.plasma.nm.libs: Wireless scan on "wlp3s0" failed: "Scanning not allowed while unavailable"
Jul 19 02:56:05 abyss systemd-sleep[1117]: [375] INFO: Writing state {'type': 'pending_post_resume', 'switch_id': '20240719T025538', 'current_mode': 'integrated'}
Jul 19 02:56:05 abyss systemd-sleep[1117]: [376] INFO: Pre-suspend hook completed successfully.
Jul 19 02:56:05 abyss systemd-sleep[1109]: Performing sleep operation 'suspend'...
Jul 19 02:56:05 abyss kernel: PM: suspend entry (deep)

The acpid script is skpped, but the system doesn't ignore the lid - if you didn't change the logind configuration, that's likely because of powerdevil/KDE
1. => test the behavior from the multi-user.target (2nd link below)

Otherwise, how does this run down?
You close the lid and the system powers down?
What happens when you open it? Does it (try to) power up but fails and you reboot w/ the power button or does just nothing happen at all when opening the lid and pushing the power button just once then starts it?

2. s2idle might work better (but possibly draw more battery during the sleep)

Another concern might be optimus manager/bbswitch
3. try to disable that and run the system in regular prime mode.

Offline

#14 2024-07-19 07:28:38

drunktobi
Member
Registered: 2024-07-17
Posts: 11

Re: when i closes the lid it gets shut down but i setted to do nothing

1. It just get shut down randomly sometime instant , other time almost 1 hour
- When i open sometimes it automatically turn on not from sleep, from shut down type (grub, sddm ,logs),
  - And sometimes it just not get boot up i need to press power button.
2. How to set up s2idle?
- the script above i shared it was working before with bbswitch and optimusmanager.
3. I tried but did not worked, for that i also changed the kernel to get fresh.

Currently im testing one thing the faulty firmware thing , i have installed win10 with dualboot (to flash bios/firmware).
Flashd the firmware, bios and other mainboard drivers.
And currently with dualboot with win10 , now testing, i will report you after few hours.

Last edited by drunktobi (2024-07-19 10:41:27)

Offline

#15 2024-07-20 07:03:49

seth
Member
Registered: 2012-09-03
Posts: 56,103

Re: when i closes the lid it gets shut down but i setted to do nothing

In case the FW update didn't help and you want to try s2idle, see https://wiki.archlinux.org/title/Power_ … end_method

Edit: did you actually do the voodoo dance after disabling windows fast-start (it's not meant as a joke, well, except the voodoo part - anecdotally that's required to "unconfuse" the ACPI/BIOS)

Last edited by seth (2024-07-20 07:04:59)

Offline

#16 2024-07-27 09:13:28

drunktobi
Member
Registered: 2024-07-17
Posts: 11

Re: when i closes the lid it gets shut down but i setted to do nothing

mine is s2idle[deep] , but didn't resolved, im currently on arch+kde , no dual boot, when lid is opened it does not get turned off but whenever lid is closed the shut down scene happens. is there any way i can disable the lid switch, in bios i don't have any option. And the problem is the display is on and i closed the lid it also gets shut down, before entering in sleep mode.

Last edited by drunktobi (2024-07-27 09:19:01)

Offline

#17 2024-07-27 12:04:01

seth
Member
Registered: 2012-09-03
Posts: 56,103

Re: when i closes the lid it gets shut down but i setted to do nothing

is there any way i can disable the lid switch

"HandleLidSwitch*=ignore", https://man.archlinux.org/man/core/syst … .conf.5.en
But that's  for systemd - your DE might intercept this, you may be running acpid and if the lid is actually intercepted by the firmware (bios) during the sleep, there's nothing you could do about that on an OS level.

Offline

#18 2024-07-27 15:14:43

drunktobi
Member
Registered: 2024-07-17
Posts: 11

Re: when i closes the lid it gets shut down but i setted to do nothing

systemd doesn't work i already did this. sad

Offline

#19 2024-07-27 18:41:12

seth
Member
Registered: 2012-09-03
Posts: 56,103

Re: when i closes the lid it gets shut down but i setted to do nothing

seth wrote:

your DE might intercept this, you may be running acpid

?

seth wrote:

if the lid is actually intercepted by the firmware (bios) during the sleep, there's nothing you could do about that on an OS leve

mine is s2idle[deep]

seth wrote:

In case the FW update didn't help and you want to try s2idle, see https://wiki.archlinux.org/title/Power_ … end_method

Offline

#20 2024-07-29 17:01:21

drunktobi
Member
Registered: 2024-07-17
Posts: 11

Re: when i closes the lid it gets shut down but i setted to do nothing

the fw was on latest version so i reinstalled , and sleep mode is set to s2idle[deep] on default , acpid did not worked.

Offline

#21 2024-07-29 20:29:21

seth
Member
Registered: 2012-09-03
Posts: 56,103

Re: when i closes the lid it gets shut down but i setted to do nothing

seth wrote:

mine is s2idle[deep]

seth wrote:

In case the FW update didn't help and you want to try s2idle, see https://wiki.archlinux.org/title/Power_ … end_method

Offline

Board footer

Powered by FluxBB