Audio issue - was Re: Starting Wayland-KDE on FC39
Richard Troy
rtroy at ScienceTools.com
Sun Dec 10 18:42:33 GMT 2023
Hi Duncan, René, et al,
WOW, I'm impressed! THANK YOU for all your thoughts on this matter.
I have some responses and some good news. ...I usually don't delete stuff,
but this time I'm going to delete a bunch to focus on just the pertinent
bits and comment "in-line:"
> I may or may not be much help, but this is sure interesting! ...
;-) I found it _frustrating!_
> Slight detour, but knowing the name of those "console windows" you mention
I'm going to just jump right in here, responding to but skipping quoting
your comments on Virtual Consoles:
This particular environment, and in fact all Unixes and Red Hat, then
Fedora, at least so far as I can recall behave thus:
1) From the "console" and ONLY the "console", you can at any time enter
control-alt-F1 through F12, and it will instantly "jump" to the chosen
VC, and at least 1 to 8 will be active logins. Some 'nixes give you all
12, most modern ones only give to 1 to 8. On some OSes (including
modern Fedora), from f9 on up are dedicated for some kind of output or
use I'm not familiar with, though I DO recall seeing some type of
logging output on these some years back. I THINK they're used during
installations and the like.
2) There is often a delay in switching, usually short but sometimes WAY
longer than you'd think, so have some patience!
3) The VCs don't go away when you switch to another one - there's always
at least a login prompt, even if the system is set up for a GUI target.
If you exit, the system just gives a new login prompt. And if you go to
a different VC, when you come back it'll be right where you left it
unless some outside influence (such as perhaps a kill command
somewhere) caused it to go away, in which case you'll be greeted with a
new login prompt.
4) I don't recall with certainty anymore but I think that Ultrix, SunOS,
Solaris, and the other 'nixes I used in the late 80s and first two
thirds of the 90s all would start x in the VC you ran startx or xinit,
effectively replacing it, but it would return depending on how you
exited.
Red Hat, I don't recall with certainty, either, but Fedora I know ONLY
provides the windowing environment in VC 1 (ctl-alt-f1). I had imagined
this is common across modern distros, but apparently not the distros
you are familiar with where it's #7! I find this very interesting, but
not particularly useful at this moment - a sort of intellectual lint
caught in the lint screen of my brain. Maybe it'll be useful for me
someday!
5) Pertaining to sound, if I was in KDE and started a song via, say,
RhythmBox, it would play, unheard. And when switching to another VC
sound would ONLY appear if that VC was logged in to the same user
profile (UID) that was running the music program, e.g. RhythmBox. Thus,
songs would neither start nor stop when one switched into the VC,
rather the sound would either appear or disappear. Keep switching
between VCs, and it'll just be later in the song, for example.
> BTW, you're not doing audio via HDMI off the video card, right?
Like you, I have a "stub". In theory, according to the manufacturer, I
should have six separate HDMI channels (at least stereo pairs, if not more
than just that) I can use, and according to the marketing literature on
the box, this works even on Linux. However no, I haven't tried it.
Instead, I've got a motherboard installed chipset that provides eight
different versions of sound, 6 of them analog and two digital.
I have given a half-hearted attempt at figuring out how to get the HDMI
based sound working but realized that even if I succeeded it wasn't going
to work out that well for me unless I had REALLY good control over it;
you'd need audio channel bonding, the logical equivalent capability of
network physical link layer bonding (such as a bonded DSL pair that used
to be common) but for audio instead of networking to be able to configure
it correctly. I seriously doubt anyone has done that already! ... If I had
a spare lifetime, I might enjoy taking a half year plus to make such a new
tool-set.
Another key reason I didn't pursue it is because I know the other hardware
works!
> For troubleshooting at least, you might want to investigate weston as a
> low-deps basic/backup wayland compositor.
I certainly WILL make (am making) note of this! So far I loathe Wayland
but maybe someday? I try not to be closed minded.
>> Where Dave runs:
>>
>> /usr/bin/dbus-run-session /usr/bin/startplasma-wayland
>>
>> I run:
>>
>> xinit /etc/X11/startplasma-x11
Yes, back to how x is started! KEY!
I recall x being run from root, and was surprised when I found it no
longer works correctly doing that. But then, maybe I SHOULDN'T have been
surprised!
> OK, two things to try, or one to try and one question to ask and maybe
> try...
>
> First the question. When you run xinit from your CLI login, does X
> start(etc).
I think I addressed these already.
I don't recall a VC being closed out, EVER, by any automation, and it's a
curious point (more lint!). It's not happening here now, though.
> If the launching CLI login continues I'm not sure why logging in in
> another CLI VC allows sound to work, since the existing login should take
> care of it.
The answer must be because of some "brain switching" that happens when the
VCs are switched. You note that they're different security environments (I
think), so that must be it?
> With sound NOT working, preferably after a clean reboot just so we know
> where we're starting, do a(n) ls -lR (long, recursive) of /dev and dump
> the results into a "broken" file. (etc)
I think the diffing idea of two ls -l outputs of /dev is a quite worthy
technique for device related privilege issues! Thanks! I hadn't thought of
it and it's, well, not a flashing red light with blaring siren calling
your attention to it, but on the other hand it is sort of obvious!
Sometimes genius is seeing the obvious everyone else overlooks!
> (I'm an mc guy so like mcdiff, or try the kde kdiff3 program,
I didn't know about these two, thanks! More tools in the toolbox is good!
> There are a few writers on this list...! :)
Duncan sure wrote a good one! And I'm not often known for brevity!
> Anyway, if ever the OP's sound was indeed configured to go through a
> digital profile like HDMI there's a potential explanation for not having
> sound after an upgrade that I experienced myself. Probably unlikely
> because I can't imagine that F38 using ALSA 1.1x and F39 ALSA 1.2x but
> somewhere between those versions the "resource directory" was
> reorganised requiring a change to the system-wide and/or your personal
> configuration file (if you have the latter). See
>
https://unix.stackexchange.com/questions/763254/pulseaudio-digital-profiles-p$
>
> I *suppose* it's not impossible that a personal ALSA configuration might
> break during a more minor ALSA upgrade, so if you do have one it might
> be a good idea to double-check it, or see if sound returns when you move
> that config file aside.
I find that very curious... In my efforts to get sound working I DID try
ALSA, along with the default of PulseAudio. It didn't help.
...OK! NOW to some good news:
I just figured it out. And, to be honest, I feel kinda stupid for
overlooking something I should have spotted right off. But to understand:
As I said, I've used x "since time immemorial," "it just works," and very,
_very_ rarely has there been a need to do anything to get it working. And
because of that I was blissfully unaware that Fedora had ditched X in favor
of Wayland until it "bit me on the ass."
When I finally gave up on Wayland and wanted to go back to x, I just tried
to start it, as usual. Since "it just works," try it! And though I never
was able to get any DM up on x, starting it by hand "just works," too,
just not the sound?!
So, X is up, works, what does that have to do with audio anyway?! I,
stupidly, didn't second guess it, and once I did suspect how it was
started, I looked in all the wrong places.
Not seeing your posts, just digging in and finding a moment to devote to
it, I figured MAYBE x has changed? I've ignored the details for so long,
I'd better start from the beginning as if seeing it for the first time.
You know the old saying, "RTFM!"
Starting "from the beginning" I quickly discovered that _somehow,_ and it
really is a mystery, the very same user login directory I've used since
1997 (no, I'm not kidding) was missing my ~/.xinitrc (!!) WTF?!
So, I just created a new one "by hand," put one line in it:
startplasma-x11 start
and restarted. ...It worked on the first try and sound came back!
THIS MADE ME HAPPY AND ANGRY! What had happened?! WHERE DID IT GO?!
I went digging and found it in my backups. I used to have one! The most
recent one started Gnome. I SURELY did NOT delete it on purpose?! What
might have done that? How'd it disappear?! I did NOT bother to cull
through all the backups to see WHEN it went away.
However, I DID install every display manager for which I could find an RPM
in a desperate attempt to get the damned thing booted into a GUI "the
right way." Perhaps one of them deleted it? I would be surprised that one
would do that but maybe? I eventually gave up, obviously. In retrospect, I
think they were all trying to start on Wayland that just didn't/doesn't
work, though I did try and get 'em started on x.
I'd take a wild guess that I wasted more than an entire man-month messing
with this damned thing... Now, to be clear, a HUGE chunk of that was
battling Wayland. -heavy-sigh-
My apologies for wasting your time guys, and thank you ever so much for
your efforts on this!
FOR ME, there's a lesson here that's maybe useful for others, namely,
"never assume!"
Happy Holidays!
Richard
--
Richard Troy, Chief Scientist
Science Tools Corporation
510-717-6942
rtroy at ScienceTools.com, http://ScienceTools.com/
More information about the kde
mailing list