What is the most difficult problem that you have fixed in linux?
What is the most difficult problem that you have fixed in linux?
![](https://lemmy.world/pictrs/image/4db72819-9c93-4dac-9996-4847af5f8610.jpeg?format=webp&thumbnail=128)
![](https://lemmy.world/pictrs/image/4db72819-9c93-4dac-9996-4847af5f8610.jpeg?format=webp)
What is the most difficult problem that you have fixed in linux?
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.
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?
This deserves some sort of funniest Linux problem award.
The controller thing is goddam hilarious
Ridiculous
I had a similar one. I had a usb-powered fan cooling pad that my laptop was sitting on. My laptop would randomly go into boot loops when I turn it on. I thought it was a grub issue so I always had my usb stick ready to re-install grub. Did some dusting one day and forgot to plug in the cooling fan, then the boot loop never happened again. Turns out it was the fan plugged into the usb that was causing it.
A couple years ago on Reddit I saw a story where a dude working IT support had to drive to a remote office or replace a workstation that wouldn't boot. When he got there the lady whose desk it was had some shitty USB fan or maybe an led Christmas tree plugged into one of the USB ports. He unplugged that and the pc booted fine.
This is up there with the redacted (just looked it up it's called the 500-mile email)
This is a phenomenal read. Thank you for sharing lol
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.
Well that's interesting.... I'd have thought, possibly naively, that as long as a thread had work to do it would essentially behave like ffmpeg does?
Perhaps there's something about the type of work though, that it's very CPU-bound or something?
I think the difference is simply that most processes only have a certain amount that needs accomplishing in a given unit of time. As long as they can get enough CPU time, and do so soon enough after getting in line for it, they can maintain real-time execution.
Very few workloads have that much to do for that long. But I would expect other similar workloads to present the same problem.
There is a useful stat which Linux tracks in addition to a simple CPU usage percentage. The "load average" represents the average number of processes that have requested CPU time, but have to queue for it.
As long as the number is lower than the available number of cores, this essentially means that whenever one process is done running a task, the next in line can get right on with theirs.
If the load average is less than the number of cores available, that means the cores have idle time where they are essentially just waiting for a process to need them for something. Good for time-sensitive processes.
If the load average is above the number of cores, that means some processes are having to wait for several cycles of other processes having their turn, before they can execute their tasks. Interestingly, the load average can go beyond this threshold way before the CPU hits 100% usage.
I found that I can allow my system to get up to a load average of about 1.5 times the number of cores available, before you start noticing it when playing on one of the servers I run.
And whenever ffmpeg was running, the load average would spike to 10-20 times the number of cores. Not good.
This reminded me of how I disabled processor cores in Process Lasso for programs
I've found that the silliest desktop problems are usually the hardest to solve, and the "serious" linux system errors are the easiest.
System doesn't boot? Look at error message, boot from a rescue disk, mount root filesystem and fix what you did wrong.
Wrong mouse cursor theme in some Plasma applications, ignoring your settings? Some weird font rendering issue? Bang your head against a wall exploring various dotfiles and rc files in your home directory for two weeks, and eventually give up and nuke your profile and reconfigure your whole desktop from scratch.
I laughed so hard reading your comment. I totally agree.
A couple of weeks ago I moved Firefox to one side. Window disappeared, but Firefox was still running "somewhere" on my desktop, but was not actually be rendered to the screen. Killing the process and relaunching just resulted in it be rendered to this weird black hole. Log out of gnome and log back in? Same! Reboot? Same!
Ended up deleting it's config folder and re-attaching to Firefox sync in order to have it working again. No idea what went wrong, nor will I ever most likely.
There really should be a hotkey for "move window to primary display" or somesuch. The worst is when just the top "cleat" of the window is inaccessible, making it impossible to simply move the window yourself.
Alternately, a CLI tool to just trash a specific app's window settings, or a system control panel that lets you browse these settings, would be incredible.
I feel like i had a disappearing window like that a lifetime ago and the fix was to change the resolution. I don't know if that uncovered the void to the right or forced the window to reassign itself to usable space. But it worked then. Hell, it could have been windows for all I recall.
Btw, QT_AUTO_SCREEN_SCALE_FACTOR set to 0 breaks your Qt apps.
Yeah for some reason a single game ignores the system sound settings and goes straight to a line out. My system doesn't see that the game is outputting sound and I can't change it. (Arch with KDE)
Somewhat related on windows 11, for some reason teams volume will desync from system volume. I'll put system volume to 0 and still be hearing teams. It's the same audio device being selected. I don't understand why it would ever work that way but here we are
Oh my god, you've put it into (really nice) words something I've felt since quite some time now. I've no trouble (in fact even joy) when something major is fucked up. But all this GUI shenanigans, I've usually no idea where to even begin. The lack of structure and hierarchy completely flummoxes me. Or maybe I just don't have enough experience debugging userland stuff
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.
I had a friend come over to my place to fix her laptops wifi. After about an hour searching for any setting in windows that i could have missed, i coincidentally found a forum where one pointed out this could be due to a hardware wifi switch...
Womp womp.
I used to bullseye womp rats in my T-16 back home, they’re not much bigger than 2 meters.
Grub.
Seriously. Tha was some fat as shit because I didn't know what I was doing.
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.
Bricked my pc twice because of the bootloader and couldn't repair it. From now on i just nuke my system if something is fucky and have a shell script do the installing of packages etc.
I once exited vim without having to look up the commands.
I suppose it's statistically inevitable, I just didn't think it would happen in my lifetime
Truly you are a god amongst men
My first Linux machine crashing. This was way before Redhat, Ubuntu, Arch, or OpenSUSE. This was installed from 60+ floppy disks on a 386-40 with 8MB of RAM.
This machine ran happily, but it crashed under heavy load. I checked out causing the load by using different applications, but could not nail it to a certain software. So the next thing I checked was the RAM. Memtest86 ran for a day without any problems. But the crashes still came. So I got the infrared camera from the lab to see if some hardware overheats. Nope, this went nowhere, either.
Then I tested the harddisk. Read test of the whole HD went without problems. I copied the data on a backup medium and did a write and read test by dd'ing /dev/zero over the whole disk, and then dd'ing the disk to /dev/null. Nothing did show up.
I reinstalled the Linux, and it crashed again. But this time, I noticed that something was odd with the harddisk. I added a second swap partition, disabled the first, and the machine ran without problems. Strange...
So I wrote a small program that tested the part of the disk occupied by the old swap space: Write data, read data, and log everything with timestamps. And there was the culprit: There was an area on the HD where I could write any data, but when I read blocks from that area, a) It took a very long time for the read, b) the blocks I read were containing all zero, regardless of what I had written, and worst of all c) there was no error indication whatsoever from the controller or drive. Down at the kernel level, the zeroed blocks were happily served by the HD with an "OK". And the faulty area was right in the middle of the original swap partition.
Nice read! Did you delete the old swap space or left it as-is?
I took no risks and binned the disk. I wanted to buy a bigger one, anyway.
lol nerd
Are you saying this as a compliment ? it's not completely clear. Either way, it is a compliment
Working for a VoIP company in the early 2010s I rm -rf'd the /bin/ directory. As root. On a production server. On site.
I ended up booting from my phone (android app for iso booting) then manually coppied over the files from another machine. Chrooted and some stuff was broken but rebuilding from the package manager reinstalled everything that was missing. Got the system back up in around 40 mins after that colossal screw up. Good fun and a great learning experience. Honestly, my manager should not have had me doing anything on a root shell with no training.
I ended up booting from my phone (android app for iso booting)
Impressive. I had no idea that was a thing. That's easily the most "Star Trek" sounding fix I've heard in a good while.
back up in around 40 mins [...] on a root shell with no training.
... and you intuited that fix, or at least pulled it together from scratch/google with no training? Doubly impressive.
You might enjoy this ;)
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.
Wow nice one! I don't think anyone outside of Gentoo or LFS would even go there.
Getting WiFi to work in 2003
For me, it was getting WiFi to work in 2023
NDISWrapper: we're just gonna trick the Windows driver into thinking it's running on Windows and intercept the system calls.
That was certainly an era.
God what a nightmare that was
Oh god I remember that. Luckily in 2003 my main computer was scraped together from discarded parts at my father's day job, so it was ethernet only
In 2024 on a laptop I still have wifi problems though. Most recently, if I closed and opened the laptop lid (suspend + resume), the wifi hardware just disappeared off the face of the kernel.
Turns out that the iwlwifi
kernel module just irreversibly crashes when the laptop suspends and can only be fixed with a reboot.
So I had the fun task learning about systemd pre-suspend hooks to unload the driver before suspend and load it again on resume.
Turns out wifi drivers still suck in 2024
Maybe this goes a bit deeper than the question intended, but I’ve made and shared two patches that I had to apply locally for years before they were merged into the base packages.
The first was a patch in 2015 for SDL2 to prevent the Sixaxis and other misbehaving controllers to not use uninitialized axes and overwrite initialized ones. Merged in 2018.
The second was a patch in the spring of 2021 for Xft to not assume all the glyphs in a monospaced font to be the same size. Some fonts have ligatures which are glyphs that represent multiple characters together, so they’re actually some multiple of the base glyph size. Merged in the fall of 2022.
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.
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.
I have no idea how widespread it is among other distros, but ArchLinux's bootable install disk/iso comes with a genfstab
command that snapshots your current mount points and outputs it as a fstab.
You still need to figure out where and how to mount everything yourself, but at least it saves you from most typos that could otherwise end up in the fstab file.
Back in the day, I upgraded a Slackware install from kernel 1.3 to 2.0. That was a fucking adventure.
The fun part about back then was that if your machine wouldn't boot or if you couldn't get your modem or pppd working, you probably didn't have another internet connected device so you might have to drive somewhere with a computer...or try to figure it out through books.
You probably remember the libc5 to glibc swap. Bad times to DIY distros.
Yep. I remember at the time I saw a lot of advice saying "you know you might want to seriously consider just installing your distro from scratch with a newer version." Tracking down all of the dependencies (some of which had to be installed as binaries) was a very manual process.
Edit: Oh and another fun aspect of that time period was that since downloads were so slow on a modem, if you wanted a newer version or to try out another distro, you would go and order a cdrom from a place like Walnut Creek.
Not a Linux problem per se, but I had a 128GB image disk in a unknown .bin format which belongs to a proprietary application. The application only ran on Windows.
I tried a few things but nothing except Windows based programs seemed able to identify the partitions, while I could run it in Wine, it dealt with unimplementend functions. So after a bit of googling and probing the file, it turns out the format had just a 512 bytes as header which some Windows based software ignored. After including the single block offset, all the tools used in Linux started working flawlessly.
This is so arcane to me. Like, I more or less understand your high-level explanation, but then you gloss over "including the block offset" but how would one do that ??
Inspecting the file with a hex editor would give you lots of useful info in this case. If you know approximately what the data should look like, you can just see where the garbage (header) ends and the data starts. I've reverse engineered data files from an oscilloscope like this.
Well, in this scenario the image file had 512 bytes sections, each one is called a block. If you have a KiB (a kibibyte = 1024 bytes) it will occupy 2 blocks and so on...
Since this image file had a header with 512 bytes (i.e. a block) I could, in any of the relevant Linux mounting software (e.g. mount
, losetup
), choose an offset adding to the starting block of a partition. The command would look like this:
sudo mount -o loop,offset=$((header+partition)) img_file /mnt
Not Linux, but Solaris, back in the day.
We had a system with a mirrored boot disk. One of the disks failed. And we were unable to boot from the other, because the boot device in OBP (~BIOS) pointed to a device-specific partitIon. When we manually booted from the live device, it was lacking the boot sector code, and wouldn't boot. When we booted from CDROM, the partitions wouldn't mount because the virtual device mapping pointed to the dead drive.
This was a gas futures trading system, and rebuild wasn't an option. Restoring from backup woyld have lost four hours of trades, which would be an extreme last resort.
A coworker and I spent all night on the box. We had a whiteboard covered with every stage of the boot sequence broken down, and every redirection we needed to (a) boot and (b) repair the system. The issue started mid-afternoon, and we finally got it back up by around 6:30 am.
cool, now find another distro
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.
quit vim
Nvidia driver fucking X in the arse without lube.
I once broke my Ubuntu install by trying to convert it KDE Neon, that reinstalled half my packages and left it in an basically unusable state. I then un-broke the install while upgrading multiple Ubuntu releases, that reinstalled the other half as well. It actually worked, and I'm still using that install.
Hehehe roughly same. I have a KDE Neon install that's older than KDE Neon. It was originally Kubuntu 13.10 and I've done in-place upgrades since.
Tried to the same thing but didn't have the patience to fix it so I made a fresh installation of kde neon
Full kernel corruption after a botched sudo full-upgrade.
I got the wonderful "bailing out you are on your own" shit as well.
Read a guide online about a hail mary ext file system journal recovery protocol, I ran it, like most things without reading too deeply.
Kernel was successfully repaired, Kubuntu kept on truckin'
Full kernel corruption
What does that even mean?
Was the file system on which your kernel resided corrupt, or did something go wrong with a kernel upgrade/installation?
It was some combination of both, the system would post, past the bootloader, attempt to initialize drivers and other standard starting packages and then immediately panic and drop into an emergency terminal (/TTS), with a failure to mount the root partition, from what I can recall. It tried it a couple times and then there was an error message that said: "Bailing out, you are on you own, good luck"
What is this "bailing out you are on your own" shit ?
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.
Removed the libc by hand, and restored the system to a usable state without turning it off and putting the file back on the FS from external source.
Mine is close to that. I still had a working libc, but the dynamic library for C++ programs wouldn't load, so most of the Gentoo tools and several other things I expected simply crashed on startup.
Found enough working programs to get the library restored and remove the bad arch flags from my configuration to start another emerge world.
After that, I was pretty confident that I could run Linux at least as confidently as I had previously run WinNT 4.
Generally if you remove a file, it won't affect programs that already have it open. So if you delete libc, hope that you don't lose power. If worse comes to worst, you'll need to pull the drive and mount it on another machine.
I did a partial system upgrade when installing nginx without upgrading the rest of my Arch system. One of the things it upgraded was libssl.
Turns out systemd depends on that.
Turns out programs won't start at all if one of their shared libraries is missing.
Turns out that if you write init=bash in the kernel command line, not even Ethernet connections work if systemd isn't running.
I had to boot off archiso, chroot into my / partition, and run the system upgrade from there.
A couple months ago, I made a Palworld server box out of a spare motherboard assembly (mobo, processor, ram) from a computer I had recently upgraded.
I didn't have any spare drives lying around, so I plugged in 7 USB flash drives and made them into a RAID array. Not a true RAID array, but a BTRFS filesystem with volumes spread onto each flash drive, with the data redundancy set to raid1, and the metadata redundancy set to raid1c3.
It worked... in the sense that I never lost any data. It certainly didn't work in the sense of having good uptime.
The first problem was getting it to boot right. The boot line in GRUB had "root=UUID=..." instead of a specific drive named. That is normal. However, in BTRFS multi-volume filesystems, all the volumes have the same UUID. So the initrd was only waiting for a single drive matching that UUID, then trying to mount it as the root filesystem. This failed, because the kernel had not yet set up the other 6 USB drives, and this BTRFS filesystem needs all 7 volumes present. Maybe 6, if you used the "degraded" mount option.
The workaround was to wait for this boot process to fail, at which point you get dropped into an initrd shell. Then, you look at all the drives and make sure they're all there. And then... I don't exactly remember what happened next. I think it was some black magic that erases your mind in the process. I somehow got it booted from the initrd shell.
Installing Steam and the Palworld server worked ok, and it even ran for a few hours before crashing overnight.
The next morning, I tried rebooting it. Unfortunately, the USB drives weren't all appearing. Turns out the motherboard had some bad USB ports, some sometimes-bad USB ports, and a maybe-bad PCIe bus, because the PCIe USB expansion card I plugged in had weird problem that it had never had before.
I found the most reliable ports and plugged the drives in there. But you can't just replug them in the initrd. It doesn't have USB hotplug support. So each time it tried to boot with not all the drives there, I restarted it again until one time I finally had all the drives.
I changed the GRUB boot line to "root=/dev/sdg1" . This made it wait for all the drives to load, in any order, and whichever one was last would be mounted as the root filesystem (but the kernel would automatically include all the others too, since they were successfully initialized).
The bad USB ports kept bringing down the server every day or two. I bought a cheap NVMe drive and added it to the BTRFS filesystem, and then removed all the USB drives except the largest. That fixed the reliability. It's been like that since.
Now, to boot the server, all I have to do is change the GRUB boot line to "root=/dev/sdb1" . Since the NVMe drive is much faster than the USB drive, it always initializes first. If the initrd waits for sdb2, then it will always have both drives initialized when it tries to mount the root filesystem.
I could add that to the grub.cfg, or come up with some other more permanent solution, but I'm not planning on rebooting this server ever again. My friends fell off Palworld, and I gave a shutdown date that's about a week away. And the electricity is pretty reliable here.
More than a decade ago a user came into #ubuntu-server on Freenode (now libera.chat ) and said that they had accidentally run "rm -rf /* something*" in a root shell.
Note the errant space that made that a fatal mistake. I don't remember how far it actually got in deleting files, but all of /bin/ /sbin/ and /usr/ were gone.
He had 1 active ssh connection, and couldn't start another one.
It was a server that was "in production", was thousands of miles away from him, and which had no possibility for IPMI / remote hands.
Everyone (but me) in the channel said that he was just SoL and should just give up.
I stayed up most of the night helping him. I like challenges and I like helping people.
This was in the sysv-init (maybe upstart) days, and so a decent number of shell scripts were running, and using basic *nix commands.
We recovered the bash binary by running something along the lines of
bash_binary_contents="$( </proc/self/exe)" printf "%s" > /tmp/bash
(If you can access "lsof" then "sudo lsof | grep deleted" will show you any files that are open, but also "deleted". You may be surprised at how many there are!)
But bash needed too many shared libraries to make that practical.
Somehow we were able to recover curl and chmod, after which I had him download busybox-static. From there we downloaded an Ubuntu LiveCD iso, loop mounted it, loop mounted the squashfs image inside the iso, and copied all of /bin/ , /sbin/ , /etc , and so on from there onto his root FS.
Then we re-installed missing packages, fixed up /etc/ (a lot of important daemons, including the one that was production critical, kept their configuration files open, and so we were able to use lsof to find the magic symlinks to them in /proc/$pid/fd/ and just cp them back into /etc/.
We were able to restart openssh-server, log in again, and I don't remember if we were brave enough to test rebooting.
But we fucking did it!
I am certainly getting a lot of details wrong from memory. It's all somewhere at irclogs.ubuntu.com though. My nick was / is Jordan_U.
I tried to find it once, and failed.
I just told this story to a friend but I did the standard rm -rf * as root while in the / directory. And this was back in the day where we nfs mounted every other machine and root privileges propagated through NFS. I think it was on the 2nd or 3rd machine when I thought -- "this seems to be taking longer than I thought".
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.
Nothing. I've fixed nothing.
You're still with us, right?
Still trying to use Linux Mint on my 2013ish MacBook Pro as a daily driver. Got the MacBook for free and it wouldn't update anymore, so installed Linux Mint and it's been great for the most part. Still trying to access my NAS on it though. Having to manually mount drives is a new experience for me, and it's not coming to me intuitively. Reached out via IRC, got some help but still working on it.
This will feel extremely simple for some folks, but I was having a hell of a time getting Steam games that had previously worked through Proton running. I scoured the internet for solutions after trying to install proton-ge and testing multiple versions. Eventually someone had the galaxy brain idea to suggest installing WINE. For some reason, that fixed the problem real good.
Upgrading the system I removed glibc from the system (Debian). apt wasn't working, etc. Had to manually fix dependencies and everything. Currently my working OS so all fixed.
Are you including back in the day when we had to use windows device drivers via ndiswrappers?
I've managed to remove a critical library once but did manage to extract it from an RPM on another machine and manually install it. That was good enough to get me to the point where I could yum reinstall.
Pre-linux we had an HP workstation where the disc drive died and of course we had no backups. I managed to frankenstein the disc by connecting the platters on the broken disc to the circuit board of a working disc. This worked and I was able to back up the disk and reload on to a new drive.
And then we bought an 8mm tape drive for backups and I had to port some drivers to HP-UX to get it to work. But we had awesome backups after that!
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.
This doesn't fit the question exactly but I feel it's in the same spirit, and a kind of interesting solution, I think.
Back in the early days of scryptcoin mining, I had a few gpu mining rigs running Linux. Occasionally they would hard lock and I'd have to power cycle them.
What I ended up doing is getting some usb to serial adapters, wrote a python script that ran on startup and would send a character over serial at a set interval in a loop. That was hooked up, if I recall correctly, to an attiny85 using softwareserial and some ttl to rs232 conversion. It would listen over serial and if it didn't receive anything with a reasonable time frame it'd flip a relay that cut mains power to the pc, then flipped it back. A deadman's switch, of a sort. It worked great!
I remember a story about someone who did something similar with a server that kept hanging. They rigged up a second computer to ping it over the local network and if there was no response for a certain amount of time, the computer would eject its CD-ROM tray which had been lined up neatly with the reset button on the server.
Since it couldn't eject fully, it then retracted, having rebooted the server.
I assume that was a temporary fix... and it was probably a Windows server tbh.
The closest I've done is having a job run every 12 hours checking if a process was over a certain memory usage (memory leak) and restarting it if it was. That was also Windows, but the same thing on Linux wouldn't have been difficult... not that the Linux servers ever had that problem.
if ping() <> 0 then drinktray.exe
Holy jank, Batman!
But hey; if it’s stupid and it works, it’s not stupid.
It's not the biggest issue I managed to fix, but it was definitely the hardest to figure out a fix for:
Whenever I would boot up any game on my Linux machine I would have microstutters ever so often, and it was frequent and lengthy enough to be very annoying, and thus started my 2 month long quest to figure out what was going wrong.
To cut a long story short, the compositor I was using had suddenly decided to do a breaking update and change the names of the backends they were using.
Can't think of the most difficult problem, but I have managed to solve a lot of problems with btrfs snapshots.
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.
single gpu vm passthrough. took a few days for troubleshooting, and i didnt even want to get it to be undetectable by game anticheat, i hear that needs building your own kernel for some advanced detection methods.
I've generally had good luck with hardware and things just worked under linux. But one day I upgraded a few machines on my network to 2.5G ethernet. Several already had the ports, but my little NUC NAS box didn't, so I installed a 2.5G usb ethernet dongle. No matter what I did, I couldn't get it to work. It would show up and NM would act like it was up and there were no errors or anything, but it just wouldn't actually function.
Eventually, I found out that it has a built in USB data partition that contains the drivers for windows. The card was coming up as a usb disk first when the hardware was assigned and not a network card which it should have been.
I had to write a blacklist the usb modules first, which I had done before, but I had to also write a udev rule to automatically add the network card and driver on boot. It wasn't that difficult to actually do, but I had just never had to do anything with udev rules before. Took me a good three days of troubleshooting to finally get everything to work correctly on boot.
ACTION=="add", ATTRS{idVendor}=="20f4", ATTRS{idProduct}=="e02c", RUN+="/sbin/modprobe r8152" RUN+="/bin/sh -c 'echo 20f4 e02c > /sys/bus/usb/drivers/r8152/new_id'"
while playing around with face/fingerprint unlock for my laptop, I messed up pam (Linux Pluggable Authentication Modules) and no passwords were working anymore except for the root account. At first I was still on my account, but then I stupidly rebooted and could only log in as root. After so many config edits, I gave up and instead booted up windows (my laptop's dual booted), setting up a new linux install in VirtualBox, and then copying over the PAM config files from the vm to the actual Linux install.
and it all somehow worked!
I am now facing another issue which I'm gonna say here in the hope somebody has already ran into it: after updating to KDE plasma 6, tap to click works on my touchpad, but actually, physically, pressing on the trackpad doesn't work. I can hear the pad's physical clicking noise, but nothing happens os wise
this one's still to be resolved
Getting VR to work
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.
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.
I have had an issue for years that I couldn't pinpoint to a root cause (I'm strongly inclined to think it's a kernel issue). I bought a CM Storm Quickfire TK keyboard with ABNT2 layout.
The issue is: every time I try to type any key that is not a letter or number one, the computer freezes for a full ten seconds before acknowledge the press and showing the character. Tried a bunch of Linux distros through the years and the issue persists. On Windows it works flawlessly.
Just give up trying to debug the problem, but I still have this hole in my heart where the cause of this issue lives.
If the keyboard has the same problem in multiple distros, surely the problem lives in the keyboard? Maybe you had a bad one.
What's the deal with Linux and Tomoko? lmao
I keep seeing memes featuring her on Linux communities. Is it only the shut-in nerdy vibes?
I think Tomoko would be an ideal Linux user
At one point, my laptop's Nvidia drivers were all tangled up. The package dependency graph had portions of the screwy, we-don't-need-your-stinking-standard-version-scheme, binary blob drivers both in front of and behind the currently installed version. I had to basically gut everything Nvidia related, by performing surgery on the filesystem and Apt database, and then build it back. At one point, I was flying in text mode only; not hard, but worth mentioning since it shows how deep a cut this was.
Related: getting the above nonsense to cooperate with containers that also want to do GPU things. As much as I wanted this work with coding up a one-and-done solution (e.g. docker-compose or BASH script), you can't get away with mounting the host Nvidia driver and tools via volumes. The software on the container image itself must be built against the specific version you're running - no exceptions. So, I now rebuild these containers after every Nvidia package upgrade (from the author's git repo), which is a stupid way to achieve containerization. If Nvidia had a stable API/ABI across releases, this would just work. /rant
Some programs still relying on python2 when the operating system has long since upgraded to python3.
Not really an issue per se, I just had to switch those apps over to using the flatpak version which would have it installed as needed. (I'm looking at you GIMP)
I installed nixos on my laptop. That was four weeks ago. I am still configuring it.
windows update kept downloading these bloated "updates" that included brand new software that I didn't want or use, broke my settings, added a bunch of spyware, adware and other shit and slowed down my system
installing linux fixed that instantly and permanently
I can't remember the details anymore, but for a year or two I had a bad run of absolutely hosing my boot config and leaving myself in a state where the system either couldn't find it's kernel or couldn't find the root partition and would drop me into an initramfs emergency shell. I got pretty good at booting into a live environment, getting all my dm-raid and lvm disks discovered, mounting all the relevant file systems in the right place, chrooting in and rebuilding the pieces that were broken
A Gentoo upgrade package list with over 100 packages and conflicts all over the place. Then do it again when the list grows to the same size in a few months.
This is why I don't use Gentoo anymore.
I haven't used Gentoo in years, maybe I should try to main it again.
It was a pain sometimes but man did I learn a lot from using it.
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
idk how i would define difficult, but the thing i probably put the most time into figuring out thus far is LXC containers.
Or LXC, if you like not using redundant acronyms. Those containers are good shit, weird shit, but good shit nonetheless.
That not a thing on Linux?
SFC /Scannow on Windows
so called free-thinking Microsoft help lines when presented with any problem whatsoever
Installing a hadoop cluster across 5 machines. I wouldn't say I fixed it, but I made it so it wouldn't collapse until long after I'd left that company.
I had to fix so many booting problems using live usb, grub, xorg, login managers, they'are all difficult
I screwed up permissions on an LXC container in Proxmox by converting it from unprivileged to privileged (against recommendations) and had to mount it offline and write a script with find
into chown
via the execute flag to change all the UIDs and GIDs from the shifted unprivileged ones to the standard host-level ones.
Luckily this was in my own lab so it was a (mostly) harmless learning experience.
At some point I've installed rust implementation of the coreutils from the AUR, they worked for a long while until some ssl vulnerability were discovered and everyone had to update the library. As you can imagine, without working coreutils system were hard to use. troubleshooting were also a pain in the ass because who could blame coreutils of all things? :P