Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap operations fail when using CLI #163

Open
LukeShortCloud opened this issue Nov 6, 2023 · 2 comments
Open

Swap operations fail when using CLI #163

LukeShortCloud opened this issue Nov 6, 2023 · 2 comments

Comments

@LukeShortCloud
Copy link

Trying to run commands such as

$ sudo -E ~/.cryo_utilities/cryo_utilities swap 17

and

$ sudo -E ~/.cryo_utilities/cryo_utilities swappiness 2

fail. This might be related to the fact that running the command with sudo does not work and requires sudo -E which has variables from the deck user. Refer to: #124

I ran an strace to get more debug logging for the first command. I found that this is the dd command that it tries to run for the swap resize. Notice that the of= is blank. It should be of=/home/swapfile.

$ sudo -E strace -vfs 512 -o /tmp/strace.k ~/.cryo_utilities/cryo_utilities swap 17
$ sudo vim /tmp/strace.k
5849  execve("/usr/bin/dd", ["dd", "if=/dev/zero", "of=", "bs=1G", "count=17", "status=progress"], ["LANG=en_US.UTF-8", "TERM=xterm-256color", "PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/home/deck/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl", "MAIL=/var/mail/root", "LOGNAME=root", "USER=root", "HOME=/root", "SHELL=/bin/bash", "SUDO_COMMAND=/usr/bin/dd if=/dev/zero of= bs=1G count=17 status=progress", "SUDO_USER=root", "SUDO_UID=0", "SUDO_GID=0"]) = 0

Tested on SteamOS 3.4.11 with CryoUtilities 2.2.0.

@CryoByte33
Copy link
Owner

Very interesting, thank you for the report! Are you using a Steam Deck running SteamOS, and if so have you used the BTRFS script?

@LukeShortCloud
Copy link
Author

And thank you for the response!

Yes, I am on the Steam Deck with SteamOS.

No, I have not converted my ext4 partitions to Btrfs. I know there are a few projects to do that and I have never downloaded or used any before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants