LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-23-2020, 02:40 AM   #1
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
[Maybe Solved] pin retask for sound ALC298 for Galaxy Book 10.6 (W620) headphones jack


Hi

The commands below that have "hda" in them come from alsa-utils for debian based distros.....YMMV

THIS IS A POSSIBLE FIX FOR A SPECIFIC make and model and only the headphone wrong pin. Do not follow this guide for your device unless you have an EXACT MATCH.
YOU HAVE BEEN WARNED.


after running
Code:
sudo su
(input local user password ( a member of sudoers)
hdajacksensetest
without headphone lead....and wants analog headphone sound

then repeating root powered hdajacksensetest with headphones inserted we have the following results

no headphone
Pin 0x18 (Pink Mic, Rear side): present = No

headphone inserted
Pin 0x18 (Pink Mic, Rear side): present = Yes

I do NOT have same hardware so modified my screenshot to suit.

Note the steps as per the image.

https://imgur.com/QX3SIVk

steps run as a local user
Code:
 hdajackretask
step 1 pulldown and change HDMI to ALC298

step 2 Tick the box for Advanced override. This has more options.

If you are altering an output to output, you may be able to avoid this box
but we are altering an input to output pin.

step 3 Next go to the wrong pin ID=0x18

You will notice it claims to be an input device.


step 4 pulldown the Device and choose Headphone

OPTIONAL change the color from pink to green. This optional step only affects results for root powered command hdajacksensetest

step 5 Click on Apply Now.

A popup will ask you to enter the root password (Not the sudo password)

##############

You must test sound now. Do not skip ahead!

If and only if you hear sound through the headphones....we go to the next step

We need this new setup to persist over reboot so

step 6 Click on Install boot override
A popup will ask you to enter the root password (Not the sudo password)

If you get an error and can not proceed past step 5 after entering the root password,
you may have a distro where pulseaudio (PA) is interfering so follow step as below


Note you can also use text editors but this attempts to automate the steps

open a terminal as a local user (not root)
copy and paste code box into the terminal

Code:
DIR=.config/pulse

# config to no autospawn (re-spawn)
A=client.conf
[ -f $DIR/$A ] || cp /etc/pulse/$A $DIR
sed 's|; autospawn = yes|autospawn = no|' -i $DIR/$A

# config to daemonize so when we stop PA its truly stopped
B=daemon.conf
[ -f $DIR/$B ] || cp /etc/pulse/$B $DIR
sed 's|; daemonize = no|daemonize = yes|' -i $DIR/$B

# now stop pulseaudio
pulseaudio --kill
If you use htop in the terminal and press F3 and start typing
pulseaudio....it should show up in red letters because its not found!

image shows pul is being typed and in red...therefore pulseaudio is not running
https://imgur.com/tYIYl3B

then go back to original steps to see if you can progress past step 5

#########################

Once your pins are working, for those who use firefox....you need pulseaudio running if you want to hear audio
in youtube and such....
restarting your PC should start PA because I have made no attempt to stop systemd service but I use a non-systemd distro can not test fully....try this first though.

As a local user in the terminal
Code:
pulseaudio
If you are having problems with PA....redo the command as
pulseaudio -vvv and do research on it please.

Only users with the above hardware....and having troubles killing PA can post to this thread please

Last edited by aus9; 03-02-2020 at 03:20 AM. Reason: and kill PA steps
 
Old 02-23-2020, 02:51 AM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Original Poster
Rep: Reputation: Disabled
anyone who has an exact match....can reply with their full pin results if also need help changing other pins.

I would appreciate it but can not demand it, for anyone with exact match....reply to advise if they were able to understand this post
and now have sound thru their headphones.

if I failed to understand something....we can always get a good looking moderator to delete this thread etc
 
Old 02-24-2020, 09:04 AM   #3
ilker4fun
LQ Newbie
 
Registered: Feb 2020
Posts: 23

Rep: Reputation: Disabled
First of all, thank you for this thread. I did all of the task as you said but when I tried to apply them, it gives me:
tee:/sys/class/sound/hwC0D0/reconfig: Device or resource busy

I googled it and found a possible solution. It seems that pulseaudio uses the sound on that time as can be seen following output:
sudo fuser -v /dev/snd/*
[sudo] password for ilker:
USER PID ACCESS COMMAND
/dev/snd/controlC0: gdm 1144 F.... pulseaudio
ilker 1623 F.... pulseaudio

I needed to kill pulseaudio. So, I tried:
sudo su
echo autospawn = no >> /etc/pulse/client.conf
killall pulseaudio and pulseaudio -k
restarted the machine

But none of them kills pulseaudio and I still got device busy error. Since I couldn't test apply now case, I selected Boot Override button and restarted. Unfortunately, I still can't hear any sound from headphone.

Thanks in advance for any help. If someone need any more information that I could give, I can happily share it.

The ss of above error:
https://imgur.com/a/TCyGfpZ

EDIT:
I was finally able to stop pulseaudio with:
systemctl --user mask pulseaudio.socket #unmask to revert
systemctl --user stop pulseaudio.service

I stopped pulseaudio,then hit apply now button, and then started pulseaudio but again I didn't work

Last edited by ilker4fun; 02-24-2020 at 04:22 PM. Reason: can stop pulseaudio
 
Old 02-28-2020, 08:44 PM   #4
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Original Poster
Rep: Reputation: Disabled
I can not trouble shoot your issue as is.

please delete any changes you made to the system files under /etc/pulse.

BTW I always believe you must use home configs for PA.

but I would like you to to copy and paste from a terminal the exact commands you used to get to that error please.
I will then attempt to duplicate it.

BTW I have PA installed and have not disabled it....altho I can and have done so many times in the past.
As I am not a mind reader.....when you do show your commands.....you may also need to comment and what step number you are at.
Its not clear to me....which step "apply" you got the error.

cheers
 
Old 02-29-2020, 01:20 PM   #5
ilker4fun
LQ Newbie
 
Registered: Feb 2020
Posts: 23

Rep: Reputation: Disabled
I didn't change anything under /etc/pulse. What I meant with apply is that: In your step by step ss, the 5. step is "Apply Now". When I click it and enter my user password, it gave me above error.

But it is not the problem now because by stopping pulse service and pulse socket, I did make "Apply Now" button work as it should be. But as I said, sound is still not working. I hope I make it clear to you about "apply".

Thanks again but I started to believe the sound on my tablet will never going to work on unix systems
 
Old 02-29-2020, 10:33 PM   #6
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Original Poster
Rep: Reputation: Disabled
Hi

At step 5 I said root password not your user please
 
Old 03-01-2020, 08:23 AM   #7
ilker4fun
LQ Newbie
 
Registered: Feb 2020
Posts: 23

Rep: Reputation: Disabled
I am the root user, so it is not a permission problem. Thanks again
 
Old 03-01-2020, 08:16 PM   #8
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Original Poster
Rep: Reputation: Disabled
Quote:
When I click it and enter my user password, it gave me above error.
Then your quote is wrong....and

Quote:
I am the root user, so it is not a permission problem
this is still misleading. What I am trying to do is make a howto knowing your pins are wrong.

Please confirm that at step 5 you did not enter your user password....but the root password
 
Old 03-01-2020, 09:06 PM   #9
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Original Poster
Rep: Reputation: Disabled
I noticed that your methods to try and stop PA are not the best.

restarting the machine without disabling PA as a service for those using systemd...is never going to work
echo autospawn = no >> /etc/pulse/client.conf....assumes you had no setting already in there and is missing bits too.

therefore please re-read my OP....there are new steps for you to follow.
try them out and report please.
 
Old 03-04-2020, 11:11 AM   #10
ilker4fun
LQ Newbie
 
Registered: Feb 2020
Posts: 23

Rep: Reputation: Disabled
Unfortunately your new method didn't also kill pulseaudio as can be seen in the ss.
https://imgur.com/a/GhmA2Ok

Btw, I just reinstalled entire system to start from scratch. I installed 19.10 and I just followed your steps. It again didn't work FYI

Last edited by ilker4fun; 03-04-2020 at 11:13 AM. Reason: edit
 
Old 03-05-2020, 06:39 AM   #11
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Original Poster
Rep: Reputation: Disabled
Hi

Your screenshot shows that not only is PA is running but my method has failed to daemonize PA.
Quote:
from screenshot...pulseaudio --daemonize=no
You better show me your config file please?
I don't want to see your system wide config I want the full contents of

.config/pulse/daemon.conf

post them in a quote box or code box...whatever suits you.
 
Old 03-08-2020, 03:12 PM   #12
ilker4fun
LQ Newbie
 
Registered: Feb 2020
Posts: 23

Rep: Reputation: Disabled
Code:
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for
## more information. Default values are commented out.  Use either ; or # for
## commenting.

daemonize = yes
; fail = yes
; allow-module-loading = yes
; allow-exit = yes
; use-pid-file = yes
; system-instance = no
; local-server-type = user
; enable-shm = yes
; enable-memfd = yes
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
; lock-memory = no
; cpu-limit = no

; high-priority = yes
; nice-level = -11

; realtime-scheduling = yes
; realtime-priority = 5

; exit-idle-time = 20
; scache-idle-time = 20

; dl-search-path = (depends on architecture)

; load-default-script-file = yes
; default-script-file = /etc/pulse/default.pa

; log-target = auto
; log-level = notice
; log-meta = no
; log-time = no
; log-backtrace = 0

; resample-method = speex-float-1
; avoid-resampling = false
; enable-remixing = yes
; remixing-use-all-sink-channels = yes
; enable-lfe-remixing = no
; lfe-crossover-freq = 0

flat-volumes = no

; rlimit-fsize = -1
; rlimit-data = -1
; rlimit-stack = -1
; rlimit-core = -1
; rlimit-as = -1
; rlimit-rss = -1
; rlimit-nproc = -1
; rlimit-nofile = 256
; rlimit-memlock = -1
; rlimit-locks = -1
; rlimit-sigpending = -1
; rlimit-msgqueue = -1
; rlimit-nice = 31
; rlimit-rtprio = 9
; rlimit-rttime = 200000

; default-sample-format = s16le
; default-sample-rate = 44100
; alternate-sample-rate = 48000
; default-sample-channels = 2
; default-channel-map = front-left,front-right

; default-fragments = 4
; default-fragment-size-msec = 25

; enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 1
; deferred-volume-extra-delay-usec = 0
 
Old 03-09-2020, 12:09 AM   #13
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Original Poster
Rep: Reputation: Disabled
Your home config looks good for tbat file. Did you kill PA?
 
Old 03-09-2020, 04:25 AM   #14
ilker4fun
LQ Newbie
 
Registered: Feb 2020
Posts: 23

Rep: Reputation: Disabled
I haven't done anything. I just started the linux and copy that file content. I didn't run any command to kill the pulseaudio or something related to it.
 
Old 03-09-2020, 07:37 AM   #15
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Original Poster
Rep: Reputation: Disabled
hmmm well something has not happened. OK show me the result of

Code:
cat .config/pulse/daemon.conf | grep daemonize
your home config was supposed to have changed before I attempted to kill PA
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any support for the audio card/codec Realtek ALC298? BigBird123 Linux - Laptop and Netbook 13 12-09-2019 05:57 AM
Difference between "1R8 Single Rank 240 Pin" and "2R8 dual Rank 240 Pin" PatD Linux - Hardware 3 12-16-2017 01:33 PM
[SOLVED] Sound does not switch to headphones after plugging jack on Alienware 15 Johnny_Metal Linux - Hardware 23 09-10-2016 03:04 PM
CPU 12-V power supply: 4-pin or 8-pin? michapma Linux - Hardware 3 07-23-2007 11:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration