• 0 Posts
  • 23 Comments
Joined 11 months ago
cake
Cake day: August 4th, 2023

help-circle





  • Interstellar_1@pawb.social

    Sorry again. I wrote this last comment (and this one, TBH) from my phone and “–iso=s” should have been “–iso-8601=s” . I’ve edited my comment and the command should now work (Making a backup of your grub.cfg containing the date, to the second, in the filename. I did that to hopefully avoid you running the same command again after trying some fixes and accidentally clobbering your backup).


  • Ahh, sorry.

    For Fedora it looks like the default /etc/default/grub looks like this:

    GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="rhgb quiet" GRUB_DISABLE_RECOVERY="true" GRUB_ENABLE_BLSCFG=true

    ( Taken from https://discussion.fedoraproject.org/t/how-to-regenerate-etc-default-grub/72677/9 )

    If you’re using LVM / LUKS you may need additional kernel parameters, like resume=… for suspend to disk to work properly.

    Please, before doing anything else, post the output of the following:

    cat /proc/cmdline

    And make a backup of your existing grub.cfg with:

    sudo cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg-backup-$(date --iso-8601=s)

    Also, be sure that you have a LiveUSB on hand. You don’t want to be SOL if we break something and can’t boot again without fixing it first.


  • Jordan_U@lemmy.mltoLinux@lemmy.mlI can't edit /etc/default/grub
    link
    fedilink
    arrow-up
    2
    arrow-down
    2
    ·
    edit-2
    4 months ago

    What version of Ubuntu are you using?

    What is the output of the following command?:

    dpkg -l | grep grub

    If you urgently want your grub menu to default to the first entry that can be done first, but unless that’s needed I’d prefer to get to the root of the problem(s) and get a proper fix.


  • This should get you back to defaults:

    sudo cp /usr/share/grub/default/grub /etc/default/grub && sudo update-grub

    At some point you definitely did accidentally write to /etc/default/grub when you meant to write to /boot/grub/grub.cfg.

    There’s no shame in that; Grub’s configuration process is very confusing and counter-intuitive.

    Everybody who has used Linux long enough has stories of breaking their systems in sillier ways, and this didn’t even really break your system 🙂.


  • Pulseaudio used features of sound cards (most prominently the hardware read pointer) that ALSA/dmix alone never used.

    ALSA/dmix could allow you to get the same power savings as pulseaudio if you set the hardware ring buffer size to, say, 2 seconds.

    And that would be fine of you were just playing some music, but if you were also chatting and wanting to get prompt notification sounds they would always be delayed between 0 and 2 seconds depending on where the hardware read pointer happened to be when the system tried to play a notification sound.

    ALSA/dmix could also allow you to set a tiny buffer size. Then your music would play, and your notification sounds would play promptly too. But if you were just playing music your CPU would never be able to go into the lower power sleep states because it would need to wake up every centisecond to service the tiny ring buffer.

    That would kill your battery life.

    Pulseaudio’s (terribly named) “glitch free” audio feature was the first solution for Linux that allowed you to get power savings and low-ish latency. Your mp3 player filled up the ring buffer once every two seconds, and if a notification came in pulseaudio would look at where the hardware read pointer was, take the contents of the buffer that was just about to be read, and mix the notification sound into it, writing the newly mixed sound data to the buffer just before the sound card read it.

    So, from the user’s perspective nothing interesting seemed to happen, but they get better battery life and things like notifications or game sounds work like they expect them to.

    ALSA drivers would commonly advertise support for accurately and precisely reporting the position of the hardware pointer, but since nothing actually used that info before, many drivers gave incorrect results, which would only cause problems when using pulseaudio.




  • …unless the videos have captions, in which case you absolutely can.

    View the transcript, search for something, click what you found and boom: You’re at that precise moment in the video.

    For literal grep, use something like NewPipe to download the subtitle file.






  • Tmux allows you to reconnect to a session, and helps guarantee that you will always be able to get back to your long running processes. For important long running processes, I still use tmux with mosh, because if the mosh client is killed (or you’re trying to “re-attach” from a different device, mosh won’t let you “re-attach” to that “session”.

    Mosh allows you to roam, and suspend your machine, and whenever you resume it again, whatever network you’re now on, the connection is basically instantly re-established. You can often roam from WiFi to cellular data without even noticing. (Great when working from a phone, or just a laptop)

    In my opinion, they are mostly orthogonal (and complementary).

    Here’s the list of features from the home page. I’ve added my own comments after ‘*’. If there is no ‘*’, then the feature doesn’t exist for tmux (because it’s outside the scope of tmux):

    Change IP. Stay connected. Mosh automatically roams as you move between Internet connections. Use Wi-Fi on the train, Ethernet in a hotel, and LTE on a beach: you’ll stay logged in. Most network programs lose their connections after roaming, including SSH and Web apps like Gmail. Mosh is different.

    Makes for sweet dreams. With Mosh, you can put your laptop to sleep and wake it up later, keeping your connection intact. If your Internet connection drops, Mosh will warn you — but the connection resumes when network service comes back.

    Get rid of network lag. SSH waits for the server’s reply before showing you your own typing. That can make for a lousy user interface. Mosh is different: it gives an instant response to typing, deleting, and line editing. It does this adaptively and works even in full-screen programs like emacs and vim. On a bad connection, outstanding predictions are underlined so you won’t be misled.

    No privileged code. No daemon. * Same for tmux, but that’s less interesting since tmux is not a network service You don’t need to be the superuser to install or run Mosh. The client and server are executables run by an ordinary user and last only for the life of the connection.

    Same login method. * Not really relevant to tmux, which doesn’t handle auth Mosh doesn’t listen on network ports or authenticate users. The mosh client logs in to the server via SSH, and users present the same credentials (e.g., password, public key) as before. Then Mosh runs the mosh-server remotely and connects to it over UDP.

    Runs inside your terminal, but better. * This is common to both Mosh is a command-line program, like ssh. You can use it inside xterm, gnome-terminal, urxvt, Terminal.app, iTerm, emacs, screen, or tmux. But mosh was designed from scratch and supports just one character set: UTF-8. It fixes Unicode bugs in other terminals and in SSH.

    Control-C works great. * Tmux can help with this too Unlike SSH, mosh’s UDP-based protocol handles packet loss gracefully, and sets the frame rate based on network conditions. Mosh doesn’t fill up network buffers, so Control-C always works to halt a runaway process.


  • Not quite running in userspace. To the best of my own understanding:

    The new kernel feature is to allow writing schedulers in eBPF, a “language” the kernel runs in kernelspace that is heavily restricted.

    For example, all eBPF programs must complete in bounded time, and the kernel’s static checker must be able to verify that before the program can even begin executing. eBPF is a rare language that is not touring complete.

    “For scx_simple, suspending the scheduler process doesn’t affect scheduling behavior because all that the userspace component does is print statistics. This doesn’t hold for all schedulers.”

    So, it may be that eBPF also makes it easier to write a truly userspace scheduler, but that’s not the primary purpose, and it’s not what is being done with scx_simple.

    https://lwn.net/Articles/909095/ for more about (e)BPF.