• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics in ~comp with the tag "linux". Back to normal view / Search all groups
    1. Auto-mute mode in ALSA might be the reason you can't use your speakers with headphones plugged in

      Problem: I recently switched back to a desktop as my main computer, and was surprised to learn I couldn't use my speakers if my headphones were plugged in. I don't use a desktop environment (just...

      Problem:

      I recently switched back to a desktop as my main computer, and was surprised to learn I couldn't use my speakers if my headphones were plugged in.

      I don't use a desktop environment (just Sway), so I rely on pavucontrol as a GUI to control my audio.

      I could use my headphones just fine while my speakers were plugged in, but when I switched to my speakers in pavucontrol's interface, they would not output audio. My headphones would stop playing (as expected), and pavucontrol's little "dancing bar" would indicate that the speaker's port was processing an audio signal (as expected), but no sound was actually being produced.


      Solution:

      The culprit ended up being something called "Auto-Mute" in ALSA. To disable auto-mute mode, you can either:

      1. Run the command amixer sset "Auto-Mute" unmute in a terminal
      2. Run the command alsamixer in a terminal
        2.1 Press F6 and select your sound card
        2.2 Ensure you're viewing playback settings by pressing F3
        2.3 Move the item selection over until you've selected auto-mute mode
        2.4 Press the down arrow key to switch it to "Disabled"

      That fixed my issue.

      For me, auto-mute mode stayed disabled after a reboot. You might need to run the command alsactl store to make the configuration persistent though. The Arch Linux Wiki article on ALSA has a "tips and tricks" section that goes into more detail:

      https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture#Tips_and_tricks

      17 votes
    2. Linux Mint desktop environment recommendations?

      I am planning on switching to Linux Mint as my first Linux daily driver. I know someone who's used Cinnamon (the default) and it works fine, but I was wondering if the other options officially...

      I am planning on switching to Linux Mint as my first Linux daily driver. I know someone who's used Cinnamon (the default) and it works fine, but I was wondering if the other options officially provided (Xfce and MATE) are any better? I have a little bit of (pretty trivial) GNOME experience on Ubuntu, but I don't really understand the pros and cons of different DEs. I've used KDE on the Steam Deck, and I hear that's a popular one, but can I get that on Mint?

      12 votes
    3. Best way to voice call and screenshare with audio on Linux?

      One thing I really enjoy is being able to share my screen with family and friends to watch movies together or share gameplay. On Windows, you can do this trivially with Discord. On Mac, you can do...

      One thing I really enjoy is being able to share my screen with family and friends to watch movies together or share gameplay. On Windows, you can do this trivially with Discord. On Mac, you can do this on Discord if you install some software they recommend. On Linux, I believe it's impossible with Discord unless you use a third party front end, which I'd rather not do. Zoom has screenshare with sound, but I don't know what the Linux support is like, and it's capped at 40 minutes unless you pay.

      Are there other messaging services that have voice call and audio screenshare support on Linux, no unofficial front end necessary, that's also available on Windows and Mac? It's ok if it requires some setup. Ideally it would be a group chat as opposed to streamed publicly on a site like Twitch.

      11 votes
    4. Share your personal dotfile treats and Unix tool recommendations

      I am currently preparing for a new job and cleaning up my dotfile repository. During the process, I had the idea that it would be nice to create a list of amazing tools, aliases, functions, and...

      I am currently preparing for a new job and cleaning up my dotfile repository. During the process, I had the idea that it would be nice to create a list of amazing tools, aliases, functions, and recommendations together.

      I will start.

      First, here is a list of nice tools to apt-get install or brew install that I can wholeheartedly recommend:

      • nvim is just an amazing text editor.
      • fzf is a very good fuzzy finder util. For example, you can quickly find files with it.
      • eza is a good ls replacement (and the successor of exa).
      • bat is a great replacement for cat with nice integrations and many options.
      • stow is great for managing your dotfiles. Thanks to @TangibleLight for telling me about it some while ago. I really love it.
      • tmux is a terminal multiplexer, i.e. you can have many sessions in one single terminal window. It's easy to use and super helpful. (When on a mac, I prefer iTerm tabs, though.)
      • nvm is practically a must if you are working with Node.
      • glow is an excellent markdown reader.
      • tldr is a nice man replacement. (You must run tldr -u after installing it to update available texts.)
      • z, an amazing tool for switching directories quickly.

      Also, I can recommend Oh My ZSH! which I have been using for years.

      Here is a small list of aliases I enjoy (I have 100+ aliases and I tried to pick some others may enjoy as well):

      # Serve current dir
      alias serve="npx serve ."
      
      # What's my IP?
      alias ip="curl --silent --compressed --max-time 5 --url 'https://ipinfo.io/ip' && echo ''"
      
      # This should be the default
      alias mkdir="mkdir -p"
      
      # Nice git helpers
      alias amend="git add . && git commit --amend --no-edit"
      alias nuke="git clean -df && git reset --hard"
      
      # Make which more powerful
      which='(alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'
      
      # This saves so many keystrokes, honestly
      alias -- +x="chmod +x"
      
      # Turns your path into a nice list and prints it
      alias path='echo -e ${PATH//:/\\n}'
      
      # Map over arguments and run a command
      # Usage: map <command>
      # Example: ls | map cat
      alias map="xargs -n1"
      

      And, finally, here are some fun functions:

      # Get cheat sheets for almost anything!
      # https://github.com/chubin/cheat.sh
      cheat() {
          WITH_PLUS=$(echo $@ | sed 's/ /+/g')
          CAT_TOOL=$(command -v batcat || command -v bat || command -v cat)
          curl "cheat.sh/$WITH_PLUS" | $CAT_TOOL
      }
      
      # Send everything to /dev/null
      nullify() {
        "$@" >/dev/null 2>&1
      }
      
      # Create a new dir and enter it
      mk() {
        mkdir -p "$@" && cd "$_"
      }
      
      # Create a data URL from a file
      # Source: https://github.com/mathiasbynens/dotfiles/blob/master/.functions
      data-url() {
      	local mimeType=$(file -b --mime-type "$1");
      	if [[ $mimeType == text/* ]]; then
      		mimeType="${mimeType};charset=utf-8";
      	fi
      	echo "data:${mimeType};base64,$(openssl base64 -in "$1" | tr -d '\n')";
      }
      
      74 votes
    5. best way to go about with a script that seems to need both bash and python functionality

      Gonna try and put this into words. I am pretty familiar with bash and python. used both quite a bit and feel more or less comfortable with them. My issue is I often do a thing where if I want to...

      Gonna try and put this into words.

      I am pretty familiar with bash and python. used both quite a bit and feel more or less comfortable with them.

      My issue is I often do a thing where if I want to accomplish a task that is maybe a bit complex, I feel like I have to wind up making a script, let's call it hello_word.sh but then I also make a script called .hello_world.py

      and basically what I do is almost the first line of the bash script, I call the python script like ./hello_world.py $@ and take advtange of the argparse library in python to determine what the user wants to do amongst other tasks that are easier to do in python like for loops and etc.

      I try to do the meat of the logic in the python scripts before I write to an .env file from it and then in the bash script, I will do

      set -o allexport
      source "${DIR}"/"${ENV_FILE}"
      set +o allexport
      

      and then use the variable from that env file to do the rest of the logic in bash.

      why do I do anything in bash?

      cause I very much prefer being able to see a terminal command being executed in real-time and see what it does and be able to Ctrl+c if I see the command go awry.

      in python, you can run a command with subprocess or other similar system libraries but you can't get the output in real-time or terminate a command preemptively and I really hate that. you have to wait for the command to end to see what happened.

      But I feel like there is something obvious I am missing (like maybe bash has an argparse library I don't know about and there is some way to inject the concept of types into it) or if there is another language entirely that fits my needs?

      6 votes
    6. Framework 16: Additional hardware questions

      I'm looking to buy a Framework 16 in its most powerful Ryzen config. I'm looking at this being the last laptop I need to buy because of its modular design, so I don't mind the heavy initial...

      I'm looking to buy a Framework 16 in its most powerful Ryzen config. I'm looking at this being the last laptop I need to buy because of its modular design, so I don't mind the heavy initial investment.

      I'm looking to shave of $400-500 by buying parts externally, however. I wanted it to be 64GB RAM, with a 4TB OS drive to run Aurora on, and later on a second drive for another non-immutable LTS distro (probably Debian?).

      If I can source the same RAM/Storage, is there any reason to actually buy them from Framework? I'm a bit confused by the huge price difference, since I can get the same memory and storage hardware from Microcenter for about $400 less total.

      And if anybody has any experience with the Framework 16 as a daily driver, I'd be interested to hear any stories. I'm not getting the graphics module yet, but may down the road to see if it can replace my desktop fully. Drivers should not be an issue as Aurora has a Framework image that contains everything I'll need.

      10 votes
    7. 3840x2160 120 Hz KVM

      Can someone recommend a KVM that works? I've been looking for a couple of years now. Requirements: 2-port, 1-monitor, DisplayPort 1.4 KVM Has a wired push button switch (and cable can be extended...

      Can someone recommend a KVM that works? I've been looking for a couple of years now.

      Requirements:

      • 2-port, 1-monitor, DisplayPort 1.4 KVM
      • Has a wired push button switch (and cable can be extended if needed)
      • Runs at 3840x2160 @ 120 Hz (or 60 Hz)
      • Works with HP docking station (HP USB-C Dock G5 for business)
      • Works with Classic 101 Black Buckling Spring USB keyboard
      • Works with Logitech TrackMan Marble Trackball
      • Works with HP laptop and custom desktop build (NVIDIA T1000 GPU)

      Anti-requirements:

      • Does not intercept keystrokes (or can be disabled)
      • Does not intercept mouse scrolling (or can be disabled)
      • Does not randomly repeat keys
      • Does not block certain keystrokes (e.g., ctrl+shift+t)
      • Does not let Windows laptop go to sleep
      • Does not require manually re-waking Windows laptop by pushing power button
      • Does not require switching back-and-forth to re-establish connectivity to both computers
      • Does not take more than 3 seconds to switch between computers
      • Does not randomly blank the screen for 1 second
      • Does not require unplugging and re-plugging the USB keyboard

      Here's the setup showing both computers and the push button switch:

      I have tried:

      • IOGEAR GCS62DP (almost perfect; kills keyboard after 60 swaps; RMA'd)
      • DiamondTiger KVM Switch EDID 8K@60Hz, 4K@144Hz, DP 1.4 (repeats keys, blanks screen, has screen tearing, and many other issues)
      • CanadaComputers iCAN HDMI USB KVM Switch 2x1 with Switch Extension 4K 60Hz (completely blocks certain keystrokes)

      Wendell's Level1Techs Store offers a highly recommended KVM, yet lacks a wired toggle button.

      What other KVM switches are available that "just work" and have a wired push button for switching?

      The next KVM I'm thinking about trying:

      ATEN also has a switch, which is on par with the IOGEAR (4K @ 60 Hz, no EDID):

      6 votes
    8. What are some great time savers on CLI that you would recommend?

      I use these right now on Debian: ncdu ncdu (NCurses Disk Usage): A disk usage analyzer with an ncurses interface, providing a fast and easy-to-use overview of disk space utilization. Ideal for...

      I use these right now on Debian:

      ncdu

      ncdu (NCurses Disk Usage): A disk usage analyzer with an ncurses interface, providing a fast and easy-to-use overview of disk space utilization. Ideal for identifying large directories and files in a user-friendly terminal interface.

      duf

      duf (Disk Usage/Free): A modern disk usage/free utility with a beautiful interface written in Go. It provides a quick and easy way to check disk usage across various file systems with color-coded output.

      tldr

      tldr (Too Long; Didn't Read): Simplified and community-driven man pages. Provides practical examples for commands, making it easier to understand and use without wading through lengthy and detailed man pages.

      nala

      nala (Next-Generation APT Frontend): A modern frontend for the APT package manager, designed to provide a more readable and user-friendly output for package management tasks.

      Speedtest-cli

      Speedtest-cli: A command-line interface for testing internet bandwidth using speedtest.net. Allows you to quickly check your upload and download speeds directly from the terminal.

      htop

      htop: An interactive process viewer for Unix systems. It provides a real-time, color-coded display of system processes, making it easier to monitor and manage system resources.

      powertop

      powertop: A tool for diagnosing issues with power consumption and power management on Linux systems. It provides detailed information on power usage by various system components and applications.

      thinkfan

      thinkfan: A simple fan control program for ThinkPads. It helps manage the system's fan speed to balance cooling and noise levels based on the temperature sensors.

      tlp

      tlp (Linux Advanced Power Management): A power management tool for Linux. It provides various configurations and options to optimize battery life on laptops without requiring manual tweaks.

      flatpak

      Flatpak: A system for building, distributing, and running sandboxed desktop applications on Linux. It provides a universal app distribution system that works across various Linux distributions.

      neofetch

      Neofetch: A command-line system information tool written in bash. It displays an aesthetically pleasing summary of system information alongside your terminal prompt.

      iftop

      iftop: A real-time console-based network bandwidth monitoring tool. It shows a list of network connections from/to your system and the bandwidth usage for each connection.

      nano

      nano: A simple, user-friendly text editor for the command line. Known for its straightforward and easy-to-use interface, making it a go-to for quick text editing tasks.

      Edit
      Oh wow! Thank you all for your suggestions!

      I was looking around and found cheat; it's defined as a cheat that allows you to create and view interactive cheatsheets on the command line. Hopefully, someone else might find it helpful as well.

      38 votes
    9. How bad are Nvidia GPUs for Linux really?

      I've been interested in switching to Linux, or at least dual booting, for some time now as Windows has kept getting worse and Proton for Steam has been getting better. I'm particularly interested...

      I've been interested in switching to Linux, or at least dual booting, for some time now as Windows has kept getting worse and Proton for Steam has been getting better. I'm particularly interested in trying Mint Cinnamon.

      In every Linux thread on here or Lemmy, I always hear people complaining about Nvidia drivers for Linux or other hardware problems that they avoid by having AMD.

      I have an Intel CPU and Nvidia GPU. How big of a problem is that, really? Does it make it an unbearable experience? Does it make it a lot more work to get things working? Does it make certain things impossible to get working? What's your experience?

      Also for dual booting, I hear people have problems with Windows messing up their Linux install. Is that a common problem, or a few people having bad luck? Is that avoidable?

      30 votes
    10. How do you organize your Linux packages?

      Hello everyone. I am planning to get back into Linux development after working with Mac only for almost a decade. On Mac, one of the most important lessons that I learned was to always use...

      Hello everyone.

      I am planning to get back into Linux development after working with Mac only for almost a decade. On Mac, one of the most important lessons that I learned was to always use Homebrew. Using various package managers (e.g. Homebrew, NPM, Yarn, Pip, etc.) creates situations in which you don't know how to uninstall or upgrade certain pieces of software. Also, it's hard to generate a complete overview.

      How do you Linux folks handle this?

      Bonus question: How do you manage your dotfiles securely? I use Bitwarden, and it's a bit clunky.

      If that helps, I want to try Mint and always use Oh My ZSH!.

      6 votes
    11. Linux Distro Recommendations

      I know this can be a bit of a heated debate sometimes, and with so many choices people will have their preferences. I wanted to hear some noob-friendly suggestions for me and some friends. What...

      I know this can be a bit of a heated debate sometimes, and with so many choices people will have their preferences. I wanted to hear some noob-friendly suggestions for me and some friends.

      What distros would work well for an old laptop repurposed as a glorified Chromebook (web browsing, Netflix, emails, etc) with some light Steam 2D indie game usage? It would be borrowed by less tech savvy people.

      What distros would work well for gaming desktops? Either current high end desktops or desktops that are a few years old.

      47 votes
    12. Does Linux From Scratch actually teach you anything?

      Two hours ago I randomly thought "hey, why not do LFS?", so I opened my laptop and started following the book. I've heard a lot of people say that LFS is great for learning how a Linux system...

      Two hours ago I randomly thought "hey, why not do LFS?", so I opened my laptop and started following the book. I've heard a lot of people say that LFS is great for learning how a Linux system works. However, so far it's just been a guide on how to compile different software and what autoconfig flags to use. I thought that maybe further chapters will have more information on how things work, but it seems like they all just contain a one-line description of a program and compilation instructions.

      If anyone here has done LFS, did you actually learn anything from it? Is it worth spending more time on?

      19 votes
    13. Have you ever compiled a custom Linux kernel?

      I was stubbornly determined to get my new Yubikeys working for FIDO2 SSH on WSL, which led me down the road to compiling my own custom Linux kernel for WSL with HIDDEV and HIDRAW enabled. This was...

      I was stubbornly determined to get my new Yubikeys working for FIDO2 SSH on WSL, which led me down the road to compiling my own custom Linux kernel for WSL with HIDDEV and HIDRAW enabled.

      This was my first time ever trying anything like this, and by the end of it I realized that it's not actually so scary to compile your own custom Linux kernel!

      Have you ever compiled a custom kernel before? What was the sequence of events that led you to do it?

      20 votes
    14. Is there an updated NixOS guide for first timers?

      I want to finally try NixOS and build a desktop OS from the ground up with sway, iwd, waybar, foot terminal, cmus, etc. I'm not a developer, but I'm a seasoned Linux user. Used Gentoo for years,...

      I want to finally try NixOS and build a desktop OS from the ground up with sway, iwd, waybar, foot terminal, cmus, etc.

      I'm not a developer, but I'm a seasoned Linux user. Used Gentoo for years, Void Linux and now I'm on OpenSUSE TW.

      I'm finding all sorts of guides and it seems confusing. In the past there wasn't any mention of home-manager and flakes, now it seems there are these things. Those are all things I need to care about? Is it all configured in one file?

      9 votes
    15. I want to learn more about linux

      I know the basics commands, command substitution, redirection, pipelines, and I know about .bashrc, .vimrc etc. but I feel like I still don't know a lot and I feel a bit lost as to where to learn...

      I know the basics commands, command substitution, redirection, pipelines, and I know about .bashrc, .vimrc etc. but I feel like I still don't know a lot and I feel a bit lost as to where to learn more. I know I'm being a bit vague, but that's on purpose, I don't really know what's possible. feel free to suggest any book or resource that you think would help me learn more about linux (I also haven't been keeping up with it lately, so any new stuff like what's NixOS would help)

      41 votes