Skip to content

Instantly share code, notes, and snippets.

@fsworld009
Last active December 10, 2024 09:30
Show Gist options
  • Save fsworld009/0a7240c4eab9254aca3f7a334acc1aa9 to your computer and use it in GitHub Desktop.
Save fsworld009/0a7240c4eab9254aca3f7a334acc1aa9 to your computer and use it in GitHub Desktop.
EndeavourOS installation diary

EndeavourOS installation notes

God a used GPD Win 4 Pro with 2TB drive, so decided to install EndeavourOS and game on it since I don't like Windows 11.

2023/12/31: Decided to install EndeavourOS on my Framework 13 as well, keeping the notes in the same doc

2023/10/23

GPD Win 4: Del to bios, make sure secure boot is off. F7 to access boot menu

By default it creates a 300GB partition for Windows and the most of the rest as D:, we will replace D: with Linux.

  1. Download ISO from website. Use flatpak ISO Image Writer to create bootable USB
  2. Boot into live env
  3. Need to patch file https://forum.endeavouros.com/t/replace-partition-with-endeavouros-on-btrfs-along-side-windows-10-dual-boot/29387 so that we can install system with btrfs partition
  4. Open installer, choose "Replace a partition", choose the D: partition, the file system should now be btrfs
  5. Check Encrypt system checkbox (forgot the exact text) so that luks is enabled.

Post installation:

Switch to Wayland https://forum.endeavouros.com/t/how-to-switch-to-wayland-in-kde-plasma/21957

2023/10/24

Get Steam working, based on my previous notes https://gist.github.com/fsworld009/cb9a402ede96fa6087a2562d987e82be

  1. Enable bluetooth https://forum.endeavouros.com/t/bluetooth-works-in-live-usb-but-not-after-installation/46700/3
  2. Enable flatpak and discover store https://flatpak.org/setup/EndeavourOS
    1. Install lutris and proton-qt
  3. Install fticx5 and IMEs via flatpak
  4. Steam: Install steam, gamescope, mangohud, ibus, ibus-pinyin, ibus-anthy
    1. multilib is already enabled
    2. Tested on desktop mode, works fine except I couldn't get local network game trasfer working
    3. My own gamescope launch script from https://gist.github.com/fsworld009/cb9a402ede96fa6087a2562d987e82be also works fine
  5. Steam Gamemode https://aur.archlinux.org/packages/gamescope-session-steam-git
    1. Steam gamesope session would appear in sddm (there will be two options, the first one should work)
    2. Sometimes game controller isn't detected in game, need to flip mouse/controller switch to reconnect it.

TODO:

  1. Set power button to sleep
  2. Look into battery setting: right now one Holocure game burns out ~60% battery

2023/10/28

Screen resolution under KDE

Anything not 1080p breaks the screen, fix to 1080p with 150% scale for now. Konsole: change font to 14px

Steam Gamemode issues

  1. Cannot adjust brightness
  2. Cannot adjust TDP

For TDO: Install ryzenadj and then install https://github.com/aarron-lee/simple-ryzen-tdp (use install.sh)

Gave up on Gamemode now and just launch gamescope in KDE Plasma, since we get screen brightness, battery related settings out of the box.

Use the script from my Arch linux note but change to launch gamescope with fullscreen

#!/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 \
      --fullscreen \
      --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

2023/10/29

Bios: can change boot order of SSD so Linux is default (Boot -> UEFI NVME Drive BBS Priorities)

Battery issue discussion

https://www.reddit.com/r/gpdwin/comments/17g7ukp/gpd_win_4_pro_2023_battery_charge_stuck_at_90/?xpromo_edp=enabled

Windows disk encryption

We won't be able to use device encryption with Windows 11 Home because we need Secure Boot off https://answers.microsoft.com/en-us/windows/forum/all/device-encryption-setting-in-windows-11-home-has/43fc2f3b-8c75-4c12-ae01-741433f5fb0f

For now leave it as non-encrypted and focus on Linux.

System backups

timeshift will work with btrfs mode

Spotify: cannot open browser to login

Install xdg-desktop-portal-kde and reboot (Maybe logout and login would work)

2023/11/10

LINE

https://ivonblog.com/posts/linux-bottles-install-line/

The guide worked on my Artch linux install but kept stuck on "Launching LINE" screen this time.

Successfully switched to lutris instead.

  1. Create game (Add locally installed game)
  2. Use Wine-GE 8.x
  3. Open bash terminal
    1. winetricks cjkfonts vcrun2012 d3dcompiler_46
    2. wine "/path/to/LineInst.exe" (Linux path not C:...)
  4. Edit -> Game options -> Executable: /path/to/wine_prefix/drive_c/users/{username}/AppData/Local/bin/LineLauncher.exe
    1. Optional: set DPI to 150 (150%) as the screen is quite small

If fcitx5 is not working, test in xterm first. Most likely it's not working there too. Make sure /etc/environment is updated with:

XMODIFIERS=@im=fcitx

Ref: fcitx/fcitx5#262

2023/12/31

No Discover store

It is skipped if some packages aren't selected during install:

sudo pacman -S discover

Install packagekit-qt5 if you'd like to update pacman packages in discover store

https://forum.manjaro.org/t/plasma-discover-which-is-the-correct-way-to-install-it-in-manjaro-kde/62845/3

Install plymouth and splash screen

  1. sudo nvim /etc/kernel/cmdline and add this to the last line
    1. kernel_cmdline+=" splash quiet "
  2. yay -S plymouth-git
  3. (Not sure if it's required) sudo dracut --uefi
  4. sudo reinstall-kernels

https://forum.endeavouros.com/t/how-do-i-make-plymouth-work-on-my-system/41258 https://forum.endeavouros.com/t/plymouth-not-working-with-systemd-boot-and-dracut-on-luks-encrypted-devices/43493

2024/01/06

Get emoji working in Konsole

https://forum.endeavouros.com/t/tip-enable-colour-emojis/6210 Only installed noto-fonts-emoji for now

Hibernate support

Make sure dracut is 59 up and systemd-boot is 255 up

https://forum.endeavouros.com/t/hibernation-stops-working-after-last-upgrade/48817/4 https://bbs.archlinux.org/viewtopic.php?id=290450

I selected swapfile during installation, but swap file is only 512MB

# Turn off swap
sudo swapoff -a
sudo btrfs filesystem mkswapfile --size 64G /swap/swapfile_64G
sudo swapon /swap/swapfile_64G
  1. Edit /etc/fstab to use the new swap file

  2. Apply dracut patch mentioned in the linnk (should be fixed in 60+?)

create /etc/dracut.conf.d/resume.conf

add_dracutmodules+=" resume "
install_items+=" /usr/lib/systemd/system/systemd-hibernate-resume.service "
  1. Run sudo dracut-rebuild and sudo reinstall-kernels to rebuild boot image

  2. Test with systemctl hibernate

KDE should have Hibernate option on boot menu after these. If not, try reboot?

2024/01/12

Syncthing-gtk not working

Brand new install on UM790Pro, hitting this error:

❯ flatpak run --command=syncthing me.kozec.syncthingtk --logfile syncthing.log --no-browser
[monitor] 2024/01/12 20:50:03 INFO: Log output saved to file "/home/fsworld009/syncthing.log"
[start] 2024/01/12 20:50:03 INFO: syncthing v1.23.4 "Fermium Flea" (go1.20.3 linux-amd64) [email protected] 2023-04-28 05:25:02 UTC [noupgrade]
[OQKKP] 2024/01/12 20:50:03 INFO: My ID: ***
[OQKKP] 2024/01/12 20:50:04 INFO: Single thread SHA256 performance is 2448 MB/s using minio/sha256-simd (696 MB/s using crypto/sha256).
[OQKKP] 2024/01/12 20:50:04 INFO: Hashing performance is 1559.07 MB/s
[OQKKP] 2024/01/12 20:50:04 INFO: Detected upgrade from v1.27.2 to v1.23.4
[OQKKP] 2024/01/12 20:50:04 INFO: Overall send rate is unlimited, receive rate is unlimited
[OQKKP] 2024/01/12 20:50:04 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
[OQKKP] 2024/01/12 20:50:04 INFO: Ready to synchronize "Default Folder" (default) (sendreceive)
[OQKKP] 2024/01/12 20:50:04 INFO: Using discovery mechanism: global discovery server https://discovery.syncthing.net/v2/?noannounce&id=*****
[OQKKP] 2024/01/12 20:50:04 INFO: Using discovery mechanism: global discovery server https://discovery-v4.syncthing.net/v2/?nolookup&id=*****
[OQKKP] 2024/01/12 20:50:04 INFO: Using discovery mechanism: global discovery server https://discovery-v6.syncthing.net/v2/?nolookup&id=*****
[OQKKP] 2024/01/12 20:50:04 INFO: Using discovery mechanism: IPv4 local broadcast discovery on port 21027
[OQKKP] 2024/01/12 20:50:04 INFO: Using discovery mechanism: IPv6 local multicast discovery on address [ff12::8384]:21027
[OQKKP] 2024/01/12 20:50:04 INFO: QUIC listener ([::]:22000) starting
[OQKKP] 2024/01/12 20:50:04 INFO: Completed initial scan of sendreceive folder "Default Folder" (default)
[OQKKP] 2024/01/12 20:50:04 INFO: GUI and API listening on 127.0.0.1:8384
[OQKKP] 2024/01/12 20:50:04 INFO: Access the GUI via the following URL: http://127.0.0.1:8384/
[OQKKP] 2024/01/12 20:50:04 INFO: TCP listener ([::]:22000) starting
[OQKKP] 2024/01/12 20:50:04 INFO: My name is "fsworld009-new"

It exits without error code afterwards. On FW13 it seems fine. Reason is unknown.

Arch native syncthing or flatpak Syncthingy works fine. Maybe try again later when moving to FW 16.

Change to use Syncthingy for now.

Config paths:

  • ~/.local/state/syncthing
  • ~/.var/app/me.kozec.syncthingtk/config/syncthing/
  • ~/.var/app/com.github.zocker_160.SyncThingy/.local/state/syncthing/

KDE Dolphiin root access

❯ sudo dolphin
Running Dolphin with sudo is not supported as it can cause bugs and expose you to security vulnerabilities. Instead, install the `kio-admin` package from your distro and use it to manage root-owned locations by right-clicking on them and selecting "Open as Administrator".

~ as 🧙 took 12s 
❯ sudo pacman -S kio-admin

Build OBS

Main note https://gist.github.com/fsworld009/cb9a402ede96fa6087a2562d987e82be#20231020

==> ERROR: 'pacman' failed to install missing dependencies.
==> Missing dependencies:
  -> asio
  -> cef-minimal-obs-bin
  -> cmake
  -> nlohmann-json
  -> swig
  -> vlc
  -> websocketpp

need to yay -S cef-minimal-obs-bin

  2%] Building C object libobs/CMakeFiles/libobs.dir/media-io/media-remux.c.o
/home/fsworld009/projects/obs-studio-git/src/obs-studio-git/libobs/media-io/media-remux.c: In function ‘init_output’:
/home/fsworld009/projects/obs-studio-git/src/obs-studio-git/libobs/media-io/media-remux.c:99:17: error: ‘av_stream_get_side_data’ is deprecated [-Werror=deprecated-declarations]
   99 |                 const uint8_t *const content_src = av_stream_get_side_data(
      |                 ^~~~~
In file included from /home/fsworld009/projects/obs-studio-git/src/obs-studio-git/libobs/media-io/media-remux.c:24:
/usr/include/libavformat/avformat.h:1917:10: note: declared here
 1917 | uint8_t *av_stream_get_side_data(const AVStream *stream,
      |          ^~~~~~~~~~~~~~~~~~~~~~~
/home/fsworld009/projects/obs-studio-git/src/obs-studio-git/libobs/media-io/media-remux.c:103:25: error: ‘av_stream_new_side_data’ is deprecated [-Werror=deprecated-declarations]
  103 |                         uint8_t *const content_dst = av_stream_new_side_data(
      |                         ^~~~~~~
/usr/include/libavformat/avformat.h:1902:10: note: declared here
 1902 | uint8_t *av_stream_new_side_data(AVStream *stream,
      |          ^~~~~~~~~~~~~~~~~~~~~~~
/home/fsworld009/projects/obs-studio-git/src/obs-studio-git/libobs/media-io/media-remux.c:115:17: error: ‘av_stream_get_side_data’ is deprecated [-Werror=deprecated-declarations]
  115 |                 const uint8_t *const mastering_src = av_stream_get_side_data(
      |                 ^~~~~
/usr/include/libavformat/avformat.h:1917:10: note: declared here
 1917 | uint8_t *av_stream_get_side_data(const AVStream *stream,
      |          ^~~~~~~~~~~~~~~~~~~~~~~
/home/fsworld009/projects/obs-studio-git/src/obs-studio-git/libobs/media-io/media-remux.c:119:25: error: ‘av_stream_new_side_data’ is deprecated [-Werror=deprecated-declarations]
  119 |                         uint8_t *const mastering_dst = av_stream_new_side_data(
      |                         ^~~~~~~
/usr/include/libavformat/avformat.h:1902:10: note: declared here
 1902 | uint8_t *av_stream_new_side_data(AVStream *stream,
      |          ^~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [libobs/CMakeFiles/libobs.dir/build.make:762: libobs/CMakeFiles/libobs.dir/media-io/media-remux.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1226: libobs/CMakeFiles/libobs.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Latest git build works fine, guess we need to rebase and rebuild again. For now, use previous build I had in backup https://github.com/fsworld009/obs-studio/releases/tag/30.0.0-rc1-projector-patches

GC553 works fine with env var and there is no audio lag out of box, guess eos did a good job to tweak pipewire configs.

Steam

Previous setup still works, but need to yay -S gamescope-session-steam and login to that session first to do first time login.

Otherwise will stuck in Steam Deck initial setup screen and get error after internet tab.

2024/01/22

Create new btrfs subvolume

My GPD Win4 install was done without swap, recreated swap subvolume and file:

sudo mkdir /mnt/root
sudo mount -t btrfs /dev/mapper/luks-{UUID} /mnt/root
sudo btrfs subvolume create /mnt/root/@swap
# create swap file
sudo btrfs filesystem mkswapfile --size 32 /swap/swapfile_32
# Copy fstab from other installs
/dev/mapper/luks-{UUID}          btrfs   subvol=/@swap,noatime 0 0
/swap/swapfile_32                            swap           swap    defaults   0 0
# Reboot, verify
swapon

2024/03/03

mangoapp breaks after glfw upgrades

❯ mangoapp
Glfw Error 65550: X11: Platform not initialized
Glfw Error 65550: X11: Platform not initialized
Glfw Error 65550: X11: Platform not initialized
Glfw Error 65550: X11: Platform not initialized

This is because glfw-x11 and glfw-wayland has now merged into one package glfw. Need to run with XDG_SESSION_TYPE=x11 under Wayland session.

Taking screenshot in gamescope breaks Steam client

This is an issue with 3.14.0 ValveSoftware/gamescope#1172

Need to downgrade to 3.13.19 for now https://archive.archlinux.org/packages/g/gamescope/

sudo pacman -U gamescope-3.13.19-1-x86_64.pkg.tar.zst

Gamescope script update

Updated script with mangoapp fix as well as porting some env vars from the script on Steam Deck

#!/bin/sh
set -v

# Enable OBS Capture
export OBS_VKCAPTURE=1

## 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

# Disable automatic audio device switching in steam, now handled by wireplumber
export STEAM_DISABLE_AUDIO_DEVICE_SWITCHING=1

# 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


# Let steam know it can unmount drives without superuser privileges
export STEAM_ALLOW_DRIVE_UNMOUNT=1


# Don't wait for buffers to idle on the client side before sending them to gamescope
export vk_xwayland_wait_ready=false




# Set input method modules for Qt/GTK that will show the Steam keyboard
export QT_IM_MODULE=steam
export GTK_IM_MODULE=Steam

# Make Qt apps use the styling and behaviour of the desktop session
# This fixes some missing icons and unreadable text with Qt desktop apps in gamescope
export QT_QPA_PLATFORM_THEME=kde


# To play nice with the short term callback-based limiter for now
export GAMESCOPE_LIMITER_FILE=$(mktemp /tmp/gamescope-limiter.XXXXXXXX)


# 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

export XDG_SESSION_TYPE=x11
gamescope -H 1080 -e \
      --generate-drm-mode fixed \
      --xwayland-count 2 \
      --cursor-hotspot 5,3 \
      --cursor "$HOME/.local/share/Steam/tenfoot/resource/images/cursors/arrow.png" \
      --hide-cursor-delay 3000 \
      --max-scale 2 \
      --default-touch-mode 4 \
      --fade-out-duration 200 \
      -R "$socket" -T "$stats" \
      -O '*',eDP-1 \
       > "${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

2024/03/23

system upgrade triggers git clone chromium-mirror and never ends

https://www.reddit.com/r/EndeavourOS/comments/1alifm0/update_trouble_cloning_chromiummirror_git_repo_is/

Main repo was 42GiB and there's mmore repo to be cloned, didn't finish all downloading after leaving update in 2 hours

Solution: yay -Rs electron25

Not sure why this was installed, could have been an old dependency of Zoom

Two providers of qt6-multimedia-backend

https://bbs.archlinux.org/viewtopic.php?id=287529

Use qt6-multimedia-ffmpeg

2024/04/02

Discord

Official app doesn't support screenshare + audio, and also seems don't support screenshare at all in Wayland?

Alternatives:

  1. https://github.com/maltejur/discord-screenaudio

Deal breaker: only allow entire monitor share, no per-app share support

Also, unable to enable tray icon, the discord-screenaudio settings is not presented as seen in maltejur/discord-screenaudio#113

  1. https://github.com/Vencord/Vesktop

Seems working, didn't verifty if audio actually works (need another account to watch my own sharing to confirm)

Issue: fcitx not working https://github.com/Vencord/Vesktop/issues/420

Confirmed current build (1.5.1) can enable fcitx with the following command

/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=startvesktop dev.vencord.Vesktop --enable-wayland-ime

To enable passing --enable-wayland-ime by default, follow https://www.reddit.com/r/Fedora/comments/s2c9in/how_do_i_always_run_a_flatpak_application_with/

cp /var/lib/flatpak/app/dev.vencord.Vesktop/current/active/export/share/applications/dev.vencord.Vesktop.desktop ~/.local/share/applications/

Edit the copied .desktop file and update Exec line:

Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=startvesktop dev.vencord.Vesktop --enable-wayland-ime

Start with system

Built-in option don't work with Flatpak install for now https://github.com/Vencord/Vesktop/issues/273 need to add the app to KDE System Settings -> Autostart -> Vesktop

2024/04/24

Brave: enable Vulkan support

Check brave://gpu/, if Vulkan is not enabled, go to brave://flags to turn it on.

2024/12/10: Currently the option is hidden by mistake, need to enable Temporarily unexpire M130 flags flag as a workaround

2024/04/27

Steam with dGPU

Switched to Framework 16 which has igpu and dgpu onboarded.

For games that don't use dgpu automatically, need to manually set env var

DRI_PRIME=1

# Some games have to use this?
DXVK_FILTER_DEVICE_NAME="AMD Radeon RX 7700S (RADV NAVI33)"

more info: https://community.frame.work/t/responded-dri-prime-not-correctly-using-the-dgpu-in-some-games/45912

Ideally it would be better to run steam with these variables, however it doesn't work on Steam client

The gamescope + SteamOS client mode combination also doesn't work,as the games would run in a separate window instead of inside the gamescope (Probably because gamescope was created under igpu).

Update: Found that I need to close Lutris main program before launching Lutris games so that the game would be launched within gamescope.

Steam + native 1080p gaming with dGPU

  1. need to update launch script with gamescope -W 1920 -H 1080 steam..., otherwise the gamescope is in 16:10 ratio. I suppose this is because FW16 built-in screen is 16:10.
  2. For Lutris games, go to Lutris preferences -> Global options, change GPU to dGPU
  3. Steam: change game options: change resolution to Native. Most games should pick dGPU automatically, if not, add the env vars mentioned above in launch options.

Step 3. need to be done on every single game, not sure if there's a way to default to those options.

Lutris flatpak + gamescope&mangohud with dGPU

Install gamescope and mangohud

flatpak install org.freedesktop.Platform.VulkanLayer.MangoHud
flatpak install org.freedesktop.Platform.VulkanLayer.gamescope

Restart Lutris, go to Preferences -> System, should see MangoHud and Gamescope as enabled

If not, could be Lutris is looking for a specific Mangohud & gamescope version, but not sure how to check

Go to Preferences -> Global options (default for all games) or game configuration -> System options, turn on FPS Counter (Mangohud) to enable MangoHud

You can also configure Gamescope in the same places.

Configure flatpak MangoHud

https://github.com/flightlessmango/MangoHud?tab=readme-ov-file#hud-configuration

Per https://github.com/flathub/org.freedesktop.Platform.VulkanLayer.MangoHud it should be possible to create config file, but it doesn't work for me, the default layout is always used

Also tried some flatpak override commands:

 sudo flatpak override --filesystem=xdg-config/MangoHud:ro

(Ref: flightlessmango/MangoHud#972

And tried to add this filesystem override to Lutris app only, didn't work.

Currently I can only confiure it via MANGOHUD_CONFIG env var In Lutris you can configure env var globally so this is probably fine for now.

2024/05/09

SDDM not showing in external display

Create a config file /etc/sddm.conf.d/10-wayland.config to switch SDDM to Wayland (Default is X11)

[General]
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell

[Wayland]
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1

Ref: https://www.reddit.com/r/archlinux/comments/1bha777/comment/kvf0ofc/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

However, it doesn't work for monitors connecting to dGPU, only for iGPU ones.

obs-studio-git build failure

https://aur.archlinux.org/packages/obs-studio-git

  1. need new dependencies 'uthash', 'ffnvcodec-headers-12-1' from yay
  2. was hitting this error in plugins/obs-filters/rnnoise/src/denoise.c
‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument

(I didn't save the full compiler message) for both yay install and my local build.

However, local build went through after deleting all local files on my local obs-studio-git folder and rebooting.

2024/06/09

Docker

sudo pacman -S docker

By default docker only works with sudo, need to follow these guides to solve permission issue:

  1. Fix user group
     # create user group docker and add self into it
     sudo groupadd docker
     sudo usermod -aG docker $USER
    
     # have group access for this shell session. To have it permanatelly, need to logout and login
     newgrp docker
    
  2. Fix systemd config
    # add group access to socket
    sudo chgrp docker /lib/systemd/system/docker.socket
    sudo chmod g+w /lib/systemd/system/docker.socket
    
    # tell the daemon use default unix socket path
    sudo mkdir /etc/systemd/system/docker.service.d 
    # Use the content below
    sudo nvim /etc/systemd/system/docker.service.d/docker.conf # Save the following content
    systemctl start docker
    # Should be able to connect without root now
    docker info
    
    1. docker.conf
    [Service]
    ExecStart=
    ExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2376
    

Build decky-loader plugins

Some plugins don't work with current Steam client due to front-end library update

See jfernandez/ControllerTools#43

Plugin authors need to bump the dependency and submit version bump to https://github.com/SteamDeckHomebrew/decky-plugin-database/pulls . Decky loader will only see new versions after database version bump PR is merged.

Currently some plugins are fixed but aren't bumped in database repo yet, so trying to manually build them

Basic

Plugin install folder: ~/homebrew/plugins

Somehow all folders are readonly, need to give write permissions first

UI are all built in the same way for all projects

nvm install --lts # 20 by the time  of writing
nvm use --lts

npm install -g pnpm

# Install dependencies
pnpm i
# dist/index.js would be the output
npm run build

# Copy dist/index.js to ~/homebrew/plugins/{name}/dist/index.js to update UI

Backend dependency: varies for each project But the common practice is to use docker to run holoiso and build them. (See Docker section above)

Decky Roullete

UI only plugin. The release tag 1.1.3 already have a zip so you can just unzip that to plugin folder.

https://github.com/davocarli/deck-roulette/releases/tag/release

Controller Tools 1.2.1

Note: Only the frontend is broken so you only need to update dist, but as a practice I also built backend and confirmed the new build works.

# Build backends
bash scripts/build_docker_image.sh
bash backend/run-docker-image.sh

# Copy dist to ~/homebrew/plugins/ControllerTools/dist
# Copy backend/out/backend to ~/homebrew/plugins/ControllerTools/bin/backend

Decky Recorder

No isse for this plugin, but it doesn't record for my EndeavourOS setup

Required Dependencies:

sudo pacman -S gstreamer libva-mesa-driver python jq

Use the current main branch main.py with following patches:

  1. Change in_gamemode condition since we are not running gamescope-session
    if "gamescope" in " ".join(child.cmdline()):
  2. Fix video src: need to specify pipewiresrc path, which is the gamescope window running steam + games. Patch this in start_capturing:
    # Video Pipeline
    path_id = get_cmd_output('pw-dump | jq \'.[] | select(.info.props.["node.name"] == "gamescope") | .id\'')
    if not self._rolling:
        videoPipeline = f"pipewiresrc path={path_id} do-timestamp=true ! vaapipostproc ! queue ! vaapih264enc ! h264parse ! {muxer} name=sink !"
    else:
        videoPipeline = f"pipewiresrc path={path_id} do-timestamp=true ! vaapipostproc ! queue ! vaapih264enc ! h264parse !"

Reload plugin and restart Replay Mode

debug note

~/homebrew/log/decky-recorder

Traceback (most recent call last):
  File "/home/fsworld009/homebrew/plugins/decky-recorder/main.py", line 95, in watchdog
    in_gm = in_gamemode()
  File "/home/fsworld009/homebrew/plugins/decky-recorder/main.py", line 59, in in_gamemode
    for child in psutil.process_iter():
NameError: name 'psutil' is not defined
2024-06-09 22:17:52,174 - ERROR - watchdog

saw

    sys.path = [str(DEPSPATH / "psutil")] + sys.path
    import psutil

and tried to print the path, but it is resolved correctly after adding log, no idea why

2024-06-10 01:04:43,671 - WARNING - Left gamemode but recording was still running, killing capture

Hard code in_gamemode to return true. (See above)

gst is launched but defuncted

❯ ps aux | grep gst
fsworld+  193463  0.7  0.0      0     0 ?        Z    00:55   0:01 [gst-launch-1.0] <defunct>

copying the command from log (Command: GST_VAAPI_ALL_DRIVERS=1 ...), run it manually, and get this output

WARNING: erroneous pipeline: no element "vaapipostproc"

Program ends immediately

Inspect this element

❯ gst-inspect-1.0 vaapipostproc
Xlib:  extension "DRI2" missing on display ":1".
Xlib:  extension "DRI2" missing on display ":1".
No such element or plugin 'vaapipostproc'

while this command is successful in steamdeck

solution: sudo pacman -S libva-mesa-driver

Now the command is successful

Same issue with gst-inspect-1.0 pipewire, need to install gst-plugin-pipewire

"Too early to record another clip""

Currently stuck in this error, there was one successful recording but the video source is my capture card, not screen.

Sync gstreamer version

SDH-Stewardship/decky-recorder-fork#25

FROM ghcr.io/steamdeckhomebrew/holo-base:latest
 
#RUN mkdir /pacman && pacman -Sydd --noconfirm --root /pacman --dbpath /var/lib/pacman gstreamer-vaapi gst-plugin-pipewire gst-plugins-bad gst-plugins-bad-libs gst-plugins-good
RUN mkdir /pacman && pacman -Udd --noconfirm --root /pacman --dbpath /var/lib/pacman \
    https://archive.archlinux.org/packages/g/gstreamer-vaapi/gstreamer-vaapi-1.24.3-1-x86_64.pkg.tar.zst \
    https://archive.archlinux.org/packages/g/gst-plugins-bad-libs/gst-plugins-bad-libs-1.24.3-1-x86_64.pkg.tar.zst \
    https://archive.archlinux.org/packages/g/gst-plugins-bad/gst-plugins-bad-1.24.3-1-x86_64.pkg.tar.zst \
    https://archive.archlinux.org/packages/g/gst-plugins-good/gst-plugins-good-1.24.3-1-x86_64.pkg.tar.zst \
    https://archive.archlinux.org/packages/g/gst-plugin-pipewire/gst-plugin-pipewire-1%3A1.0.7-2-x86_64.pkg.tar.zst


#RUN cd /pacman/usr/lib/gstreamer-1.0/ && rm libgstneonhttpsrc.so libgstfaad.so libgstcacasink.so libgstaasink.so libgstspandsp.so libgstgme.so libgstteletext.so libgstshout2.so libgstchromaprint.so libgstkate.so libgstwildmidi.so libgstmusepack.so libgstmplex.so libgsttimecode.so libgstavtp.so libgstwebrtc.so libgsttwolame.so libgstmpeg2enc.so libgstopenmpt.so libgstdtsdec.so libgstzbar.so libgstresindvd.so libgstdc1394.so libgstsoundtouch.so libgstmicrodns.so libgstmpg123.so libgstrtmp.so libgstopenexr.so libgstfluidsynthmidi.so libgstsvthevcenc.so libgstwavpack.so libgstde265.so libgstsrtp.so libgstladspa.so libgstdv.so
RUN cd /pacman/usr/lib/gstreamer-1.0/ && rm -f libgstneonhttpsrc.so libgstfaad.so libgstcacasink.so libgstaasink.so libgstspandsp.so libgstgme.so libgstteletext.so libgstshout2.so libgstchromaprint.so libgstkate.so libgstwildmidi.so libgstmusepack.so libgstmplex.so libgsttimecode.so libgstavtp.so libgstwebrtc.so libgsttwolame.so libgstmpeg2enc.so libgstopenmpt.so libgstdtsdec.so libgstzbar.so libgstresindvd.so libgstdc1394.so libgstsoundtouch.so libgstmicrodns.so libgstmpg123.so libgstrtmp.so libgstopenexr.so libgstfluidsynthmidi.so libgstsvthevcenc.so libgstwavpack.so libgstde265.so libgstsrtp.so libgstladspa.so libgstdv.so

RUN pacman -Sydd --noconfirm --dbpath /var/lib/pacman python-pip

RUN pip3 install psutil --target=/psutil

ENTRYPOINT [ "/backend/entrypoint.sh" ]
  1. Run cd backend && make all to build
  2. Copy backend/out to ~/homebrew/decky-recorder/bin

This causes the record to fail (gst command results in status).

Building frontend from current master, the index.js won't load, not sure the reason. (Readme says Node version is 18, could be a reason)

2024/07/05

After latest system upgrade, I can no longer downgrade gamescope due to dependency conflict.

There seems to be no screenshot issues anymore

In GPD Win4 I've found that it doesn't render anything, later on found it works if I turn off FSR.

Searched around and confirmed FSR+Fullscreen is the issue ValveSoftware/gamescope#1237

The issue thread suggested using --backend sdl but it crashed on many games from my testing.

Hence for now we cannot use FSR with fullscreen. If the game has been set to use FSR in steam client and it's not possible to bring up the menu to turn it off due to game not rendering, the workaround is to leave gamescope fullscreen with Win+F to turn it off.

Also the FSR seems picking up wrong resolution if we set scaling in descktop setting.

For a 1080p screen with 150% scale, and running game in 720p, I have to use gamescope -H 477 in order to get FSR rendering. Higher height like 495 won't work.

I assume it's because 4771.5 < 720 while 4951.5 > 720

2024/08/10

BizHawk Linux native build

yay -S bizhawk

Need to fix user group and folder permission based on https://aur.archlinux.org/packages/bizhawk-bin

sudo usermod -a -G games fsworld009
sudo chown fsworld009 /opt/bizhawk -R

Might need to reboot to take effect?

Confirmed the Lua script work (RMX4 Boost). Not compatible with VBA-RR scripts.

If we want this on Steam Deck, probably need to use distrobox

Dark theme doesn't work well with mono mono/mono#9998

GTK_DATA_PREFIX= bizhawk

Flatpak: app has no dark theme

# give apps permission to read theme
sudo flatpak override --filesystem=xdg-config/gtk-3.0:ro
sudo flatpak override --filesystem=xdg-config/gtk-4.0:ro
sudo flatpak override --filesystem=xdg-data/icons:ro
sudo flatpak override --filesystem=xdg-config/vkBasalt:ro
	
# seems the corresponding theme set in KDE config need to be installed in flatpak as well, e.g.
flatpak install org.gtk.Gtk3theme.adw-gtk3-dark
flatpak install org.gtk.Gtk3theme.adw-gtk3

Alternatively force theme for this app by
GTK_THEME=adw-gtk3-dark

Note: prerequisite to install apps to user space

flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

2024/09/15

fcitx5

Plain bopomofo is broken after system upgrade, switched to Flatpak fcitx5 for now

  1. Set virtual keyboard to None
sudo pacman -Rs fcitx5 fcitx5-configtool fcitx5-mcbopomofo-git fcitx5-mozc fcitx5-qt
  1. install fcitx5 from Discover, then reselect virtual keyboard
  2. Right click keyboard icon on bottom right to configure IMEs and shortcuts

2024/09/23

https://www.reddit.com/r/linuxquestions/comments/eznjzs/v4l2_vs_vaapi_vs_vdpau/ https://forum.endeavouros.com/t/random-crashes-and-freezes-with-kde-plasma/58760/22

Installing these may help resolve random crash

mesa
lib32-mesa
vulkan-radeon
lib32-vulkan-radeon

# For accelerated video (VA-API) (VDPAU)
vdpau
libva-mesa-driver
lib32-libva-mesa-driver
mesa-vdpau
lib32-mesa-vdpau

# utils
vdpauinfo libva-utils

Another possible solution: https://unix.stackexchange.com/questions/756281/kernel-6-5-2-seems-to-have-amdgpu-crash-on-no-retry-page-fault set kernel param amdgpu.mcbp=0

2024/10/10

Seems dracut-build is not necessary when the changes require reinstall-kernels

https://forum.endeavouros.com/t/system-wont-boot-unless-i-select-fallback/42183/6

System

AMD Ryzen 7840HS + AMD Radeon RX 7700 S

Goal

  1. Pass GPU to a Windows 10 Guest VM in KVM/Qemu/virt-manager
  2. Be able to game on the guest VM

Enable IOMMU

  1. Edit /etc/kernal/cmdline
    kernel_cmdline+=" amd_iommu=on iommu=pt "
    
  2. sudo reinstall-kernels

Validate:

sudo dmesg | grep -i -e DMAR -e IOMMU

should see it is loaded

Identify GPU

  1. Use the script from this guide:
#!/bin/bash
shopt -s nullglob
for g in /sys/kernel/iommu_groups/*; do
    echo "IOMMU Group ${g##*/}:"
    for d in $g/devices/*; do
        echo -e "\t$(lspci -nns ${d##*/})"
    done;
done;

For Framework 16 AMD Radeon RX 7700S GPU, the target IDs are 1002:7480,1002:ab30

IOMMU Group 15:
        03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 33 [Radeon RX 7600/7600 XT/7600M XT/7600S/7700S / PRO W7600] [1002:7480] (rev c1)
IOMMU Group 16:
        03:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 HDMI/DP Audio [1002:ab30]

Load vfio-pci modules and Bind GPU

  1. edit Kernel cmdline /etc/kernel/cmdline
    kernel_cmdline+=" amd_iommu=on iommu=pt vfio-pci.ids=1002:7480,1002:ab30 vfio_iommu_type1.allow_unsafe_interrupts=1 "
    
    1. Options are based on this note
  2. dracut: load the vfio modules
    1. Create /etc/dracut.conf.d/vfio.conf with
    force_drivers+=" vfio_pci vfio vfio_iommu_type1 "
    
  3. sudo dracut-rebuild
  4. sudo reinstall-kernels

Validate:

  1. Reboot
  2. lspci -nnk, you should see Kernel driver in use: vfio-pci for both devices

Note:

  1. Even though virt-manager is supposed to be able to hot plug GPUs, I found libvirtd service would hang after VM shutdown, so it's better to still manually bind GPU on boot a. Can still manually reassign GPU back to host later
  2. Some older guides would say we need to add vfio_virqfd but this is not true anymore https://www.reddit.com/r/archlinux/comments/11dqiy5/vfio_virqfd_missing_in_linux621arch11/
  3. Use force_drivers so vfio_pci is loaded before GPU drivers Ref: https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#dracut

Configure VM via virt-manager

  1. Check OS Firmware type in Details -> Overview -> Firmware.
    1. If it's "BIOS" then we need to recreate a VM with "UEFI" type
      1. Reuse the existing Win10 disk in new VM
      2. Select "Customize configuration before install" in the last step so the details setting is shown before VM creation
      3. In OS section select "UEFI" with OVMF_CODE.secboot.4m.fd image
    2. Alternatively it's possible to manually patch XML, see this and this for reference, I didn't fix my old VM setup with this though.
    3. If reusing the old disk from a VM with BIOS, it's likely that it won't boot and you need to convert the disk to GPT table
      1. See (Guide)[https://viml.nchc.org.tw/use-mbr2gpt-to-convert-os-to-uefi-boot/]
      2. If the command is failing try mbr2gpt /disk:0 /convert Ref

Install virtio drivers in Guest VM

  1. Go to https://github.com/virtio-win/virtio-win-pkg-scripts/blob/master/README.md and download stable virtio-win ISO
  2. Turn on Win10 Guest, moust the disc, install the drivers (all drivers)
  3. Shutdown VM

Configure PCI Passthrough for GPU

  1. CPUs: Copy host CPU Configuration
  2. Add PCI Host devices for the two devices we bound to vfio-pci earlier

Install AMD Radeon GPU Driver on guest VM

  1. Boot VM
  2. Download driver & software from here
    1. Note that only the full wqhl version works. The web version would report we are in unsupported env.

Validate

Check Device Manager to confirm the GPU is listed

Connect to GPU

In order to get native performance, we now need to switch to the display output of the GPU Hardware.

By doing so, we will not use the virtual display and IO drivers from spice and virtio. As a result, we need to prepare a separated monitor, mouse, and keyboard.

We also lost the clipboard and file sharing provided by spice and virtiofs

  1. Hide VM status
    1. Follow the guide here to update XML features part
      <features>
        ...
        <ioapic driver='kvm'/>
        <kvm>
          <hidden state='on'/>
        </kvm>
        <hyperv>
          <vendor_id state='on' value='123412341234'/>
        </hyperv>
      </features>
      
      
    2. Without this, the monitor would display garbage
  2. Change Video to None so the virtualized display is disabled
  3. (Optional) remove all spice devices and display spice
    1. Keeping them might be better, since we need them if we want to use looking-glass to mirror display on host machine
  4. Add USB Host device for each keyboard, mouse, controller...etc you want to use in VM
  5. Boot the VM

Now the VM should have native GPU performance on the monitor connected to GPU. Test a game to validate it works!

Optional: looking-glass

  1. Purpose: open a window on host to mirror the display on guest machine with almost native performance

  2. Guest machine runs looking-glass-host to stream and host machine runs looking-glass-client to see the guest screen

  3. Install: yay -S looking-glass

  4. Follow guide to configure Linux host and guest VM

    1. The installed version is B6, however it's recommended to follow the latest guide to set things up with kvmfr for even better performance.
    2. currently using 128MB, will test 4k streaming
  5. Windows guest: download looking-glass Host, need to match guest version (Stable B6)

  6. Run looking-glass-client -f /dev/kvmfr0 from host to see the stream

Note: change audio output to the virtualized one, so the audio goes to host as well.

Mouse cursor not showing

Possible solutions (not sure which one worked)

  1. Removing the Channel (Spice) device
  2. Removing the Tablet device

Future

  1. Evdev passthrough for keyboard and mouse
    1. Seems to provide lower latency compared to looking-glass https://www.reddit.com/r/VFIO/comments/op4qkg/hows_the_current_latency_of_looking_glass_and/
    2. https://passthroughpo.st/using-evdev-passthrough-seamless-vm-input/
  2. Get clipboard sharing and file share to work again
  3. https://www.youtube.com/watch?v=g--fe8_kEcw the author claims a native performance with QML view, not sure how that was done
    1. Uninstalling virtio driver seems weird though
    2. Doen't seem to require hiding VM

Windows 11

  1. VM config: sudo pacman -S swtpm and add TPM 2.0 device (Emulated)
  2. Can skip MS account login with Pro version

Bind GPU back to host

Ref: https://www.reddit.com/r/VFIO/comments/12z0jfo/can_gpu_be_switched_between_host_and_vm_while/

Use echo or use driverctl: yay -S driverctl

#!/bin/sh

sudo driverctl set-override 0000:03:00.0 amdgpu
sudo driverctl set-override 0000:03:00.1 snd_hda_intel

sudo driverctl set-override 0000:03:00.0 vfio-pci
sudo driverctl set-override 0000:03:00.1 vfio-pci

There is a unset-override command

# unset
sudo driverctl unset-override 0000:03:00.0
sudo driverctl unset-override 0000:03:00.1

Observations:

  1. It seems failing and causing display to stuck forever if current used driver is amdgpu
  2. It seems causing defualt drivvers become amdgpu instead of vfio-pci on next boot
    1. Guess this means what the kernel params did is to set driver override on boot?

References

  1. https://qqq.ninja/blog/post/vfio-on-arch/
  2. https://wiki.gentoo.org/wiki/User:Firelizzard/Framework_16
  3. https://www.youtube.com/watch?v=g--fe8_kEcw
  4. https://www.reddit.com/r/VFIO/comments/ojxx4o/clipboard_storage_sharing_in_virtmanager/
  5. https://regunakyle.github.io/regunakyle/posts/007_simple_guide_for_vfio_2/
  6. https://community.frame.work/t/virtualization-on-fw16s-ryzen-9-7940hs/43227/

Troubleshoot notes

Looking glass ivshmemOpen DeviceIoControl Failed: device was already attached to another device (0x00000224)

  1. https://forum.level1techs.com/t/looking-glass-ivshmemopen-deviceiocontrol-failed-device-was-already-attached-to-another-device-0x00000224/205768
  2. It could also caused by msising spice devices like display server
Event:
1. open gamescope-steam-bp.sh, no window is shown
2. Tried to restart plasma session with systemctl
3. Tried to manually kill gamescope-steam-bp process
-- Boot c34fa96968d64fac9605293869c007ea --
Sep 02 18:45:48 fsworld009-fw16 systemd[1871]: Starting KDE Plasma Workspace...
Sep 02 18:45:48 fsworld009-fw16 systemd[1871]: Started KDE Plasma Workspace.
Sep 02 18:45:48 fsworld009-fw16 plasmashell[2190]: kde.plasmashell: Aborting shell load: The activity manager daemon (kactivitymanagerd) is not running.
Sep 02 18:45:48 fsworld009-fw16 plasmashell[2190]: kde.plasmashell: If this Plasma has been installed into a custom prefix, verify that its D-Bus services dir is known to the system for the daemon to be activatable.
Sep 02 18:45:48 fsworld009-fw16 plasmashell[2190]: kde.plasmashell: Aborting shell load: The activity manager daemon (kactivitymanagerd) is not running.
Sep 02 18:45:48 fsworld009-fw16 plasmashell[2190]: kde.plasmashell: If this Plasma has been installed into a custom prefix, verify that its D-Bus services dir is known to the system for the daemon to be activatable.
Sep 02 18:45:48 fsworld009-fw16 plasmashell[2190]: kf.plasma.quick: Applet preload policy set to 1
Sep 02 18:45:48 fsworld009-fw16 plasmashell[2190]: file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/main.qml:195:25: QML FolderViewDropArea (parent or ancestor of QQuickLayoutAttached): Binding loop detected for property "minimumWidth"
Sep 02 18:45:48 fsworld009-fw16 plasmashell[2190]: Toolbox not loading, toolbox package is either invalid or disabled.
Sep 02 18:45:48 fsworld009-fw16 plasmashell[2190]: file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/main.qml:195:25: QML FolderViewDropArea (parent or ancestor of QQuickLayoutAttached): Binding loop detected for property "minimumWidth"
Sep 02 18:45:48 fsworld009-fw16 plasmashell[2190]: Toolbox not loading, toolbox package is either invalid or disabled.
Sep 02 18:45:48 fsworld009-fw16 plasmashell[2190]: file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/main.qml:162:21: QML KSortFilterProxyModel: Binding loop detected for property "sourceModel"
Sep 02 18:45:48 fsworld009-fw16 plasmashell[2190]: file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/main.qml:162:21: QML KSortFilterProxyModel: Binding loop detected for property "sourceModel"
Sep 02 18:45:49 fsworld009-fw16 plasmashell[2190]: qt.dbus.integration: Could not connect "org.cups.cupsd.Notifier" to PrinterFinishingsChanged(QString, QString, QString, uint, QString, bool) :
Sep 02 18:45:49 fsworld009-fw16 plasmashell[2190]: qml: SystemTray ItemLoader: Invalid state, cannot determine source!
Sep 02 18:45:49 fsworld009-fw16 plasmashell[2190]: kf5idletime_wayland: This plugin does not support polling idle time
Sep 02 18:45:49 fsworld009-fw16 plasmashell[2190]: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
Sep 02 18:45:49 fsworld009-fw16 kioworker[2507]: kf.coreaddons: "Could not load plugin from /usr/lib/qt6/plugins/kf6/thumbcreator/appimagethumbnail.so: Cannot load library /usr/lib/qt6/plugins/kf6/thumbcreator/appimagethumbnail.so: libappimage.so.1.0: cannot open shared object file: No such file or directory"
Sep 02 18:45:49 fsworld009-fw16 kioworker[2507]: kf.coreaddons: "Could not load plugin from /usr/lib/qt6/plugins/kf6/thumbcreator/appimagethumbnail.so: Cannot load library /usr/lib/qt6/plugins/kf6/thumbcreator/appimagethumbnail.so: libappimage.so.1.0: cannot open shared object file: No such file or directory"
Sep 02 18:45:50 fsworld009-fw16 plasmashell[2190]: kameleon supported false
Sep 02 18:45:50 fsworld009-fw16 plasmashell[2190]: kameleon enabled true
Sep 02 18:45:50 fsworld009-fw16 plasmashell[2190]: error getting max keyboard brightness via dbus QDBusError("org.freedesktop.DBus.Error.UnknownObject", "No such object path '/org/kde/Solid/PowerManagement/Actions/KeyboardBrightnessControl'")
Sep 02 18:45:52 fsworld009-fw16 plasmashell[2190]: file:///usr/share/plasma/plasmoids/org.kde.plasma.keyboardindicator/contents/ui/main.qml:61:13: Unable to assign [undefined] to bool
Sep 02 18:45:54 fsworld009-fw16 plasmashell[2190]: kf.plasma.quick: Exposed with no visual parent. Window positioning broken.
Sep 02 19:31:24 fsworld009-fw16 plasmashell[2190]: file:///usr/share/plasma/plasmoids/org.kde.plasma.mediacontroller/contents/ui/AlbumArtStackView.qml:153:13: QML QQuickImage: Cannot open: file:///tmp/.org.chromium.Chromium.cM0pRi
Sep 02 23:30:40 fsworld009-fw16 plasmashell[2190]: kf.windowsystem.wayland: Failed to recreate shadow for PlasmaQuick::AppletPopup_QML_183(0x5b0a110cb3e0, name="popupWindow")
Sep 02 23:30:40 fsworld009-fw16 plasmashell[2190]: qt.qpa.wayland: eglSwapBuffers failed with 0x300d, surface: 0x0
Sep 03 06:27:24 fsworld009-fw16 plasmashell[2190]: file:///usr/share/plasma/plasmoids/org.kde.plasma.mediacontroller/contents/ui/AlbumArtStackView.qml:153:13: QML QQuickImage: Cannot open: file:///tmp/.org.chromium.Chromium.NNKTHj
Sep 03 14:07:32 fsworld009-fw16 plasmashell[2190]: QQmlVMEMetaObject: Internal error - attempted to evaluate a function in an invalid context
Sep 03 14:07:32 fsworld009-fw16 plasmashell[2190]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:242: TypeError: Property 'modelIndex' of object Task_QMLTYPE_344(0x5b0a0eb98810) is not a function
Sep 03 14:07:33 fsworld009-fw16 plasmashell[2190]: kf.kunitconversion: currency conversion table data obtained via network
Sep 03 18:11:36 fsworld009-fw16 plasmashell[2190]: kf.windowsystem.wayland: Failed to recreate shadow for PlasmaQuick::AppletPopup(0x5b0a0fe0cb30, name="popupWindow")
Sep 03 18:11:36 fsworld009-fw16 plasmashell[2190]: qt.qpa.wayland: eglSwapBuffers failed with 0x300d, surface: 0x0
Sep 03 22:34:41 fsworld009-fw16 plasmashell[2190]: org.kde.plasma.libtaskmanager: Got invalid activation app_id: "/home/fsworld009/Desktop/gamescope-steam-bp.sh"
Sep 03 22:37:37 fsworld009-fw16 systemd[1871]: Stopping KDE Plasma Workspace...
Sep 03 22:37:37 fsworld009-fw16 plasmashell[2190]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml:136: TypeError: Cannot read property 'screenGeometry' of null
Sep 03 22:37:37 fsworld009-fw16 plasmashell[2190]: QObject::killTimer: Timers cannot be stopped from another thread
Sep 03 22:37:37 fsworld009-fw16 plasmashell[2190]: QObject::~QObject: Timers cannot be stopped from another thread
Sep 03 22:37:37 fsworld009-fw16 plasmashell[2190]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml:250: TypeError: Cannot read property 'plasmoid' of undefined
Sep 03 22:38:17 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: State 'stop-sigterm' timed out. Killing.
Sep 03 22:38:17 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 2190 (plasmashell) with signal SIGKILL.
Sep 03 22:38:57 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Processes still around after SIGKILL. Ignoring.
Sep 03 22:39:37 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: State 'final-sigterm' timed out. Killing.
Sep 03 22:39:37 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 2190 (plasmashell) with signal SIGKILL.
Sep 03 22:40:17 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Processes still around after final SIGKILL. Entering failed mode.
Sep 03 22:40:17 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Failed with result 'timeout'.
Sep 03 22:40:17 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Unit process 2190 (plasmashell) remains running after unit stopped.
Sep 03 22:40:17 fsworld009-fw16 systemd[1871]: Stopped KDE Plasma Workspace.
Sep 03 22:40:17 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Consumed 48.488s CPU time, 528.7M memory peak.
Sep 03 22:40:17 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Found left-over process 2190 (plasmashell) in control group while starting unit. Ignoring.
Sep 03 22:40:17 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Sep 03 22:40:17 fsworld009-fw16 systemd[1871]: Starting KDE Plasma Workspace...
Sep 03 22:40:57 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: start operation timed out. Terminating.
Sep 03 22:41:38 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: State 'stop-sigterm' timed out. Killing.
Sep 03 22:41:38 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 118912 (plasmashell) with signal SIGKILL.
Sep 03 22:41:38 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 2190 (plasmashell) with signal SIGKILL.
Sep 03 22:42:18 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Processes still around after SIGKILL. Ignoring.
Sep 03 22:42:58 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: State 'final-sigterm' timed out. Killing.
Sep 03 22:42:58 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 118912 (plasmashell) with signal SIGKILL.
Sep 03 22:42:58 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 2190 (plasmashell) with signal SIGKILL.
Sep 03 22:43:38 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Processes still around after final SIGKILL. Entering failed mode.
Sep 03 22:43:38 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Failed with result 'timeout'.
Sep 03 22:43:38 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Unit process 2190 (plasmashell) remains running after unit stopped.
Sep 03 22:43:38 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Unit process 118912 (plasmashell) remains running after unit stopped.
Sep 03 22:43:38 fsworld009-fw16 systemd[1871]: Failed to start KDE Plasma Workspace.
Sep 03 22:43:38 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Consumed 61ms CPU time, 528.7M memory peak.
Sep 03 22:43:39 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Scheduled restart job, restart counter is at 1.
Sep 03 22:43:39 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Found left-over process 2190 (plasmashell) in control group while starting unit. Ignoring.
Sep 03 22:43:39 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Sep 03 22:43:39 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Found left-over process 118912 (plasmashell) in control group while starting unit. Ignoring.
Sep 03 22:43:39 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Sep 03 22:43:39 fsworld009-fw16 systemd[1871]: Starting KDE Plasma Workspace...
Sep 03 22:44:19 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: start operation timed out. Terminating.
Sep 03 22:44:59 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: State 'stop-sigterm' timed out. Killing.
Sep 03 22:44:59 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 119155 (plasmashell) with signal SIGKILL.
Sep 03 22:44:59 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 2190 (plasmashell) with signal SIGKILL.
Sep 03 22:44:59 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 118912 (plasmashell) with signal SIGKILL.
Sep 03 22:45:39 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Processes still around after SIGKILL. Ignoring.
Sep 03 22:46:20 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: State 'final-sigterm' timed out. Killing.
Sep 03 22:46:20 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 119155 (plasmashell) with signal SIGKILL.
Sep 03 22:46:20 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 2190 (plasmashell) with signal SIGKILL.
Sep 03 22:46:20 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 118912 (plasmashell) with signal SIGKILL.
Sep 03 22:47:00 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Processes still around after final SIGKILL. Entering failed mode.
Sep 03 22:47:00 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Failed with result 'timeout'.
Sep 03 22:47:00 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Unit process 2190 (plasmashell) remains running after unit stopped.
Sep 03 22:47:00 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Unit process 118912 (plasmashell) remains running after unit stopped.
Sep 03 22:47:00 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Unit process 119155 (plasmashell) remains running after unit stopped.
Sep 03 22:47:00 fsworld009-fw16 systemd[1871]: Failed to start KDE Plasma Workspace.
Sep 03 22:47:00 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Consumed 60ms CPU time, 528.7M memory peak.
Sep 03 22:47:00 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Scheduled restart job, restart counter is at 2.
Sep 03 22:47:00 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Found left-over process 2190 (plasmashell) in control group while starting unit. Ignoring.
Sep 03 22:47:00 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Sep 03 22:47:00 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Found left-over process 118912 (plasmashell) in control group while starting unit. Ignoring.
Sep 03 22:47:00 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Sep 03 22:47:00 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Found left-over process 119155 (plasmashell) in control group while starting unit. Ignoring.
Sep 03 22:47:00 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Sep 03 22:47:00 fsworld009-fw16 systemd[1871]: Starting KDE Plasma Workspace...
Sep 03 22:47:40 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: start operation timed out. Terminating.
Sep 03 22:48:20 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: State 'stop-sigterm' timed out. Killing.
Sep 03 22:48:20 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 120203 (plasmashell) with signal SIGKILL.
Sep 03 22:48:20 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 2190 (plasmashell) with signal SIGKILL.
Sep 03 22:48:20 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 118912 (plasmashell) with signal SIGKILL.
Sep 03 22:48:20 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 119155 (plasmashell) with signal SIGKILL.
Sep 03 22:49:00 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Processes still around after SIGKILL. Ignoring.
Sep 03 22:49:41 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: State 'final-sigterm' timed out. Killing.
Sep 03 22:49:41 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 120203 (plasmashell) with signal SIGKILL.
Sep 03 22:49:41 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 2190 (plasmashell) with signal SIGKILL.
Sep 03 22:49:41 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 118912 (plasmashell) with signal SIGKILL.
Sep 03 22:49:41 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Killing process 119155 (plasmashell) with signal SIGKILL.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Processes still around after final SIGKILL. Entering failed mode.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Failed with result 'timeout'.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Unit process 2190 (plasmashell) remains running after unit stopped.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Unit process 118912 (plasmashell) remains running after unit stopped.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Unit process 119155 (plasmashell) remains running after unit stopped.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Unit process 120203 (plasmashell) remains running after unit stopped.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: Failed to start KDE Plasma Workspace.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Consumed 55ms CPU time, 530.4M memory peak.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Scheduled restart job, restart counter is at 3.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Found left-over process 2190 (plasmashell) in control group while starting unit. Ignoring.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Found left-over process 118912 (plasmashell) in control group while starting unit. Ignoring.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Found left-over process 119155 (plasmashell) in control group while starting unit. Ignoring.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: Found left-over process 120203 (plasmashell) in control group while starting unit. Ignoring.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: plasma-plasmashell.service: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Sep 03 22:50:21 fsworld009-fw16 systemd[1871]: Starting KDE Plasma Workspace...
-- Boot a62f613dfcad4ab98193aeab0fcfc8e4 --
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment