Dell xps 15 9510 opening lid issue

I have a strange issue wirh the laptop. When I turn laptop off, close the lid and, after that open lid, laptop turns on without pressing any button. I’ve created a systemd daemon to disable wakeup in LID0 in file /proc/acpi/wakeup, and it works, but no change in lid behaviour. I was searching any options in kde plasma to change opening lid behaviour, but there is only closing lid behaviour. Also i’ve looked into bios for this kind of option, but i didn’t find anything (mb i blind, idk).

[DIO dio]# systemctl status disable-lid-on-wakeup.service
○ disable-lid-on-wakeup.service - Disable lid as wakeup
     Loaded: loaded (/etc/systemd/system/disable-lid-on-wakeup.service; enabled; vendor preset: disabled)
     Active: inactive (dead) since Wed 2022-01-26 05:17:06 +10; 20min ago
    Process: 702 ExecStart=/home/dio/Scripts/disable-lid-on-wakeup.sh (code=exited, status=0/SUCCESS)
   Main PID: 702 (code=exited, status=0/SUCCESS)
        CPU: 17ms

янв 26 05:17:06 DIO systemd[1]: Starting Disable lid as wakeup...
янв 26 05:17:06 DIO sudo[718]:     root : PWD=/ ; USER=root ; COMMAND=/usr/bin/sh -c echo LID0 > /proc/acpi/wakeup
янв 26 05:17:06 DIO sudo[718]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
янв 26 05:17:06 DIO sudo[718]: pam_unix(sudo:session): session closed for user root
янв 26 05:17:06 DIO systemd[1]: disable-lid-on-wakeup.service: Deactivated successfully.
янв 26 05:17:06 DIO systemd[1]: Finished Disable lid as wakeup.

/home/dio/Scripts/disable-lid-on-wakeup.sh:

#!/bin/bash

declare -a devices=("LID0") # <-- Add your entries here
for device in "${devices[@]}"; do
    if grep -qw ^$device.*enabled /proc/acpi/wakeup; then
        sudo sh -c "echo $device > /proc/acpi/wakeup"
    fi
done

/home/dio/Scripts/disable-lid-on-wakeup.service:

[Unit]
Description=Disable lid as wakeup

[Service]
ExecStart=/home/dio/Scripts/disable-lid-on-wakeup.sh
Type=oneshot

[Install]
WantedBy=multi-user.target

Info about my system:

System:
  Kernel: 5.15.16-1-MANJARO x86_64 bits: 64 Desktop: KDE Plasma 5.23.5
    Distro: Manjaro Linux
Machine:
  Type: Laptop System: Dell product: XPS 15 9510 v: N/A
    serial: <superuser required>
  Mobo: Dell model: 01V4T3 v: A00 serial: <superuser required> UEFI: Dell
    v: 1.7.0 date: 12/09/2021
Battery:
  ID-1: BAT0 charge: 57.1 Wh (65.5%) condition: 87.2/84.3 Wh (103.4%)
CPU:
  Info: 8-core model: 11th Gen Intel Core i7-11800H bits: 64 type: MT MCP
    cache: L2: 10 MiB
  Speed (MHz): avg: 1929 min/max: 800/4600 cores: 1: 1224 2: 1711 3: 3174
    4: 1896 5: 3580 6: 1554 7: 1600 8: 1479 9: 1740 10: 2607 11: 1434 12: 801
    13: 2144 14: 801 15: 4320 16: 801
Graphics:
  Device-1: Intel TigerLake-H GT1 [UHD Graphics] driver: i915 v: kernel
  Device-2: NVIDIA GA107M [GeForce RTX 3050 Ti Mobile] driver: nvidia
    v: 495.46
  Device-3: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo
  Display: x11 server: X.org 1.21.1.3 driver: loaded: modesetting,nvidia
    resolution: <missing: xdpyinfo>
  OpenGL: renderer: Mesa Intel UHD Graphics (TGL GT1) v: 4.6 Mesa 21.3.4
Audio:
  Device-1: Intel Tiger Lake-H HD Audio driver: snd_hda_intel
  Device-2: Logitech Blue Microphones type: USB
    driver: hid-generic,snd-usb-audio,usbhid
  Sound Server-1: ALSA v: k5.15.16-1-MANJARO running: yes
  Sound Server-2: PulseAudio v: 15.0 running: yes
  Sound Server-3: PipeWire v: 0.3.43 running: yes
Network:
  Device-1: Intel Tiger Lake PCH CNVi WiFi driver: iwlwifi
  IF: wlp0s20f3 state: up mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb
  Report: rfkill ID: hci0 state: up address: see --recommends
RAID:
  Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd
Drives:
  Local Storage: total: 1.38 TiB used: 226.85 GiB (16.1%)
  ID-1: /dev/nvme0n1 vendor: Western Digital model: PC SN730 NVMe WDC 512GB
    size: 476.94 GiB
  ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 980 PRO 1TB size: 931.51 GiB
Partition:
  ID-1: / size: 48.83 GiB used: 22.92 GiB (46.9%) fs: btrfs
    dev: /dev/nvme1n1p4
  ID-2: /boot/efi size: 499 MiB used: 572 KiB (0.1%) fs: vfat
    dev: /dev/nvme1n1p5
  ID-3: /home size: 491.56 GiB used: 203.93 GiB (41.5%) fs: btrfs
    dev: /dev/nvme1n1p3
  ID-4: /var/log size: 48.83 GiB used: 22.92 GiB (46.9%) fs: btrfs
    dev: /dev/nvme1n1p4
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 57.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 410 Uptime: 15m Memory: 15.36 GiB used: 3.85 GiB (25.1%)
  Shell: Bash inxi: 3.3.12

Modified a little bit:

#!/bin/bash

sleep 5;
declare -a devices=("LID0") # <-- Add your entries here
for device in "${devices[@]}"; do
    if grep -qw ^$device.*enabled /proc/acpi/wakeup; then
       echo $device > /proc/acpi/wakeup
    fi
done

If that doesn’t work then use instead a udev rule. Instead of enable, use disable in that example:

https://wiki.archlinux.org/title/Udev#Waking_from_suspend_with_USB_device