-
18 votes
-
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:
- Run the command
amixer sset "Auto-Mute" unmute
in a terminal - Run the command
alsamixer
in a terminal
2.1 PressF6
and select your sound card
2.2 Ensure you're viewing playback settings by pressingF3
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 - Run the command
-
Cycling typing
4 votes -
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
11 votes -
AMD Radeon PRO W7700 running on Raspberry Pi
10 votes -
Zig reproduced without binaries
19 votes -
Why I will always be angry about software engineering
34 votes -
Desktop icons are surprisingly hard!
30 votes -
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
14 votes -
KeenWrite 3.4.7
26 votes -
When Machine Learning Tells the Wrong Story
6 votes -
Ideas for a side project I'm working on -- an RPG to help me curb my alcohol consumption
Preface: I am familiar with Habitica. This idea would probably scratch a similar itch, but I'm also using this as an opportunity to sharpen my Rust skills. My idea came about when I was trying to...
Preface: I am familiar with Habitica. This idea would probably scratch a similar itch, but I'm also using this as an opportunity to sharpen my Rust skills.
My idea came about when I was trying to find out some new tactics to curb my alcohol consumption, which isn't quite out of control yet, but I don't want to tempt fate.
I've also really liked the progression aspect of RPGs. What if I could gamify my quest to not drink alcohol and make it sort of a fun, unique RPG experience at the same time?
In the broadest sense, it would go something like this:
- You open the game up, ideally each day. You are instantly prompted: "Did you drink yesterday?" (and perhaps it will go back a few more days if you skipped).
- For each day you answer "no", you are rewarded with some sort of tokens, credits, etc. -- currency to play the game. If you answer "yes", maybe you get penalized somehow.
- Then, you pick up your journey, which is sort of a standard RPG experience -- fighting battles, buying gear, learning spells, leveling up, advancing through the world, you name it.
- The game should get progressively more difficult, but should not have an ending, as "quitting alcohol" does not have an ending either. At the same time, it should scratch the RPG progression itch.
The initial game concept I came up with is just one that I see as the quickest way to get this off the ground, which would be something CLI-based, where you are presented with a menu ("visit shop, enter arena, view equipment" etc.). You spend battle tokens to enter into arena battles, which reward experience points, money, and gear. You level up, work towards a build (there needs to be a way to respec because restarting isn't really an option), and progress through the arena.
In total, you would probably spend less than 5 minutes every day playing the game, which is by design. It should be an every day habit. But, there should be enough entertainment value that, if I'm not getting those sweet battle tokens by not drinking, I'm missing out on experiencing the game (or, I could lie, which defeats the purpose of the app).
So that's where I'm at right now. I'm really interested to hear your thoughts, ideas, critiques, etc. before I spend a free weekend building out a concept.
Some questions in particular:
- I was leaning toward just building this in CLI because it will be extremely simple. It could just be a matter of STDINs. However, I'm open to other Rust-based options. Is there a good Rust UI toolkit or web framework that is worth looking into that would make this a little more modern?
- What about game features? What could make this a really fun experience, while also balancing the whole concept of being built around your life and your habits?
In the end, this is a deeply personal project that would be built, first and foremost, for my specific needs. But that's not to say I couldn't build it with some scalability in mind. Rather than asking about alcohol, perhaps the "habits" can be customized, and so forth.
Anyway, have a great weekend!
23 votes -
A Craving for Calculation
4 votes -
Add a Meta page to your personal website
17 votes -
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 -
Moving my game project from C to Odin language
15 votes -
The (new) Excel Turing machine
18 votes -
Cmake strategies or alternatives for building (different) code for different platforms
Okay, so this is getting really long, I'll put the ask up front: I have a strategy, I think it is reasonable. Now is a point where I can easily change things, and it won't be so easily later. So...
Okay, so this is getting really long, I'll put the ask up front: I have a strategy, I think it is reasonable. Now is a point where I can easily change things, and it won't be so easily later. So I'm looking to see if anyone has trod this road before and can recommend any of:
- a different build system that will be easier to manage for this use case
- a different strategy for using cmake that will be easier to manage
- any gotchas I should be aware of, even if you don't have better solutions.
Background
I have a project I'm working on where the ultimate deliverable will be a hardware device with 3-4 different microcontrollers coordinating with each other and interacting with a PC-ish platform. This is a clean rewrite of a C++ codebase. Due to the microcontroller (and some of the PC APIs) being C++, the language of choice for most of it is likely to remain C/C++.
I'm succeeded in setting up a build system for embedded code. The old code was arduino, so it relies a lot on those libraries, but I've managed to set up enough custom cmake to get off of the ardunio tools altogether, even if I am borrowing their libraries and some of the "smarts" built into the system about setting build flags, etc. So far, I have a dockerized toolchain (cmake + make + gcc-arm-none-eabi) that can successfully build ARM binaries for the target platform.
The thing that I'm up against now is that I'd like to have a robust off-target unit testing infrastructure. My ideal case is that everything in the embedded system will be broken down into libraries that have clear interfaces, then to use unit tests with mocks to get high coverage of test cases. I'll still need some HIL tests, but because those are harder to set up and run, I want to use those for integration and validation.
In terms of OSes available, we're mostly working on Windows systems using WSL for linux. I'd like things to be as linux-based as possible to support CI on github, etc.
Goals and Cmake limitations
I started out using cmake because I hate it least of the tools I've used, and I am at least pretty far up the learning curve with it. But a limitation I'm hitting is that you can't do a mixed compile with two different toolchains in one build. The reasons why cmake has this limitation seem reasonable to me, even if it is annoying. You can easily change the toolchain that your code is built with, but that seems to be largely targeted at cross-compiling the same binaries for different systems. What I want to do is:
- build my code libraries with embedded settings for linking to the embedded binaries and build those embedded binaries (the end product)
- build my code libraries with linux-ish tools and link them against unit tests to have a nice CI test process
- (eventually) also be able to build windows binaries for the PC components -- when I get to that point, I'd like to get away from the MSVC compilers, but will use them if I have to
Current strategy
My current plan is to configure a library build like this (pseudocode):
add_library(mylib sources) if (BUILD_TYPE STREQUAL BUILD_TYPE_EMBEDDED) <embedded config> elseif (BUILD_TYPE STREQUAL BUILD_TYPE_LINUX) <linux config, if any> endif() #unit tests are built for each library if (BUILD_TYPE STREQUAL BUILD_TYPE_LINUX) add_executable(mylib_test sources test_sources) target_link_libraries(mylib gtest etc.) endif()
For the rollup binaries, I make the whole target conditional
if (BUILD_TYPE STREQUAL BUILD_TYPE_EMBEDDED) add_executable(myembedap sources) target_link_libraries(mylib) endif()
Then the build script (outside cmake) is something like
cd build/embedded cmake <path to src> <set embedded toolchain> -DBUILD_TYPE=embedded make cd ../../build/linux cmake <path to src> -DBUILD_TYPE=linux make
Things I like about this strategy:
- It's relatively simple to do all the builds or just one of the builds (that control would go in the shell script)
- I have one source tree for the whole build
- It lets configuration be near code
- It lets tests be near code.
- I think it's extensible to cover the PC component builds in the future
Things that worry me:
- It feels like a hack
- Support for off-target tests feels like it should be solved problem and I'm worried I'm missing something
Thanks for reading. If you made it this far, you have my gratitude. Here's a video with funny out of office messages that I enjoyed.
6 votes -
best option for a bare-bones message board/forum?
hello tildes, i am searching for a bare-bones forum/message board. i'll describe what i need and perhaps someone can point me in the right direction: must have the ability to create an account...
hello tildes,
i am searching for a bare-bones forum/message board. i'll describe what i need and perhaps someone can point me in the right direction:
must have the ability to
- create an account
- create topics with the ability to reply
- fully customizable front-end (html/css) so i can make it match my website
- either self-host or use a custom domain on ext hosting
unimportant but nice to have
- display images in posts via external urls
- different boards (categories?) to post into (would be nice but not vital)
- nested replies (or some visual way to see what you're replying to)
free would be ideal (dreams are nice) but probably wouldn't want to spend more than $5/month as this is a supplement to a website where i don't expect much traffic at all due to the nature of the project. no images/video/audio will be hosted ideally.
i'm ok with "hacker news" or "reddit-like" software but my backend knowledge if very limited. for instance, i looked into self-hosting lemmy but i don't understand how to setup docker. options like phpbb would be fine if i could strip away everything aside from the above-mentioned features.
i want it to be extremely simplistic in appearance and for the end-user (tildes is a great example of the simplistic end-user experience). tildes could be a cool option but i think getting it setup is a bit out of my skill-range.
can anyone offer any suggestions/guidence?
edited to emphasize important aspects and clarify things that are not vital but would be nice to have.
15 votes -
Best solution to extract PDF data?
Hi folks-- To those more knowledgeable than I am: What would be the best local solution to extract numerical data from a batch of PDF file reports? The values I want are interspersed among word...
Hi folks--
To those more knowledgeable than I am:
What would be the best local solution to extract numerical data from a batch of PDF file reports? The values I want are interspersed among word processor formatted tables and irrelevant text. The text and table formatting are (nearly) identical across reports. The data I want vary across reports. The PDFs are not of images...I can select and copy text without OCR. I have thousands to process, and the data themselves are confidential (I have clearance) and cannot be shared. I can use Windows or Linux but no MacOS.
I am technically inclined, so I bashed my head against regular expressions just enough to use notepad++ to find and delete most of the irrelevant stuff and make a CSV, but it's a hacky, imprecise method and not nearly automated enough for batches. For reference, I don't code for a living or even as a hobby, but I use R and bash, am familiar with IDEs, and can follow pseudocode well enough to edit and use scripts.
Any thoughts? Thanks in advance!
24 votes -
My even smaller keyboard upgrade
18 votes -
What has case distinction but is neither uppercase nor lowercase?
38 votes -
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
14 votes -
Are Feeds - like RSS or Atom feeds - Really worth it for a personal blog?
I stopped blogging several years ago. Over the last few years, I've been writing plenty of private essays. However, very recently I have been considering starting to publish my writing and, well,...
I stopped blogging several years ago. Over the last few years, I've been writing plenty of private essays. However, very recently I have been considering starting to publish my writing and, well, start blogging again publicly. I have no desire to waste time on templates, look-and-feel, visual stuff, etc. I just want to write a bog-standard html file, and then publish it...I do value leveraging html elements that help with meta data (e.g. microformats, etc.), but don't care about how things look - and these elements that i value are all invisible to most users anyway. I would be fine with just crafting html by hand, deploying it via sftp or some boring deployment pipleine, and that's it. But, then, I started thinking: what about having an RSS/Atom feed? I used to consume content via an rss reader, but have not done so in years. But, I don't want to manually craft that feed file; nope, sorry. But, I've heard a comment or two from acquaintances that rss/atom feeds and syndication are really something that people - like my potential audience - might really desire. So, I should really consider having one. This means that either I have to craft several things manually (from the blog post itself, the list of archived posts, the feed file, etc.), or use a static site generator that will handle all this for me, etc. I don't want to get trapped down a rabbit hole where I am spending so much on the tooling, the scaffolding, twiddling with templates, or the publish process itself. I just want the minimal for writing and publishing, I want it to live on my domain name, and that's it. Am I crazy or extremely lazy for not wanting to generate an RSS/Atom feed file?
So, here's my ask of you all nice people: are feeds like RSS/Atom feeds even worth it? If so, does anyone have recommendations for a manual process where i can craft the blog post's html by hand, but somehow leverage a portion of a static site generator (or some minimal tool) to only automate the creation of the RSS/Atom feed file? Thanks in advfance for any constructive feedback!
P.S. - One thing that re-ignited my desire both to write more in public, and keep it alive with minimal fuss was my re-reading of Jeff Huang's excellent "This Page is Designed to Last" post: https://jeffhuang.com/designed_to_last/
19 votes -
Debugging audio artifacts caused by... a serial port?
7 votes -
FizzBuzz as a TypeScript type
11 votes -
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
18 votes -
Paper: Feminism in Programming Language Design
36 votes -
Real-time speech-to-speech translation
Has anyone used a free, offline, open-source, real-time speech-to-speech translation app on under-powered devices (i.e., older smart phones)? There are a few libraries that written that...
Has anyone used a free, offline, open-source, real-time speech-to-speech translation app on under-powered devices (i.e., older smart phones)? There are a few libraries that written that purportedly can do or help with local speech-to-speech:
- https://github.com/ictnlp/StreamSpeech
- https://github.com/k2-fsa/sherpa-onnx
- https://github.com/openai/whisper
I'm looking for a simple app that can listen for English, translate into Korean (and other languages), then perform speech synthesis on the translation. Although real-time would be great, a short delay would work.
RTranslator is awkward (couldn't get it to perform speech-to-speech using a single phone). 3PO sprouts errors like dandelions and requires an online connection.
Any suggestions?
6 votes -
Several Russian developers lose kernel maintainership status
40 votes -
TLA from first principles
5 votes -
Slowly booting full Linux on the intel 4004 for fun, art, and absolutely no profit
10 votes -
Everything I built with Claude Artifacts this week
10 votes -
Gamedev in Lisp. Part 1: ECS and metalinguistic abstraction
9 votes -
Never missing the train again, thanks to Rust
21 votes -
Steve Klabnik's Tutorial on Jujutsu (git replacement)
18 votes -
Formatting Maven Errors
Maven conveniently puts all errors at the end of a build. However, the error messages are not formatted. The errors messages are presented as once giant line via word wrap. I'm on a windows box,...
Maven conveniently puts all errors at the end of a build.
However, the error messages are not formatted. The errors messages are presented as once giant line via word wrap.
I'm on a windows box, using Git Bash to run maven.
I could futz around and make a macro in Notepad++ for formatting the error messages into a more readable format.
Before I go that route I was wondering if maven had any handy settings or if there is some handy utility that will do that for me.
3 votes -
My solar-powered and self-hosted website
10 votes -
How to make Racket go (almost) as fast as C
2 votes -
How to write a blog post about how to monetize a blog
5 votes -
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
11 votes -
Ladybird chooses Swift as its successor language to C++
I've copied the full tweet below (it's from August, I missed this news somehow): We've been evaluating a number of C++ successor languages for @ladybirdbrowser , and the one best suited to our...
I've copied the full tweet below (it's from August, I missed this news somehow):
We've been evaluating a number of C++ successor languages for @ladybirdbrowser , and the one best suited to our needs appears to be @SwiftLang 🪶
Over the last few months, I've asked a bunch of folks to pick some little part of our project and try rewriting it in the different languages we were evaluating. The feedback was very clear: everyone preferred Swift!
Why do we like Swift?
First off, Swift has both memory & data race safety (as of v6). It's also a modern language with solid ergonomics.
Something that matters to us a lot is OO. Web specs & browser internals tend to be highly object-oriented, and life is easier when you can model specs closely in your code. Swift has first-class OO support, in many ways even nicer than C++.
The Swift team is also investing heavily in C++ interop, which means there's a real path to incremental adoption, not just gigantic rewrites.
Strong ties to Apple?
Swift has historically been strongly tied to Apple and their platforms, but in the last year, there's been a push for "swiftlang" to become more independent. (It's now in a separate GitHub org, no longer in "apple", for example).
Support for non-Apple platforms is also improving, as is the support for other, LSP-based development environments.
What happens next?
We aren't able to start using it just yet, as the current release of Swift ships with a version of Clang that's too old to grok our existing C++ codebase. But when Swift 6 comes out of beta this fall, we will begin using it!
No language is perfect, and there are a lot of things here that we don't know yet. I'm not aware of anyone doing browser engine stuff in Swift before, so we'll probably end up with feedback for the Swift team as well.
I'm super excited about this! We must steer Ladybird towards memory safety, and the first step is selecting a successor language that we can begin adopting very soon. 🤓🐞
Nitter link:
https://nitter.poast.org/awesomekling/status/1822236888188498031
Original post:
https://x.com/awesomekling/status/1822236888188498031
Some of Kling's replies in that thread are also pretty interesting:
My general thoughts on Rust:
- Excellent for short-lived programs that transform input A to output B
- Clunky for long-lived programs that maintain large complex object graphs
- Really impressive ecosystem
- Toxic communityIn the end it came down to Swift vs Rust, and Swift is strictly better in OO support and C++ interop.
The September monthly report for Ladybird released the day after I posted this. It provides basically the same information:
This Month in Ladybird September 2024
The section about Swift:
Successor language search progress
Over the past year, our core contributors have been exploring potential safe languages to complement or succeed C++. We evaluated several options, including Rust, Swift, Fil-C, and others. While some languages offered compelling features, many fell short in either C++ interoperability or providing the level of memory safety we needed.
After extensive testing and discussion, Swift emerged as the top choice among our core developers, thanks to the new Swift 6 interoperability features and its growing cross-platform support. As a result, we’ve decided to adopt Swift as our C++ successor language.
That said, this will be an incremental shift. The existing C++ codebase is deeply embedded in the project, and a complete rewrite would be impractical. Instead, we’ll be gradually introducing new components in Swift, carefully integrating them with our existing C++ code over time. Look forward to a dedicated blog post on the topic soon.
32 votes -
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 -
Encrypted Root with LUKS and Opal
6 votes -
Curly-Cue: Geometric methods for highly coiled hair
12 votes -
Diffusion for World Modeling - CS:GO and other games rendered in real time using neural networks
7 votes -
Relative installed shady browser extension
[Possibly solved, please look at comments] Hey, so recently a family member accidentally downloaded a shady browser extension called: "Easy Print" on Firefox. 30k downloads, no ratings, weird...
[Possibly solved, please look at comments]
Hey,
so recently a family member accidentally downloaded a shady browser extension called: "Easy Print" on Firefox. 30k downloads, no ratings, weird "offical" website and installed accidentally trying to buy tickets. I assume it showed something along the lines of: "Buy ticket now" and they just clicked on it (being overall inexperieced with security). Only extension installed was uBlock until then.
I won't post a link just in case, but you can easily find it by googling: "Easy Print Firefox" or "Easy Print App" for their website.
What makes this weirder is that they change the default search engine to Yahoo, which for me was always a red flag for a hijacked browser.
I uninstalled it, but am concerned that they installed something like a keylogger along with it.
Can anyone help me what this is and, especially, how I can properly teach them the basics of internet safety? Not the first time their PC/browser was filled with unwanted stuff...
Thank you and best regards!
15 votes -
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
14 votes -
Get me out of data hell
30 votes -
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
14 votes