=== ArchSetup Tasks === * ArchSetup v0.5 ** TODO [#B] Change Lockscreen to hyprlock (something simple) :LOGBOOK: - State "TODO" from [2024-11-07 Thu 12:32] :END: ** TODO [#B] Thunderbird dotfiles :LOGBOOK: - State "TODO" from [2024-11-07 Thu 12:32] :END: ** TODO [#B] Calibre dotfiles :LOGBOOK: - State "TODO" from [2024-11-07 Thu 16:21] :END: ** TODO [#B] Check into getting fingerprint auth working :LOGBOOK: - State "TODO" from [2024-11-07 Thu 16:16] :END: ** TODO [#B] Push Archsetup to Website on Archsetup Commit :LOGBOOK: - State "TODO" from [2024-04-18 Thu 16:21] :END: ** TODO [#B] Install VPN w/ GUI :LOGBOOK: - State "TODO" from [2024-11-07 Thu 05:31] :END: ** TODO [#B] Fix "at" error during install :LOGBOOK: - State "TODO" from "VERIFY" [2024-11-30 Sat 16:56] - State "TODO" from [2024-05-06 Mon 21:38] :END: *** 2024-11-30 Sat @ 16:56:46 -0600 Failed with yay on ongoing install. I think this might be the only error. *** 2024-11-07 Thu @ 05:28:26 -0600 Looks like it's in the extra repository so changing to aur install ** TODO [#B] Sleep/Suspend Working on Framework Laptop *** Note: kernel parameter for sleep/suspend issue in Framework Laptop #+BEGIN_QUOTE Lastly, my findings… after bit of testing and measuring, it appears that with more or less up-to-date software (current linux kernel, systemd, etc.) it evens out (very scientifically measured:) at around 1.2-1.3 percent/hour in s2idle for the above described configuration (mainly 2x16 GB SO-DIMM sticks), independent of the distribution used (i.e. Fedora and NixOS) but with “rtc_cmos.use_acpi_alarm=1” added to the kernel command line (iiuc, which will become the default in a future systemd release thanks to @Mario_Limonciello et al.) and a “powertop --auto-tune” run at boot time. Considering that refreshing memory in sleep/stand-by mode is the main consumer of energy and that soldered memory consumes around 90% less energy (with the obvious caveats, of course) in sleep than non-soldered solutions, this boils down (again, very scientifically measured) to around 0.7/0.8 watts in s2idle, which is a (very) good result, imo. This would be the first laptop with which i’ve been able to achieve acceptable suspend results now that ACPI S3 appears to have gone everywhere. Thanks a bunch, everybody… #+END_QUOTE [[https://community.frame.work/t/battery-drain-on-suspend-sleep-with-linux/42395/7][Battery Drain on Suspend/Sleep with Linux - Framework Laptop 13 - Framework Community]] Captured On: [2024-03-03 Sun 06:16] *** Note: kernel parameter to solve battery drain with Sleep/Suspend on Framework #+BEGIN_QUOTE Adding the kernel parameter acpi_mask_gpe=0x1A has made sleep much closer to desired with decently low battery drain overnight. Still a bit unpredictable with manual suspend where it’ll just decide to wake up instantly for some reason, but once the automatic 15 minute inactivity is hit it seems to sleep with the lid closed. #+END_QUOTE [[https://community.frame.work/t/battery-drain-on-suspend-sleep-with-linux/42395/4][Battery Drain on Suspend/Sleep with Linux - Framework Laptop 13 - Framework Community]] Captured On: [2024-03-03 Sun 06:14] *** Note: Suspend Then Hibernate for Framework Laptop #+BEGIN_QUOTE In /etc/systemd/logind.conf I have the following relevant lines: HandleLidSwitch=suspend-then-hibernate HandleLidSwitchExternalPower=suspend-then-hibernate IdleAction=suspend-then-hibernate In /etc/systemd/sleep.conf I have these relevant lines: #AllowSuspendThenHibernate=yes HibernateDelaySec=720min The AllowSuspendThenHibernate line is commented out but that is the default so it is fine. #+END_QUOTE [[https://community.frame.work/t/tracking-suspend-on-linux-drains-a-lot-of-battery-compared-to-other-laptop/24737/12][[TRACKING] Suspend on linux drains a lot of battery compared to other laptop - Framework Laptop 13 / Linux - Framework Community]] Captured On: [2024-03-03 Sun 07:14] ** TODO [#C] Graphical Boot :LOGBOOK: - State "TODO" from [2024-11-30 Sat 17:10] :END: Or perhaps just a black screen during boot if it's quick. Low on the list, but it'll be weird to have nice UI after boot, but the boot's text raining. ** TODO [#B] Graphical Login You're going to need this as you'll want to choose between hyprland and dwm *** TODO SDDM? then systemctl enable sddm.service **** Move All Startup Apps to Startdwm and Call Startdwm From Xinitrc **** 2024-04-02 Tue @ 18:51:04 -0500 xinit-xsession doesn't work Steps I followed: install xinit-xsession to run .xinitrc as a session .xinitrc needs to be executable **** Note: How to Add 'dwm.desktop' as an SDDM Session #+BEGIN_QUOTE In /usr/share/xsessions/ directory I created a dwm.desktop file: [Desktop Entry] Encoding=UTF-8 Name=DWM Comment=Log in using the Dynamic Window Manager Exec=/usr/local/bin/dwm Icon=/usr/local/bin/dwm.png TryExec=/usr/local/bin/dwm Type=XSession and in my ~/.xinitrc file I have added these lines: # DWM Status dwmstatus 2>&1 >/dev/null & # Keyboard Layout setxkbmap -layout us,gr -option grp:alt_caps_toggle & # Compositor picom -f & #Add Wallpaper nitrogen --restore & #Execute DWM exec dwm Last edited by mikch (2022-05-15 18:11:34) Offline #22022-05-15 13:22:36 seth Member Registered: 2012-09-03 Posts: 50,327 Please use code tags, https://bbs.archlinux.org/help.php#bbcode The xinitrc won't be sourced by SDDM, move that stuff (MINUS the "exec dwm"!) to ~/.xprofile Edit: though it will then also be sourced by plasma. In doubt create a /usr/local/bin/dwm.sh wrapper and run that instead. #+END_QUOTE [[https://bbs.archlinux.org/viewtopic.php?id=276424][[SOLVED]Cannot start DWM properly from SDDM session menu / Newbie Corner / Arch Linux Forums]] Captured On: [2024-04-02 Tue 17:38] **** Note: Starting DWM from SDDM #+BEGIN_QUOTE As root create a file like this: $ cat /usr/share/xsessions/dwm.desktop [Desktop Entry] Encoding=UTF-8 Name=dwm Comment=Dynamic window manager Exec=dwm Icon=dwm Type=XSession with these permissions $ ls -l /usr/share/xsessions/dwm.desktop -rw-r--r-- 1 root root 108 Jun 27 17:24 /usr/share/xsessions/dwm.desktop Optionally rather than executing dwm directly you could execute a shell script instead that writes stdout / stderr to a file for logging purposes. E.g. Exec=startdwm and $ cat /usr/local/bin/startdwm #!/bin/sh echo "$(date): Starting dwn" >> /path/to/logs/$(date +%Y-%m-%d_%H.dwm.log) dwm >> /path/to/logs/$(date +%Y-%m-%d_%H.dwm.log) 2>&1 $ ls -l /usr/local/bin/startdwm -rwxr-xr-x 1 root root 204 Sep 19 14:12 /usr/local/bin/startdwm #+END_QUOTE [[https://www.reddit.com/r/suckless/comments/jj61py/how_do_i_make_dwm_appear_on_my_display_manager/][(3) How do I make dwm appear on my display manager? (lightDM) : suckless]] Captured On: [2024-04-02 Tue 17:46] ** TODO [#B] Add Hyprland Config :LOGBOOK: - State "TODO" from [2024-11-30 Sat 17:00] :END: *** Reference TechHeart https://www.youtube.com/watch?v=iE99GrcZzhs TypeCraft's Playlist https://www.youtube.com/watch?v=2CP_9-jCV6A&list=PLsz00TDipIfeDrFeSA56W1wPrYYg_Kd-b *** Hyprland Install *** HyprPanel as the top bar https://www.youtube.com/watch?v=6Dn9k8EX0-M *** nwg-dock-hyprland as the doc https://www.youtube.com/watch?v=16KX3vnbNcg *** Other tools https://www.youtube.com/watch?v=KA1jv40q9lQ ** TODO [#B] Add Thunar or other Graphical File Manager :LOGBOOK: - State "TODO" from [2024-11-30 Sat 17:01] :END: ** TODO [#C] Walk through ranger config :LOGBOOK: - State "TODO" from [2024-11-09 Sat 10:28] :END: ** TODO [#C] Scenario Test & Bugfixes *** Virtualbox Installation Testing *** Reinstall Velox Using Latest ** TODO [#C] Robust Installation Using Local Packages *** What Problem Am I Trying to Solve? reinstall current configuration entirely offline this includes building emacs and all packages *** requirements - local package store as current as the last installation - all git repositories in same location as package store - archsetup changes to use local if available, otherwise fallback to online repositories as normal. *** nice-to-have - bootable archinstall with archsetup - script that reconfigures the local store as the package repository to use for installs *** CANCELLED aconfmgr package and restore local package cache from elsewhere? CLOSED: [2024-04-13 Sat 15:24] **** Decision This is a good tool, but not for my purposes. I can get what I want easier in other ways. It's just too easy to make a mistake with aconfmgr and excluding files or packages by mistake. Going through the first sort, there were too many files and packages I had no idea about Excluding them could have been fine, but they could have been important dependencies The only real way to find out what they do would be to remove them and see how the system runs, or to see if they come in as a dependency of something else that's important. It's just too much effort. Much easier to reinstall from scratch. **** Info / Thoughts https://github.com/CyberShadow/aconfmgr would probably need to have aconfmgr script save on systemd timer, and notify when new in unsorted. Elsewhere could be: - git repo download (what if no wifi available, and how is this better than using official online repos)? - local directory (more complex) need an attached drive or partition (maybe just partition the install this way?) maybe still use git clone as the copy mechanism? (no - probably no need to keep revisions) maybe rsync the package cache with --delete and then rsync in reverse during the archsetup script? - regardless, I need to fallback to network connectivity if local repository fails *** pacman trigger that copies packages somewhere that will function as local repository. **** Example Trigger #+BEGIN_QUOTE # Force disks to sync to reduce the risk of data corruption [Trigger] Operation = Install Operation = Upgrade Operation = Remove Type = Package Target = * [Action] Depends = coreutils When = PostTransaction Exec = /usr/bin/sync #+END_QUOTE **** More info on triggers [[https://man.archlinux.org/man/alpm-hooks.5][alpm-hooks(5) — Arch manual pages]] Captured On: [2024-04-13 Sat 13:19] ** TODO [#C] Cleanup Dotfiles Repository The .dotfiles repo has configuration for applications I no longer use. ** TODO [#C] Test new apps :LOGBOOK: - State "TODO" from [2024-11-09 Sat 10:24] :END: - [ ] foliate setup properly with resetmimetypes and calibre - [ ] boxbuddy tested - [ ] gnome-boxes tested - [ ] archdev created ** VERIFY [#C] Add Gnome Boxes to ArchSetup :LOGBOOK: - State "TODO" from [2024-11-07 Thu 12:32] :END: ** VERIFY [#C] Add OBS Studio :LOGBOOK: - State "TODO" from [2024-11-07 Thu 12:32] :END: ** VERIFY [#C] Add Picom :LOGBOOK: - State "TODO" from [2024-11-07 Thu 12:32] :END: ** DONE [#B] Check into issues with Chrome and Electron Apps (like Obsidian) CLOSED: [2024-11-09 Sat 12:28] :LOGBOOK: - State "DONE" from "DOING" [2024-11-09 Sat 12:28] - State "DOING" from "TODO" [2024-11-09 Sat 11:50] - State "TODO" from [2024-11-09 Sat 10:28] :END: Problem Statement: - When right clicking in an area, the surrounding menu has a buffer of 10 px, and it's black. - When selecting a button, typing text, or using any of the UI elements, the screen doesn't refresh until it's resized or redrawn. SOLUTION: Removing xf86-video-intel driver solved the problem. *** DONE Run through theories CLOSED: [2024-11-09 Sat 12:26] :LOGBOOK: - State "DONE" from "DOING" [2024-11-09 Sat 12:26] - State "DOING" from "WAITING" [2024-11-09 Sat 11:43] - State "DOING" from "PROJECT" [2024-11-09 Sat 11:43] - State "TODO" from [2024-11-09 Sat 11:43] :END: **** DONE It's the compositor (it's not) CLOSED: [2024-11-09 Sat 11:47] :LOGBOOK: - State "DONE" from [2024-11-09 Sat 11:47] :END: killed picom and the same thing's happening **** DONE It's the wrong video driver CLOSED: [2024-11-09 Sat 12:26] :LOGBOOK: - State "DONE" from "DOING" [2024-11-09 Sat 12:26] - State "DOING" from "PROJECT" [2024-11-09 Sat 11:43] - State "TODO" from [2024-11-09 Sat 11:43] :END: ***** DONE [#B] Try other appropriate OSS video drivers CLOSED: [2024-11-09 Sat 12:25] :LOGBOOK: - State "DONE" from "PROJECT" [2024-11-09 Sat 12:25] - State "TODO" from [2024-11-09 Sat 11:43] :END: Command used to install all video drivers: sudo pacman -S $(pacman -Sgq xorg-drivers | grep xf86-video) Which one am I using? from neofetch, I have - GPU: Intel Raptor Lake-P [Iris Xe Graphics] from inxi -G I see:: - Graphics: Device-1: Intel Raptor Lake-P [Iris Xe Graphics] driver: i915 v: kernel Device-2: Realtek Laptop Camera driver: uvcvideo type: USB Display: x11 server: X.Org v: 21.1.14 driver: X: loaded: intel unloaded: fbdev,modesetting,vesa dri: i965 gpu: i915 resolution: 2256x1504~60Hz API: EGL v: 1.5 drivers: iris,swrast platforms: gbm,x11,surfaceless,device API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.2.6-arch1.1 renderer: Mesa Intel Graphics (RPL-P) I noted that the first time it couldn't identify which renderer it was using, and asked for GLXinfo to be installed, so I did that. SOLUTION: Removing xf86-video-intel driver solved the problem. ** DONE [#C] Quiet Login Removing Hostname No Longer Working CLOSED: [2024-11-07 Thu 14:10] :LOGBOOK: - State "DONE" from "VERIFY" [2024-11-07 Thu 14:10] :END: *** 2024-04-13 Sat @ 14:33:42 -0500 Test if alternate getty is the reason Ran same sed command to change all agetty commands ** DONE [#C] Screen Recording Solution CLOSED: [2024-04-06 Sat 17:22] *** 2024-04-06 Sat @ 17:22:37 -0500 Added recordnow script using ffmpeg does everything: - full screen recording - all audio - microphone base configuration came from combining commands from https://trac.ffmpeg.org/wiki/Capture/Desktop command is: ffmpeg -framerate 30 -f x11grab -i :0.0+ -f pulse -i alsa_input.pci-0000_00_1b.0.analog-stereo -ac 1 -f pulse -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor -ac 2 "$LOCATION/$NAME".mkv *** 2024-04-06 Sat @ 16:06:49 -0500 Tried OBS, but should try something simpler ** DONE [#C] Add paccache systemd timer CLOSED: [2024-04-13 Sat 12:58] systemctl enable --now paccache.timer will setup paccache -rk3 to run every three days. You can locate the paccache.service file to adjust this to your needs. ** DONE [#C] No Wallpaper on First Boot CLOSED: [2024-04-13 Sat 12:59] ** DONE [#C] Install Gist Emacs Dependency CLOSED: [2024-04-13 Sat 14:12] ...from the AUR Under Emacs Dependencies for this particular dependency: (use-package erc-yank :defer 1 :after erc :bind (:map erc-mode-map ("C-y" . erc-yank))) ** Add vpcserver to archsetup https://gist.github.com/miguelmota/9cd15049843ddf1ee1a52196f5c7e5ea * ArchSetup Backlog ** TODO [#D] Rewrite Archsetup in Another Language There's no current way to test each function, and Archsetup's complexity will grow *** Which Language? **** Python | pros | cons | |-----------------------------------+-----------------------------------| | text based and easily inspectable | needs the interpreter installed | | more engineers can contribute | unit testing frameworks not great | | great libraries | | | ablity to curl and pipe? | | **** Go | pros | cons | |------------------------------------+---------------------------------| | no interpreter needed | opaque binary; less credibility | | great unit test framework built-in | | ** TODO [#D] Evaluate i3 / Sway to Duplicate DWM Workflows ** TODO [#D] Evaluate Rofi Menus ** TODO [#D] Evaluate Binding the Right Alt Key to Mod4 Using Xmodmap #+BEGIN_QUOTE Bind the right Alt key to Mod4 When using Mod4 (the Super/Windows Key) as the MODKEY, it may be equally convenient to have the right Alt key (Alt_R) act as Mod4. This will allow you to perform otherwise awkward keystrokes one-handed, such as zooming with Alt_R+Enter. First, find out which keycode is assigned to Alt_R: $ xmodmap -pke | grep Alt_R Then simply add the following to the startup script (e.g. ~/.xinitrc), changing the keycode 113 if necessary to the result gathered by the previous xmodmap command: Reassign Alt_R to Super_L: xmodmap -e "keycode 113 = Super_L" Make sure X keeps it out of the "mod1" group: xmodmap -e "remove mod1 = Super_L" After doing so, any functions that are triggered by the Super_L key press will also be triggered by an Alt_R key press. Note: There is a #define option in config.h which also allows you to switch the modkey. #+END_QUOTE [[https://wiki.archlinux.org/title/Dwm][dwm - ArchWiki]] Captured On: [2024-04-02 Tue 17:42] * ArchSetup Reference/Research ** Info on Local Pacman Cache/Mirror [[https://bbs.archlinux.org/viewtopic.php?id=242471][Use pacman cache as local package mirror / Pacman & Package Upgrade Issues / Arch Linux Forums]] Captured On: [2024-04-13 Sat 12:07] ** Zorin OS Code Z217-1PVI-K50J-GYDA ** ZFS Notes and Reference Pages *** Reference Pages **** [[https://blog.timo.page/installing-arch-linux-on-zfs][Installing Arch Linux on ZFS]] **** [[https://openzfs.github.io/openzfs-docs/Getting%20Started/Arch%20Linux/Root%20on%20ZFS.html][OpenZFS - Arch Linux Root on ZFS]] **** [[https://wiki.archlinux.org/title/Install_Arch_Linux_on_ZFS][Arch Wiki - Install Arch Linux on ZFS]] **** [[https://wiki.archlinux.org/title/ZFS][Arch Wiki - ZFS Main Page]] **** [[https://bbs.archlinux.org/viewtopic.php?id=298463][Gist on Arch ZFS install]] **** [[https://florianesser.ch/posts/20220714-arch-install-zbm/][Guide on ZFS Arch Install with ZFSBootMenu]] **** [[https://docs.zfsbootmenu.org/en/v2.3.x/][ZFSBootMenu Docs]] These pages look especially useful https://github.com/zbm-dev/zfsbootmenu/blob/master/testing/helpers/install-arch.sh https://github.com/zbm-dev/zfsbootmenu/blob/master/testing/helpers/chroot-arch.sh **** Misc Tips on mounting zfs disks in arch https://www.reddit.com/r/archlinux/comments/varwmc/quick_tip_for_mounting_zfs_disks_in_arch_its/ on compiling the zfs dkms modules https://bbs.archlinux.org/viewtopic.php?id=298463 *** Building Arch iso with ZFS modules from: https://blog.timo.page/installing-arch-linux-on-zfs Building an Arch ISO with ZFS support The default ISO image you can download from the Arch Linux website does not support ZFS. That's why we have to create our own using the archiso tool. We will install the tool from the Arch Linux repositories. If you are not already running Arch Linux, you can also install and run the tools inside a container. (Remember to remove sudo from all commands) docker run --rm --privileged -it -v "$(pwd)/out":/root/iso/out archlinux Install the archiso tool, create a work directory and copy the releng profile to it. sudo pacman -Sy archiso mkdir ~/iso cp -r /usr/share/archiso/configs/releng/* ~/iso Add the ArchZFS repository to the Pacman configuration for our build and tell archiso to install the ZFS DKMS module and ZFS utils to our resulting ISO. echo -e ' [archzfs] Server = https://archzfs.com/$repo/$arch SigLevel = Optional TrustAll' >> ~/iso/pacman.conf echo -e ' linux-headers archzfs-dkms zfs-utils' >> ~/iso/packages.x86_64 Next, build the ISO. This can take some time… sudo mkarchiso -vo ~/iso/out ~/iso Finally, write the ISO to a USB drive using your favorite tool, restart your computer and boot it. ** Arch Install Steps *** References [[https://youtu.be/zQQN3Pj4K0Y?list=PLHlcDXHFansDuXdFbU2XZXoNOGQiq1zr3][Stephen's Tech Talks: Arch Linux the Easy Way: Encrypted Wayland KDE, Timeshift, Working Boot from Snapshots]] *** Arch Install Choices These are saved as "user_configuration.json" and "user_credentials.json" in the assets folder **** Disk Layout - Wipe all selected drives and use a best-effort default partition layout - Select btrfs - Select "yes" to using BTRFS subvolumes with a default structure - Select "yes" to BTRFS compression **** Encryption password This is the LUKS encryption password. Choose whatever password you like. **** Bootloader - Select "yes" to "use GRUB as bootloader instead of systemd-boot" **** Profile - Choose minimal **** Kernels - Choose linux **** Additional Packages git neovim openssh terminus-font **** Optional Repositories Select multilib *** Chroot Activities After checking these items, you can exit and reboot **** Check /etc/fstab change relatime to noatime for SSD performance remove space_cache=v2 as it's redundant **** Check /etc/default/grub check that encryption is setup properly (look for cryptdevice in grub_cmdline_linux) add video=1920x1080 in grub_cmdline_linux_default after "loglevel-3 quiet" if you modify anything, make sure to type grub-mkconfig -o /boot/grub/grub.cfg **** Check /etc/mkinitcpio.conf check MODULES=(btrfs) ensure that the HOOKS= line has encrypt before filesystems