• Random Dent@lemmy.ml
    link
    fedilink
    English
    arrow-up
    61
    ·
    2 years ago

    I have two, one is actually complicated and one was so obtuse that I never would have figured it out in a million years:

    Actually complicated: I still don’t know how it happened, but somehow an update on Arch filled the boot partition with junk files, which then caused the kernel update to fail because of no disk space, which then kind of tanked the whole system. It took ages, but with a boot disk and chroot-ing back into the boot partition I eventually managed to untangle it all. I was determined to see it through and not reinstall.

    Ridiculous: One day when using Ubuntu, the entire system went upside-down. As in, everything was working perfectly fine, but literally the screen was upside-down. After much Googling I had no luck figuring it out, then I accidentally found the solution - I’d plugged a PS4 controller into the USB on the laptop to charge it, and for some reason Ubuntu interpreted the gyroscope on the controller as “rotate the screen display” so when I moved it, the screen spun round. I only figured it out by accident when I plugged it back it and it spun back to normal lol.

    • 0110010001100010@lemmy.world
      link
      fedilink
      arrow-up
      33
      ·
      2 years ago

      Ridiculous: One day when using Ubuntu, the entire system went upside-down. As in, everything was working perfectly fine, but literally the screen was upside-down. After much Googling I had no luck figuring it out, then I accidentally found the solution - I’d plugged a PS4 controller into the USB on the laptop to charge it, and for some reason Ubuntu interpreted the gyroscope on the controller as “rotate the screen display” so when I moved it, the screen spun round. I only figured it out by accident when I plugged it back it and it spun back to normal lol.

      LMAO what the fuck?

      • foggy@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        2 years ago

        I think this is likely related to USB cables as power cables and USB ports/voltages.

        I have seen a lamp completely fry a MacBook. I wouldn’t be surprised to see something similar cause a boot loop.

      • Random Dent@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 years ago

        Ah I remember that one! Classic. I also remember a story about someone who lost an entire PC in their apartment. It was running and connected to the network, they could ping it, but couldn’t physically find it lol.

  • MentalEdge@sopuli.xyz
    link
    fedilink
    arrow-up
    34
    ·
    2 years ago

    I manage a machine that runs both media transcodes and some video game servers.

    The video game servers have to run in real-time, or very close to it. Otherwise players using them suffer noticeable lag.

    Achieving this at the same time that an ffmpeg process was running was completely impossible. No matter what I did to limit ffmpegs use of CPU time. Even when running it at lowest priority it impacted the game server processes running at top priority. Even if I limited it to one thread, it was affecting things.

    I couldn’t understand the problem. There was enough CPU time to go around to do both things, and the transcode wasn’t even time sensitive, while the game server was, so why couldn’t the Linux kernel just figure it out and schedule things in a way that made sense?

    So, for the first time I read up on how computers actually handle processes, multi-tasking and CPU scheduling.

    As FFMPEG is an application that uses ALL available CPU time until a task is done, I came to the conclusion that due to how context switching works (CPU cores can only do one thing, they just switch out what they do really fast, but this too takes time) it was causing the system to fall behind on the video game processes when the system was operating with zero processing headroom. The scheduler wasn’t smart enough to maintain a real-time process in the face of FFMPEG, which would occupy ALL available cycles.

    I learned the solution was core pinning. Manually setting processes to run on certain cores of the CPU. I set FFMPEG to use only one core, since it doesn’t matter how fast it completes. And I set the game processes to use all but that one core, so they don’t accidentally end up queueing for CPU time on a core that doesn’t have the headroom to allow the task to run within a reasonable time range.

    This has completely solved the problem, as the game processes and FFMPEG no longer wait for CPU cycles in the same queue.

    • nul9o9@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      I broke my bootloader fucking with uefi settings. I was in a panic for a few hours because I hadn’t bothered to learn how that shit worked until then.

      It sure was a relief when i got back into my system.

  • ChojinDSL@discuss.tchncs.de
    link
    fedilink
    arrow-up
    8
    ·
    2 years ago

    Around 2003-2004. I was still a bit of a Linux noob, just getting to grips with Gentoo.

    Had two no-name WiFi adapters that weren’t directly supported under Linux. Found some obscure forum thread that mentioned them, along with which lines in which source code driver to change to make these adapters work.

  • Diplomjodler@feddit.de
    link
    fedilink
    arrow-up
    6
    ·
    2 years ago

    Fixed a typo in my /etc/fstab that prevented the NAS from mounting. I am a bear of little brain. But I’m also proof that you don’t have to be some master hacker to successfully run Linux.

    • NaoPb@eviltoast.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      This is something I’ve had to do a few times.

      Saved me from reinstalling. Made me realise that there really should be an alternative to typing into fstab by hand since us humans will make mistake. Either that or make fstab nog crash completly on an error but just skip it.

  • Hyrulian@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    2 years ago

    Around 2017 I spent three days on and off trying to diagnose why my laptop running elementary OS had no wifi support. I reinstalled the wifi drivers and everything countless times. It worked for many days initially then just didn’t one day when I got on the laptop. Turns out I had accidentally flipped the wifi toggle switch while it was in my bag. I forgot the laptop had one. Womp womp.

  • kugel7c@feddit.de
    link
    fedilink
    arrow-up
    5
    ·
    2 years ago

    So I mostly fried the SSD by using it to write and rewrite ML checkpoints and logs, this in turn made the device read only and I somehow managed to migrate to a different SSD probably using clonezilla or something, but it messed up the bootloader so I installed refind in a new partition, configured it and voila it works. It’s scary because you need to do everything without seeing your system even half alive anywhere along the process, but it’s not actually hard, just copying data and installing/configuring a bootloader. But for a then 20year old at his more or less first job my head was on fire for the 1.5 days this took.

    By far the most difficult single thing that I’ve ever had to fix that actually had to do with the system.

    I now don’t flood my SSDs with data that is constantly rewritten.

    • cygon@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      2 years ago

      That might be it for me, too.

      I run a distro with OpenRC instead of systemd, so I had to gain some understanding of udev permissions for USB devices and come up with my own udev rules for Steam because I couldn’t follow Valve’s setup guide.

      • DumbAceDragon@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 years ago

        VR pretty much just worked for me with my vive. Had some issues with weird stuttering and tearing but I managed to find a solution in some config file.

    • IninewCrow@lemmy.ca
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 years ago

      Sometimes … usually I just hit a wall because I don’t know enough but I know enough to get myself in trouble … so I just stop, reformat, reinstall and start all over.

      About the biggest lesson I’ve learned from Linux is not to mess with too many things unless you want to learn about it and have lots of time in your hands.

      Otherwise if you find a good distro for your needs, a stick with it, don’t change it, update and backup regularly.

  • eugenia@kbin.social
    link
    fedilink
    arrow-up
    3
    ·
    2 years ago

    Making a Palm Pilot getting a live connection to the internet through an infrared connection (Red Hat Linux). That was circa 2004, and I spent 10 hours, all night on it.

  • Kevin@lemmy.worldM
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    2 years ago

    Learned how drivers worked and fixed a driver for an USB to I2C chip. It’s still buggy but at least it sorta works now.

    Some more details: I was using a CH347 (USB to UART/SPI/I2C) and there was an open source driver that used a previous chip version. The original dev had hardcoded the bulk IO endpoints indices. The only change I had to do was just iterate over the endpoints and search for the correct ones. But at first, I didn’t understand anything about how the USB subsystem worked and how drivers were loaded. All I could tell was the USB device was correctly detected but the I2C driver wasn’t being loaded, despite proper udev rules, correct vendor/product IDs, etc.

  • LordCrom@lemmy.world
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    2 years ago

    I used a GPS module to feed time data to a custom ntp service with no jitter. About as close as I could get to atomic clock precision for under $150.

  • Sybil@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    2 years ago

    is debootstrap considered reinstalling? because i’vedebootstrapped at least 2 systems to fix botched upgrades.

  • Destide@feddit.uk
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    2 years ago

    Biggest thing I noticed after switching is forum posts. In Linux ones you usually get a fix where the Windows ones 9/10 they just advise you reformat