Table of Contents

Issue 2022 - January

AWS CodePipeline + GitHub + git submodule

There are couple of how tos AWS CodePipeline + GitHub and git submodule around - one, two(which discusses handful of solutions), three, four. And here is the one which works for me in given setup:

  1. private repositories hosted at GitHub
  2. AWS CodeStar connection to GitHub
  3. AWS CodePipeline with “full clone”
  4. AWS CodeBuild with the following buildspec
buildspec.yml
version: 0.2

env:
  git-credential-helper: yes

phases:
  build:
    commands:
      - git submodule update --init --recursive
      - ls -laR .

NOTES:

  1. URL in .gitmodules must be https://github.com/user-org/repo. Relative path and git+SSH didn't work for me. Actually, this was rather important finding for me and it looks like it's not mentioned anywhere. It looks like I will have to apply yet another hack since GitHub Actions require hack-around as well.
  2. Don't forget to allow AWS CodeBuild service role to use of AWS CodeStar connection, namely codestar-connections:UseConnection. Usually forgotten.
  3. What about SSH? What about it? Sadly, that's one way to deal with git submodules in GitHub Actions.

Zdenek Styblik 2022/01/21 19:01

Case of a sleepy J.. laptop

As I've hinted previously I had some issues with my laptop occasionally falling asleep(suspend to RAM) for no apparent reason. Unfortunately, quite a lot of changes bunched up at once like BIOS update, OS update, kernel, new LCD, new chair. That's Christmas for you. Somehow I found question at ArchLinux forums and symptoms were exactly the same.

root@xxx:~# systemctl status systemd-logind
● systemd-logind.service - User Login Management
     Loaded: loaded (/lib/systemd/system/systemd-logind.service; static)
     Active: active (running) since Mon 2021-12-27 22:23:22 CET; 5 days ago
       Docs: man:sd-login(3)
             man:systemd-logind.service(8)
             man:logind.conf(5)
             man:org.freedesktop.login1(5)
   Main PID: 686 (systemd-logind)
     Status: "Processing requests..."
      Tasks: 1 (limit: 18744)
     Memory: 2.0M
        CPU: 8.982s
     CGroup: /system.slice/systemd-logind.service
             └─686 /lib/systemd/systemd-logind

Dec 27 22:57:38 xxx systemd-logind[686]: Operation 'sleep' finished.
Dec 29 12:08:02 xxx systemd-logind[686]: Lid closed.
Dec 29 12:30:12 xxx systemd-logind[686]: Lid opened.
Dec 29 12:30:12 xxx systemd-logind[686]: Operation 'sleep' finished.
Dec 30 11:40:59 xxx systemd-logind[686]: Lid closed.
Dec 30 11:41:00 xxx systemd-logind[686]: Lid opened.
Dec 30 11:41:23 xxx systemd-logind[686]: Operation 'sleep' finished.
Jan 02 13:54:41 xxx systemd-logind[686]: Lid closed.
Jan 02 13:54:42 xxx systemd-logind[686]: Lid opened.
Jan 02 13:55:03 xxx systemd-logind[686]: Operation 'sleep' finished.
root@xxx:~# journalctl -b -u systemd-suspend.service
-- Journal begins at Sun 2021-12-12 06:39:01 CET, ends at Sun 2022-01-02 14:21:22 CET. --
Dec 27 22:57:09 xxx systemd[1]: Starting Suspend...
Dec 27 22:57:09 xxx systemd-sleep[16406]: Suspending system...
Dec 27 22:57:38 xxx systemd-sleep[16406]: System resumed.
Dec 27 22:57:38 xxx systemd[1]: systemd-suspend.service: Succeeded.
Dec 27 22:57:38 xxx systemd[1]: Finished Suspend.
Dec 29 12:08:02 xxx systemd[1]: Starting Suspend...
Dec 29 12:08:02 xxx systemd-sleep[146437]: Suspending system...
Dec 29 12:30:12 xxx systemd-sleep[146437]: System resumed.
Dec 29 12:30:12 xxx systemd[1]: systemd-suspend.service: Succeeded.
Dec 29 12:30:12 xxx systemd[1]: Finished Suspend.
Dec 30 11:41:00 xxx systemd[1]: Starting Suspend...
Dec 30 11:41:00 xxx systemd-sleep[258245]: Suspending system...
Dec 30 11:41:23 xxx systemd-sleep[258245]: System resumed.
Dec 30 11:41:23 xxx systemd[1]: systemd-suspend.service: Succeeded.
Dec 30 11:41:23 xxx systemd[1]: Finished Suspend.
Jan 02 13:54:42 xxx systemd[1]: Starting Suspend...
Jan 02 13:54:42 xxx systemd-sleep[508777]: Suspending system...
Jan 02 13:55:03 xxx systemd-sleep[508777]: System resumed.
Jan 02 13:55:03 xxx systemd[1]: systemd-suspend.service: Succeeded.
Jan 02 13:55:03 xxx systemd[1]: Finished Suspend.
root@xxx:~# journalctl -b -u systemd-logind
-- Journal begins at Sun 2021-12-12 06:39:01 CET, ends at Sun 2022-01-02 14:21:22 CET. --
Dec 27 22:23:22 xxx systemd[1]: Starting User Login Management...
Dec 27 22:23:22 xxx systemd-logind[686]: Watching system buttons on /dev/input/event6 (Power Button)
Dec 27 22:23:22 xxx systemd-logind[686]: Watching system buttons on /dev/input/event5 (Lid Switch)
Dec 27 22:23:22 xxx systemd-logind[686]: Watching system buttons on /dev/input/event4 (Sleep Button)
Dec 27 22:23:22 xxx systemd-logind[686]: Watching system buttons on /dev/input/event0 (AT Translated Set 2 keyboard)
Dec 27 22:23:22 xxx systemd-logind[686]: Watching system buttons on /dev/input/event7 (ThinkPad Extra Buttons)
Dec 27 22:23:22 xxx systemd-logind[686]: New seat seat0.
Dec 27 22:23:22 xxx systemd[1]: Started User Login Management.
Dec 27 22:23:28 xxx systemd-logind[686]: New session 1 of user sddm.
Dec 27 22:23:34 xxx systemd-logind[686]: New session 3 of user yyy.
Dec 27 22:23:34 xxx systemd-logind[686]: Session 1 logged out. Waiting for processes to exit.
Dec 27 22:57:09 xxx systemd-logind[686]: Lid closed.
Dec 27 22:57:37 xxx systemd-logind[686]: Lid opened.
Dec 27 22:57:38 xxx systemd-logind[686]: Operation 'sleep' finished.
Dec 29 12:08:02 xxx systemd-logind[686]: Lid closed.
Dec 29 12:30:12 xxx systemd-logind[686]: Lid opened.
Dec 29 12:30:12 xxx systemd-logind[686]: Operation 'sleep' finished.
Dec 30 11:40:59 xxx systemd-logind[686]: Lid closed.
Dec 30 11:41:00 xxx systemd-logind[686]: Lid opened.
Dec 30 11:41:23 xxx systemd-logind[686]: Operation 'sleep' finished.
Jan 02 13:54:41 xxx systemd-logind[686]: Lid closed.
Jan 02 13:54:42 xxx systemd-logind[686]: Lid opened.
Jan 02 13:55:03 xxx systemd-logind[686]: Operation 'sleep' finished.

Then I found this could be bug in upower or BIOS/firmware. Oh well. From questions in another direction(my lid is not closed and isn't being closed, just HW/FW/OS thinks it's) “disable sleep when external monitor is connected and lid is closed” I've tried to disable sleep “Even when an external monitor is connected”(System Settings → Power Management → Energy Saving). And it worked! No more falling asleep, although I could see that laptop wanted to.

As for reason WHY, it seems when you pass really strong magnet near the edge of Lenovo's T490 it's as if lid was being closed or opened. That's why(at least in my particular case).

Zdenek Styblik 2022/01/30 20:37