fix amdvlk taking over
This commit is contained in:
parent
48b35b4479
commit
d2f361fcde
@ -1,29 +0,0 @@
|
||||
pika-amdgpu-core (100:22.40.50403-1538781~22.04-3) lunar; urgency=low
|
||||
|
||||
* Update to 22.40.50403-1538781
|
||||
|
||||
-- Ward Nakchbandi <hotrod.master@hotmail.com> Sat, 01 Oct 2022 14:50:00 +0200
|
||||
|
||||
pika-amdgpu-core (100:22.40.50401-1518373~22.04) kinetic; urgency=low
|
||||
|
||||
* add a firmware apt hook
|
||||
|
||||
-- Ward Nakchbandi <hotrod.master@hotmail.com> Sat, 01 Oct 2022 14:50:00 +0200
|
||||
|
||||
pika-amdgpu-core (100:22.20.50205-1511376~22.04-14) kinetic; urgency=low
|
||||
|
||||
* switch to systemd service
|
||||
|
||||
-- Ward Nakchbandi <hotrod.master@hotmail.com> Sat, 01 Oct 2022 14:50:00 +0200
|
||||
|
||||
pika-amdgpu-core (100:22.20.50205-1511376~22.04-13) kinetic; urgency=low
|
||||
|
||||
* remove broken apt hook
|
||||
|
||||
-- Ward Nakchbandi <hotrod.master@hotmail.com> Sat, 01 Oct 2022 14:50:00 +0200
|
||||
|
||||
pika-amdgpu-core (100:22.40.50403-538781~22.04) lunar; urgency=low
|
||||
|
||||
* Initial Creation
|
||||
|
||||
-- Ward Nakchbandi <hotrod.master@hotmail.com> Sat, 01 Oct 2022 14:50:00 +0200
|
@ -1,17 +0,0 @@
|
||||
Source: pika-amdgpu-core
|
||||
Section: metapackages
|
||||
Priority: optional
|
||||
Maintainer: Ward Nakchbandi <hotrod.master@hotmail.com>
|
||||
Build-Depends: debhelper-compat (= 13)
|
||||
Standards-Version: 4.6.1
|
||||
Homepage: https://repo.radeon.com/
|
||||
|
||||
Package: pika-amdgpu-core
|
||||
Section: metapackages
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, libdrm-amdgpu-amdgpu1, libdrm-amdgpu-radeon1, libdrm2-amdgpu, libdrm-amdgpu-common, amdgpu-dkms-firmware
|
||||
Suggests: amdgpu-vulkan-switcher, amdgpu-opengl-switcher, amdgpu-opencl-switcher, pika-amdgpu-config
|
||||
Provides: amdgpu-core, amdgpu-pro-core, amdgpu-dkms, amdgpu-pro-lib32
|
||||
Multi-Arch: foreign
|
||||
Description: Core meta package for Pro components of the unified amdgpu driver, with mesa priority.
|
||||
|
@ -1,8 +0,0 @@
|
||||
Files: *
|
||||
Copyright: 2022 Ward Nakchbandi <hotrod.master@hotmail.com>
|
||||
License: GPL-2
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2022 Ward Nakchbandi <hotrod.master@hotmail.com>
|
||||
License: GPL-2
|
||||
|
@ -1,2 +0,0 @@
|
||||
etc
|
||||
usr
|
@ -1,21 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# Enable systemd service
|
||||
|
||||
systemctl enable --now amdgpu-pro-lib.service || echo "amdgpu-pro-lib service could not be enabled"
|
||||
|
||||
# Add firmware
|
||||
|
||||
rm -r /usr/src/amdgpu-official || echo
|
||||
|
||||
ln -s /usr/src/"$(ls /usr/src/ | grep amdgpu- | sort -nr | head -n1)" /usr/src/amdgpu-official
|
||||
|
||||
rm -r /usr/lib/firmware/amdgpu || echo
|
||||
|
||||
ln -s /usr/src/amdgpu-official/firmware/amdgpu /usr/lib/firmware/
|
||||
|
||||
update-initramfs -c -k all
|
||||
|
||||
#
|
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
systemctl disable --now amdgpu-pro-lib.service || echo "amdgpu-pro-lib service could not be disabled"
|
||||
|
||||
rm -r /usr/lib/firmware/amdgpu || echo
|
||||
|
||||
update-initramfs -c -k all
|
||||
|
||||
# Add firmware
|
@ -1,2 +0,0 @@
|
||||
DPkg::Pre-Install-Pkgs {"/usr/share/dpkg/scripts/amdgpu-firmware-hook.sh pre";};
|
||||
DPkg::Post-Invoke {"/usr/share/dpkg/scripts/amdgpu-firmware-hook.sh post";};
|
@ -1,2 +0,0 @@
|
||||
DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
|
||||
ROC_ENABLE_PRE_VEGA=1
|
@ -1,8 +0,0 @@
|
||||
[Unit]
|
||||
Description=Prevents AMDGPU-PRO dangerous behaviour and symlinks its firmware and libraries to sytem path.
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/amdgpu-lib-refresh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,5 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
sudo /usr/bin/amdgpu-lib-refresh
|
||||
sudo update-initramfs -c -k all
|
||||
|
@ -1,289 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Disables amdgpu-pro libraries to fallback to mesa
|
||||
# USE wrappers instead
|
||||
|
||||
export PRO_DISABLED=0
|
||||
export AMD_DISABLED=0
|
||||
export BIN_AMD_DISABLED=0
|
||||
export BIN_INTEL_DISABLED=0
|
||||
export ENC_EXISTS=0
|
||||
export AMF_EXISTS=0
|
||||
export AMD64_OPENCL_LEGACY_AMDGPU_PRO_ICD_EXISTS=0
|
||||
export AMD64_OCL_ICD_LIBOPENCL1_AMDGPU_PRO_EXISTS=0
|
||||
export AMD64_OCL_ICD_LIBOPENCL1_AMDGPU_PRO_DEV_EXISTS=0
|
||||
export I386_OPENCL_LEGACY_AMDGPU_PRO_ICD_EXISTS=0
|
||||
export I386_OCL_ICD_LIBOPENCL1_AMDGPU_PRO_EXISTS=0
|
||||
export I386_OCL_ICD_LIBOPENCL1_AMDGPU_PRO_DEV_EXISTS=0
|
||||
export AMD64_LIBGL1_AMDGPU_PRO_OGLP_EXT_EXISTS=0
|
||||
export AMD64_LIBGL1_AMDGPU_PRO_OGLP_GBM_EXISTS=0
|
||||
export AMD64_LIBEGL1_AMDGPU_PRO_OGLP_EXISTS=0
|
||||
export AMD64_LIBGL1_AMDGPU_PRO_OGLP_DRI_EXISTS=0
|
||||
export AMD64_LIBGL1_AMDGPU_PRO_OGLP_GLX_EXISTS=0
|
||||
export AMD64_LIBGLES1_AMDGPU_PRO_OGLP_EXISTS=0
|
||||
export AMD64_LIBGLES2_AMDGPU_PRO_OGLP_EXISTS=0
|
||||
export I386_LIBEGL1_AMDGPU_PRO_OGLP_EXISTS=0
|
||||
export I386_LIBGL1_AMDGPU_PRO_OGLP_DRI_EXISTS=0
|
||||
export I386_LIBGL1_AMDGPU_PRO_OGLP_GLX_EXISTS=0
|
||||
export I386_LIBGLES1_AMDGPU_PRO_OGLP_EXISTS=0
|
||||
export I386_LIBGLES2_AMDGPU_PRO_OGLP_EXISTS=0
|
||||
export AMD64_VULKAN_AMDGPU_PRO_EXISTS=0
|
||||
export I386_VULKAN_AMDGPU_PRO_EXISTS=0
|
||||
export AMD64_AMDVLK_EXISTS=0
|
||||
export I386_AMDVLK_EXISTS=0
|
||||
|
||||
# Add firmware
|
||||
|
||||
rm -r /usr/src/amdgpu-official || echo
|
||||
|
||||
ln -s /usr/src/"$(ls /usr/src/ | grep amdgpu- | sort -nr | head -n1)" /usr/src/amdgpu-official
|
||||
|
||||
rm -r /usr/lib/firmware/amdgpu || echo
|
||||
|
||||
ln -s /usr/src/amdgpu-official/firmware/amdgpu /usr/lib/firmware/
|
||||
|
||||
# Check files and packages
|
||||
|
||||
### Check if library paths are disables
|
||||
|
||||
cat /etc/ld.so.conf.d/10-amdgpu-pro.conf | grep "#" && export PRO_DISABLED=1
|
||||
|
||||
cat /etc/ld.so.conf.d/20-amdgpu.conf | grep "#" && export AMD_DISABLED=1
|
||||
|
||||
cat /etc/ld.so.conf.d/10-amdgpu-pro-x86_64.conf | grep "#" && export BIN_AMD_DISABLED=1
|
||||
|
||||
cat /etc/ld.so.conf.d/10-amdgpu-pro-i386.conf | grep "#" && export BIN_INTEL_DISABLED=1
|
||||
|
||||
### Check if amf libraries exist
|
||||
|
||||
ls /opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdenc* && export ENC_EXISTS=1
|
||||
|
||||
ls /opt/amdgpu-pro/lib/x86_64-linux-gnu/libamf* && export AMF_EXISTS=1
|
||||
|
||||
### Check if amd64 opencl packages exist
|
||||
|
||||
dpkg -s opencl-legacy-amdgpu-pro-icd:amd64 && export AMD64_OPENCL_LEGACY_AMDGPU_PRO_ICD_EXISTS=1
|
||||
|
||||
dpkg -s ocl-icd-libopencl1-amdgpu-pro:amd64 && export AMD64_OCL_ICD_LIBOPENCL1_AMDGPU_PRO_EXISTS=1
|
||||
|
||||
dpkg -s ocl-icd-libopencl1-amdgpu-pro-dev:amd64 && export AMD64_OCL_ICD_LIBOPENCL1_AMDGPU_PRO_DEV_EXISTS=1
|
||||
|
||||
### Check if i386 opencl packages exist
|
||||
|
||||
dpkg -s opencl-legacy-amdgpu-pro-icd:i386 && export I386_OPENCL_LEGACY_AMDGPU_PRO_ICD_EXISTS=1
|
||||
|
||||
dpkg -s ocl-icd-libopencl1-amdgpu-pro:i386 && export I386_OCL_ICD_LIBOPENCL1_AMDGPU_PRO_EXISTS=1
|
||||
|
||||
dpkg -s ocl-icd-libopencl1-amdgpu-pro-dev:i386 && export I386_OCL_ICD_LIBOPENCL1_AMDGPU_PRO_DEV_EXISTS=1
|
||||
|
||||
|
||||
### Check if amd64 opengl packages exist
|
||||
|
||||
dpkg -s libgl1-amdgpu-pro-oglp-ext:amd64 && export AMD64_LIBGL1_AMDGPU_PRO_OGLP_EXT_EXISTS=1
|
||||
|
||||
dpkg -s libgl1-amdgpu-pro-oglp-gbm:amd64 && export AMD64_LIBGL1_AMDGPU_PRO_OGLP_GBM_EXISTS=1
|
||||
|
||||
|
||||
dpkg -s libegl1-amdgpu-pro-oglp:amd64 && export AMD64_LIBEGL1_AMDGPU_PRO_OGLP_EXISTS=1
|
||||
|
||||
dpkg -s libgl1-amdgpu-pro-oglp-dri:amd64 && export AMD64_LIBGL1_AMDGPU_PRO_OGLP_DRI_EXISTS=1
|
||||
|
||||
dpkg -s libgl1-amdgpu-pro-oglp-glx:amd64 && export AMD64_LIBGL1_AMDGPU_PRO_OGLP_GLX_EXISTS=1
|
||||
|
||||
dpkg -s libgles1-amdgpu-pro-oglp:amd64 && export AMD64_LIBGLES1_AMDGPU_PRO_OGLP_EXISTS=1
|
||||
|
||||
dpkg -s libgles2-amdgpu-pro-oglp:amd64 && export AMD64_LIBGLES2_AMDGPU_PRO_OGLP_EXISTS=1
|
||||
|
||||
### Check if i386 opengl packages exist
|
||||
|
||||
dpkg -s libegl1-amdgpu-pro-oglp:i386 && export I386_LIBEGL1_AMDGPU_PRO_OGLP_EXISTS=1
|
||||
|
||||
dpkg -s libgl1-amdgpu-pro-oglp-dri:i386 && export I386_LIBGL1_AMDGPU_PRO_OGLP_DRI_EXISTS=1
|
||||
|
||||
dpkg -s libgl1-amdgpu-pro-oglp-glx:i386 && export I386_LIBGL1_AMDGPU_PRO_OGLP_GLX_EXISTS=1
|
||||
|
||||
dpkg -s libgles1-amdgpu-pro-oglp:i386 && export I386_LIBGLES1_AMDGPU_PRO_OGLP_EXISTS=1
|
||||
|
||||
dpkg -s libgles2-amdgpu-pro-oglp:i386 && export I386_LIBGLES2_AMDGPU_PRO_OGLP_EXISTS=1
|
||||
|
||||
### Check if amd64 vulkan packages exist
|
||||
|
||||
dpkg -s vulkan-amdgpu-pro:amd64 && export AMD64_VULKAN_AMDGPU_PRO_EXISTS=1
|
||||
|
||||
### Check if i386 vulkan packages exist
|
||||
|
||||
dpkg -s vulkan-amdgpu-pro:i386 && export I386_VULKAN_AMDGPU_PRO_EXISTS=1
|
||||
|
||||
### Check if amd64 free vulkan packages exist
|
||||
|
||||
dpkg -s amdvlk:amd64 && export AMD64_AMDVLK_EXISTS=1
|
||||
|
||||
### Check if i386 free vulkan packages exist
|
||||
|
||||
dpkg -s amdvlk:i386 && export I386_AMDVLK_EXISTS=1
|
||||
|
||||
|
||||
# Take Actions
|
||||
|
||||
### Get rid of dangerous library paths
|
||||
|
||||
if [[ "${PRODISABLED}" != 1 ]]; then
|
||||
sed -i.old -e 's/^/#/' /etc/ld.so.conf.d/10-amdgpu-pro.conf
|
||||
fi
|
||||
|
||||
if [[ "${AMDDISABLED}" != 1 ]]; then
|
||||
sed -i.old -e 's/^/#/' /etc/ld.so.conf.d/20-amdgpu.conf
|
||||
fi
|
||||
|
||||
if [[ "${BIN_AMD_DISABLED}" != 1 ]]; then
|
||||
sed -i.old -e 's/^/#/' /etc/ld.so.conf.d/10-amdgpu-pro-x86_64.conf
|
||||
fi
|
||||
|
||||
if [[ "${BIN_INTEL_DISABLED}" != 1 ]]; then
|
||||
sed -i.old -e 's/^/#/' /etc/ld.so.conf.d/10-amdgpu-pro-i386.conf
|
||||
fi
|
||||
|
||||
### Link AMF libraries to system lib path
|
||||
|
||||
if [[ "${ENC_EXISTS}" != 0 ]]; then
|
||||
ln -s /opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdenc* /usr/lib/x86_64-linux-gnu/
|
||||
fi
|
||||
|
||||
if [[ "${AMF_EXISTS}" != 0 ]]; then
|
||||
ln -s /opt/amdgpu-pro/lib/x86_64-linux-gnu/libamf* /usr/lib/x86_64-linux-gnu/
|
||||
fi
|
||||
|
||||
|
||||
### Link amd64 opencl packages
|
||||
rm -rf /opt/amdgpu-pro/pika/opencl/x86_64-linux-gnu || echo
|
||||
if [[ "${AMD64_OPENCL_LEGACY_AMDGPU_PRO_ICD_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opencl/x86_64-linux-gnu
|
||||
for i in $(dpkg-query -L opencl-legacy-amdgpu-pro-icd:amd64 | grep /x86_64-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opencl/x86_64-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
if [[ "${AMD64_OCL_ICD_LIBOPENCL1_AMDGPU_PRO_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opencl/x86_64-linux-gnu
|
||||
for i in $(dpkg-query -L ocl-icd-libopencl1-amdgpu-pro:amd64 | grep /x86_64-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opencl/x86_64-linux-gnu/ ; done
|
||||
fi
|
||||
if [[ "${AMD64_OCL_ICD_LIBOPENCL1_AMDGPU_PRO_DEV_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opencl/x86_64-linux-gnu
|
||||
for i in $(dpkg-query -L ocl-icd-libopencl1-amdgpu-pro-dev:amd64 | grep /x86_64-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opencl/x86_64-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
### Link i386 opencl packages
|
||||
rm -rf /opt/amdgpu-pro/pika/opencl/i386-linux-gnu || echo
|
||||
if [[ "${I386_OPENCL_LEGACY_AMDGPU_PRO_ICD_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opencl/i386-linux-gnu
|
||||
for i in $(dpkg-query -L opencl-legacy-amdgpu-pro-icd:i386 | grep /i386-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opencl/i386-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
if [[ "${I386_OCL_ICD_LIBOPENCL1_AMDGPU_PRO_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opencl/i386-linux-gnu
|
||||
for i in $(dpkg-query -L ocl-icd-libopencl1-amdgpu-pro:i386 | grep /i386-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opencl/i386-linux-gnu/ ; done
|
||||
fi
|
||||
if [[ "${I386_OCL_ICD_LIBOPENCL1_AMDGPU_PRO_DEV_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opencl/i386-linux-gnu
|
||||
for i in $(dpkg-query -L ocl-icd-libopencl1-amdgpu-pro-dev:i386 | grep /i386-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opencl/i386-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
### Link amd64 opengl packages
|
||||
rm -rf /opt/amdgpu-pro/pika/opengl/x86_64-linux-gnu || echo
|
||||
|
||||
if [[ "${AMD64_LIBGL1_AMDGPU_PRO_OGLP_EXT_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opengl/x86_64-linux-gnu
|
||||
for i in $(dpkg-query -L libgl1-amdgpu-pro-oglp-ext:amd64 | grep /x86_64-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opengl/x86_64-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
if [[ "${AMD64_LIBGL1_AMDGPU_PRO_OGLP_GBM_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opengl/x86_64-linux-gnu
|
||||
for i in $(dpkg-query -L libgl1-amdgpu-pro-oglp-gbm:amd64 | grep /x86_64-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opengl/x86_64-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
|
||||
if [[ "${AMD64_LIBEGL1_AMDGPU_PRO_OGLP_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opengl/x86_64-linux-gnu
|
||||
for i in $(dpkg-query -L libegl1-amdgpu-pro-oglp:amd64 | grep /x86_64-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opengl/x86_64-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
if [[ "${AMD64_LIBGL1_AMDGPU_PRO_OGLP_DRI_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opengl/x86_64-linux-gnu
|
||||
for i in $(dpkg-query -L libgl1-amdgpu-pro-oglp-dri:amd64 | grep /x86_64-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opengl/x86_64-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
if [[ "${AMD64_LIBGL1_AMDGPU_PRO_OGLP_GLX_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opengl/x86_64-linux-gnu
|
||||
for i in $(dpkg-query -L libgl1-amdgpu-pro-oglp-glx:amd64 | grep /x86_64-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opengl/x86_64-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
if [[ "${AMD64_LIBGLES1_AMDGPU_PRO_OGLP_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opengl/x86_64-linux-gnu
|
||||
for i in $(dpkg-query -L libgles1-amdgpu-pro-oglp:amd64 | grep /x86_64-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opengl/x86_64-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
if [[ "${AMD64_LIBGLES2_AMDGPU_PRO_OGLP_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opengl/x86_64-linux-gnu
|
||||
for i in $(dpkg-query -L libgles2-amdgpu-pro-oglp:amd64 | grep /x86_64-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opengl/x86_64-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
### Link i386 opengl packages
|
||||
rm -rf /opt/amdgpu-pro/pika/opengl/i386-linux-gnu || echo
|
||||
|
||||
if [[ "${I386_LIBEGL1_AMDGPU_PRO_OGLP_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opengl/i386-linux-gnu
|
||||
for i in $(dpkg-query -L libegl1-amdgpu-pro-oglp:i386 | grep /i386-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opengl/i386-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
if [[ "${I386_LIBGL1_AMDGPU_PRO_OGLP_DRI_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opengl/i386-linux-gnu
|
||||
for i in $(dpkg-query -L libgl1-amdgpu-pro-oglp-dri:i386 | grep /i386-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opengl/i386-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
if [[ "${I386_LIBGL1_AMDGPU_PRO_OGLP_GLX_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opengl/i386-linux-gnu
|
||||
for i in $(dpkg-query -L libgl1-amdgpu-pro-oglp-glx:i386 | grep /i386-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opengl/i386-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
if [[ "${I386_LIBGLES1_AMDGPU_PRO_OGLP_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opengl/i386-linux-gnu
|
||||
for i in $(dpkg-query -L libgles1-amdgpu-pro-oglp:i386 | grep /i386-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opengl/i386-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
if [[ "${I386_LIBGLES2_AMDGPU_PRO_OGLP_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/opengl/i386-linux-gnu
|
||||
for i in $(dpkg-query -L libgles2-amdgpu-pro-oglp:i386 | grep /i386-linux-gnu/ ); do ln -sfv $i /opt/amdgpu-pro/pika/opengl/i386-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
### Link amd64 vulkan packages
|
||||
rm -rf /opt/amdgpu-pro/pika/vulkan/x86_64-linux-gnu || echo
|
||||
if [[ "${AMD64_VULKAN_AMDGPU_PRO_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/vulkan/x86_64-linux-gnu
|
||||
for i in $(dpkg-query -L vulkan-amdgpu-pro:amd64 | grep /x86_64-linux-gnu/ ); do ln -sfv $i //opt/amdgpu-pro/pika/vulkan/x86_64-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
### Link i386 vulkan packages
|
||||
rm -rf /opt/amdgpu-pro/pika/vulkan/i386-linux-gnu || echo
|
||||
if [[ "${I386_VULKAN_AMDGPU_PRO_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu-pro/pika/vulkan/i386-linux-gnu
|
||||
for i in $(dpkg-query -L vulkan-amdgpu-pro:i386 | grep /i386-linux-gnu/ ); do ln -sfv $i //opt/amdgpu-pro/pika/vulkan/i386-linux-gnu/ ; done
|
||||
fi
|
||||
|
||||
### Link amd64 free vulkan packages
|
||||
rm -rf /opt/amdgpu/pika/vulkan/x86_64-linux-gnu || echo
|
||||
if [[ "${AMD64_AMDVLK_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu/pika/vulkan/x86_64-linux-gnu
|
||||
for i in $(dpkg-query -L amdvlk:amd64 | grep /x86_64-linux-gnu/ ); do ln -sfv $i /opt/amdgpu/pika/vulkan/x86_64-linux-gnu/ ; done
|
||||
mkdir -p /opt/amdgpu/share/vulkan/icd.d/
|
||||
mv /etc/vulkan/icd.d/amd_icd*.json /opt/amdgpu/share/vulkan/icd.d/ || true
|
||||
fi
|
||||
|
||||
### Link i386 free vulkan packages
|
||||
rm -rf /opt/amdgpu/pika/vulkan/i386-linux-gnu || echo
|
||||
if [[ "${I386_AMDVLK_EXISTS}" != 0 ]]; then
|
||||
mkdir -p /opt/amdgpu/pika/vulkan/i386-linux-gnu
|
||||
for i in $(dpkg-query -L amdvlk:i386 | grep /i386-linux-gnu/ ); do ln -sfv $i /opt/amdgpu/pika/vulkan/i386-linux-gnu/ ; done
|
||||
mkdir -p /opt/amdgpu/share/vulkan/icd.d/
|
||||
mv /etc/vulkan/icd.d/amd_icd*.json /opt/amdgpu/share/vulkan/icd.d/ || true
|
||||
|
||||
fi
|
||||
|
||||
ldconfig
|
@ -1,24 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
if [[ $1 == pre ]]
|
||||
then
|
||||
if grep -q amdgpu-dkms-firmware
|
||||
then
|
||||
mkdir -p /var/lib/apt/hooks
|
||||
touch /var/lib/apt/hooks/amdgpu-dkms-firmware
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $1 == post ]]
|
||||
then
|
||||
if [[ -f /var/lib/apt/hooks/amdgpu-dkms-firmware ]]
|
||||
then
|
||||
amdgpu-firmware-refresh
|
||||
rm -rf /var/lib/apt/hooks/amdgpu-dkms-firmware
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
6
pika-amdgpu-switcher/Makefile
Normal file
6
pika-amdgpu-switcher/Makefile
Normal file
@ -0,0 +1,6 @@
|
||||
all:
|
||||
true
|
||||
|
||||
install:
|
||||
install -d $(DESTDIR)/
|
||||
cp -r usr $(DESTDIR)/
|
5
pika-amdgpu-switcher/debian/changelog
Normal file
5
pika-amdgpu-switcher/debian/changelog
Normal file
@ -0,0 +1,5 @@
|
||||
pika-amdgpu-switcher (2.0-99pika2) lunar; urgency=low
|
||||
|
||||
* Initial Creation
|
||||
|
||||
-- Ward Nakchbandi <hotrod.master@hotmail.com> Sun, 09 Oct 2022 18:34:00 +0300
|
17
pika-amdgpu-switcher/debian/control
Normal file
17
pika-amdgpu-switcher/debian/control
Normal file
@ -0,0 +1,17 @@
|
||||
Source: pika-amdgpu-switcher
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Maintainer: Ward Nakchbandi <hotrod.master@hotmail.com>
|
||||
Build-Depends: debhelper-compat (= 13)
|
||||
Standards-Version: 4.6.1
|
||||
Homepage: https://pikaproject.org/
|
||||
|
||||
Package: pika-amdgpu-switcher
|
||||
Section: misc
|
||||
Architecture: all
|
||||
Provides: amdgpu-vulkan-switcher, amdgpu-opengl-switcher, amdgpu-opencl-switcher
|
||||
Depends: ${misc:Depends}
|
||||
Description: Prefix Scripts to choose the driver for OpenGL, OpenCL, and Vulkan on amdgpus.
|
||||
|
||||
|
||||
|
9
pika-amdgpu-switcher/usr/bin/cl_pro
Executable file
9
pika-amdgpu-switcher/usr/bin/cl_pro
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# This script applies amdocl-pro OpenGL driver for specific application.
|
||||
# You can test the difference with clinfo utility.
|
||||
|
||||
export LD_LIBRARY_PATH="/opt/amdgpu/lib/x86_64-linux-gnu:/opt/amdgpu/lib/i386-linux-gnu:/opt/amdgpu-pro/pika/opencl/x86_64-linux-gnu:/opt/amdgpu-pro/pika/opencl/i386-linux-gnu:${LD_LIBRARY_PATH}"
|
||||
|
||||
# applied variables, now execute the rest of the command
|
||||
"$@"
|
15
pika-amdgpu-switcher/usr/bin/gl_mesa
Executable file
15
pika-amdgpu-switcher/usr/bin/gl_mesa
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# This script applies amdogl-pro/zink/mesa OpenGL driver for specific application.
|
||||
# You can test the difference (GL_VENDOR, GL_RENDERER, GL_VERSION) with glmark2 utility.
|
||||
#
|
||||
# Usage:
|
||||
# <gl_mesa|gl_zink|gl_pro> <app and its parameters>
|
||||
# For example:
|
||||
# $ gl_pro davinci-resolve
|
||||
# This will start davinci resolve with AMDGPU PRO OpenGL driver.
|
||||
|
||||
export __GLX_VENDOR_LIBRARY_NAME=mesa
|
||||
|
||||
# applied variables, now execute the rest of the command
|
||||
"$@"
|
15
pika-amdgpu-switcher/usr/bin/gl_pro
Executable file
15
pika-amdgpu-switcher/usr/bin/gl_pro
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# This script applies amdogl-pro/zink/mesa OpenGL driver for specific application.
|
||||
# You can test the difference (GL_VENDOR, GL_RENDERER, GL_VERSION) with glmark2 utility.
|
||||
#
|
||||
# Usage:
|
||||
# <gl_mesa|gl_zink|gl_pro> <app and its parameters>
|
||||
# For example:
|
||||
# $ gl_pro davinci-resolve
|
||||
# This will start davinci resolve with AMDGPU PRO OpenGL driver.
|
||||
|
||||
export LD_LIBRARY_PATH="/opt/amdgpu/lib/x86_64-linux-gnu:/opt/amdgpu/lib/i386-linux-gnu:/opt/amdgpu-pro/pika/opengl/x86_64-linux-gnu:/opt/amdgpu-pro/pika/opengl/i386-linux-gnu:${LD_LIBRARY_PATH}"
|
||||
|
||||
# applied variables, now execute the rest of the command
|
||||
"$@"
|
15
pika-amdgpu-switcher/usr/bin/gl_zink
Executable file
15
pika-amdgpu-switcher/usr/bin/gl_zink
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# This script applies amdogl-pro/zink/mesa OpenGL driver for specific application.
|
||||
# You can test the difference (GL_VENDOR, GL_RENDERER, GL_VERSION) with glmark2 utility.
|
||||
#
|
||||
# Usage:
|
||||
# <gl_mesa|gl_zink|gl_pro> <app and its parameters>
|
||||
# For example:
|
||||
# $ gl_pro davinci-resolve
|
||||
# This will start davinci resolve with AMDGPU PRO OpenGL driver.
|
||||
|
||||
export __GLX_VENDOR_LIBRARY_NAME=mesa MESA_LOADER_DRIVER_OVERRIDE=zink
|
||||
|
||||
# applied variables, now execute the rest of the command
|
||||
"$@"
|
20
pika-amdgpu-switcher/usr/bin/vk_amdvlk
Executable file
20
pika-amdgpu-switcher/usr/bin/vk_amdvlk
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# This script applies amdvlk-pro/amdvlk/radv Vulkan driver for specific application.
|
||||
# You can see the list of available drivers with vulkaninfo utility, see the driverName and driverID lines.
|
||||
#
|
||||
# Usage:
|
||||
# <vk_radv|vk_amdvlk|vk_pro> <app and its parameters>
|
||||
# For example:
|
||||
# $ vk_pro vkmark
|
||||
# This will start vkmark with AMDGPU PRO vulkan driver.
|
||||
|
||||
# When amdvlk is installed, then VK_ICD_FILENAMES is ignored and AMD_VULKAN_ICD is read instead. However, AMD_VULKAN_ICD does not allow you (afaics) select pro driver.
|
||||
# So we revert this behavior to standard one.
|
||||
|
||||
export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
|
||||
export LD_LIBRARY_PATH="/opt/amdgpu/lib/x86_64-linux-gnu:/opt/amdgpu/lib/i386-linux-gnu:${LD_LIBRARY_PATH}"
|
||||
export VK_ICD_FILENAMES="/opt/amdgpu/share/vulkan/icd.d/amd_icd32.json:/opt/amdgpu/share/vulkan/icd.d/amd_icd64.json"
|
||||
|
||||
# applied variables, now execute the rest of the command
|
||||
"$@"
|
20
pika-amdgpu-switcher/usr/bin/vk_pro
Executable file
20
pika-amdgpu-switcher/usr/bin/vk_pro
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# This script applies amdvlk-pro/amdvlk/radv Vulkan driver for specific application.
|
||||
# You can see the list of available drivers with vulkaninfo utility, see the driverName and driverID lines.
|
||||
#
|
||||
# Usage:
|
||||
# <vk_radv|vk_amdvlk|vk_pro> <app and its parameters>
|
||||
# For example:
|
||||
# $ vk_pro vkmark
|
||||
# This will start vkmark with AMDGPU PRO vulkan driver.
|
||||
|
||||
# When amdvlk is installed, then VK_ICD_FILENAMES is ignored and AMD_VULKAN_ICD is read instead. However, AMD_VULKAN_ICD does not allow you (afaics) select pro driver.
|
||||
# So we revert this behavior to standard one.
|
||||
|
||||
export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
|
||||
export LD_LIBRARY_PATH="/opt/amdgpu/lib/x86_64-linux-gnu:/opt/amdgpu/lib/i386-linux-gnu:${LD_LIBRARY_PATH}"
|
||||
export VK_ICD_FILENAMES="/opt/amdgpu-pro/etc/vulkan/icd.d/amd_icd32.json:/opt/amdgpu-pro/etc/vulkan/icd.d/amd_icd64.json"
|
||||
|
||||
# applied variables, now execute the rest of the command
|
||||
"$@"
|
18
pika-amdgpu-switcher/usr/bin/vk_radv
Executable file
18
pika-amdgpu-switcher/usr/bin/vk_radv
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# This script applies amdvlk-pro/amdvlk/radv Vulkan driver for specific application.
|
||||
# You can see the list of available drivers with vulkaninfo utility, see the driverName and driverID lines.
|
||||
#
|
||||
# Usage:
|
||||
# <vk_radv|vk_amdvlk|vk_pro> <app and its parameters>
|
||||
# For example:
|
||||
# $ vk_pro vkmark
|
||||
# This will start vkmark with AMDGPU PRO vulkan driver.
|
||||
|
||||
# When amdvlk is installed, then VK_ICD_FILENAMES is ignored and AMD_VULKAN_ICD is read instead. However, AMD_VULKAN_ICD does not allow you (afaics) select pro driver.
|
||||
# So we revert this behavior to standard one.
|
||||
|
||||
export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/radeon_icd.i686.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json"
|
||||
|
||||
# applied variables, now execute the rest of the command
|
||||
"$@"
|
@ -0,0 +1 @@
|
||||
_have cl_pro && complete -F _command cl_pro
|
@ -0,0 +1,3 @@
|
||||
_have gl_mesa && complete -F _command gl_mesa
|
||||
_have gl_zink && complete -F _command gl_zink
|
||||
_have gl_pro && complete -F _command gl_pro
|
@ -0,0 +1,3 @@
|
||||
_have gl_mesa && complete -F _command gl_mesa
|
||||
_have gl_zink && complete -F _command gl_zink
|
||||
_have gl_pro && complete -F _command gl_pro
|
@ -0,0 +1,3 @@
|
||||
_have gl_mesa && complete -F _command gl_mesa
|
||||
_have gl_zink && complete -F _command gl_zink
|
||||
_have gl_pro && complete -F _command gl_pro
|
@ -0,0 +1,4 @@
|
||||
_have vk_radv && complete -F _command vk_radv
|
||||
_have vk_amdvlk && complete -F _command vk_amdvlk
|
||||
_have vk_pro && complete -F _command vk_pro
|
||||
_have vk_legacy && complete -F _command vk_legacy
|
@ -0,0 +1,4 @@
|
||||
_have vk_radv && complete -F _command vk_radv
|
||||
_have vk_amdvlk && complete -F _command vk_amdvlk
|
||||
_have vk_pro && complete -F _command vk_pro
|
||||
_have vk_legacy && complete -F _command vk_legacy
|
@ -0,0 +1,4 @@
|
||||
_have vk_radv && complete -F _command vk_radv
|
||||
_have vk_amdvlk && complete -F _command vk_amdvlk
|
||||
_have vk_pro && complete -F _command vk_pro
|
||||
_have vk_legacy && complete -F _command vk_legacy
|
@ -0,0 +1,4 @@
|
||||
_have vk_radv && complete -F _command vk_radv
|
||||
_have vk_amdvlk && complete -F _command vk_amdvlk
|
||||
_have vk_pro && complete -F _command vk_pro
|
||||
_have vk_legacy && complete -F _command vk_legacy
|
Loading…
Reference in New Issue
Block a user