Tdesktop: Can't change recording device under Linux/PulseAudio

Created on 6 Jul 2016  路  20Comments  路  Source: telegramdesktop/tdesktop

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

bug

Most helpful comment

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

All 20 comments

Does changing the output device of Telegram work for you?

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

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

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.

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

Probably duplicate of #776

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

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

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.

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

Can't this be fixed?

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.

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.

Bug persists on Ubuntu 18.04 with Telegram 1.5.8

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

Same issue with pulseaudio 13 and telegram 1.8.8 on Archlinux.

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 ).

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

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

https://github.com/telegramdesktop/tdesktop/issues/5380
My issue 5380 was recognized as a duplicate of this and still does not work for me.
Should I have a new issue?

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

auchri picture auchri  路  149Comments

leolabs picture leolabs  路  108Comments

facundobatista picture facundobatista  路  135Comments

kmare picture kmare  路  109Comments

YousefSaber picture YousefSaber  路  108Comments