Page 1 of 1

No Audio As root

PostPosted: Jul 10th, '19, 02:15
by theYogster
This is my first time using mageia. I installed ver 7 and began to explore the system. Everything seemed be working well as a regular user. When I switched to root user the audio disappeared. The particulars for my audio card are as follows:

Identification
  • Vendor: ‎Intel Corporation
  • Description: ‎CM238 HD Audio Controller
  • Media class: ‎Audio device
  • Module: ‎snd_hda_intel

Is it normal for root to not have audio, or am I missing something in the setup?

Re: No Audio As root

PostPosted: Jul 10th, '19, 09:22
by ITA84
Haven't tried it myself, but since I think PulseAudio is run in user mode, maybe for root it's either blocked or not configured to start because it's not normally used. You could try systemctl --user as root to see if the service is listed or in failed state (and compare it with what you get with a regular user)

Re: No Audio As root

PostPosted: Jul 10th, '19, 16:23
by theYogster
ITA84 Thanks for the tip. Both root and the regular user show a similar, if not identical, list. The CM238 HD Audio Controller is in both so that I presume the problem is with Pulse Audio. I am definitely a n00bie when it comes to mageia; my previous experience is with Ubuntu. The question I have now is how to enable audio as root, or am I asking too much from mageia 7?

Re: No Audio As root

PostPosted: Jul 10th, '19, 18:10
by doktor5000
Can you be more specific what you are actually referring to when you write "When I switched to root user".

Re: No Audio As root

PostPosted: Jul 10th, '19, 18:23
by theYogster
I created two user accounts.
One account with user name = root
One account with user name = username

I am assuming the "root" account is superuser given that I get warnings about doing things as "root"
The "username" account does not generate these warnings so I assume it is not superuser.

I choose "Switch User" from the session menu to change login accounts. The expected request for login credentials appears and the desktop environment changes, thus assuring me these are two different accounts.

Not sure what else I can tell you.

Re: No Audio As root

PostPosted: Jul 11th, '19, 09:13
by ITA84
Thanks for the clarification. It could be that the problem isn't the root account but the fact that you're using two logins at the same time (I've read PulseAudio in user mode may not work properly that way); a quick test you could do is to try logging out of your regular user (Close Session or whatever it's called) instead of using Switch User, then logging in as root and see if sound works.

That said, there's a reason there are warnings for logging in to the root desktop: many applications may not work correctly, and it's also a security risk. Most operations you need root permissions for can be done from your regular user desktop (you should get a prompt for entering a password which should let you perform that task only as root, it's safer that way), and for the rest it's usually better to use su (or sudo if you have it installed and configured) from a terminal window.

Re: No Audio As root

PostPosted: Jul 12th, '19, 18:59
by theYogster
ITA84 Thank you again for your interest and assistance.

Logged out of all (2) accounts, then shut down. Power up from a cold start and logged into the root account to discover there STILL is no audio output or input devices found when trying to play a track from YouTube. Even going into the audio settings to test the speakers produces silence. I find this to be highly unusual, but perhaps that is due to the fact that I am new to the ways of Mageia. I've experimented with several other Linux OS distros and never ran into this particular situation which is why I'm surprised to see it here. There does not seem to be any documentation of the fact that root user will not hear audio by default. I looked and could not find any such documents, which brought me to this forum. Apparently I am the only one who finds this lack of audio to be an oddity.

I am also very comfortable navigating about as superuser/root. The risks and dangers are embedded in my mind given that I've experimented with several other OS's and also have some sys admin time on my resume, albeit I've retired many years ago. I'll agree that it's probably a great idea to not be root most of the time, but I do miss being able to do things a regular user would do while I'm root.

Re: No Audio As root

PostPosted: Jul 12th, '19, 19:50
by ITA84
I've tried logging in as root on my Plasma desktop, but had a bit of a different situation: sound doesn't work, but the applications using sound just exit giving an error. I saw that the user mode service pulseaudio was not running, and starting it with systemctl --user start pulseaudio didn't work because there's ConditionUser != root. From what I understand this isn't your situation at all, so I doubt it'll help. Maybe you should try opening a bug report