Got myself a Miniforum UM790Pro. I would like to install Linux and use it as my daily driver forLD_PRELOAD=/usr/lib/libv4l/v4l1compat.so mpv --demuxer-lavf-o=video_size=1920x1080,framerate=60 av://v4l2:/dev/video0 --profile=low-latency --untimed
- Internet browsing
- Gaming
- Hobby programming
Eventually this would replace my current Windows machine, and then I will move the SSD to a Framework laptop once it's arrived.
The CPUs on these devices are pretty similar (AMD Ryzen™ 9 7940HS on UM790Pro and AMD Ryzen™ 7 7840HS on my Framework 16 preorder)
Got myself a Lexar NM790 4TB m2 nvme SSD, but pop_os install cannot detect it. Found this is due to https://bugzilla.kernel.org/show_bug.cgi?id=217863
Need a manual kernel patch so I suppose I'm out of luck for now.
I did test UM790Pro a bit with the SSD from my HP Elitebook which has Pop_os installed. Works pretty well.
Bought a m2 SSD to type C external box. By using the external box the pop_os installer can now recongnize my 4T SSD, so at least I can continue this way for now.
In the meanwhile, I have been doing research on which distros I'd like to use.
Listing down requirements I have gathered so far...
- Need to support luks encryption from installer
- Need to be close to SteamOS 3 (Arch based)
- But SteamOS 3 or distros based on it don't support disk encryption, so can't use them directly
- Need to use KDE plastma as DE
- [?] burfs filesystem with home as sub container (so it's easier to reinstall system later on if needed?)
- [?] Wayland or X11?
- [?] which sound system?
Seems like I have to go vanilla arch and do all the requirements myself
Tried to create a virtual machine under Qemu/KVM, but Arch live CD cannot regconize SSD on external USB even though I set USB redirect
Works with host machine, looks like we can continue (tomorrow).
Install based on this guide https://wiki.archlinux.org/title/User:ZachHilman/Installation_-_Btrfs_%2B_LUKS2_%2B_Secure_Boot with some changes:
- Don't use swap partition, use swapfile https://confluence.jaytaala.com/display/TKB/Use+a+swap+file+and+enable+hibernation+on+Arch+Linux+-+including+on+a+LUKS+root+partition
- Made a subvolumn @swapfile for swapfile, filepath /.swapfile/swapfile
- for HOOKS, file is /etc/mkinitcpio.coiinf
1/ Remove
sd-
https://bbs.archlinux.org/viewtopic.php?id=284741 sbctl create-keys
was run but probably don't have any actual effect since it's unused 4. sbctl remove-bundle- Need to install missing packages like
git, efibookmgr
- Don't use secure boot, run efibootmgr manager with arch-linux loader https://wiki.archlinux.org/title/Unified_kernel_image#Directly_from_UEFI
- Don't use TPM2
Cannot boot, due to unable to decrypt drive
Bootloader
https://wiki.archlinux.org/title/Unified_kernel_image#Building_the_UKIs
- edit /etc/mkinitcpio.d/linux.preset to uncomment efi output
- mkdir in /efi/ partition if using default output
Then use https://wiki.archlinux.org/title/Unified_kernel_image#Directly_from_UEFI to generate UEFI entry
- Fix mkinitproc config: use sd-encrypt
Fix Swapfile: With btrfs, swapfile cannot be in compress mode. Remount subvolume with no compression (change compress=none in fstab)
use https://wiki.archlinux.org/title/Btrfs#Swap_file to recreate swap
manually mount sudo swapon {file}
to confirm it works
No network
boot to live cd to install dhcpcd
systemctl enable dhcpcd systemctl enable wpa_supplicant
Use wget to download files
https://www.reddit.com/r/archlinux/comments/rn25qo/how_do_you_apply_kernel_patches/
https://archlinux.org/packages/core/x86_64/linux/ -> Go to Source (https://gitlab.archlinux.org/archlinux/packaging/packages/linux) select tag, get zip url
Get patch URL from https://bugzilla.kernel.org/show_bug.cgi?id=217863
Patch PKGBUILD
Edit makepkg config to use multi thread https://wiki.archlinux.org/title/Makepkg#Improving_build_times https://www.reddit.com/r/archlinux/comments/12ds8zd/how_long_to_compile_kernel/
Build: makepkg -s
(Maybe makepkg -src
so build dependencies and build folders are cleaned up afterwards)
If failed with gpg key:
gpg --recv-keys $PUBLIC_KEY
For this key specificly need to specify key server
gpg --keyserver hkps://keys.openpgp.org --recv-keys 3B94A80E50A477C7
install: sudo pacman -U linux-6.5.4.arch2-1-x86_64.pkg.tar.zst
optional: skip building doc https://wiki.archlinux.org/title/Kernel/Arch_build_system#Avoid_creating_the_doc
Unresolved problem: if using capture card, it goes to 4k in terminal and can't change to 1080p (fbset not working)
Replace dhcpcd and wpa_supplicant with networkmanager
sudo pacman -Rs dhcpcd wpa_supplicant
sudo pacman -Syu networkmanager
systemctl start NetworkManager.service
systemctl enable NetworkManager.service
replug network cable -> network is up again.
https://archlinux.org/pacman/pacman.8.html
Remove unused dependencies: https://www.reddit.com/r/ManjaroLinux/comments/mixbgk/how_can_i_remove_the_unused_dependencies_but_keep/ pacman -Rns $(pacman -Qdtq)
Learn pacman: https://archlinux.org/pacman/pacman.8.html
https://www.debugpoint.com/wayland-arch-linux/#Set_up_Wayland_in_Arch_Linux
providers
https://bbs.archlinuxcn.org/viewtopic.php?id=13151
- jack2 vs pipewire-jack -> pipewirejack
- pipewire-media-session vs wireplumber -> wireplumber
- phonon-qt5-gstreamer
- python-pyqt5
- cronie
- tesseract-data-eng
https://gitlab.freedesktop.org/pipewire/media-session
Successful login
Issues:
- video not working
- Barrier doesn't support wayland
Found input-leap, issue discussion mentioning Wayland support seems to be implemented input-leap/input-leap#109
For now need to build flatpak from branch https://github.com/input-leap/flathub-inputleap/tree/add/input-leap
pacman -Syu flatpak-builder
git clone {flathub-inputleap repo}
git submodule update --init --recursive
mkdir build
flatpak-builder build/ io.github.input_leap.input-leap.yml
# Get error, missing KDE SDK
# Add it with guides in https://github.com/input-leap/input-leap/wiki/Building-the-Flatpak
# Choose sdk version in cli
flatpak --user install flathub org.kde.Sdk
# build again
(current failing)
Gave up on Barrier for now.
- https://wiki.archlinux.org/title/GStreamer install gstreamer and all codec
- gstreamer should have been integerated with KDE as part of KDE installation
- Audio: found both pipewire and pulse audio are running
- remove plastma-pa and dependencies
sudo pacman -Rs plasma-pa
- disable pulseaudio services
$ systemctl --user stop pulseaudio.{service,socket} $ systemctl --user disable pulseaudio.{service,socket}
- remove plastma-pa and dependencies
- install
pirepwire-pulse
systemctl --user start pipewire-pulse
.systemctl --user enable pipewire-pulse
sudo pacman -Syu plasma-pa
, now it doesn't prompt to install pulseaudio anymore
ref: https://blog.ryey.icu/replace-pulseaudio-with-pipewire.html https://superuser.com/questions/1223030/cant-play-music-or-youtube-videos-on-arch-linux
restart
run makewhatis /usr/share/man
sudo pacman noto-fonts-cjk, noto-fonts-emoji
Probably caused by custom kernel upgrade
man: outdated mandoc.db lacks ** entry, run makewhatis /usr/share/man
: run the command with sudoman: SYSERR: exec: less: No such file or directory
: need to installless
fcitx5 is now on flatpak, easy
- McBopomofo for fcitx
- Mozc for Fcitx 5
- https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland#KDE_Plasma
- Start it from Virtual Keyboard setting
- didn't configure anything else (like for xorg, trying to daily drive without X for now)
Firefox and Brave are on flatpak
For brave, full history can only be manually synced https://community.brave.com/t/how-to-export-braves-browsing-history-to-another-browser/114687
systemctl enable --now sshd
- Read external disks with NTFS -> install
ntfs-3g
- Remap mouse button -> install AUR
input-remapper-git
- Auto start mapping on boot:
systemctl enable input-remapper
- Auto start mapping on boot:
- Double click to open instead of single click https://forum.endeavouros.com/t/dolphin-double-click-and-extend-2nd-monitor-feature/7939
https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Configure_the_initramfs
Add resume
hook after sd-encrypt in /etc/mkinitcpio.d
https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
Find swapfile physical offset
btrfs inspect-internal map-swapfile -r /swap/swapfile
Edit /etc/kernel/cmdline
resume=/dev/mapper/system
resume_offset=(offset)
Rebuild UKI sudo mkinitcpio -p linux
-> Maybe reboot here to take effect on new boot parameters?
https://bbs.archlinux.org/viewtopic.php?id=265175
Edit /etc/systemd/slee.conf
HibernateMode=shutdown
Test with systemctl hibernate
If works fine, then AUR install hibernator-git
, sudo hibernator
, rebot to get Hibernator menu in KDE Plasma
Failed attempts:
- Play video after resume before login (click play on login screen). This seems crashed pipewire
- Failed when external disk is connected?
Otherwise the Hipernate setup itself should have been counted as done.
https://www.reddit.com/r/pop_os/comments/v3g2w9/is_there_a_cli_command_to_restart_pipewire/
Try this next time?
#!/bin/sh
systemctl --user restart wireplumber pipewire.socket pipewire pipewire-pulse
pacman -Rs kmix
Use interactive management shell bluetoothctl
bluetoothctl
devices
trust {MAC of device}
to enable auto reconnect
Or can be simplified in bluetoothctl trust {MAC}
if you already know MAC address.
Probably need a script / service to auto trust new connections? (Check how this was done in Steamdeck?)
Steam & MangoHud & Gamescope: trying all flatpak https://www.reddit.com/r/linux_gaming/comments/16cdkt8/mangohud_flatpak_steam_flatpak_recently_quit/ https://www.reddit.com/r/linux_gaming/comments/15qsshe/gamescope_flatpak_runtime_is_end_of_life_but_the/ Mangohud and gamescope: seems not on discover shop, but can be manually installed
https://github.com/flightlessmango/MangoHud#flatpak enable for steam
- https://www.acgfate.com/gc553-linux/
- https://blog.mmf.moe/post/gc553-setup-multiplatform/
- https://disp.cc/b/PC_Shopping/g5KH
- mpv-player/mpv#9595
- https://unix.stackexchange.com/questions/560545/problem-with-audio-stuttering-choppy-in-every-single-distribution-ive-used
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so mpv --demuxer-lavf-o=video_size=1920x1080,framerate=60 av://v4l2:/dev/video0 --profile=low-latency --untimed
mpv: only works with video
OBS: Works fine with low latency, not sure which ones did the trick
- Pass LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so
- Follow https://wiki.archlinux.org/title/PulseAudio/Troubleshooting#Setting_the_default_fragment_number_and_buffer_size_in_PulseAudio
- Update /etc/pulse/default.pa with
load-module module-udev-detect tsched=0
- Update /etc/pulse/client.conf with
default-fragments = 3 default-fragment-size-msec = 5
- Update /etc/pulse/default.pa with
- https://unix.stackexchange.com/questions/560545/problem-with-audio-stuttering-choppy-in-every-single-distribution-ive-used
sudo cp /usr/share/pipewire/pipewire.conf /etc/pipewire/
- Edit
/etc/pipewire/pipewire.conf
to enable: (2023/09/27 update: this affects audio quality, reverted)default.clock.rate = 19200 default.clock.quantum = 512 default.clock.min-quantum = 32 default.clock.max-quantum = 4096
- Restart audio
Observed slow write speed (~10MB/s) when trying to copy Steam games from backup USB external SSD (ext4 nonencrypted).
https://forum.manjaro.org/t/btrfs-slow-read-write-speed-on-nvme/118249/11 https://www.reddit.com/r/btrfs/comments/r04i0l/ideal_mount_options_for_ssd/
sudo systemctl enable fstrim.timer
?- Disable CoW for steam common folder seems helped a bit http://www.infotinks.com/btrfs-disabling-cow-file-directory-nodatacow/
https://www.reddit.com/r/btrfs/comments/112ucfg/very_slow_drive_after_adding_millions_of_files/
manually defrag home subvol
sudo btrfs filesystem defragment -vrf /home
https://forum.manjaro.org/t/slow-writes-with-btrfs-luks-nvme-ssd/145868
but doesn't seem like mount is wrong
https://bbs.archlinux.org/viewtopic.php?id=280471
sudo cryptsetup status system
# no discards
sudo cryptsetup refresh --allow-discards /dev/mapper/system
Still no fixed
Maybe related? https://unix.stackexchange.com/questions/341442/luks-discard-trim-conflicting-kernel-command-line-options
Not sure which one successfully added discrads flag to lukc
sudo cryptsetup --allow-discards --persistent refresh system
- Add
rd.luks.options=discard
to/etc/kernel/cmdline
- Set
/etc/crypttab.initramfs
withsystem /dev/disk/by-partlabel/cryptsystem none timeout=180,rd.luks.options=discard
2 and 3 require mkinitptio rebuild
still no performance improvement
https://forum.manjaro.org/t/slow-writes-with-btrfs-luks-nvme-ssd/145868
https://www.reddit.com/r/linux/comments/15wyukc/the_real_performance_impact_of_using_luks_disk/ https://wiki.archlinux.org/title/Dm-crypt/Specialties#Disable_workqueue_for_increased_solid_state_drive_(SSD)_performance
sudo fstrim -v /
sudo fstrim -v /home
cryptsetup --perf-no_read_workqueue --perf-no_write_workqueue --allow-discrads --persistent
Still no change in general, will continue to monitor and see if it has any real impact other than copying large game files.
0925 update: tested other drive and looked fine, so it's probably just the external SSD is bad.
- Manual maintain tips:
- Check mounted options:
findmnt
(note: autodefrag is already the default) sudo btrfs filesystem defragment -vrf /home
,sudo fstrim -v /home
- https://www.thegeekdiary.com/how-to-check-btrfs-filesystem-usage-and-perform-balancing/
- Check mounted options:
Baloo takes many CPUs https://askubuntu.com/questions/1068788/is-it-safe-to-disable-baloo-file-extractor-in-kde-plasma-5
- Controller not detected: disable steam input
- Having a second "OpenGL Rendering" window, cannot be closed and Steam won't consider the game is stopped
ps aux | grep MonsterHunterRise
andkill -9
all process manually- Caused by running reframework, probably because I copied some configs from Windows
- IME works fine without reframework
Current /etc/environment
config
MOZ_ENABLE_WAYLAND=1
XMODIFIERS=@im=fcitx
To enable Firefox Wayland support and be able to use fticx in Line (and I assume all apps rendering on Xorg!?)
pacman -S vscode
Installed Code - OSS
instead.
Tried to sync settings, but it failed to download certain extensions. This is because OSS cannot use Marketplace from Microsoft. https://stackoverflow.com/questions/74524907/why-cant-i-search-for-vs-code-extensions
Possible workaround https://stackoverflow.com/questions/64463768/cant-find-certain-extensions-in-code-ossopen-source-variant-of-visual-studio-c
Maybe it's time to rebuilt VS code config
Basic https://github.com/mbnuqw/sidebery/wiki/Firefox-Styles-Snippets-(via-userChrome.css)
Styles in this page doesn't work for me, though.
For flatkap Firefox, profiles are under /home/user/.var/app/org.mozilla.firefox/.mozilla/firefox
(the one showed on UI is wrong)
https://www.reddit.com/r/FirefoxCSS/comments/wgwxgk/userchromecss_on_steam_deck_firefox_flatpack/
Also used the script in thread disable native tab (Using Sidebery now)
Need to install vulkan drivers https://wiki.archlinux.org/title/Vulkan#Selecting_Vulkan_driver vulkan-icd-loader and vulkan-radeon
gamescope -w 1280 -h 720 -e -- /var/lib/flatpak/exports/bin/com.valvesoftware.Steam -steamos -gamepadui
Can't really run any game, though. And have to rely on system gamescope
can do a simple test with glxgears
Based on this article, it's not possible to run "Game mode UI" under Wayland Plasma session and launch games within the same gamescope window
flathub/com.valvesoftware.Steam.Utility.gamescope#7
Flatpak gamescope won't work with official Proton or ProtonGE. Need to use flatpak build.
Tested and it seems flatpak ProtonGE build doesn't work with wmv/wma fixes, probably can't really be used. Seems also not really possible to use system gamescope?
URL: https://web.archive.org/web/2000/https://mirrors.kernel.org/gentoo/distfiles/arial32.exe
Downloaded: ab830b501128ed56cb86fbf200e96201883319d6f92c39932ab75ecf6117a95d
Expected: 85297a4d146e9c87ac6f74822734bdee5f4b2a722d7eaa584b7f2cbf76f478f6
Install would fail
Need to manually patch winetricks used in flatpak Lutris with this branch. Use which winetricks in Lutris's Bash terminal (from Wine icon menu) to find out where winetricks is installed, for me it is ~/.var/app/net.lutris.Lutris/data/lutris/runtime/winetricks/winetricks
https://wiki.archlinux.org/title/steam
lib32-vulkan-radeon mesa, lib32-mesa ttf-liberation
mangoapp: symbol lookup error: mangoapp: undefined symbol: glfwGetX11Window
uninstall glfw-wayland
and install glfw-x11
(mangoapp doesn't work due to glfw-x11 dependency but Steam performance overlay doesn't rely on it, so it's fine)
- Set folders under common to read-only
- Luanch steam with
-noverifyfiles
- Do the following each game at one time
- Change game comapatibility
- When triggering re-install, it should only redownload preshader cache and failed when downloading game content
- Change folder permission back to r/w
- Download should finish immediately after retry
REf: https://steamcommunity.com/app/1675200/discussions/1/5568165891215726482/?l=tchinese https://www.reddit.com/r/Steam/comments/t8evi4/i_got_the_steam_deck_ui_on_my_pc/
Run with -steamdeck -gamepadui
only once, to bypass prompts for steam deck initial setup.
Make a script to launch Steam deck ui in gamescope:
#!/bin/sh
set -v
# This option would break mongohud in Stem and games
#export STEAM_USE_MANGOAPP=1
#export QT_IM_MODULE=steam
#export GTK_IM_MODULE=Steam
gamescope -H 1080 -e -F fsr &
gamescope_pid="$!"
sleep 5
export DISPLAY=:2
export GAMESCOPE_WAYLAND_DISPLAY="gamescope-0"
# Found steam would run mangoapp on its own so this is not needed
#mangoapp &
#mangoapp_pid="$!"
#sleep 5
steam -steamos3 -steampal -steamdeck -gamepadui
kill -9 $gamescope_pid
#wakill -9 $mangoapp_pid
Performance toggle and fps limiter work (I suppose mangohud integration is working). Input doesn't work (both onscreen and keyboard), can't type in MHR as of now.
https://unix.stackexchange.com/a/3111/109803 https://superuser.com/a/1638317/446027
fuser -mv /path/to/mountpoint
to find who is accessing disksudisksctl power-off -b /dev/sdb
power off external disks
Create a new btrfs subvolume for vm disks storage
sudo mount -t btrfs LABEL=system /mnt/disk
sudo btrfs subvolume create /mnt/disk/@vmdisks
sudo umount /mnt/disk
planning to add nodatacow
mount option to deal with
sudo mount -t btrfs -o defaults,x-mount.mkdir,nodatacow,compress=zstd,ssd,noatime,subvol=@vmdisks LABEL=system /vmdisks
https://www.reddit.com/r/btrfs/comments/p1xa0u/terrible_vm_performance_even_with_mitigations/
However the mount option doesn't work, findmnt
doesn't reflect this value. It could be because the mount is under @root
subvolume which has CoW enabled.
Solution: set chtttr +C /vmdisks/
https://blog.gtwang.org/linux/how-to-make-file-immutable-on-linux-chattr-command/
make a file and verify the new file has C
flag (CoW disabled):
$ lsattr /vmdisks/
---------------C------ /vmdisks/test.txt
2024/01/25: Guess I am not supposed to mount it with compressed support as it's not compatible with nocow files https://superuser.com/questions/858219/btrfs-filesystem-compression-and-copy-on-write However nodatacow still doesn't work and still require chattr to set the folder
Learning: https://blog.51cto.com/changfei/1672147
Basic guide: https://ivonblog.com/posts/archlinux-qemu-virt-manager/
iptables
and iptables-nft
would conflict, choose the later, as it's the newer package
Create disk manually with dynamic allocating: see my old note: https://gist.github.com/fsworld009/5f0ff0c5541079c4d28bdbc692fc15cf#kvm--virtmanager-to-install-windoes-10-with-oem-key
- Download Win10 image from Microsoft and mount it as CD-ROM
- Remove all ADs after installtion https://gist.github.com/fsworld009/5f0ff0c5541079c4d28bdbc692fc15cf#kvm--virtmanager-to-install-windoes-10-with-oem-key
- Cannot activate key 0x80072F8F -> check internet connection & sync system time https://www.youtube.com/watch?v=KUhkeCdwUfU
- Auto adjust resolution, sharing clipboard, files: https://forum.manjaro.org/t/how-to-setting-up-shared-folders-auto-resize-vm-and-clipboard-share-with-virt-manger/127490
- 2024/04/03: Found the existing folder share is broken, followed https://www.debugpoint.com/kvm-share-folder-windows-guest/ to reinstall
- Difference is to download and install full virtio-guest-tools on guest instead of just copying drivers from iso
- Create sc service with
start= auto
to preserve it after rebootsc.exe create VirtioFsSvc binpath="C:\virtiofs\w10\amd64\virtiofs.exe" DisplayName="Virtio FS Service" start= auto
- Ref: https://forum.manjaro.org/t/how-to-setting-up-shared-folders-auto-resize-vm-and-clipboard-share-with-virt-manger/127490
- 2024/04/03: Found the existing folder share is broken, followed https://www.debugpoint.com/kvm-share-folder-windows-guest/ to reinstall
- IME: Get Chinese Phonetic IME (舊注音) https://mikabook.co/windows-10-%E6%96%B0%E5%A2%9E%E3%84%85%E5%8D%8A%E6%B3%A8%E9%9F%B3%E8%BC%B8%E5%85%A5%E6%B3%95-2%E5%88%86%E9%90%98%E8%BC%95%E9%AC%86%E5%AE%8C%E6%88%90/
- Need to turn on
Capability mode
from Bopomofo IME settings https://cchess.pixnet.net/blog/post/43541171
- Need to turn on
- IME: JP: Use Google JP IME
- https://www.reddit.com/r/VFIO/comments/erys86/hibernating_a_vm_with_devices_passed_through/
- https://stackoverflow.com/questions/35413360/how-to-enable-sleep-option-in-windows-10-power-menu-under-ubunto-host-kvm
- https://www.ionos.com/digitalguide/server/configuration/windows-11-hibernate-mode/
- https://www.reddit.com/r/VFIO/comments/ivea5u/suspend_or_hibernate_windows10/
2024/01/25 What i have tried so far
<suspend-to-disk enabled='yes'/>
powercfg.exe /hibernate on
Enable Hibernate menu in Power options
Hibernate would success and shutdown, but upon reboot the state is not restored.
Attempt 2: Installed virtio driver (which includes QEMU guest agant), then add this new channel
<channel type="unix">
<source mode="bind" path="/run/libvirt/qemu/channel/19-win10pro/org.qemu.guest_agent.0"/>
<target type="virtio" name="org.qemu.guest_agent.0" state="connected"/>
<alias name="channel1"/>
<address type="virtio-serial" controller="0" bus="0" port="2"/>
</channel>
sudo virsh dompmsuspend win10pro disk
would work, but it is just for triggering hibernate from host, it is still cannot be resumed.
Redo shell env configs. Seems most of the stuffs I want is already done by Starship
Created https://github.com/fsworld009/dotfiles to collect new configs & remove unused configs from previous repo.
Start to build Code OSS from scrach as well.
Note for Settings Sync: Ctrl+Shift+P -> Sync: Advanced options -> Sync: Edit Local Settings
Edit:
- ignoreUploadFiles -> add clipboard.history.json
- ignoreUploadFolders -> add History, globalStorage
To avoid uploading unnecessary data to gist.
sudo btrfs subvolume snapshot -r / /.snapshots/2023-10-07
For recovery use rsync or cp like external backups, see https://linuxhint.com/use-btrfs-snapshots/
Found RetroFighter bladeGC receiver is connected to Linux as Switch Pro controller mode and cannot change it. When plugged in Steam deck it is in XInput mode, so it should support linux. Not sure if I need to change OS Name manually for the receiver to recongnize it.
All emus can be found on flatpak
- PPSSP: seems ok, no auto save/load feature though
- Dolphin: no auto save/load feature https://github.com/stenzek/duckstation/releases/tag/latest
- Duckstation: rolling release could be found from github
- PCSX2: need to manually install https://github.com/flathub/net.pcsx2.PCSX2
- Xenia: only has windows version
- BizHalk: also only has windows version
- melonDS: does not support chaging binding for load/save state melonDS-emu/melonDS#1183, and default is Shift+F1 which will be inconvenient on steamdeck
Re-installed glfw-x11 and copied mangoapp related settings from https://gist.github.com/DoomedSouls/e4015dffc08963a57c6adf3066f5a486
#!/bin/sh
set -v
## This option would break mongohud in Stem and games
# Enable Mangoapp
export STEAM_USE_MANGOAPP=1
export MANGOHUD_CONFIGFILE=/usr/share/doc/mangohud/MangoHud.conf
#https://gist.github.com/DoomedSouls/e4015dffc08963a57c6adf3066f5a486
# Enable support for xwayland isolation per-game in Steam
export STEAM_MULTIPLE_XWAYLANDS=1
# We have the Mesa integration for the fifo-based dynamic fps-limiter
export STEAM_GAMESCOPE_DYNAMIC_FPSLIMITER=1
# Don't wait for buffers to idle on the client side before sending them to gamescope
export vk_xwayland_wait_ready=false
# Scaling support
export STEAM_GAMESCOPE_FANCY_SCALING_SUPPORT=1
# Support for gamescope tearing with GAMESCOPE_ALLOW_TEARING atom
export STEAM_GAMESCOPE_HAS_TEARING_SUPPORT=1
# Enable tearing controls in steam
export STEAM_GAMESCOPE_TEARING_SUPPORTED=1
# We no longer need to set GAMESCOPE_EXTERNAL_OVERLAY from steam, mangoapp now does it itself
export STEAM_DISABLE_MANGOAPP_ATOM_WORKAROUND=1
# Enable horizontal mangoapp bar
export STEAM_MANGOAPP_HORIZONTAL_SUPPORTED=1
# Set input method modules for Qt/GTK that will show the Steam keyboard
export QT_IM_MODULE=steam
export GTK_IM_MODULE=Steam
# Initially write no_display to our config file
# so we don't get mangoapp showing up before Steam initializes
# on OOBE and stuff.
mkdir -p "$(dirname "$MANGOHUD_CONFIGFILE")"
echo "no_display" > "$MANGOHUD_CONFIGFILE"
gamescope -H 1080 -e -F fsr \
--xwayland-count 2 \
-O DP-1,DP-3,*,eDP-1 \
--default-touch-mode 4 \
--immediate-flips \
--adaptive-sync &
gamescope_pid="$!"
sleep 5
export DISPLAY=:2
export GAMESCOPE_WAYLAND_DISPLAY="gamescope-0"
# If we have mangoapp binary start it
if command -v mangoapp > /dev/null; then
mangoapp > "${HOME}"/.mangoapp-stdout.log 2>&1 &
fi
mangoapp_pid="$!"
steam -steamos3 -steampal -steamdeck -gamepadui
kill -9 $mangoapp_pid
Not sure which option did the effect, but now the scaling slider in Steam UI work (so FSR to a 720p on 1080p gamescope screen is now possible)
Because this runs on user instead of root, we need to sudo chmod o+w /usr/share/doc/mangohud/MangoHud.conf
for mangoapp to work (steam will write configs on UI to this file).
Benefit of using mangoapp:
- Will work for all games
- HUD display resolution is based on gamescope screen instead of in-game resolution.
- For example when running a 720p game in a 1080p gamescope screen, the HUD will be smaller / consised.
pacman -Syu
results many renames. This is for upcoming KDE Plasma 6 release https://forum.garudalinux.org/t/looks-like-my-packages-respositories-are-changed-is-this-normal/31248/6
upgrades went fine.
Found global shortcuts like Meta+F8 doesn't work, asked in https://www.reddit.com/r/kde/comments/173ktgm/most_shortcuts_includting_altf4_stopped_working/?sort=new
but turns out it is just keyboard issue. Did learned a bit about kwin, kglobalaccel, and dbus in the process
during the research process I saw this article mentioned a bad shortkey config file may cause global shortcuts stopped working: https://pay.reddit.com/r/kde/comments/16mmacx/some_shortcuts_with_meta_key_dont_works/
I also observed that on my Steamdeck (Runs KDE Plasma on X11 in Desktop mode), it is kglobalaccel
that registers org.kde.kglobalaccel
on dbus instead of kwin:
(deck@steamdeck ~)$ qdbus org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID org.kde.kglobalaccel
3039
(deck@steamdeck ~)$ ps aux | grep 3039
deck 3039 0.0 0.1 229928 26528 ? Ssl 15:16 0:00 /usr/bin/kglobalaccel5
deck 7142 0.0 0.0 6564 2460 pts/1 S+ 16:01 0:00 grep --color=auto 3039
(deck@steamdeck ~)$ systemctl status --user plasma-kglobalaccel.service
● plasma-kglobalaccel.service - KDE Global Shortcuts Server
Loaded: loaded (/usr/lib/systemd/user/plasma-kglobalaccel.service; static)
Active: active (running) since Mon 2023-10-09 15:16:29 CST; 46min ago
Main PID: 3039 (kglobalaccel5)
Tasks: 3 (limit: 17686)
Memory: 4.7M
CPU: 197ms
CGroup: /user.slice/user-1000.slice/[email protected]/background.slice/plasma-kglobalaccel.service
└─3039 /usr/bin/kglobalaccel5
Oct 09 15:16:29 steamdeck systemd[1116]: Starting KDE Global Shortcuts Server...
Oct 09 15:16:29 steamdeck systemd[1116]: Started KDE Global Shortcuts Server.
And I actually cannot start kglobalaccell service manually in Arch Linux
❯ systemctl --user status plasma-kglobalaccel.service
○ plasma-kglobalaccel.service - KDE Global Shortcuts Server
Loaded: loaded (/usr/lib/systemd/user/plasma-kglobalaccel.service; static)
Active: inactive (dead)
❯ systemctl --user start plasma-kglobalaccel.service
Job for plasma-kglobalaccel.service failed because the control process exited with error code.
See "systemctl --user status plasma-kglobalaccel.service" and "journalctl --user -xeu plasma-kglobalaccel.service" for details.
❯ systemctl status --user plasma-kglobalaccel.service
× plasma-kglobalaccel.service - KDE Global Shortcuts Server
Loaded: loaded (/usr/lib/systemd/user/plasma-kglobalaccel.service; static)
Active: failed (Result: exit-code) since Mon 2023-10-09 15:09:13 CST; 52min ago
Duration: 1.929s
Main PID: 4772 (code=exited, status=1/FAILURE)
CPU: 19ms
Oct 09 15:09:11 fsworld009-archlinux systemd[1237]: Starting KDE Global Shortcuts Server...
Oct 09 15:09:11 fsworld009-archlinux systemd[1237]: Started KDE Global Shortcuts Server.
Oct 09 15:09:13 fsworld009-archlinux kglobalaccel5[4772]: kf.dbusaddons: Couldn't register name 'org.kde.kglobalaccel' with DBUS - another process owns it already!
Oct 09 15:09:13 fsworld009-archlinux systemd[1237]: plasma-kglobalaccel.service: Main process exited, code=exited, status=1/FAILURE
Oct 09 15:09:13 fsworld009-archlinux systemd[1237]: plasma-kglobalaccel.service: Failed with result 'exit-code'.
Steamdeck version info at the time of this writing
Operating System: SteamOS 3.4.11
KDE Plasma Version: 5.26.1
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Kernel Version: 5.13.0-valve37-1-neptune (64-bit)
Graphics Platform: X11
Processors: 8 × AMD Custom APU 0405
Memory: 14.5 GiB of RAM
Graphics Processor: AMD Custom GPU 0405
Manufacturer: Valve
Product Name: Jupiter
System Version: 1
Turns out steam utalizes ibus IMEs:
(deck@steamdeck ~)$ sudo pacman -Q | grep ibus
ibus 1.5.27-1
ibus-anthy 1.5.14-4
ibus-hangul 1.5.4-3
ibus-pinyin 1.5.0-8
ibus-table 1.16.12-1
ibus-table-cangjie-lite 1.8.8-2
libibus 1.5.27-1
libusb 1.0.26-1
libusbmuxd 2.0.2-1
Install desired IMEs (anthy for JPN and pinyin for CHT), then add these to gamescope launch script:
# Set input method modules for Qt/GTK that will show the Steam keyboard
export QT_IM_MODULE=steam
export GTK_IM_MODULE=Steam
ibus-daemon -d -r --panel=disable --emoji-extension=disable
It's now working in Steam UI and in game too. However, keyboard only works for English. This is probably expected considering IME is now steam
instead of fticx
.
updated script:
#!/bin/sh
set -v
## This option would break mongohud in Stem and games
# Enable Mangoapp
export STEAM_USE_MANGOAPP=1
export MANGOHUD_CONFIGFILE=/usr/share/doc/mangohud/MangoHud.conf
#https://gist.github.com/DoomedSouls/e4015dffc08963a57c6adf3066f5a486
# Enable support for xwayland isolation per-game in Steam
export STEAM_MULTIPLE_XWAYLANDS=1
# We have the Mesa integration for the fifo-based dynamic fps-limiter
export STEAM_GAMESCOPE_DYNAMIC_FPSLIMITER=1
# Don't wait for buffers to idle on the client side before sending them to gamescope
export vk_xwayland_wait_ready=false
# Scaling support
export STEAM_GAMESCOPE_FANCY_SCALING_SUPPORT=1
# Support for gamescope tearing with GAMESCOPE_ALLOW_TEARING atom
export STEAM_GAMESCOPE_HAS_TEARING_SUPPORT=1
# Enable tearing controls in steam
export STEAM_GAMESCOPE_TEARING_SUPPORTED=1
# We no longer need to set GAMESCOPE_EXTERNAL_OVERLAY from steam, mangoapp now does it itself
export STEAM_DISABLE_MANGOAPP_ATOM_WORKAROUND=1
# Enable horizontal mangoapp bar
export STEAM_MANGOAPP_HORIZONTAL_SUPPORTED=1
# Set input method modules for Qt/GTK that will show the Steam keyboard
export QT_IM_MODULE=steam
export GTK_IM_MODULE=Steam
# Initially write no_display to our config file
# so we don't get mangoapp showing up before Steam initializes
# on OOBE and stuff.
mkdir -p "$(dirname "$MANGOHUD_CONFIGFILE")"
echo "no_display" > "$MANGOHUD_CONFIGFILE"
# Input method support if present
if command -v /usr/bin/ibus-daemon > /dev/null; then
/usr/bin/ibus-daemon -d -r --panel=disable --emoji-extension=disable
fi
gamescope -H 1080 -e \
--xwayland-count 2 \
--default-touch-mode 4 \
--immediate-flips &
gamescope_pid="$!"
sleep 5
export DISPLAY=:2
export GAMESCOPE_WAYLAND_DISPLAY="gamescope-0"
# If we have mangoapp binary start it
if command -v mangoapp > /dev/null; then
mangoapp > "${HOME}"/.mangoapp-stdout.log 2>&1 &
mangoapp_pid="$!"
fi
steam -steamos3 -steampal -steamdeck -gamepadui
kill -9 $mangoapp_pid
pkill -9 -f ibus-daemon
When the USB dongle is plugged in Arch Linux, it is recongnized as Switch Pro controller instead of XInput device, and Steam cannot recongnize it.
However, when pluging into Steam deck in game mode, or in desktop mode while Steam is open, it will be a Xinput device.
lsusb
shows that VID and PID are different so it's not a driver issue
Bus 001 Device 018: ID 057e:2009 Nintendo Co., Ltd Switch Pro Controller
Bus 007 Device 019: ID 045e:028e Microsoft Corp. Xbox360 Controller
Current workaround: get a USB female to two USB male adapter (one for data+power and one for additional power), connect data to SteamDeck and power to somewhere (can be Arch Linux PC), once it is powered on as Xinput device, unplug data from SteamDeck, leaving power cable open (hence it's still powered on while disconnected from devices), then plug it into Arch Linux PC.
Need to figure out what triggers the dongle to enter XInput mode when plugged into the Steamdeck
Update steam gamescope script: Auto assign DISPLAY and GAME_SCOPE_WAYLAND_DISPLAY, add mouse cursor (although mouse still don't work in steam menu)
#!/bin/sh
set -v
## This option would break mongohud in Stem and games
# Enable Mangoapp
export STEAM_USE_MANGOAPP=1
export MANGOHUD_CONFIGFILE=$(mktemp /tmp/mangohud.XXXXXXXX)
#https://gist.github.com/DoomedSouls/e4015dffc08963a57c6adf3066f5a486
# Enable support for xwayland isolation per-game in Steam
export STEAM_MULTIPLE_XWAYLANDS=1
# We have the Mesa integration for the fifo-based dynamic fps-limiter
export STEAM_GAMESCOPE_DYNAMIC_FPSLIMITER=1
# Don't wait for buffers to idle on the client side before sending them to gamescope
export vk_xwayland_wait_ready=false
# Scaling support
export STEAM_GAMESCOPE_FANCY_SCALING_SUPPORT=1
# Support for gamescope tearing with GAMESCOPE_ALLOW_TEARING atom
export STEAM_GAMESCOPE_HAS_TEARING_SUPPORT=1
# Enable tearing controls in steam
export STEAM_GAMESCOPE_TEARING_SUPPORTED=1
# We no longer need to set GAMESCOPE_EXTERNAL_OVERLAY from steam, mangoapp now does it itself
export STEAM_DISABLE_MANGOAPP_ATOM_WORKAROUND=1
# Enable horizontal mangoapp bar
export STEAM_MANGOAPP_HORIZONTAL_SUPPORTED=1
# Set input method modules for Qt/GTK that will show the Steam keyboard
export QT_IM_MODULE=steam
export GTK_IM_MODULE=Steam
# Create run directory file for startup and stats sockets
# shellcheck disable=SC2030 # (broken warning)
tmpdir="$([[ -n ${XDG_RUNTIME_DIR+x} ]] && mktemp -p "$XDG_RUNTIME_DIR" -d -t gamescope.XXXXXXX)"
socket="${tmpdir:+$tmpdir/startup.socket}"
stats="${tmpdir:+$tmpdir/stats.pipe}"
# Fail early if we don't have a proper runtime directory setup
# shellcheck disable=SC2031 # (broken warning)
if [[ -z $tmpdir || -z ${XDG_RUNTIME_DIR+x} ]]; then
echo >&2 "!! Failed to find run directory in which to create stats session sockets (is \$XDG_RUNTIME_DIR set?)"
exit 0
fi
export GAMESCOPE_STATS="$stats"
mkfifo -- "$stats"
mkfifo -- "$socket"
# Initially write no_display to our config file
# so we don't get mangoapp showing up before Steam initializes
# on OOBE and stuff.
mkdir -p "$(dirname "$MANGOHUD_CONFIGFILE")"
echo "no_display" > "$MANGOHUD_CONFIGFILE"
# Input method support if present
if command -v ibus-daemon > /dev/null; then
ibus-daemon -d -r --panel=disable --emoji-extension=disable
fi
gamescope -H 1080 -e \
--xwayland-count 2 \
--cursor-hotspot 5,3 \
--cursor "$HOME/.local/share/Steam/tenfoot/resource/images/cursors/arrow.png" \
--default-touch-mode 4 \
-R "$socket" -T "$stats" \
--immediate-flips > "${HOME}"/.gamescope-stdout.log 2>&1 &
gamescope_pid="$!"
if read -r -t 3 response_x_display response_wl_display <> "$socket"; then
export DISPLAY="$response_x_display"
export GAMESCOPE_WAYLAND_DISPLAY="$response_wl_display"
# We're done!
else
echo "failed to get DISPLAY and GAMESCOPE_WAYLAND_DISPLAY"
kill -9 "$gamescope_pid"
exit 0
fi
# If we have mangoapp binary start it
if command -v mangoapp > /dev/null; then
mangoapp > "${HOME}"/.mangoapp-stdout.log 2>&1 &
mangoapp_pid="$!"
fi
steam -steamos3 -steampal -steamdeck -gamepadui > "${HOME}"/.steam-stdout.log 2>&1
kill -9 $mangoapp_pid
pkill -9 -f ibus-daemon
Don't set GTK_IM_MODULE & QT_IM_MODULE & SDL_IM_MODULE in /etc/environment
, forgot why I added them.
https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland#KDE_Plasma
- Audio capture https://github.com/dimtpap/obs-pipewire-audio-capture
- Add application source -> need to manually type game exe name (Can check in pipewire UI)
- Maybe try virtual audio source next time https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Virtual-devices
- Game capture https://github.com/nowrep/obs-vkcapture
- Follow instruction for flatpak plugin
- For native games install
obs-vkcapture
from AURsudo aura -A obs-vkcapture
- This installs obs-studio in native, though.
- pass
OBS_VKCAPTURE=1
when launching gamescope & steam to make all game windows available to be captured.
If the title displayed on Pipewire UI isn't app name, for example:
- Holocure: "Audio stream #1"
- Sonic Adventure DX: "sonic"
While audio is playing, use pw-dump > ~/pw-dump.log
, then open the text file
Find the string in the log to lookup application name, for example:
"application.process.binary": "wine64-preloader",
"application.process.host": "fsworld009-fw16",
"application.process.id": 235394,
"application.process.machine-id": "383c37d990f5464696d9d10eb6507ad9",
"application.process.session-id": 2,
"application.process.user": "fsworld009",
"audio.adapt.follower": "",
"client.api": "pipewire-pulse",
"client.id": 311,
"clock.quantum-limit": 8192,
"factory.id": 6,
"factory.mode": "split",
"library.name": "audioconvert/libspa-audioconvert",
"media.class": "Stream/Output/Audio",
"adapt.follower.spa-node": "",
"application.language": "en_US.UTF-8",
"application.name": " sonic",
"application.process.binary": "wine-preloader",
"application.process.host": "fsworld009-fw16",
"application.process.id": 233868,
"application.process.machine-id": "383c37d990f5464696d9d10eb6507ad9",
"application.process.session-id": 2,
"application.process.user": "fsworld009",
So we could get that binary name is wine-preloader
and wine64-preloader
respectively.
PCSX2 crashes when using Vulkan, fallback to OpenGL for now. Possible reason is AMD APU? https://forums.pcsx2.net/Thread-Lots-of-Games-Crashed-on-Vulkan
OBS: Minimize sound delay on capture cards
/etc/pipewire/pipewire.conf
default.clock.quantum = 96
default.clock.min-quantum = 96
default.clock.max-quantum = 96
Restart pipewire.
quantum = buffer size. Need to observe if this affects other usages.
10/28 update: 128 seems work well.
Use https://aur.archlinux.org/obs-studio-git.git
aura -A obs-studio-git
(or `yay -S obs-studio-git) once so that all dependencies are installed- Clone the package repo
- modify PKGBUILD
source=("$pkgname::git+https://github.com/fsworld009/obs-studio#branch=projector-patches
- run
makepkg -s
to build package - run
sudo pacman -U obs-studio-git-30.0.0.rc1-1-x86_64.pkg.tar.zst
to install local package- Run install again if it's replaced after package upgrades
Got this error
CMake Error at CMakeLists.txt:46 (project):
VERSION "20230815.projector.patches" format invalid.
So I rebased (no conflict), and retagged from 30.0.0-rc1.
Drag to move in frameless window doesn't work without passing xcb flag obs -platform xcb
Update 2024/02/12
Rebased projector-patches
from latest master and tried to rebuild, but got this error:
CMake Error at /usr/share/cmake/Modules/WriteBasicConfigVersionFile.cmake:43 (message):
No VERSION specified for WRITE_BASIC_CONFIG_VERSION_FILE()
Call Stack (most recent call first):
/usr/share/cmake/Modules/CMakePackageConfigHelpers.cmake:239 (write_basic_config_version_file)
cmake/Modules/ObsHelpers.cmake:269 (write_basic_package_version_file)
cmake/Modules/ObsHelpers_Linux.cmake:13 (_export_target)
libobs/cmake/legacy.cmake:502 (export_target)
cmake/Modules/ObsHelpers.cmake:473 (include)
libobs/CMakeLists.txt:3 (legacy_check)
Need to push latest tag to my repo
# In my local folder, `upstream` pointss to obs-studio/obs-studio repo and `origin` points to fsworld009/obs-studio
git fetch --tags upstream
git push origin 30.1.0-beta1
Also, patch pkgver() in PKBBUILD so that 30.1.0
is used as version number (currently the script would only detect 30.0.2 due to 30.1.0 tag has -beta1
in the end):
pkgver() {
cd "$pkgname"
_version="30.1.0-beta1"
_revision=$(git rev-list --count $_version..HEAD)
_hash=$(git rev-parse --short=7 HEAD)
printf '%s.r%s.g%s' "30.1.0" "${_revision:?}" "${_hash:?}"
}
Changed to Portable mode build
However, it still relies on dependencies from pacman to build & run
Hence, it's necessary to install obs-studio-git
first to get all build dependencies before doing portable build.
Plugins for Portable build:
- Plugins manually added to
~/.config/obs-studio/
will still work - For obs-vkcapture
- Build from source then move to
path/to/obs-studio-portable/obs-plugins/64bit/
- Manually copied from
/usr/lib/obs-plugins/linux-vkcapture.so
if you have AUR package installed - However for actual capturing you still need the following packages
- Build from source then move to
Useful env vars: OBS_VKCAPTURE_QUIET=0 VK_LOADER_DEBUG=all
Reinstall obs-studio-git:
Currently need to clone https://aur.archlinux.org/packages/ffnvcodec-headers-12-1 and manually update PKGBUILD
provides=("ffnvcodec-headers=${pkgver}")
Then makepkg -s
to build and sudo pacman -U ....tsz
to install this, then obs-studio-git install will succeed with
this dependency.
Thinking about using timeshift but it won't work with current btrfs subvolume mapping https://www.reddit.com/r/Fedora/comments/uopp33/timeshift_doesnt_let_me_select_btrfs_snapshot/
❯ sudo pacman -Syu
:: Synchronizing package databases...
core is up to date
extra is up to date
multilib is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing ki18n5 (5.111.0-1) breaks dependency 'ki18n' required by diskmonitor
:: installing kiconthemes5 (5.111.0-1) breaks dependency 'kiconthemes' required by diskmonitor
:: installing knotifications5 (5.111.0-1) breaks dependency 'knotifications' required by diskmonitor
:: installing kxmlgui5 (5.111.0-1) breaks dependency 'kxmlgui' required by diskmonitor
:: installing plasma-framework5 (5.111.0-1) breaks dependency 'plasma-framework' required by diskmonitor
Remove diskmonitor then reupgrade
maybe related topic: https://bbs.archlinux.org/viewtopic.php?id=289694
https://wiki.archlinux.org/title/security#Lock_out_user_after_three_failed_login_attempts deny = 5 unlock_time = 10
It could be
- client update
- Proton is installed after selecting capability one game
- I have run client gamepadui mode with steamos flag once
❯ sudo hdparm -Y /dev/sdb
/dev/sdb:
issuing sleep command
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
❯ udisksctl power-off -b /dev/sdb
Error powering off drive: Error opening /dev/sdb for fsync: Device or resource busy (udisks-error-quark, 0)
Workaround: put computer to sleep so disks are poered off, unplug it while it's in sleep
System won't boot, reason unknown (didn't do any system upgrade or package install)
Reverted system from previous snapshot and also fixed subvolume name (@root
-> @
) so I can use timeshift.
Snapshots are read-only subvolumes, so the idea of revert is to change to mount root as the backup subvolume on boot.
Prepare Arch linux live USB disk from another computer
# Unlock and mount root volume
cryptsetup open /dev/disk/by-partlabel/cryptsystem system
mount -t btrfs -o x-mount.mkdir LABEL=system /mnt
# Remove rw from snapshot and move to `/@`:
cd /mnt
btrfs property set -ts ./@snapshots/(snapshot-name) ro false
mv ./@snapshots/(snapshot-name) ./@
# List subvol ids and edit /etc/fstab to mount the new subvol and subvolid
btrfs subvolume list /mnt
For this revert specifically, because I changed subvol name I need to rebuild boot image to mount it:
mount -t btrfs -o defaults,x-mount.mkdir,compress=zstd,ssd,noatime,subvol=@root LABEL=system /mnt2
mount LABEL=EFI /mnt2/efi
arch-chroot /mnt2
mkinitcpio -p linux
exit
Ref: https://www.reddit.com/r/archlinux/comments/r17a8i/messed_up_my_build_need_to_restore_from_btrfs/
Although timeshift still didn't work with this partition.
Possible improvements:
- Should probably make a copy for revert instead of mv directly
- Maybe we should remove subvolid from fstab
- Fix virtual console on boot so it's possible to check boot log
According to https://wiki.archlinux.org/title/mkinitcpio#HOOKS I should have added sd-vconsole
to hooks, but that didn't fix it.
systemctl status systemd-vconsole-setup.service
systemd-vconsole-setup.service - Virtual Console Setup
Loaded: loaded (/usr/lib/systemd/system/systemd-vconsole-setup.service; static)
Active: active (exited) since Sat 2023-10-28 22:20:53 CST; 35s ago
Docs: man:systemd-vconsole-setup.service(8)
man:vconsole.conf(5)
Process: 1040 ExecStart=/usr/lib/systemd/systemd-vconsole-setup (code=exited, status=0/SUCCESS)
Main PID: 1040 (code=exited, status=0/SUCCESS)
CPU: 21ms
Oct 28 22:20:53 fsworld009-archlinux systemd[1]: Starting Virtual Console Setup...
Oct 28 22:20:53 fsworld009-archlinux systemd-vconsole-setup[1040]: KD_FONT_OP_GET failed while trying to get the font metadata: Invalid argument
Oct 28 22:20:53 fsworld009-archlinux systemd-vconsole-setup[1040]: Fonts will not be copied to remaining consoles
Oct 28 22:20:53 fsworld009-archlinux systemd[1]: Finished Virtual Console Setup.
Boot log: journalctl -xb
observed same output as the systend log
Related article about this bug: https://bbs.archlinuxcn.org/viewtopic.php?id=13563 https://forum.endeavouros.com/t/systemd-vconsole-setup-service-fails-on-boot/34134/5?page=2
None of the solution works at the time of writing.
security delete a fiile
recurrsiively delete all files in a folder
https://unix.stackexchange.com/a/27029
find /path/to/folder -type f -exec shred -zvu -n 5 {} \;
After system upgrades today, the Virtual Console setup failure error is gone, not sure what fixed it.
Here's the current /etc/mkinitcpio.conf
MODULES=(i915)
HOOKS=(base systemd plymouth modconf keyboard sd-vconsole block filesystems btrfs sd-encrypt resume fsck)
current `/etc/vconsole.conf
# This is the fallback vconsole configuration provided by systemd.
KEYMAP=us
#FONT=lat9w-16
Downgrade flatpak packages https://itsfoss.com/downgrade-flatpak-packages/
Spotify: fix blank rendering
flatpak --user update --commit=bb7db9a54eabf67432c600af7d942997f569570cc10ebe7e9caf50060749e234 com.spotify.Client
Note: not sure how user
or system
installation was determined, on my GPD Win4 it was installed via system so need sudo
without --user
flag.
Brave: Fix offset minimize/maximize/close button
sudo flatpak update --commit=21e5a1e980bfb25e329f69f39ce91e6c76ff5756e3969a35f3d90b8c65665cdf com.brave.Browser
- Unselect fcitx5 in Settings ->
Inp[ut Devices Virtual Keyboard
- Exit and uninstall flatpak fcitx5 and all IMEs
-
sudo pacman -S fcitx5-im fcitx5-mozc sudo aura -A fcitx5-mcbopomofo-git fcitx5
- Select fcitx5 again in
Settings -> Virtual Keyboard
- Run
fcitx5-configtool
or go to settings -> Regional Settings -> Input Method to configure fcitx5
Ref: https://ivonblog.com/posts/install-archlinux/ https://wiki.archlinux.org/title/Fcitx5#Configuration
Note: still don't set GTK_IM_MODULE or QT_IM_MODULE env var
https://www.reddit.com/r/kde/comments/ubk9ag/fonts_in_gtk_apps_are_very_blocky/
Install xdg-desktop-portal-gtk
and restart.
Note: this is not installed in my EndeavourOS setup but the font works well there
Moved to Framework 13 (AMD 7840U)
Need to re-add UEFI entry, use Arch live env disk
efibootmgr --create --disk /dev/nvme0n1 --part 1 --label "Arch Linux" --loader '\EFI\Linux\arch-linux.efi' --unicode
https://wiki.archlinux.org/title/Unified_kernel_image#Directly_from_UEFI
This is because by default UEFI looks for specific path in partition
EFI\boot\bootX64.efi
Seems like I could edit /etc/mkinitcpio.d/linux.preset
to change efi output location
default_uki="/efi/EFI/Linux/arch-linux.efi"
https://bbs.archlinux.org/viewtopic.php?id=290277
But upon on checking the UEFI Boot entry in my GPR WIN 4 setup
Boot0000* Linux Boot Manager HD(4,GPT,****)/File(\EFI\systemd\systemd-bootx64.efi)
I suppose it's a common practice to add boot entries to UEFI for Linux installations
Nuphy Air75 Fn key not working, soluition: https://www.reddit.com/r/MechanicalKeyboards/comments/tgjvp2/nuphy_air75_on_linux_issues_with_fn/
This only happens in Win mode, bluetooth connection for me.
Better pipewire configuration to reduce GC553 latency
default.clock.quantum = 512
default.clock.max-quantum = 512
Seems geting rid of random audio cracks compared to previous changes.
Based on other people's solution in store review page
rm -rf ~/.var/app/com.spotify.Client/cache/
https://fosskers.github.io/aura/aur.html
==> ERROR: A package has already been built. (use -f to overwrite)
add --force
plymouth-git
+ exec meson setup --prefix /usr --libexecdir lib --sbindir bin --buildtype plain --auto-features enabled --wrap-mode nodownload -D b_lto=true -D b_pie=true -D python.bytecompile=1 plymouth build -D logo=/usr/share/pixmaps/archlinux-logo.png -D background-color=0x000000 -D background-start-color-stop=0x000000 -D background-end-color-stop=0x4D4D4D
Directory already configured.
Just run your build command (e.g. ninja) and Meson will regenerate as necessary.
Run "meson setup --reconfigure to force Meson to regenerate.
If build failures persist, run "meson setup --wipe" to rebuild from scratch
using the same options as passed when configuring the build.
ERROR: Build data file '/var/cache/aura/vcs/plymouth-git/plymouth-git/src/build/meson-private/build.dat' references functions or classes that don't exist. This probably means that it was generated with an old version of meson. Consider reconfiguring the directory with "meson setup --reconfigure".
==> ERROR: A failure occurred in build().
Aborting...
aura >>= There was a makepkg failure.
aura >>= Would you like to continue anyway? [Y/n]
aura >>= Every package failed to build.
No solution yet
Use KDE Partition manager to create luks+btrfs
When first mounted in Dolphin, need to fix chown:
sudo chown fsworld009:fsworld009 /run/media/fsworld009/me/
Ref: https://forum.manjaro.org/t/unable-to-write-to-a-1tb-luks-encrypted-hdd-drive/113390
https://forum.manjaro.org/t/how-to-clone-btrfs/134143/9
I/O speed is kinda slow, even with a USB type C SSD.
sudo btrfs subvolume snapshot -r /home/ /.snapshots/home-bk
❯ sudo sudo btrfs send /.snapshots/home-bk | sudo btrfs receive /run/media/fsworld009/me/
At subvol /.snapshots/home-bk
At subvol home-bk
media/fsworld009/me took 1h27m18s
subvolume size was ~630GB.
I've decided to reinstall the system with EndeavourOS, so will not update this note anymore.
Future update to EndeavourOS or general Arch linux usage goes to https://gist.github.com/fsworld009/0a7240c4eab9254aca3f7a334acc1aa9