Closed Lattitude75 closed 4 years ago
I don’t see a link to logs.i3wm.org. Did you follow https://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)
My immediate thought is that your system triggers the lockscreen on wakeup rather than before allowing the machine to go to sleep.
I don’t see a link to logs.i3wm.org. Did you follow https://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)
I am sorry. I will include it right away.
My immediate thought is that your system triggers the lockscreen on wakeup rather than before allowing the machine to go to sleep.
Is there any way I would know if that is the case by following the journal logs?
@Airblader I did not understand how I should go about solving it. Is this an issue with my set-up or the plasma screenlocker? Is it that this is not the right place for me to ask this question? Cause I don't get any reply.
Is it that this is not the right place for me to ask this question?
You can also ask on /r/i3wm, you may get some help there as well. Not that we wouldn't help you here (though I did migrate the issue to the correct repository now), but on reddit you'll have far more users reading actively along.
At the moment I don't have the time to look into this myself (sorry).
I don’t know about the specifics of how i3lock is started in your environment, but I will note that when using xss-lock
, this happens by default unless you specify --transfer-sleep-lock
, at which point i3lock
can pass control back to xss-lock (which then proceeds with suspending) after the screen is locked.
So, perhaps using xss-lock
with the --transfer-sleep-lock
option helps?
I know it has been a long while, but I wanted to show the solution I adopted. I used a systemd service file which can be activated on a per-user basis to include a sleep delay just before the sleep.
suspend@.service:
[Unit]
Description=User suspend actions
Before=sleep.target
[Service]
User=%I
Type=oneshot
Environment=DISPLAY=:0
ExecStart=/usr/bin/sleep 2
NOW=$(date +%%s); \
if [[ $(pacmd list-sink-inputs | grep -c 'state: RUNNING') > 0 ]]; then echo "Playing";fi;\
/usr/bin/sleep 2\
'
#ExecStartPost=/usr/bin/sleep 1
[Install]
WantedBy=sleep.target
Now, the system waits for about a couple of seconds before it goes to sleep to wait for the lockscreen to finish its job. I do not mind a couple of second wait, so it's fine for me.
My setup is the following: I use i3wm on Plasma desktop with SDDM on Arch Linux. I have noticed, since the very beginning, that when my laptop wakes up from sleep the KDE lockscreen comes up with the password prompt. The lockscreen takes a few seconds to load and meanwhile the window, on which I was working before my laptop went to suspend, shows up. This happens before the lockscreen shows and thus before I put in my password. This is not secure and is a serious issue as my active window is clearly shown even though for a couple of seconds.
I also noticed another issue. Since I use the Plasma background apps and services, the location of the KDE notifications sometimes shows up in the centre of the screen randomly. This only happens when I login into my user and the location stays the same. For example, if I find that the notification showed up in the centre of the screen, it stays the same for the rest of the session. I tried to use the i3wm config for the location and also use a script to redirect the window to the specific location. The script is shown below(I took the following script from some post I don't remember where. I am sorry for not citing the source). The problem still persists.
My log file is: https://logs.i3wm.org/logs/5645139984777216.bz2 I will provide you with any other info as needed.
Environment
Output of
i3 --moreversion 2>&-
: