-
-
Save Nexarian/82cb4d48f07e9b9005123c21c8dc08e5 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash | |
set -e | |
sudo -v | |
sudo apt-get update | |
sudo apt-get dist-upgrade -y | |
sudo apt-get autoremove -y | |
sudo usermod $USER -a -G video | |
sudo usermod $USER -a -G tty | |
sudo usermod $USER -a -G render | |
# XRDP Build Pre-reqs Part 1 | |
sudo apt-get install -y git autoconf libtool pkg-config gcc g++ make libssl-dev libpam0g-dev \ | |
libjpeg-dev libx11-dev libxfixes-dev libxrandr-dev flex bison libxml2-dev intltool xsltproc \ | |
xutils-dev python3-libxml2 g++ xutils libfuse-dev libmp3lame-dev nasm libpixman-1-dev \ | |
xserver-xorg-dev libjson-c-dev libsndfile1-dev libspeex-dev libspeexdsp-dev libpulse-dev \ | |
libpulse0 autopoint \*turbojpeg\* libfdk-aac-dev libopus-dev libgbm-dev libx264\* \ | |
libx264-dev | |
#XRDP Build Pre-reqs Part 2 (For some reason apt needs this to be separate) | |
sudo apt-get install -y libepoxy-dev | |
BUILD_DIR=$(mktemp -d) | |
echo "Building Intel YAMI and Media Driver" | |
sudo rm -rf /opt/yami || true | |
sudo mkdir /opt/yami | |
sudo chown $USER:$USER /opt/yami | |
git clone https://github.com/Nexarian/builders.git --branch update-to-media-driver "$BUILD_DIR/builders" | |
cd "$BUILD_DIR/builders/yami/omatic" | |
./buildyami.sh --prefix=/opt/yami --disable-x11 | |
echo "Building xrdp..." | |
git clone https://github.com/Nexarian/xrdp.git --branch mainline_merge "$BUILD_DIR/xrdp" | |
cd "$BUILD_DIR/xrdp" | |
./bootstrap | |
XRDP_YAMI_CFLAGS="-I/opt/yami/include" XRDP_YAMI_LIBS="-I/opt/yami/lib" ./configure \ | |
--enable-fuse --enable-rfxcodec --enable-pixman --enable-mp3lame \ | |
--enable-sound --enable-opus --enable-fdkaac --enable-x264 --enable-yami | |
make -j $(nproc) clean all | |
sudo make install | |
echo "Building xorgxrdp..." | |
git clone https://github.com/Nexarian/xorgxrdp.git --branch mainline_merge "$BUILD_DIR/xorgxrdp" | |
cd "$BUILD_DIR/xorgxrdp" | |
./bootstrap | |
./configure --with-simd --enable-glamor | |
make -j $(nproc) clean all | |
sudo make install | |
#Allow permission to connect | |
sudo tee /etc/X11/Xwrapper.config > /dev/null << EOL | |
# Xwrapper.config (Debian X Window System server wrapper configuration file) | |
# | |
# This file was generated by the post-installation script of the | |
# xserver-xorg-legacy package using values from the debconf database. | |
# | |
# See the Xwrapper.config(5) manual page for more information. | |
# | |
# This file is automatically updated on upgrades of the xserver-xorg-legacy | |
# package *only* if it has not been modified since the last upgrade of that | |
# package. | |
# | |
# If you have edited this file but would like it to be automatically updated | |
# again, run the following command as root: | |
# dpkg-reconfigure xserver-xorg-legacy | |
needs_root_rights=no | |
allowed_users=anybody | |
EOL | |
#Disable nvidia | |
sudo sed -i -E 's#param=xrdp/xorg_nvidia.conf#param=xrdp/xorg.conf#' /etc/xrdp/sesman.ini | |
echo "Starting the server..." | |
sudo systemctl enable xrdp | |
sudo service xrdp start |
Hi, thank you for the script. When running the script I get the following error -- any idea, how to get rid of it? I am running Ubuntu 24.04.1 with an Intel HD 620. Thank you.
(...)
[ 4%] Building CXX object media_driver/CMakeFiles/iHD_drv_video_SOFTLET_CODEC.dir//media_softlet/agnostic/common/codec/hal/enc/shared/packet/encode_huc.cpp.o
In file included from /tmp/tmp.pIDJ5bgjAW/builders/yami/omatic/media-driver-intel-media-22.6.2/media_softlet/agnostic/common/shared/mediacopy/media_blt_copy_next.h:36,
from /tmp/tmp.pIDJ5bgjAW/builders/yami/omatic/media-driver-intel-media-22.6.2/media_softlet/agnostic/common/shared/mediacopy/media_blt_copy_next.cpp:31:
/tmp/tmp.pIDJ5bgjAW/builders/yami/omatic/media-driver-intel-media-22.6.2/media_softlet/agnostic/common/shared/mediacopy/media_blt_copy_next.cpp: In member function ‘virtual MOS_STATUS BltStateNext::SubmitCMD(PBLT_STATE_PARAM)’:
/tmp/tmp.pIDJ5bgjAW/builders/yami/omatic/media-driver-intel-media-22.6.2/media_softlet/agnostic/common/shared/mediacopy/media_copy_common.h:51:57: error: ‘VPHAL_MCP_BLT_COPY’ was not declared in this scope
51 | #define BLT_COPY ((uint32_t)(VPHAL_MCP_BLT_COPY))
| ^~~~~~~~~~~~~~~~~~
/tmp/tmp.pIDJ5bgjAW/builders/yami/omatic/media-driver-intel-media-22.6.2/media_softlet/agnostic/common/shared/mediacopy/media_blt_copy_next.cpp:861:49: note: in expansion of macro ‘BLT_COPY’
861 | m_osInterface->pfnSetPerfTag(m_osInterface, BLT_COPY);
| ^~~~~~~~
make[2]: *** [media_driver/CMakeFiles/iHD_drv_video_SOFTLET_COMMON.dir/build.make:356: media_driver/CMakeFiles/iHD_drv_video_SOFTLET_COMMON.dir//media_softlet/agnostic/common/shared/mediacopy/media_blt_copy_next.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:261: media_driver/CMakeFiles/iHD_drv_video_SOFTLET_COMMON.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 4%] Building CXX object media_driver/CMakeFiles/iHD_drv_video_CODEC.dir/agnostic/common/codec/hal/codechal_decode_sfc.cpp.o
(...)
[ 12%] Building CXX object media_driver/CMakeFiles/iHD_drv_video_SOFTLET_CODEC.dir/__/media_softlet/agnostic/common/codec/hal/enc/av1/features/encode_av1_scc.cpp.o
In file included from /tmp/tmp.pIDJ5bgjAW/builders/yami/omatic/media-driver-intel-media-22.6.2/media_driver/agnostic/common/shared/mediacopy/media_vebox_copy.h:37,
from /tmp/tmp.pIDJ5bgjAW/builders/yami/omatic/media-driver-intel-media-22.6.2/media_driver/agnostic/common/shared/mediacopy/media_vebox_copy.cpp:28:
/tmp/tmp.pIDJ5bgjAW/builders/yami/omatic/media-driver-intel-media-22.6.2/media_driver/agnostic/common/shared/mediacopy/media_vebox_copy.cpp: In member function ‘virtual MOS_STATUS VeboxCopyState::CopyMainSurface(PMOS_RESOURCE, PMOS_RESOURCE)’:
/tmp/tmp.pIDJ5bgjAW/builders/yami/omatic/media-driver-intel-media-22.6.2/media_softlet/agnostic/common/shared/mediacopy/media_copy_common.h:49:57: error: ‘VPHAL_MCP_VEBOX_COPY’ was not declared in this scope
49 | #define VEBOX_COPY ((uint32_t)(VPHAL_MCP_VEBOX_COPY))
| ^~~~~~~~~~~~~~~~~~~~
/tmp/tmp.pIDJ5bgjAW/builders/yami/omatic/media-driver-intel-media-22.6.2/media_driver/agnostic/common/shared/mediacopy/media_vebox_copy.cpp:151:48: note: in expansion of macro ‘VEBOX_COPY’
151 | m_osInterface->pfnSetPerfTag(m_osInterface,VEBOX_COPY);
| ^~~~~~~~~~
make[2]: *** [media_driver/CMakeFiles/iHD_drv_video_COMMON.dir/build.make:986: media_driver/CMakeFiles/iHD_drv_video_COMMON.dir/agnostic/common/shared/mediacopy/media_vebox_copy.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:235: media_driver/CMakeFiles/iHD_drv_video_COMMON.dir/all] Error 2
(...)
[ 55%] Building CXX object media_driver/CMakeFiles/iHD_drv_video_SOFTLET_CODEC.dir/__/media_softlet/agnostic/Xe2_M_plus/Xe2_LPM/codec/hal/dec/vvc/packet/decode_vvc_s2l_packet_xe2_lpm_base.cpp.o
[ 55%] Built target iHD_drv_video_SOFTLET_CODEC
make: *** [Makefile:156: all] Error 2
error make intel-media-22.6.2
Got error message as follows:
[ 76%] Building CXX object media_driver/CMakeFiles/iHD_drv_video_COMMON.dir//media_softlet/linux/Xe_M_plus/ddi/media_libva_caps_mtl.cpp.o
/tmp/tmp.rXjaKtqClx/builders/yami/omatic/media-driver-intel-media-22.6.2/media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp:201:32: error: ‘IGFX_ARROWLAKE’ was not declared in this scope; did you mean ‘IGFX_CANNONLAKE’?
201 | .productFamily = (uint32_t)IGFX_ARROWLAKE,
| ^~~~~~~~~~~~~~
| IGFX_CANNONLAKE
make[2]: *** [media_driver/CMakeFiles/iHD_drv_video_COMMON.dir/build.make:4724: media_driver/CMakeFiles/iHD_drv_video_COMMON.dir//media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/tmp.rXjaKtqClx/builders/yami/omatic/media-driver-intel-media-22.6.2/media_softlet/linux/Xe_M_plus/ddi/media_libva_caps_mtl.cpp:75:47: error: ‘IGFX_ARROWLAKE’ was not declared in this scope; did you mean ‘IGFX_CANNONLAKE’?
75 | RegisterCaps((uint32_t)IGFX_ARROWLAKE);
| ^~~~~~~~~~~~~~
| IGFX_CANNONLAKE
make[2]: *** [media_driver/CMakeFiles/iHD_drv_video_COMMON.dir/build.make:4752: media_driver/CMakeFiles/iHD_drv_video_COMMON.dir/__/media_softlet/linux/Xe_M_plus/ddi/media_libva_caps_mtl.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:235: media_driver/CMakeFiles/iHD_drv_video_COMMON.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
error make intel-media-22.6.2
any fix?
UPDATE: mattisz's fork works!