Skip to content

Commit

Permalink
chore: remove unused ujust commands
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyalOughtness authored Nov 27, 2024
1 parent 5253aa2 commit c2795a4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 45 deletions.
7 changes: 0 additions & 7 deletions docs/POSTINSTALL-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ rpm-ostree kargs \
--append-if-missing=initcall_blacklist=simpledrm_platform_driver_init
```

### Nvidia optimus laptop
If you are using an nvidia image on an optimus laptop, run this after installation:

```
ujust configure-nvidia-optimus
```

## Enroll secureboot key

```
Expand Down
37 changes: 0 additions & 37 deletions files/justfiles/utilities.just
Original file line number Diff line number Diff line change
Expand Up @@ -141,40 +141,3 @@ toolbox-assemble CONTAINER="prompt" ACTION="create" FILE="/etc/toolbox/toolbox.i
# Toolboxes are gathered from toolbox.ini, please add them there
source /usr/lib/ujust/ujust.sh
ToolboxAssembleList {{ FILE }} {{ ACTION }} {{ CONTAINER }}

alias nvidia := configure-nvidia

# Configure the Nvidia driver
configure-nvidia ACTION="prompt":
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
OPTION={{ ACTION }}
if [ "$OPTION" == "prompt" ]; then
echo "${bold}Configuring Nvidia drivers${normal}"
echo 'What would you like to do?'
OPTION=$(ugum choose "Set needed kernel arguments" "Test CUDA support")
elif [ "$OPTION" == "help" ]; then
echo "Usage: ujust configure-nvidia <option>"
echo " <option>: Specify the quick option - 'kargs' or 'test-cuda'"
echo " Use 'kargs' to Set needed kernel arguments"
echo " Use 'test-cuda' to Test CUDA support"
exit 0
fi
if [ "$OPTION" == "Set needed kernel arguments" ] || [ "${OPTION,,}" == "kargs" ]; then
if command -v nvidia-smi; then
else
echo 'You do not appear to be on a Nvidia image, please refer to the README for your uBlue-OS image.'
fi
elif [ "$OPTION" == "Test CUDA support" ] || [ "${OPTION,,}" == "test-cuda" ]; then
if lsmod | grep -wq "nvidia"; then
podman run \
--user 1000:1000 \
--security-opt=no-new-privileges \
--cap-drop=ALL \
--security-opt label=type:nvidia_container_t \
--device=nvidia.com/gpu=all \
docker.io/nvidia/samples:vectoradd-cuda11.2.1
else
echo 'The Nvidia kernel module is not loaded. You may be using secure boot without the needed signing key, lacking the needed kargs, or may not be on a Nvidia image. See "just enroll-secure-boot-key" and "just nvidia-set-kargs".'
fi
fi
2 changes: 1 addition & 1 deletion files/system/usr/libexec/deprecated-images.json.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Rebase to: The equivalent image without `-laptop`. For example, for `kinoite-mai

Rationale: Upstream recommendations have changed and improvements are being made to PPD. Additionally, nvidia optimus configuration has moved to upstream `just` commands.

Rebase to: The equivalent image without `-laptop`. For example, for `kinoite-nvidia-laptop-hardened`, rebase to `kinoite-nvidia-hardened` and reboot. Then, run `ujust configure-nvidia-optimus`.
Rebase to: The equivalent image without `-laptop`. For example, for `kinoite-nvidia-laptop-hardened`, rebase to `kinoite-nvidia-hardened` and reboot.

0 comments on commit c2795a4

Please sign in to comment.