Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't change recording device under Linux/PulseAudio #2231

Closed
meltylang opened this issue Jul 6, 2016 · 21 comments · Fixed by #7313
Closed

Can't change recording device under Linux/PulseAudio #2231

meltylang opened this issue Jul 6, 2016 · 21 comments · Fixed by #7313
Labels

Comments

@meltylang
Copy link

meltylang commented Jul 6, 2016

Steps to reproduce

  1. Install external sound card or webcam
  2. Make this external card default (fallback) recording device using pavucontrol
  3. Make old card output-only (e.g. analog stereo output instead of analog stereo duplex)
  4. Launch Telegram
  5. Try to record audio message

Expected behaviour

Message recorded from webcam mic.

Actual behaviour

Telegram will use old device or show error message "Could not send an empty file :(" . Skype on this machine works just fine.

Configuration

Operating system:
Debian 8.5+backports, Linux 4.6.1-1~bpo8+1 x86_64, pulseaudio 7.1, KDE 4.14

Version of Telegram Desktop:
0.9.51

Logs

Console messages:

Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number
AL lib: (EE) LoadHrtf: Could not open default-48000.mhr
AL lib: (EE) GetHrtf: Incompatible format: Stereo 48000hz
QXcbWindow: Unhandled client message: "QTCURVE_ACTIVE_WINDOW"
[libopus @ 0x7fd1fc017b10] Warning: not compiled with thread support, using thread emulation
[opus @ 0x7fd1fc017140] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.

log_20_45.txt

@z3ntu
Copy link

z3ntu commented Jul 12, 2016

Does changing the output device of Telegram work for you?

@meltylang
Copy link
Author

No, I can't change output device for Telegram.

@z3ntu
Copy link

z3ntu commented Jul 12, 2016

Okay then I also experienced this issue (Arch Linux).

@meltylang
Copy link
Author

Kind of solution:
Updated to Debian Testing + Pulseaudio 9.0, and then old caches break PA.
Cleaned old caches by next command:
$ rm -r ~/.pulse ~/.pulse-cookie ~/.config/pulse
Now when you set fallback device and restart telegram it will respect new settings.

@meltylang meltylang reopened this Aug 16, 2016
@meltylang
Copy link
Author

After reboot TG again forget about selected device and do not want to user fallback device.

@z3ntu
Copy link

z3ntu commented Sep 2, 2016

Probably duplicate of #776

@meltylang
Copy link
Author

Version 1.0.5 seems to respect pulseaudio settings.
PA version 10.0
Debian Testing (aka 9.0 Stretch)

@dariox2
Copy link

dariox2 commented Feb 19, 2018

Problem persists on 1.2.6 alpha. Cleaning caches solves until next reboot only.

@Bleuzen
Copy link

Bleuzen commented Mar 9, 2018

I also have this problem with Telegram 1.2.8 on Manjaro Linux.
I can't get it to record from my 'real' mic. It always starts recording from my 'Monitor of ...'.
If I go into pavuctl and change it to my mic, it directly resets itself to the 'Monitor of ...' input. So Telegram forces this. I can't change the input device for that recording stream. With other applications, this is possible, but not with Telegram.

Also an option in Telegram to choose a mic would be nice. Because I for example have my webcam and my 'real' mic and there is currently no way to switch between them.

@stefan-reich
Copy link

I also can't use my external mic for Telegram voice messages.

Can't this be fixed?

@meltylang
Copy link
Author

This issue can't be fixed until it's not affecting core developers, as it is for many other projects running on linux desktop.
My workaround is just switching to macOS and forgeting about desktop linux like it was a bad dream.

@0xpr03
Copy link

0xpr03 commented Dec 10, 2018

Same problem here on Ubuntu 18.04 in Pulse Audio trying to select audio output device.
Works for another person on KDE Neon.. (which also has an ubuntu base)
The only solution is to disable all but the wanted device completely.

@iKoze
Copy link

iKoze commented Jan 29, 2019

Bug persists on Ubuntu 18.04 with Telegram 1.5.8

@ghost
Copy link

ghost commented Mar 12, 2019

Same issue with pulseaudio 12.2 and telegram 1.5.15 on Manjaro.
Other programs use the fallback device but telegram ignores pavuctrl options

@logicinu
Copy link

Same issue with pulseaudio 13 and telegram 1.8.8 on Archlinux.

@0xpr03
Copy link

0xpr03 commented Sep 25, 2019

This seems to be an inherent issue depending on the audio engine you use. I know exactly one other system that has this problem: Minecraft, java edition. Every other system seems to use the pulse audio API, except these two, where you have to disable all other devices except for the one you want them to use. Then these applications will stick with them forever (accidentally unplugged your device ? restart the application ).

@arlyoneel
Copy link

arlyoneel commented Oct 19, 2019

This seems to be an inherent issue depending on the audio engine you use. I know exactly one other system that has this problem: Minecraft, java edition. Every other system seems to use the pulse audio API, except these two, where you have to disable all other devices except for the one you want them to use. Then these applications will stick with them forever (accidentally unplugged your device ? restart the application ).

I do not agree, I solve the problem that has an issue with some programs. In the case of MC/Steam and Telegram issue is simple you need to enable this configuration in your system:

Create a config file for openalsoft (~/.alsoftrc or /etc/openal/alsoft.conf). This will allow to seamsly change your sound output/input on the fly.

[pulse]
allow-moves=yes

After this you can switch on the fly ACTIVE streams, but may not really changes default option in some cases, e.g. calls is easy because the stream do not depend of your mouse, different is when you need to change device of a recording audio. In KDE/Plasma you can change it but only if its active, when I release the audio record button, stream stops and I cannot change the stream device input, and the funny thing is that stream is not using even the default device, is so weird.

May some of you do not notice but, there is a call specific options that are not in global settings, you need to go to call-> and then setting. This settings are useful to change device streams using test microphone option either with system device switch or the telegram option listed there, this may solve call issue, but there is no option for test recording audio, not even here or in general settings.

I leave this half solution that may will be useful. I'm still with the issue of recording audios with correct device.

I do not agree with you because Telegram IS NOT using default device, and telegram uses two different configurations for call and record, so I dont think this is an SO or audio engine issue, is the way that telegram handles devices, may they should have a similar test and options for recording audio like they have with call settings.

PS: I'm using Manjaro Linux & Plasma

@sTiKyt
Copy link

sTiKyt commented Mar 1, 2020

Now they have settings and ability to change recording device, and you know what? Test works great! But it still records with internal microphone...

@IlyaIndigo
Copy link

#5380
My issue 5380 was recognized as a duplicate of this and still does not work for me.
Should I have a new issue?

@0xpr03
Copy link

0xpr03 commented Sep 23, 2020

Create a config file for openalsoft (~/.alsoftrc or /etc/openal/alsoft.conf). This will allow to seamsly change your sound output/input on the fly.

[pulse]
allow-moves=yes

After this you can switch on the fly ACTIVE streams, but may not really changes default option in some cases, e.g. calls is easy because the stream do not depend of your mouse, different is when you need to change device of a recording audio. In KDE/Plasma you can change it but only if its active, when I release the audio record button, stream stops and I cannot change the stream device input, and the funny thing is that stream is not using even the default device, is so weird.

May some of you do not notice but, there is a call specific options that are not in global settings, you need to go to call-> and then setting. This settings are useful to change device streams using test microphone option either with system device switch or the telegram option listed there, this may solve call issue, but there is no option for test recording audio, not even here or in general settings.

I leave this half solution that may will be useful. I'm still with the issue of recording audios with correct device.

I do not agree with you because Telegram IS NOT using default device, and telegram uses two different configurations for call and record, so I dont think this is an SO or audio engine issue, is the way that telegram handles devices, may they should have a similar test and options for recording audio like they have with call settings.

PS: I'm using Manjaro Linux & Plasma

@arlyoneel Thanks! I didn't see this reply until now.. (And yes that full quote is on purpose, it's the solution.)
I think it just uses the first device on the list. Which is why the default is ignored.

@github-actions
Copy link

github-actions bot commented Mar 4, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.