Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freezes completely after suspend #292

Closed
AmitGolden opened this issue Sep 16, 2021 · 23 comments
Closed

Freezes completely after suspend #292

AmitGolden opened this issue Sep 16, 2021 · 23 comments

Comments

@AmitGolden
Copy link

Hi,
I've enabled the systemd service.
Sometimes after my pc wakes up after suspend, betterlockscreen is active, but I can't type ANYTHING.
I can't even change to a different tty.
The only thing that I can do is either force reboot with the power button or use the magik SysRq.

One strange thing is that sometimes, using Alt + SysRq + R will unfreeze the pc and I could type again.

What can I do to fix this?

@SebTM
Copy link
Collaborator

SebTM commented Sep 16, 2021

Thanks for your report, could you please add information's about OS/Distro, Versions (like betterlockscreen -v), content of your systemd-service and does it happen regularly? Were you able to get any logs from systemd after reboot which indicates what happened?

As Betterlockscreen is just a Bash-Script wrapping around i3lock-color, I'm not sure if this could be an i3lock-color issue (if it's not caused by invalid/wrong config e.g.). Could you maybe test switching to i3lock-color without additional config and test if it still occurs?

@AmitGolden
Copy link
Author

Oh, sorry I forgot to add my system information...

Arch Linux

$ betterlockscreen -v
[B] Betterlockscreen

Betterlockscreen: version: v4.0.3 (dunst: true, feh: true)
i3lock: version 2.13.c.4 © 2010 Michael Stapelberg, © 2015 Cassandra Fox, © 2021 Raymond Li
Version: ImageMagick 7.1.0-7 Q16-HDRI x86_64 2021-09-12 https://imagemagick.org
Copyright: (C) 1999-2021 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(4.5) 
Delegates (built-in): bzlib cairo djvu fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png raqm raw rsvg tiff webp wmf x xml zip zlib
Compiler: gcc (11.1)
dunst version: 1.6.1
feh version 3.7.1
Compile-time switches: curl exif inotify help stat64 verscmp xinerama 

By the content of my systemd service you mean the service file?

I'll post the logs next time that happens (It doesn't happen every time)
Then I'll try using vanilla i3lock-color

Thanks!

@SebTM
Copy link
Collaborator

SebTM commented Sep 17, 2021

Thanks for the additional information's.

By the content of my systemd service you mean the service file?

Yes :)

I'll post the logs next time that happens (It doesn't happen every time)
Then I'll try using vanilla i3lock-color

Sounds good 👍🏻

@AmitGolden
Copy link
Author

/usr/lib/systemd/system/betterlockscreen@.service (the default systemd service):

[Unit]
Description=Lock screen when going to sleep/suspend
Before=sleep.target
Before=suspend.target

[Service]
User=%I
Type=simple
Environment=DISPLAY=:0
ExecStart=/usr/bin/betterlockscreen --lock
TimeoutSec=infinity
ExecStartPost=/usr/bin/sleep 1

[Install]
WantedBy=sleep.target
WantedBy=suspend.target

It happened again, but I'm not sure what logs should I look at...
Didn't find any logs for i3lock, and I didn't find any useful information on the Xorg logs.

What logs should I post?

@SebTM
Copy link
Collaborator

SebTM commented Sep 22, 2021

You can find a list of logs per boot with journalctl --list-boots and with journalctl -b <id> e.g. -1 you can get the last log. This log maybe shows some more information's especially at the end - how/what crashed.

@AmitGolden
Copy link
Author

It happned again, here are the logs:

Sep 30 09:29:19 archlinux sudo[260716]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Sep 30 09:29:19 archlinux sudo[260730]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Sep 30 09:29:19 archlinux sudo[260730]: amitgold : TTY=pts/0 ; PWD=/home/amitgold ; USER=root ; COMMAND=/usr/bin/pacman --sync -y -u --
Sep 30 09:29:19 archlinux sudo[260730]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Sep 30 09:30:10 archlinux sudo[260730]: pam_unix(sudo:session): session closed for user root
Sep 30 10:00:56 archlinux betterlockscreen[301028]: [B] Betterlockscreen
Sep 30 10:00:56 archlinux betterlockscreen[301042]: Failed to open connection to "session" message bus: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
Sep 30 10:00:56 archlinux betterlockscreen[301040]: Failed to communicate with dunst, is it running? Or maybe the version is outdated. You can try 'dunstctl debug' as a next debugging step.
Sep 30 10:00:56 archlinux betterlockscreen[301028]: [*] Running prelock...
Sep 30 10:00:56 archlinux betterlockscreen[301028]: [*] Locking screen...

@iamgodot
Copy link

iamgodot commented Oct 2, 2021

It happned again, here are the logs:

Sep 30 09:29:19 archlinux sudo[260716]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Sep 30 09:29:19 archlinux sudo[260730]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Sep 30 09:29:19 archlinux sudo[260730]: amitgold : TTY=pts/0 ; PWD=/home/amitgold ; USER=root ; COMMAND=/usr/bin/pacman --sync -y -u --
Sep 30 09:29:19 archlinux sudo[260730]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Sep 30 09:30:10 archlinux sudo[260730]: pam_unix(sudo:session): session closed for user root
Sep 30 10:00:56 archlinux betterlockscreen[301028]: [B] Betterlockscreen
Sep 30 10:00:56 archlinux betterlockscreen[301042]: Failed to open connection to "session" message bus: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
Sep 30 10:00:56 archlinux betterlockscreen[301040]: Failed to communicate with dunst, is it running? Or maybe the version is outdated. You can try 'dunstctl debug' as a next debugging step.
Sep 30 10:00:56 archlinux betterlockscreen[301028]: [*] Running prelock...
Sep 30 10:00:56 archlinux betterlockscreen[301028]: [*] Locking screen...

Got the same issue here, try add export $(dbus-launch) when activating X (e.g. in the .xinitrc), the problem seems to be solved.

@AmitGolden
Copy link
Author

I use lightdm, will putting it in my .profile work as well?

@iamgodot
Copy link

iamgodot commented Oct 2, 2021

I use lightdm, will putting it in my .profile work as well?

It should, according to the wiki here.

@AmitGolden
Copy link
Author

Thanks!
I've added this to my .profile, but weirdly enough my computer just froze while I was using it!
Using Alt+SysRq+R solved it though.
Also, I didn't notice anything unusual in the logs...

@iamgodot
Copy link

iamgodot commented Oct 2, 2021

Thanks! I've added this to my .profile, but weirdly enough my computer just froze while I was using it! Using Alt+SysRq+R solved it though. Also, I didn't notice anything unusual in the logs...

So the logs meaning the dbus solution worked? You can print out DBUS_SESSION_BUS_ADDRESS to make sure, plus maybe you should restart to have a fresh test.

@iamgodot
Copy link

iamgodot commented Oct 3, 2021

@AmitGolden I may have misguided you in the wrong direction with the above solution, sorry. After rechecking the Archwiki for xinit, I think the problem is my .xinitrc file not including some of the contents in the default config file, as pointed out by the wiki:

Note: At the very least, ensure that the last if block in /etc/X11/xinit/xinitrc is present in your ~/.xinitrc file to ensure that the scripts in /etc/X11/xinit/xinitrc.d are sourced.

I updated my .xinitrc and the issue got eliminated this time. To be specific, the key content to add should be the following:

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

Which executes the scripts under /etc/X11/xinit/xinitrc.d where I figure one called 50-systemd-user.sh did the trick, it simply includes:

#!/bin/sh

systemctl --user import-environment DISPLAY XAUTHORITY

if command -v dbus-update-activation-environment >/dev/null 2>&1; then
    dbus-update-activation-environment DISPLAY XAUTHORITY
fi

For you the .profile config should work but also check .xinitrc in case things work differently in LightDM. Hope this can help you.

@AmitGolden
Copy link
Author

Thanks a lot!
I've updated my .profile and will update if any issues arise

@SebTM
Copy link
Collaborator

SebTM commented Oct 3, 2021

Thanks for your support and contributions to this issue :) I will leave this open until I've finished the new docs and added this case to a troubleshooting section.

Or do you think there is something else, Betterlockscreen should/can improve on this except documentation?

@iamgodot
Copy link

iamgodot commented Oct 4, 2021

Thanks a lot! I've updated my .profile and will update if any issues arise

Welcome. Let me know if that works out for you :)

@iamgodot
Copy link

iamgodot commented Oct 4, 2021

Thanks for your support and contributions to this issue :) I will leave this open until I've finished the new docs and added this case to a troubleshooting section.

Or do you think there is something else, Betterlockscreen should/can improve on this except documentation?

You're welcome. The cause of this issue is actually an Arch one other than Betterlockscreen itself, so I suppose mentioning in the doc should suffice.

@AmitGolden
Copy link
Author

Just out of curiosity, what caused the problem?

@iamgodot
Copy link

iamgodot commented Oct 5, 2021

Just out of curiosity, what caused the problem?

Well, as to quote from Archwiki:

D-Bus is a message bus system that provides an easy way for inter-process communication.

Without proper configuration, the dbus daemon may not get fully activated. In this case, 50-systemd-user.sh is essential to provide some environment variables.

In addition, dunst relies on D-Bus for programs to send notifications, thus in your system log provided:

...
Sep 30 10:00:56 archlinux betterlockscreen[301042]: Failed to open connection to "session" message bus: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
Sep 30 10:00:56 archlinux betterlockscreen[301040]: Failed to communicate with dunst, is it running? Or maybe the version is outdated. You can try 'dunstctl debug' as a next debugging step.
...

@AmitGolden
Copy link
Author

It happened again.
I really don't know what causes this, here are the logs I could find:

Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.689673:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension eoceebklhjepohnakemchinmkdpbolgh installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirsKtAYT, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent
Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.698916:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension galpopeppgfimpgpdbbkhemhcjgghmhl installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirOd8mBq, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent
Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.699682:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension bpkoijdaibakhfgahdfknbdcankhidoa installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirixFuYW, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent
Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.719548:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension ficffphkednpmhjngkiljamkalhjmclj installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirQacLio, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent
Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.721697:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension ldopphkgfhfchjcgfilekhkifaodmegm installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirl3ElZa, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent
Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.732014:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension gajhkmnhhoadjcfchafgbekhgigglnkp installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirsXaQZr, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent
Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.735622:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension glcghbidhfocejckcfmfpdhmkjfmkiei installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirKBUDHq, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent
Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.736192:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension mjkjompjknhcipamakpfliebpggggpga installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirDwabCm, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent
Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.737532:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension feipjgjfhmnfhhmbkclfopokbcgnpnnd installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirDN1ZEL, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent

@SebTM
Copy link
Collaborator

SebTM commented Oct 8, 2021

From the provided logs I can't see that this is related to Betterlockscreen? (Logs show warnings about corrupt data issues in chromium/brave)

@iamgodot
Copy link

iamgodot commented Oct 9, 2021

It happened again. I really don't know what causes this, here are the logs I could find:

Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.689673:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension eoceebklhjepohnakemchinmkdpbolgh installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirsKtAYT, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent
Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.698916:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension galpopeppgfimpgpdbbkhemhcjgghmhl installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirOd8mBq, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent
Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.699682:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension bpkoijdaibakhfgahdfknbdcankhidoa installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirixFuYW, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent
Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.719548:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension ficffphkednpmhjngkiljamkalhjmclj installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirQacLio, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent
Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.721697:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension ldopphkgfhfchjcgfilekhkifaodmegm installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirl3ElZa, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent
Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.732014:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension gajhkmnhhoadjcfchafgbekhgigglnkp installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirsXaQZr, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent
Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.735622:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension glcghbidhfocejckcfmfpdhmkjfmkiei installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirKBUDHq, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent
Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.736192:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension mjkjompjknhcipamakpfliebpggggpga installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirDwabCm, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent
Oct 07 22:45:27 archlinux chrome[18421]: [18421:18421:1007/224527.737532:WARNING:chrome_content_verifier_delegate.cc(212)] Corruption detected in extension feipjgjfhmnfhhmbkclfopokbcgnpnnd installed at: /home/amitgold/.config/BraveSoftware/Brave-Browser/Greaselion/Temp/scoped_dirDN1ZEL, from webstore: 0, corruption reason: 1, should be repaired: 1, extension location: kComponent

I agree with @SebTM since the logs are not related. Maybe you should refer it to the Arch Community?

@AmitGolden
Copy link
Author

I've posted this problem on the Arch Forums

@SebTM
Copy link
Collaborator

SebTM commented Oct 11, 2021

I'm going to close this issue now as it seems resolved as far as what could be done here :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants