Live data from Hacker News

Fedora 38 LLVM vs. Team Fortress 2

airlied.blogspot.com

21–30 of 111 posts

Re: Fedora 38 LLVM vs. Team Fortress 2

#21
post #14
post #7

It's unfortunate but the Steam experience on Linux seems to be progressively getting worse (outside of Steam Deck ofc). The Steam client is often borderline unusable for Linux users. You can find many issue threads on GitHub reporting client freezes and crashes. It seems like a big part of the issues is a lack of maintenance. TF2 would actually run better on Linux via Proton but VAC isn't enabled so you can't join th…

> You can find many issue threads on GitHub reporting client freezes and crashes. The fact that these are happening does not necessarily mean the client is getting worse. For example, it could mean that more people are installing Steam for Linux. There is no baseline to say it's getting worse, because nobody opens an issue saying "all working here." In my experience, the only issue I have on Wayland is this: https://…

> There is nothing special about the Steam Deck. It's just another Linux machine.

That's not true. It's a read-only linux on a fixed hardware platform, which is a vaaastly different beast than the myriad of hardware/software combinations that exist out there in the wild.

Re: Fedora 38 LLVM vs. Team Fortress 2

#22
post #7

It's unfortunate but the Steam experience on Linux seems to be progressively getting worse (outside of Steam Deck ofc). The Steam client is often borderline unusable for Linux users. You can find many issue threads on GitHub reporting client freezes and crashes. It seems like a big part of the issues is a lack of maintenance. TF2 would actually run better on Linux via Proton but VAC isn't enabled so you can't join th…

I run Steam in a Docker container of Ubuntu 22.04 for reasons like this. Also my actual system isn't polluted with 32-bit libs, Steam can't rm-rf my home directory and games can't steal files from my home directory (homedir inside the container is a separate directory on the host), and access to X and dbus is restricted (dbus socket not forwarded, X socket is from a nested Xephyr instance) so nothing can be stolen from there either.

Edit: More details in https://news.ycombinator.com/item?id=34634854

Re: Fedora 38 LLVM vs. Team Fortress 2

#23
post #7

It's unfortunate but the Steam experience on Linux seems to be progressively getting worse (outside of Steam Deck ofc). The Steam client is often borderline unusable for Linux users. You can find many issue threads on GitHub reporting client freezes and crashes. It seems like a big part of the issues is a lack of maintenance. TF2 would actually run better on Linux via Proton but VAC isn't enabled so you can't join th…

I run Steam in a Docker container of Ubuntu 22.04 for reasons like this. Also my actual system isn't polluted with 32-bit libs, Steam can't rm-rf my home directory and games can't steal files from my home directory (homedir inside the container is a separate directory on the host), and access to X and dbus is restricted (dbus socket not forwarded, X socket is from a nested Xephyr instance) so nothing can be stolen fr…

Is there a guide for this? I'd really like to isolate Steam from the rest of my system

Re: Fedora 38 LLVM vs. Team Fortress 2

#24
post #19
post #14

Earlier quoted context omitted.

> You can find many issue threads on GitHub reporting client freezes and crashes. The fact that these are happening does not necessarily mean the client is getting worse. For example, it could mean that more people are installing Steam for Linux. There is no baseline to say it's getting worse, because nobody opens an issue saying "all working here." In my experience, the only issue I have on Wayland is this: https://…

True, I don't have enough data to really make that claim. I can say that my own hardware hasn't changed in ~4 years and I've been using Steam for Linux since I built this machine. It's only within the last year or so that I started having major issues with the client. > there is nothing special about the steam deck How is first party support for the hardware and software stack "nothing special"? > If it is bjorked th…

> How is first party support for the hardware and software stack "nothing special"?

Because the vast majority of that stack (the kernel, GPU driver, window manager, and so forth) has nothing to do with Valve. They might contribute drivers to the kernel (I'm not sure if they actually do - I would expect AMD to be doing that), but otherwise it's an Arch-based distro with the same Steam client and Proton runtime that everyone else is using.

Re: Fedora 38 LLVM vs. Team Fortress 2

#25
post #18

Earlier quoted context omitted.

If you don't mind wasting a bit of time, you could forward size+alignment to the allocator, return the aligned version and keep a record of aligned-to-allocation mapping. (For freeing later) But as the other comment mentioned - it should be a problem for tf2 in the first place since that's not the behaviour they're after.

> If you don't mind wasting a bit of time, you could forward size+alignment to the allocator, return the aligned version and keep a record of aligned-to-allocation mapping. (For freeing later) I'm unsure what you're proposing here - the only methods you know in the replacement allocator are operator new(size_t) and operator delete(void ). The two possible failure paths are: a = ::operator new(some size) ... ::operato…

> and then just repeatedly allocate in the hope that you will eventually get a correctly aligned value out

If you preload something that patches all the new/delete interfaces, you can do this without guesswork.

    new(size, alignment) ->
      res=alloc(size+alignment)
      res_aligned=res+...
      offsets[res_aligned] = res

    new(size) -> alloc(size)

    free(ptr) ->
      free(offsets[ptr] || ptr)
      offsets.del(ptr)

Re: Fedora 38 LLVM vs. Team Fortress 2

#26
post #23

Earlier quoted context omitted.

I run Steam in a Docker container of Ubuntu 22.04 for reasons like this. Also my actual system isn't polluted with 32-bit libs, Steam can't rm-rf my home directory and games can't steal files from my home directory (homedir inside the container is a separate directory on the host), and access to X and dbus is restricted (dbus socket not forwarded, X socket is from a nested Xephyr instance) so nothing can be stolen fr…

Is there a guide for this? I'd really like to isolate Steam from the rest of my system

[deleted]

Re: Fedora 38 LLVM vs. Team Fortress 2

#27
post #24
post #19

Earlier quoted context omitted.

True, I don't have enough data to really make that claim. I can say that my own hardware hasn't changed in ~4 years and I've been using Steam for Linux since I built this machine. It's only within the last year or so that I started having major issues with the client. > there is nothing special about the steam deck How is first party support for the hardware and software stack "nothing special"? > If it is bjorked th…

> How is first party support for the hardware and software stack "nothing special"? Because the vast majority of that stack (the kernel, GPU driver, window manager, and so forth) has nothing to do with Valve. They might contribute drivers to the kernel (I'm not sure if they actually do - I would expect AMD to be doing that), but otherwise it's an Arch-based distro with the same Steam client and Proton runtime that ev…

Yes, the Steam Deck is using a fairly standard stack and the default client but you're missing the point. Valve directly tests the Steam Deck and prioritizes bug fixes for it. When users report issues with other setups it often takes months for the identified bug to be fixed if it ever is.

Re: Fedora 38 LLVM vs. Team Fortress 2

#28
post #18

Earlier quoted context omitted.

If you don't mind wasting a bit of time, you could forward size+alignment to the allocator, return the aligned version and keep a record of aligned-to-allocation mapping. (For freeing later) But as the other comment mentioned - it should be a problem for tf2 in the first place since that's not the behaviour they're after.

> If you don't mind wasting a bit of time, you could forward size+alignment to the allocator, return the aligned version and keep a record of aligned-to-allocation mapping. (For freeing later) I'm unsure what you're proposing here - the only methods you know in the replacement allocator are operator new(size_t) and operator delete(void ). The two possible failure paths are: a = ::operator new(some size) ... ::operato…

The latter suggestion assumes that there’s enough entropy in the allocation process to make this work. But that’s not guaranteed! Suppose that your allocator doesn’t pad allocations (e.g. because it uses a bitmap), and that it only guarantees 0x10 alignment. If the top of the heap happens to be unaligned with respect to your desired alignment (e.g. address ends in 0x10 when you want 0x20 alignment), you might wind up just repeatedly allocating unaligned blocks off the top of the heap forever.

This is not an easy problem to solve, unfortunately. On MacOS I believe they solve this problem using the two-level namespace: symbol references include the library name, so “operator new(size_t)” from libstdc++ is distinct from “operator new(size_t)” from libtcmalloc.

Symbol versioning also seems like it should solve the problem: have the new interfaces explicitly declared with a newer ABI version (e.g. @@LIBCXX_17) and link only to those new versions from code that expects them. Of course, symbol versioning comes with its own set of nasty drawbacks, but in this case it seems like a solution that might work?

Re: Fedora 38 LLVM vs. Team Fortress 2

#29
post #9
post #5

Earlier quoted context omitted.

I'm not sure that's sound. You can't just redirect an aligned new to the unaligned operator new as you may get unaligned result. It _sounds_ like what is happening is a = ::operator new(some size, some alignment) ... ::operator delete(a); where delete is dropping the align_val_t parameter that would guarantee it hits the same allocator family. There are a variety of ways this can happen, and let's just take it as giv…

That's not sound in general, but it is "probably" going to work for this specific case because the previous build was build with allocator that did not support this alignment, meaning that they did not need extra alignment. This is pretty rare actually. And you had anyway to use a custom allocator already with previous C++ versions to make it work.

While I do agree with you, and think it's probably worth seeing if detecting the override and falling back to unaligned allocation works, the problem is not that the code in TF is compiling assuming/requiring over aligned data.

The problem is that there is system code that they are calling that is making using of over aligned allocation, so therefore could be generating code dependent on said alignment. The failure mode can very easily be

    someSystemLibrary.so`someFunction:
      alignedThing = ::operator new(size, alignment)
      ...
      i_dunno_dma_memcpy_or_something(a, somewhere else)
      ...
      ::operator delete(a)
With no interaction with TF code at all. Except TF has replaced operator delete so that fails due to the allocator mismatch. If you make ::opeator new(size_t, align_val_t) redirect to ::operator new(size_t) if it detects an override then the aligned operation can fail. The above example is moderately difficult to induce so it's more likely that there's an explicit split with the system is doing one half of new/delete and TF is doing the other, but the important thing is that it implies the system code is built aware of alignment and it depends on the alignment even if TF does not.

Re: Fedora 38 LLVM vs. Team Fortress 2

#30
post #14

Earlier quoted context omitted.

> You can find many issue threads on GitHub reporting client freezes and crashes. The fact that these are happening does not necessarily mean the client is getting worse. For example, it could mean that more people are installing Steam for Linux. There is no baseline to say it's getting worse, because nobody opens an issue saying "all working here." In my experience, the only issue I have on Wayland is this: https://…

> There is nothing special about the Steam Deck. It's just another Linux machine. That's not true. It's a read-only linux on a fixed hardware platform, which is a vaaastly different beast than the myriad of hardware/software combinations that exist out there in the wild.

> It's a read-only linux on a fixed hardware platform

I have heard that argument about macOS a lot, and this is nothing like that. There isn't some "special sauce er... Source" that they apply to their platform. It's just GPL Linux. They may have avoided bad decisions like relying on NVIDIA for Linux gaming, but that's hardly the level of ownership that you see with other vertical integrations. If I use an AMD CPU (or Intel, which would be arguably better) and AMD GPU, there is no reason why my PC couldn't be just as "first-party" as the Steam Deck.

Wine/Proton ultimately access the GPU through DRM, that remains the same for Valve hardware or custom-built hardware. Both Steam and Wine/Proton currently render via X11 (via XWayland if necessary), on both my PC and the Steam Deck.

I feel like there is a gap of understanding how a HAL works here.

Post reply on HN