tell me the most ass over backward shit you do to keep your system chugging?
here’s mine:
sway struggles with my dual monitors, when my screen powers off and back on it causes sway to crash.
system service ‘switch-to-tty1.service’

[Unit]
Description=Switch to tty1 on resume
After=suspend.target

[Service]
Type=simple
ExecStart=/usr/local/bin/switch-to-tty1.sh

[Install]
WantedBy=suspend.target

‘switch-to-tty1.service’ executes ‘/usr/local/bin/switch-to-tty1.sh’ and send user to tty1

#!/bin/bash
# Switch to tty1
chvt 1

.bashrc login from tty1 then kicks user to tty2 and logs out tty1.

if [[ "$(tty)" == "/dev/tty1" ]]; then
    chvt 2
    logout
fi

also tty2 is blocked from keyboard inputs (Alt+Ctrl+F2) so its a somewhat secure lock-screen which on sway lock-screen aren’t great.

  • Eager Eagle
    link
    fedilink
    English
    12
    edit-2
    10 months ago

    I keep a small local knowledge base with common fixes for problems I find recurrently (over and over again in some cases).

    It has a bit over 1,300 lines of markdown files split by category of problem. It saves me the trouble of finding that exact solution in stack overflow that fixed this exact problem 5 months ago.

    • @[email protected]
      link
      fedilink
      210 months ago

      I do this also except I need to get in the habit of documenting every single problem instead of just recurring ones. I should start using one of those local server shell history databases, too.

  • @[email protected]
    link
    fedilink
    410 months ago

    gtk3-classic still doesn’t work properly on Wayland and I doubt it will ever be fixed so I include WAYLAND_DISPLAY=0 in each shortcut file to force them into xwayland.

  • kate
    link
    fedilink
    English
    6
    edit-2
    10 months ago

    something kept messing with my dns and i’m too lazy to find out why so i hardcoded etc/resolv.conf and chmod +i on it

    • downhomechunk
      link
      fedilink
      English
      410 months ago

      I too was a bit underwhelmed by sway. I also bought an amd gpu, but I don’t regret it. I couldn’t get Wayland to work at all on my 3060 ti.

  • Ephera
    link
    fedilink
    5610 months ago

    I like to use unclutter to hide my mouse pointer after a few seconds without being moved.

    Now, the thing is, it doesn’t just visually hide the cursor, it actually removes it, so UI elements triggered by hovering disappear. Sometimes that’s great, other times it’s infurriating, like when reading a tooltip or menu.

    I mostly use a touchpad, and so I developed a habit to wiggle my finger while I’m intentionally hovering something, so that there was enough mouse movement for unclutter to not remove my pointer.

    Then I found a setting for the jitter threshold of the touchpad. Basically, with the threshold on, it ignores tiny movements, because the hardware reports finger wiggling, even if you hold your finger perfectly still. Which is perfect for me to turn off.

    Now when I have my finger on the touchpad, it automatically wiggles and allows me to read hover elements. If I take my finger off, it stops wiggling and removes the cursor.
    It’s almost like someone designed an OS with touchpads in mind, rather than them being an afterthought.

      • Ephera
        link
        fedilink
        210 months ago

        Uh, well, I kind of already wrote most of what there’s to say in the comment above, it hides your mouse pointer when you don’t move it for a few seconds.

        In most distros, it’s available as the unclutter package, directly from the repos. On Debian-based systems, the package you want is called unclutter-xfixes.

        https://wiki.archlinux.org/title/Unclutter

        It is built for X11 and won’t work on Wayland.
        But KDE recently shipped a built-in feature as part of Plasma 6.1 (a Desktop Effect called “Hide Cursor”), which also works very nicely. That one does not cause hover elements to disappear.

  • Ving Thor
    link
    fedilink
    610 months ago

    I wrote a systemd unit file to force my wireless keyboard to always switch the fn key to normal F-keys.

    • @[email protected]
      link
      fedilink
      410 months ago

      I think there is a value you can put into a /sys file to fix this. Had the same issue on my k10 keyboard. (the fix was easily findable on their forums)

  • @[email protected]
    link
    fedilink
    1110 months ago

    Got fed up of Pipewire suspending (old receiver takes ~2 sec to work again after spdif stream is cut) that now I auto-run aplay to play a silent .wav on loop

    • DarkSirrush
      link
      fedilink
      210 months ago

      But there is a setting to disable that? I don’t remember where I found it because I don’t remember where to find any settings, but you can definitely disable automatic shut off of audio devices.

      • @[email protected]
        link
        fedilink
        210 months ago

        Yes, you kinda can disable suspend, but it will still cut off spdif transmission even then. Normally that wouldn’t be an issue but my receiver is super old and takes its sweet time to start actually playing audio after it gets a signal

        • DarkSirrush
          link
          fedilink
          110 months ago

          Ah, didn’t know it worked differently for spdif, never had anything nice enough to use it.

  • @[email protected]
    link
    fedilink
    1910 months ago

    I ran out of crtcs, but I wanted another monitor. I widened a virtual display, and drew the left portion of it on one monitor, like regular. Then I had a crown job that would copy chunks of it into the frame buffer of a USB to DVI-d adapter. It could do 5 fps redrawing the whole screen, but I chose things to put there where it wouldn’t matter too much. The only painful thing was arranging the windows on that monitor, with the mouse updating very infrequently, and routinely being drawn 2 or more places in the frame buffer.

  • @[email protected]
    link
    fedilink
    1210 months ago

    Well it was more like a temporary duct tape, but I “installed” a copy of Ubuntu in RAM from the running Ubuntu system so that I could “boot” (pivot_root) into it without restarting it

    All because I didn’t want to wait on a ticket for my dedicated server provider to hook in a KVM LOL

    (See my meme post I posted to c/linuxmemes a few weeks back for more info)

  • @[email protected]
    link
    fedilink
    610 months ago

    Not exactly mine but I’ve used it. I have a fast but data-limited internet connection and a slower unlimited connection. When I need the faster connection to do something I connect to it through wifi while staying connected to the other through Ethernet. Then use this project to bind a specific app to wifi while everything else keeps using Ethernet. It uses LD_PRELOAD to link its own version of network connect that calls the real method. There’s definitely a better way to do this with iptables but it’s a good enough patch for when needed.

  • @[email protected]
    link
    fedilink
    810 months ago

    My Nvidia card won’t properly resume the display after suspend with the default suspend script, but if I correct the script file, every time aptitude updates the nvidia drivers, it restores the bad version of the configuration file. If you set the file immutable with chattr, aptitude throws a fit and goes into a broken state when it can’t overwrite the file on a driver update.

    So I keep a good copy of the script file in the directory, and in my pre-suspend script file I overwrite the main suspend script with the good version. Every single time.

  • Julian
    link
    fedilink
    English
    1510 months ago

    So I use a surface device with the Linux surface kernel, and there was (and probably still is) an issue where the type cover doesn’t properly rebind after being detached and re-attatched. To make matters worse, connecting other USB devices disconnected the type cover. My solution was to make a udev rule that detected if the keyboard is “removed” and then try to rebind it, effectively unplugging it and plugging it back in again in software.