-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
new spaced repetition spams the lock screen with notifications #50
Comments
Escalating priority to high because if you leave your computer long enough (24-72 hours) without restarting the notifications will make it run out of memory. This means spaced repetition trainer is slowing down IBD too! |
I ran into this problem and had to abort the IBD process. Currently I am trying again. I'm having Bitcoin Core download blocks, but this time I am not creating/restoring a wallet - and keeping Bails closed. I'll check in 10 hours and see what happens. Using an older Lenovo Thinkpad and a SanDisk USB3.0 drive with 30GB storage. |
A workaround is to shut down Bitcoin Core and restart Tails after you’ve installed Bitcoin Core. The spaced repetition trainer only runs for the initial setup.
…On Mon, Aug 21, 2023 at 22:49, extrapockets ***@***.***(mailto:On Mon, Aug 21, 2023 at 22:49, extrapockets <<a href=)> wrote:
I ran into this problem and had to abort the IBD process. Currently I am trying again. I'm having Bitcoin Core download blocks, but this time I am not creating/restoring a wallet - and keeping Bails closed. I'll check in 10 hours and see what happens. Using an older Lenovo Thinkpad and a SanDisk USB3.0 drive with 30GB storage.
—
Reply to this email directly, [view it on GitHub](#50 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ARQZ6FYV6XJHDZLEPDB2DETXWQT5LANCNFSM6AAAAAA2VROE2Y).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
A related improvement: In discussions with the codex32 authors, the spec for importing and confirming shares will require custom Gtk dialogs. This means the spaced repetition can check if you're on a typing step and not bother you until you submit your string. |
Came back to check in. Bitcoin Core has finished catching up after 3 weeks of nonstop block downloading (with a few restarts when it's seemed extra slow). Common block download rates I saw were from 0.2% to 0.05%. Everything is working now. |
Thanks for this report @extrapockets! Would you mind sharing your system's Total RAM and the model of USB stick used? Very slow synchronizations like this are unfortunately expected from 4 GB laptops using slow USB sticks it would be the same (or worse) to an internal HDD with low RAM. Another tester with an 8GB laptop using a budget Kingston model synced in under 4 days. And with 16GB of RAM and fast enough internet you can sync in hours. |
You can significantly improve the sync time to just a few days, even with 4GB ram by choosing one of the SSD-like flash drives here: https://github.com/BenWestgate/Bails/blob/master/FAQ.md#what-type-of-flash-drive-should-i-get I personally synced a 2010 MacBook with 3.6GB RAM and a Core 2 Duo CPU in 2021 in 3.5 days using an external SSD (USB 2.0 of course). A side benefit of a faster drive (vs more RAM) especially if you use Bails frequently is starting Tails is much quicker, and catching up will reach full speed faster, versus using a cheap USB and getting more RAM. But the Samsung FIT is $11 and performs very well, likely 2-3 day syncs on 8GB ram and under 2 weeks on 4GB. |
The RAM warnings during setup helped me to understand that it would take a while. I used a laptop that I was able to keep running without interruption: 4GB RAM, i5-4300U CPU, 128GB Disk Capacity. The Thumbdrive is a SanDisk 128GB, but I am thinking that perhaps not all 128GB was accessible to BAILS since my persistent storage is only 10GB. |
I'm planning to clone BAILS next, so I'll get a SSD-style recommend drive to speed up that process and do more testing. |
By that you mean the notification that said:
Or something I wrote in the FAQ?
Tails doesn't touch the internal storage at all, so only the USB stored blockchain data. It may have run faster, even on 4G ram, if it had used more of your USB's capacity. Can you type |
Clone has not been implemented into the alpha yet. Before you make any wallets, however, you can make clones safely: Use Roll dice or use Making clones after you already have secrets on your Bails requires encrypting your data before |
Yes, the low memory warning pop-up, and also I had read the README. $lsblk output: $df -h ~/Persistent/.bitcoin output: size: 21G NOTE: I was incorrect on the thumbrive size in my earlier post. The thumbdrive I'm using for BAILS is 32GB, not 128. |
* Fine tune environment variables * nest bin,lib,share,state under .local, add environment variables * nest dirs under .local and move config to .config * fix spaced repetition spam Resolves #50 * Remove unused files, & PR deps post, fix templates * fix typo in ignore_paths for shell linter * Update install-core * remove .idea folders to fix codeQL bug * more deleting .idea folders * remove dot from folder names to fix codeql * rename the non dot folders to dot in `b` script This will allow default CodeQL to scan my library.
Increasing timeout only somewhat helped the issue I have found the root cause: Your suspicion is correct: when the screen is locked, This immediate cancellation can lead to a large number of notifications because each attempt to prompt for the passphrase fails instantly, and the script may retry frequently, creating numerous notifications in quick succession. To handle this, you might consider modifying your script to detect whether the screen is locked before invoking Checking if the Screen is LockedYou can use a utility like is_screen_locked() {
if gnome-screensaver-command -q | grep -q "is active"; then
return 0
else
return 1
fi
}
get_passphrase() {
# Check if the screen is locked
if is_screen_locked; then
echo "Screen is locked, postponing passphrase prompt."
return 1
fi
passphrase="$(echo -e "SETPROMPT $enter Persistent Storage passphrase:\nGETPIN" | pinentry-gnome3 --timeout 99999 2>&1 | grep D | cut -c3-)"
if [ -n "$passphrase" ]; then
return 0 # Success: passphrase is not empty
else
return 1 # Failure: passphrase is empty
fi
} Example Script with Screen Lock CheckHere is how you can integrate the screen lock check into your script: #!/bin/bash
min_interval=5
interval=30
exp=1
enter='Enter'
sleep $interval
is_screen_locked() {
if gnome-screensaver-command -q | grep -q "is active"; then
return 0
else
return 1
fi
}
get_passphrase() {
if is_screen_locked; then
echo "Screen is locked, postponing passphrase prompt."
return 1
fi
passphrase="$(echo -e "SETPROMPT $enter Persistent Storage passphrase:\nGETPIN" | pinentry-gnome3 --timeout 99999 2>&1 | grep D | cut -c3-)"
if [ -n "$passphrase" ]; then
return 0
else
return 1
fi
}
while true; do
get_passphrase
if [ $? -eq 0 ]; then
unset passphrase temp_passw
interval=$((interval * (RANDOM % 2500 + 2000) / 2 ** exp / 1500))
(( interval < min_interval )) && interval=$min_interval
sleep $interval
exp=0
enter='Enter'
else
unset passphrase temp_pass
zenity --notification --text="Passphrase does not match or screen is locked.\nTry again."
sleep 2
enter='Re-enter'
((exp = (exp == 0) ? 2 : exp + 1))
fi
done By including the |
If the screen is locked. No notification should be generated and the current interval should simply continue looping until the screen is unlocked again. |
these notifications should not reach the lock screen,
spaced-repetition
should clear it's own notifications after they display, it should not clear other notifications however.The text was updated successfully, but these errors were encountered: