Finger info for flibitijibibo@icculus.org...


Wayland Support in SDL 2.0.18

The latest SDL release was tagged today! And we actually met the 3-month goal! Dearest me!

With 2.0.16 being the release where we got SDL up to speed with modern Wayland protocols and behaviors, 2.0.18 was mostly about fixing issues found in testing and on devices I didn't quite have access to (mobile in particular). Thanks to everyone who looked at SDL Wayland these past few months!

But that's not what you care about, what you care about is what's left before it's the default. You may remember these three from the last SDL Wayland post:

1. Window transparency. This has been fixed thanks to EGL_EXT_present_opaque, which Eric Engeström developed as a workaround for apps that didn't expect that some day alpha might represent transparency somehow. Update to Mesa 21.3 ASAP!

2. NVIDIA Wayland Vulkan support. So funny thing... they actually added support for KHR_wayland_surface, but a goofy thing about Vulkan is that you can support an extension without actually supporting the feature at all. So yes, the NVIDIA driver now properly returns VK_FALSE when you try to render to a Wayland surface, but almost no application actually handles this robustly. I'm not even 100% sure FNA3D does it right. vulkaninfo still doesn't AFAIK. I expect this to get fixed by the time they're done finishing Wayland support in their current NFB driver series.

3. Infinite hangs in window presentation. We've fixed just about every other thing in SDL, and in a lot of places we're actually more complete than X11 even, but all the fixes and features in the world won't save you from getting caught in a deadlock that's out of anyone's control. While there was a fair bit of activity here, progress on fixing the issue has stalled for the past few months. It's ended up getting divided between two halves: One half wants to add the suspension event and integrate it into both Mesa and toolkits like SDL, and the other half wants to implement a timeout similar to Xwayland's 1Hz throttle in Mesa. Personally I'd prefer the former because it gives apps helpful information, but at this point all I care about is not being worse than X11, so if we have the same timeout as Xwayland then it's good enough for me.

So, in summary: The first blocker's fixed, the second blocker's been offloaded to NVIDIA (and to a lesser extent Vulkan applications), leaving us with the third blocker as the final blocker.

If you're running with Mesa 21.3 and you don't come across a deadlock, SDL Wayland should feel complete now. AKA: We've gone from Alpha to Beta. Once the surface suspension issue is fixed, I intend to make a final call for emergency situations that would prevent SDL Wayland from being the default, effectively making 2.0.19 (I hope) the SDL Wayland Release Candidate. If nothing comes up, the next release will make Wayland the default video driver, after checks notes over 9 years.

I was able to get sponsored by a private company for the 2.0.18 cycle, but that contract has been wrapped up so I'm back to working primarily via GitHub Sponsors again. And yes, I still need Linux users to keep pushing developers for native support so that I can keep finding work that uses all this stuff. Things are going pretty much exactly how I expected them to, so assume the worst unless you hear otherwise from me.

See you all in the Wayland tracker!

Bill's Hat

Turn a minimal Fedora installation into a SteamOS box!

1. Write Fedora Workstation NetInstall ISO to a USB drive
2. Boot USB image, install Minimal configuration with standard partition layout matching SteamOS'
3. Set root password, create a user called 'steam', set a password for it
4. Reboot, log in as root
5. A whole bunch of commands:

dnf group install hardware-support
dnf install Xorg xorg-x11-drv-evdev libglvnd-egl vulkan-loader.x86_64 vulkan-loader.i686 lightdm flatpak NetworkManager-wifi kernel-modules-extra bluez
dnf config-manager --add-repo=https://negativo17.org/repos/fedora-steam.repo
dnf install steam steamos-compositor steamos-modeswitch-inhibitor.x86_64 steamos-modeswitch-inhibitor.i686
setsebool -P allow_execheap 1
systemctl enable sshd.service
systemctl enable lightdm.service
systemctl set-default graphical.target

6. Edit /etc/lightdm/lightdm.conf:

pam-service=lightdm-autologin
pam-autologin-service=lightdm-autologin
user-session=steamos
autologin-user=steam
autologin-session=steamos

7. Create /var/lib/AccountsService/users/steam:

[User]
Session=steamos
XSession=steamos
Icon=/home/steam/.face
SystemAccount=false

8. Reboot, should work now!

9. Additional steps for NVIDIA users:

dnf config-manager --add-repo=https://negativo17.org/repos/fedora-nvidia.repo
dnf install kernel-devel dkms-nvidia nvidia-driver-libs.x86_64 nvidia-driver-libs.i686
reboot # Should be using the NVIDIA driver now!

flibitBuild

Want to replicate my build machine? Grab CentOS 7 and have a look...

# Update base install before doing anything else
yum update
# Add EPEL
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# Add SCL
yum install centos-release-scl
# All the base build tools!
yum install bzip2 bzip2-devel chrpath cmake cmake3 freetype-devel gcc-c++ \
    git gtk3-devel hg libcxx-devel libstdc++-static libusbx-devel \
    libuuid-devel libvorbis-devel libxml2-devel lzma-sdk-devel meson \
    ocl-icd-devel openal-soft-devel opencl-headers openssl-devel patch \
    perl-IPC-Cmd svn unix2dos yum-utils yum-plugin-copr zlib-static
# SDL2 dependencies
yum-builddep SDL2
# Coprs for MinGW as well as GCC 10, needed to build Clang/LLVM/osxcross
yum copr enable mlampe/devtoolset-10
yum copr enable alonid/mingw-epel7
yum install devtoolset-10 mingw32-* mingw64-*

# CMake3 by default
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake 10 \
    --slave /usr/local/bin/ctest ctest /usr/bin/ctest \
    --slave /usr/local/bin/cpack cpack /usr/bin/cpack \
    --slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake \
    --family cmake
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \
    --slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \
    --slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \
    --slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \
    --family cmake

# Fake libdecor, for building with Wayland client decorations
mkdir /usr/local/include/libdecor-0
curl -o /usr/local/include/libdecor-0/libdecor.h \
    https://gitlab.gnome.org/jadahl/libdecor/-/raw/0.1.0/src/libdecor.h
touch /usr/local/lib/libdecor-0.so.0
ln -s libdecor-0.so.0 /usr/local/lib/libdecor-0.so

# Fake libdecor pkgconfig
cat <<ENDOFFAKELIBDECOR > /usr/lib64/pkgconfig/libdecor-0.pc
prefix=/usr/local
libdir=${prefix}/lib
includedir=${prefix}/include
Name: libdecor-0
Description: library for Wayland client-side window decors
Version: 0.1.0
Libs: -L${libdir} -ldecor-0
Cflags: -I${includedir}/libdecor-0
ENDOFFAKELIBDECOR

# Also:
# Modify unistd.h to change __block to anything but __block
# The CMake config provided by SDL2-mingw is terrible, delete the block
#  that starts with "if(NOT TARGET SDL2::SDL2)".
# Be prepared to pass -std=gnu99 manually. A LOT.

# To enter Mac building mode (and to build osxcross itself):
# scl enable devtoolset-10 bash

Wait, a "plan"?

Well, this is a .plan file, so here's my TODO. Expect nothing from it, ever.

In Progress
    gpuvis libtraceevent
    Codename DanishBootleg

Waiting Room
    Thirty Flights of Loving
        - Waiting for release day!
    Codename Devolution Assessment
        - Waiting for a source drop
    Super Hexagon "Neo" Rewrite
        - Waiting on Android stuff
    Proteus "Neo" Rewrite
        - Not actually a thing, I just wish it was
    SDL_ActionSet
        - Pending some replies
    Coding History
        - On call throughout development
    VVVVVV 2.4
        - Giving the localization project as much time as it wants
    ScoreRush PC
        - Need AppAdmin for publish, crosshair for mouse
    Anodyne 1
        - Retirement project


When this .plan was written: 2021-12-03 23:55:57
.plan archives for this user are here (RSS here).
Powered by IcculusFinger v2.1.27
You could be playing Pringles for Genesis but instead you're here?