Today, I switched the last of my Windows machines to Linux: my gaming PC. I’ve been using Linux on servers for many years but was a bit apprehensive for gaming.

Turns out it just… works. Just installed steam and turned proton on, have zero performance or other issues. I’m using Ubuntu 25.04 for the 6.14 kernels NT emulation performance tweaks. Aside from there not being a catalyst driver for it and so I can’t undervolt my card everything is great.

  • daggermoon@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    15 hours ago

    Fair enough, I misunderstood your argument. I appreciate your demonstration. Any chance you’d be willing to share your script? I have a few ideas on how to play with it.

    Edit: I forgot, I actually had a HDD fail on me, luckily I was able to recover some of the data. Many .flac files on it were completely corrupted and unreadable past a certain point. The .aiff files I had were perfectly readable. I suspect they were at least partially corrupted. Luckily, I was able to re download all of the affected files. So, no data was actually lost.

    • squaresinger@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      8 hours ago
      import sys
      import random
      
      inFilePath = sys.argv[1]
      outFilePath = sys.argv[2]
      damagePercentage = float(sys.argv[3])
      
      with open(inFilePath, "rb") as f:
          d = f.read()
      
      damageTotalCount = int(len(d) * damagePercentage / 100)
      
      print("Damaging "+str(damageTotalCount)+" bytes.")
      
      dList = [ x.to_bytes(1) for x in d ]
      
      for i in range(damageTotalCount):
          pos = random.randint(2000,len(d)-2)
          dList[pos] = random.randint(0,255).to_bytes(1)
          if (i%1000 == 0):
              print(str(i)+"/"+str(damageTotalCount))
      
      d = b"".join(dList)
      
      with open(outFilePath, "wb") as f:
          f.write(d)
      

      If you run it, the first argument is the input file, the second one is the output file and the third is the percentage of corrupted bytes to inject.

      I did spare the first 2000 bytes in the file to get clear of the file header (corruption on a BMP file header can still cause the whole image to be illegible, and this demonstration was about uncompressed vs compressed data, not about resilience of file headers).

      I also just noticed when pasting the script that I don’t check for double-corrupting the same bytes. At lower damage rates that’s not an issue, but for the 95% example, it’s actually 61.3% actual corruption.