You are not logged in.

#1 2015-10-22 14:08:30

Tranzystor
Member
Registered: 2015-10-22
Posts: 1

DELL Latitude E7240 - When I close lid not work locker screen&suspend

Hi,
I'm new on this forum. Therefore I ask for your understanding.

I wanted to write systemd service (the script is below) which will lock the screen and suspend system when I close the lid. My screen locker is i3lock-wrapper.

/etc/systemd/system/before-sleep.service

[Unit]
Description=Before hibernate
Before=sleep.target

[Service]
User=jakub
Type=forking
Environment=DISPLAY=:0
ExecStart=/home/jakub/.screen-lock.sh

[Install]
WantedBy=sleep.target
/home/jakub/.screen-lock.sh

#!/bin/bash
i3lock-wrapper -l
xrandr --output eDP1 --auto --primary --output DP1-1 --off --output DP1-2 --off
exit 0

Unfortunately, it doesn't work properly. When I close the lid, the LED doesn't pulse. It means that computer doesn't suspend. I waited several seconds and nothing... When I opened the lid, I see locked screen. But I can't unlock it. I can only restart the computer...

But I can suspend computer using Programs -> Log out -> Suspend and everything works. Also interesting is that if I make suspension of the computer using this method and then I close the lid, it also works. It's very strange. I suspected DPMS, therefore I tried turning off DPMS using xset s off -dpms. But it doesn't help. I thought that problem is intel_ips module, because journalctl returns:

systemd[1]: Starting Delayed hibernation trigger...
systemd[1]: Starting Before hibernate...
systemd[1]: Starting Network Manager Script Dispatcher Service...
dbus[304]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
systemd[1]: Started Network Manager Script Dispatcher Service.
sh[2639]: alarm set for 1445519807
systemd[1]: Started Delayed hibernation trigger.
.screen-lock.sh[2640]: warning: output DP1-1 not found; ignoring
.screen-lock.sh[2640]: warning: output DP1-2 not found; ignoring
systemd[1]: Started Before hibernate.
kernel: [drm:check_crtc_state [i915]] *ERROR* mismatch in ips_enabled (expected 1, found 0)
kernel: ------------[ cut here ]------------
kernel: WARNING: CPU: 0 PID: 494 at drivers/gpu/drm/i915/intel_display.c:12324 check_crtc_state+0x8df/0xf80 [i915]()
kernel: pipe state doesn't match!
kernel: Modules linked in: cmac ecb rfcomm fuse sha256_ssse3 sha256_generic hmac drbg ansi_cprng ctr ccm snd_hda_codec_hdmi joydev mousedev pn544_mei mei_
kernel:  drm serio_raw mei snd_soc_core snd_hda_core ptp intel_gtt snd_hwdep snd_compress i2c_algo_bit pps_core snd_pcm_dmaengine shpchp ac97_bus lpc_ich 
kernel: CPU: 0 PID: 494 Comm: Xorg Tainted: G        W       4.2.3-1-ARCH #1
kernel: Hardware name: Dell Inc. Latitude E7240/      , BIOS A15 05/19/2015
kernel:  0000000000000000 000000003a81d924 ffff88020f4b3788 ffffffff8156c0ca
kernel:  0000000000000000 ffff88020f4b37e0 ffff88020f4b37c8 ffffffff81074886
kernel:  ffff88020f4b37c8 ffff880213f74b50 ffff880214386000 ffff880213f74800
kernel: Call Trace:
kernel:  [<ffffffff8156c0ca>] dump_stack+0x4c/0x6e
kernel:  [<ffffffff81074886>] warn_slowpath_common+0x86/0xc0
kernel:  [<ffffffff81074915>] warn_slowpath_fmt+0x55/0x70
kernel:  [<ffffffffa082cf7f>] check_crtc_state+0x8df/0xf80 [i915]
kernel:  [<ffffffffa03e64ba>] ? drm_calc_vbltimestamp_from_scanoutpos+0x17a/0x330 [drm]
kernel:  [<ffffffffa083f9f6>] intel_modeset_check_state+0x216/0xb50 [i915]
kernel:  [<ffffffffa083a00c>] ? __intel_set_mode+0x92c/0xb60 [i915]
kernel:  [<ffffffffa0841037>] intel_crtc_set_config+0x4c7/0x580 [i915]
kernel:  [<ffffffffa03ef9f6>] drm_mode_set_config_internal+0x66/0x100 [drm]
kernel:  [<ffffffffa03f4809>] drm_mode_setcrtc+0x3e9/0x500 [drm]
kernel:  [<ffffffffa03e5575>] drm_ioctl+0x125/0x610 [drm]
kernel:  [<ffffffffa03f4420>] ? drm_mode_setplane+0x1b0/0x1b0 [drm]
kernel:  [<ffffffff811e29e5>] do_vfs_ioctl+0x295/0x480
kernel:  [<ffffffff811ecad7>] ? __fget+0x77/0xb0
kernel:  [<ffffffff811e2c49>] SyS_ioctl+0x79/0x90
kernel:  [<ffffffff8108300e>] ? SyS_rt_sigprocmask+0x8e/0xc0
kernel:  [<ffffffff8157162e>] entry_SYSCALL_64_fastpath+0x12/0x71
kernel: ---[ end trace 4d6ca53908cd9b8f ]---
systemd[1]: Reached target Sleep.
systemd[1]: Starting Suspend...
systemd-sleep[2687]: Suspending system...
-- Reboot --

When I added intel_ips module to mkinitcpio.conf this error disappears. But suspension just like before doesn't work properly. I tried to lock the screen using i3lock, and it's the same. But when I add i915 module to blacklist that suspending is working properly. But it cannot work that way, because I cannot resume system!

Please, help me!

Regards,
Tranzystor

Last edited by Tranzystor (2015-10-22 14:10:32)

Offline

Board footer

Powered by FluxBB