Le blog de Jean David TECHER, un Réunionnais à Saint-Priest/Lyon

Aller au contenu | Aller au menu | Aller à la recherche


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 >

samedi 6 octobre 2018

Build Wine-Staging-3.17 + PBA + Gallium Nine on Linux 32 Bits

As of 2018-10-06, Wine 3.17 was released one week ago. It's time to build it from sources including

  • Patches from Wine-Staging
  • Patches from PBA
  • Patches from Gallium-Nine
  • Patches from wine-gaming-nine

1. Download sources + patches. Apply patches

_major_version=3
_minor_version=17
_version="${_major_version}.${_minor_version}"

_srcdir=/opt/Builds/Wine-Staging-${_version}_PBA_Gallium-Nine

_error() { echo "Met some issue. Will stop now!"; exit 1; }

[ ! -d ${_srcdir} ] && { mkdir -pv ${_srcdir}; } || { rm -rf ${_srcdir}/*; }

cd ${_srcdir}

echo "Current directory is ${PWD}";

echo "** Sources and patches **";

echo "- Downloading Gallium-Nine Patches...";
( wget -q https://github.com/sarnex/wine-d3d9-patches/archive/wine-d3d9-${_version}.tar.gz -O - | tar xzf - ) || { _error; }

echo "- Downloading Wine-Staging + PBA Patches...";
( wget -q https://github.com/Firerat/wine-staging/archive/wine-staging-pba-v${_version}.tar.gz -O - | tar xzf - ) || { _error; }

echo "- Downloading Wine sources..."
( wget -q https://dl.winehq.org/wine/source/3.x/wine-${_version}.tar.xz -O - | tar xJf -) || { _error; }

echo "- Cloning wine-gaming-nine repository"
git clone https://aur.archlinux.org/wine-gaming-nine.git || { _error; }

echo "** Patching Wine**";

echo "- Applying patches from Wine-Gaming-Nine (Log = wine-gaming-nine.log )";
for file in $(ls wine-gaming-nine/*patch|grep -v keybinding);do patch -d wine-${_version} -Np1 -i ../$file >> wine-gaming-nine.log 2>&1 || { _error; } ;done 
patch -d wine-${_version} -R -Np1 -i ../wine-gaming-nine/keybindings.patch >> wine-gaming-nine.log 2>&1 || { _error; }

echo "- Applying patches for Wine-Staging and PBA ( Log = wine-staging-pba.log )";
./wine-staging-wine-staging-pba-v${_version}/patches/patchinstall.sh DESTDIR="${_srcdir}/wine-${_version}" --all >> wine-staging-pba.log 2>&1 || { _error; }

echo "- Applying Gallium-Nine patches ( Log = gallium-nine.log )"
patch -d wine-${_version} -Np1 -i ../wine-d3d9-patches-wine-d3d9-${_version}/wine-d3d9.patch >> gallium-nine.log 2>&1 || { _error; }
patch -d wine-${_version} -Np1 -i ../wine-d3d9-patches-wine-d3d9-${_version}/staging-helper.patch >> gallium-nine.log 2>&1 || { _error; }

2. Build wine 3.17

cd wine-${_version}
autoreconf -fiv

./configure --prefix=/opt/wine/apps/mpv/ --with-alsa --with-capi --with-cms --with-coreaudio --with-cups --with-curses \
 --with-d3d9-nine --with-d3d9-nine-module=auto --with-d3d9-nine-headers-path=auto --with-dbus --with-ffmpeg \
 --with-float-abi=abi --with-fontconfig --with-freetype --with-gettext --with-gettextpo --with-glu --with-gnutls \
 --with-gphoto --with-gsm --with-gssapi --with-gstreamer --with-gtk3 --with-jpeg --with-krb5 --with-ldap --with-mpg123 \
 --with-netapi --with-openal --with-opencl --with-opengl --with-osmesa --with-oss --without-hal --with-pcap --with-png \
 --with-pthread --with-pulse --with-sane --with-sdl --with-tiff --with-udev --with-v4l --with-va --without-vkd3d --with-vulkan \
 --with-x --with-xattr --with-xcomposite --with-xcursor --with-xfixes --with-xinerama --with-xinput --with-xinput2 --with-xml \
 --with-xrandr --with-xrender --with-xshape --with-xshm --with-xslt --with-xxf86vm --with-zlib

make -j$(nproc) && make install

samedi 22 septembre 2018

Build Wine-Staging-3.16 + PBA + Gallium Nine on Linux 32 Bits

AFAIR I didn't write a ticket like this one for a while now . It's time to write a new one !!!

Listed below are my own instructions to build Wine-Staging 3.16 + PBA + Gallium-Nine + Some other patches on my PC Linux 32 Bits

  • Download sources
    wget https://github.com/sarnex/wine-d3d9-patches/archive/wine-d3d9-3.16.tar.gz -O - | tar xvzf -
    wget https://github.com/Firerat/wine-staging/archive/wine-staging-pba-v3.16.tar.gz -O - | tar xvzf -
    wget https://dl.winehq.org/wine/source/3.x/wine-3.16.tar.xz -O - | tar xvJf -
    
    git clone https://aur.archlinux.org/wine-gaming-nine.git
    cd wine-gaming-nine && cd git checkout baaddca018c4fd2808ef32dc2fa05c6116c79012 && cd ..
    
  • Apply patches from Wine-Gaming-Nine
    for file in $(ls wine-gaming-nine/*patch|grep -v keybinding);do patch -d wine-3.16 -Np1 -i ../$file;done
    patch -d wine-3.16 -R -Np1 -i ../wine-gaming-nine/keybindings.patch
    
  • Apply patches from Wine-Staging-PBA
    ./wine-staging-wine-staging-pba-v3.16/patches/patchinstall.sh DESTDIR="${PWD}/wine-3.16" --all
  • Apply patches from Gallium Nine
    patch -d wine-3.16 -Np1 -i ../wine-d3d9-patches-wine-d3d9-3.16/wine-d3d9.patch
    patch -d wine-3.16 -Np1 -i ../wine-d3d9-patches-wine-d3d9-3.16/staging-helper.patch
    
After that, get into wine-3.16 sources folder.
# Update files inside the folder
cd wine-3.16
autoreconf -fiv
Some packages are built outside my base system but are required to build Wine
# PKG_CONFIG_PATH should point to 
# * Mpg123
# * Vulkan-SDK
# * Gstreamer 1.10.4
export PKG_CONFIG_PATH=/opt/mpg123/1.25.8/lib/pkgconfig/:/opt/vulkan-sdk/lib/pkgconfig/:/opt/gstreamer/1.10.4/lib/pkgconfig/:/opt/ffmpeg/4.0.2/lib/pkgconfig/
#
# PATH should point to 
# *  MinGW Toolchain, support for 
#    - Posix, required by DXVK
#    - d3d11, required by DXVk
#    - d3dcompiler_47, required by DXVk
export PATH=/opt/MinGW32/bin:${PATH}

export LDFLAGS="-O2 -L/opt/vulkan-sdk/lib/ -L/opt/wine/apps/koku-xinput/lib/ -L/opt/ffmpeg/4.0.2/lib/"
export COMMON_FLAGS="-std=gnu99 -march=native -pipe -O2"
export CFLAGS="${COMMON_FLAGS}"
export CXXFLAGS="${COMMON_FLAGS}"
./configure --prefix=/opt/wine/apps/mpv/ --with-alsa --with-capi --with-cms --with-coreaudio --with-cups --with-curses \
 --with-d3d9-nine --with-d3d9-nine-module=auto --with-d3d9-nine-headers-path=auto --with-dbus --with-ffmpeg --with-float-abi=abi\
  --with-fontconfig --with-freetype --with-gettext --with-gettextpo --with-glu --with-gnutls --with-gphoto --with-gsm --with-gssapi --with-gstreamer\
  --with-gtk3 --with-jpeg --with-krb5 --with-ldap --with-mpg123 --with-netapi --with-openal --with-opencl --with-opengl --with-osmesa --with-oss \
 --without-hal --with-pcap --with-png --with-pthread --with-pulse --with-sane --with-sdl --with-tiff --with-udev --with-v4l --with-va --without-vkd3d \
 --with-vulkan --with-x --with-xattr --with-xcomposite --with-xcursor --with-xfixes --with-xinerama --with-xinput --with-xinput2 --with-xml \
 --with-xrandr --with-xrender --with-xshape --with-xshm --with-xslt --with-xxf86vm --with-zlib

make -j$(nproc)

make install

samedi 17 février 2018

Wine-Staging is dead BUT Wine-Staging has been forked

Since 2014, that was my favorite project on Linux. Today I read this sad new on phoronix . Well I hope that their original authors -- Michael and Sebastian -- will have a cool and interesting professional life. They posted a ticket explaining why the project is no more maintained

Fortunately Wine-Staging has been forked https://github.com/wine-staging/wine-staging.

I guess that there will be a lot of forks of this project. Well wait and see

jeudi 18 janvier 2018

[LinuxGaming] Some benchmarks on Linux 4.8.17 | AMDGPU DRM | Mesa 17.3.1

Upgrade to kernel 4.8.17 | Switched from RADEON to AMDGPU

This week -- over Monday 15-Jan-2018 -- I upgraded my Linux kernel from 4.4 serie to 4.8 serie. It was the occasion to switch from Radeon module kernel to AMGGPU module kernel.

Some notes to keep in mind

  • Kernel 4.8.17 is an outdated kernel. At the date of writing this ticket, the most recent/stable kernel is 4.14
  • AMDGPU module is quite experimental
For those wondering my rig is a Linux 32 bit. (Yes it is even in 2018!). It is used
  • as multimedia workstation (Youtube, Mail)
  • for gaming -- only for small games, not AAA games --.
  • my own tests with Wine but on Linux 32 Bits for retro-compatibilty with some old libraries
AMDGPU module was built within kernel 4.8.17
root@amdgaming:~# grep -i AMDGPU /boot/config-4.8.17
CONFIG_DRM_AMDGPU=m
CONFIG_DRM_AMDGPU_CIK=y
CONFIG_DRM_AMDGPU_USERPTR=y
CONFIG_DRM_AMDGPU_GART_DEBUGFS=y
I had to blacklist RADEON
  • root@amdgaming:~# cat /etc/modprobe.d/blacklist-radeon.conf
    blacklist radeon
    
  • Once booted on this kernel, files used by kernel 4.8.17 were refreshed
    update-initramfs -u -k $(uname -r) && reboot
This is the command line I am currently using
root@amdgaming:~# cat /proc/cmdline 
BOOT_IMAGE=/boot/vmlinuz-4.8.17 root=UUID=8092ec20-bb12-4e08-9863-8ab86481aced ro \
amdgpu.dpm=1 amdgpu.deep_color=1 amdgpu.pcie_gen2=1 amdgpu.powerplay=1 amdgpu.exp_hw_support=1 amdgpu.smc_load_fw=1 amdgpu.audio=0 \
radeon.modeset=0 radeon.pcie_gen2=0 radeon.audio=0 radeon.dpm=0 nouveau.pstate=1 kvm.ignore_msrs=1 intel_iommu=on,igfx_off vfio_iommu_type1.allow_unsafe_interrupts=1 \
i915.enable_hd_vgaarb=1 quiet splash nomdmonddf nomdmonisw vt.handoff=7
It implies to build xf86-video-amdgpu -- for Xorg Server as driver--. Refer to https://cgit.freedesktop.org/xorg/driver/xf86-video-amdgpu/
mkdir -pv /opt/Sources
cd /opt/Sources
git clone git://anongit.freedesktop.org/xorg/driver/xf86-video-amdgpu
mkdir -pv /opt/Builds/xf86-video-amdgpu_build
cd  /opt/Builds/xf86-video-amdgpu_build
/opt/Sources/xf86-video-amdgpu/autogen.sh --enable-maintainer-mode --prefix=/usr/ --enable-glamor --enable-udev
make -j4 && make install

Is it worth switching from RADEON to AMDGPU?

That was my main concern for this week...

But my Linux systems works perfectly for the past days. No real issue with this kernel and this driver.

The only solution is to run some benchmarks tests through Wine and natively on Linux. This way I should be able to discriminate

For the tests shown below I had to switch ShadowPrimary to Off. -- Its default value is "Off --. But since I used this parameter explicitly in my configuration file, this is a personal reminder for myself

david@amdgaming:~$ cat /etc/X11/xorg.conf.d/01-amdgpu-glamor-dri3.conf
Section "Screen"
       Identifier     "Screen"
       DefaultDepth    24
       SubSection      "Display"
               Depth   24
       EndSubSection
EndSection

Section "Device"
	Identifier "AMDGPU"
	Driver "amdgpu"
	Option "Accel" "on"
	Option "AccelMethod" "glamor"
	Option "DRI" "3"
	Option "TearFree" "on"
	Option "ShadowPrimary" "off"	
EndSection

Test 1: Unigine Valley: Wine-Staging 2.21 | Gallium-Nine | Mesa 17.3.1 | AMDGPU | Kernel 4.8.17 | RX 290X

Back in 2015, Gallium Nine performed pretty well. Here I am doing the same test but for
  • Quality = High
  • Vsync = Off
To be honest I keep it mind that performances depends on 4 metrics
  • 3D Engine used for the game
  • Your 3D Drivers
  • The GPU
  • Wine features for 3D Rendering
But this quick test should be useful compared to the test I did 2 years ago

Test 2: Unigine Heaven 4.0: Natively on Linux | Mesa 17.3.1 | AMDGPU | Kernel 4.8.17 | RX 290X

  • Quailty = Ultra
  • Tessellation = Extreme
  • Anti-aliasing = x8
Compared to a few videos I watched on youtube, I came to the conclusion that it works pretty well

Conclusion: Yes AMDGPU runs pretty well!!!

Bye RADEON!!!