Pulseaudio fails to run when system's language is in certain non-English locales

Bug #1445358 reported by sotiris papadimitriou
42
This bug affects 9 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Fix Released
High
David Henningsson

Bug Description

Changing the System Language in Greek resulted in the corruption of the sound in the entire system. This happened when the latest updates applied and after a reboot.

I have attempted a new installation in Greek getting the latest ISO image and the problem exists there as well.

If I go back (turn the system) to the English Language and reboot the problem disappears.

I have also tested another Language (Russian Localization) but the problem does not occur.

How to reproduce:
Apply the latest updates and install the Greek language packages (language-pack-el , language-pack-el-base).
Choose Greek as the system's language and reboot.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: pulseaudio 1:6.0-0ubuntu5
ProcVersionSignature: Ubuntu 3.19.0-14.14-generic 3.19.3
Uname: Linux 3.19.0-14-generic x86_64
ApportVersion: 2.17.1-0ubuntu2
Architecture: amd64
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/hwC1D0', '/dev/snd/pcmC1D0c', '/dev/snd/pcmC1D0p', '/dev/snd/controlC1', '/dev/snd/hwC0D0', '/dev/snd/pcmC0D8p', '/dev/snd/by-path', '/dev/snd/pcmC0D7p', '/dev/snd/pcmC0D3p', '/dev/snd/controlC0', '/dev/snd/timer', '/dev/snd/seq'] failed with exit code 1:
CurrentDesktop: Unity
Date: Fri Apr 17 09:48:39 2015
InstallationDate: Installed on 2015-04-15 (1 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Beta amd64 (20150415)
SourcePackage: pulseaudio
Symptom: audio
Symptom_Card: HDA-Intel - HDA Intel PCH
Symptom_Jack: Speaker, Internal
Title: [SVF1532X1EB, Realtek ALC233, Speaker, Internal] Pulseaudio fails to detect card
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/19/2014
dmi.bios.vendor: Insyde Corp.
dmi.bios.version: R1080DB
dmi.board.asset.tag: N/A
dmi.board.name: VAIO
dmi.board.vendor: Sony Corporation
dmi.board.version: N/A
dmi.chassis.asset.tag: N/A
dmi.chassis.type: 10
dmi.chassis.vendor: Sony Corporation
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnInsydeCorp.:bvrR1080DB:bd09/19/2014:svnSonyCorporation:pnSVF1532X1EB:pvrC10KBNMG:rvnSonyCorporation:rnVAIO:rvrN/A:cvnSonyCorporation:ct10:cvrN/A:
dmi.product.name: SVF1532X1EB
dmi.product.version: C10KBNMG
dmi.sys.vendor: Sony Corporation

Revision history for this message
sotiris papadimitriou (sotiris21papadimitriou) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :

Απρ 17 08:28:12 hostname pulseaudio[952]: [pulseaudio] module-alsa-card.c: Failed to parse ignore_dB argument.
Απρ 17 08:28:12 hostname pulseaudio[952]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_00_03.0" card_name="alsa_card.pci-0000_00_03.0" namereg_fail=false tsched=ναι fixed_latency_range=όχι ignore_dB=όχι deferred_volume=ναι use_ucm=ναι card_properties="module-udev-detect.discovered=1""): initialization failed.
Απρ 17 08:28:12 hostname pulseaudio[952]: [pulseaudio] module-alsa-card.c: Failed to parse ignore_dB argument.
Απρ 17 08:28:12 hostname pulseaudio[952]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="1" name="pci-0000_00_1b.0" card_name="alsa_card.pci-0000_00_1b.0" namereg_fail=false tsched=ναι fixed_latency_range=όχι ignore_dB=όχι deferred_volume=ναι use_ucm=ναι card_properties="module-udev-detect.discovered=1""): initialization failed.
Απρ 17 08:28:12 hostname pulseaudio[1021]: [pulseaudio] pid.c: Daemon already running.

strange that those parameters are localised

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
description: updated
Revision history for this message
Manos Sarris (emmsarris) wrote :

Actually it does not concern only realtek but my intel hd audio card too. Thanks for the workaround...

Revision history for this message
N1ck 7h0m4d4k15 (nicktux) wrote :

This .po file seems to work without problems.

Compile the file to pulseaudio.mo and move it to /usr/share/locale-langpack/el/LC_MESSAGES/

$ msgfmt -o pulseaudio.mo -v ~/Downloads/el.po
$ sudo mv /usr/share/locale-langpack/el/LC_MESSAGES/pulseaudio.mo ~/pulseaudio.mo.bad
$ sudo mv ~/pulseaudio.mo /usr/share/locale-langpack/el/LC_MESSAGES/
$ sudo reboot

summary: - [SVF1532X1EB, Realtek ALC233, Speaker, Internal] Pulseaudio fails to
- detect card
+ Pulseaudio fails to run when system's language is in Greek
Revision history for this message
N1ck 7h0m4d4k15 (nicktux) wrote : Re: Pulseaudio fails to run when system's language is in Greek

Right click and save as el.po

Then proceed with the instructions above (comment #6).

Revision history for this message
Nick Bagios (nickbagi) wrote :

It works for me with solution of NickTh (Kubuntu 15.04) thank you

Changed in pulseaudio (Ubuntu):
importance: Undecided → Medium
Revision history for this message
N1ck 7h0m4d4k15 (nicktux) wrote :

Further testing I've made showed different results.
I've downloaded the source code of pulseaudio in Vivid

$ apt-get source pulseaudio

then I compiled the pulseaudio-6.0/po/el.po , WITHOUT change anything and I replaced the pulseaudio.mo with the new compiled pulseaudio.mo.

Guess what, audio works.

So, maybe something is going on with the Machine Object file and has nothing to do with translation ?

Revision history for this message
Simos Xenitellis  (simosx) wrote :

The relevant message in /var/log/syslog is:

Apr 20 14:03:45 user-laptop pulseaudio[1661]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_00_1b.0" card_name="alsa_card.pci-0000_00_1b.0" namereg_fail=false tsched=ναι fixed_latency_range=όχι ignore_dB=όχι deferred_volume=ναι use_ucm=ναι card_properties="module-udev-detect.discovered=1""): initialization failed.

What is says here is that "insmod" (or similar) was called with parameters like "tsched=ναι", and failed.

"git blame" says:
d806b197 src/pulsecore/core-util.h (poljar (Damir Jelić) 2013-06-27 19:28:09 +0200 92) static inline const char *pa_yes_no(bool b) {
cd13fb36 src/pulsecore/core-util.h (Tanu Kaskinen 2014-03-24 09:17:53 +0200 93) return b ? _("yes") : _("no");

which means that about a year ago a change was made to make yes/no localisable.

A quick fix is to make pa_yes_no() non-localisable again.

Revision history for this message
Robie Basak (racb) wrote :

Sounds like sound is broken for everyone when in certain locales? That'll be Importance: High then.

Changed in pulseaudio (Ubuntu):
importance: Medium → High
tags: added: rls-v-incoming
summary: - Pulseaudio fails to run when system's language is in Greek
+ Pulseaudio fails to run when system's language is in certain non-English
+ locales
Changed in pulseaudio (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → David Henningsson (diwic)
Revision history for this message
David Henningsson (diwic) wrote :

I've tested and uploaded a fix now, it's waiting for an archive admin to approve. Thanks to all of you who helped reporting / triaging / analysing this issue, in this case it was just a matter of packaging up Simos patch, test and upload.

Revision history for this message
David Henningsson (diwic) wrote : [PATCH] core-util, pactl: Make one localised and one non-localised version of pa_yes_no
Download full text (5.1 KiB)

We currently use pa_yes_no to write module arguments, so they can not be
localised. Instead add a new pa_yes_no_localised function and use it in pactl
(and thus, revert all other places to use the non-localised version).

BugLink: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1445358
Signed-off-by: David Henningsson <email address hidden>
---
 src/pulsecore/core-util.h | 4 ++++
 src/utils/pactl.c | 20 ++++++++++----------
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/src/pulsecore/core-util.h b/src/pulsecore/core-util.h
index dcdc40e..d5a2d39 100644
--- a/src/pulsecore/core-util.h
+++ b/src/pulsecore/core-util.h
@@ -90,6 +90,10 @@ int pa_parse_boolean(const char *s) PA_GCC_PURE;
 int pa_parse_volume(const char *s, pa_volume_t *volume);

 static inline const char *pa_yes_no(bool b) {
+ return b ? "yes" : "no";
+}
+
+static inline const char *pa_yes_no_localised(bool b) {
     return b ? _("yes") : _("no");
 }

diff --git a/src/utils/pactl.c b/src/utils/pactl.c
index a13c7fb..d6791d4 100644
--- a/src/utils/pactl.c
+++ b/src/utils/pactl.c
@@ -196,7 +196,7 @@ static void get_server_info_callback(pa_context *c, const pa_server_info *i, voi
              pa_context_get_server(c),
              pa_context_get_protocol_version(c),
              pa_context_get_server_protocol_version(c),
- pa_yes_no(pa_context_is_local(c)),
+ pa_yes_no_localised(pa_context_is_local(c)),
              pa_context_get_index(c),
              pa_context_get_tile_size(c, NULL));

@@ -302,7 +302,7 @@ static void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_
            pa_sample_spec_snprint(s, sizeof(s), &i->sample_spec),
            pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map),
            i->owner_module,
- pa_yes_no(i->mute),
+ pa_yes_no_localised(i->mute),
            pa_cvolume_snprint_verbose(cv, sizeof(cv), &i->volume, &i->channel_map, i->flags & PA_SINK_DECIBEL_VOLUME),
            pa_cvolume_get_balance(&i->volume, &i->channel_map),
            pa_volume_snprint_verbose(v, sizeof(v), i->base_volume, i->flags & PA_SINK_DECIBEL_VOLUME),
@@ -409,7 +409,7 @@ static void get_source_info_callback(pa_context *c, const pa_source_info *i, int
            pa_sample_spec_snprint(s, sizeof(s), &i->sample_spec),
            pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map),
            i->owner_module,
- pa_yes_no(i->mute),
+ pa_yes_no_localised(i->mute),
            pa_cvolume_snprint_verbose(cv, sizeof(cv), &i->volume, &i->channel_map, i->flags & PA_SOURCE_DECIBEL_VOLUME),
            pa_cvolume_get_balance(&i->volume, &i->channel_map),
            pa_volume_snprint_verbose(v, sizeof(v), i->base_volume, i->flags & PA_SOURCE_DECIBEL_VOLUME),
@@ -578,8 +578,8 @@ static void get_card_info_callback(pa_context *c, const pa_card_info *i, int is_

         printf(_("\tProfiles:\n"));
         for (p = i->profiles2; *p; p++)
- printf("\t\t%s: %s (sinks: %u, sources: %u, priority: %u, available: %s)\n", (*p)->name,
- (*p)->description, (*p)->n_sinks, (*p)->n_sources, (*p)->priority, pa_yes_no((*p)-...

Read more...

Revision history for this message
Tanu Kaskinen (tanuk) wrote : Re: [pulseaudio-discuss] [PATCH] core-util, pactl: Make one localised and one non-localised version of pa_yes_no

On Mon, 2015-04-20 at 17:41 +0200, David Henningsson wrote:
> We currently use pa_yes_no to write module arguments, so they can not be
> localised. Instead add a new pa_yes_no_localised function and use it in pactl
> (and thus, revert all other places to use the non-localised version).
>
> BugLink: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1445358
> Signed-off-by: David Henningsson <email address hidden>
> ---
> src/pulsecore/core-util.h | 4 ++++
> src/utils/pactl.c | 20 ++++++++++----------
> 2 files changed, 14 insertions(+), 10 deletions(-)

Looks good to me.

--
Tanu

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Make pa_yes_no() non-localisable." seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:6.0-0ubuntu6

---------------
pulseaudio (1:6.0-0ubuntu6) vivid; urgency=medium

  * debian/patches/0099-pa-yes-no.patch:
    - Fix pulseaudio failure to load in some non-English
    locales (LP: #1445358)
 -- David Henningsson <email address hidden> Mon, 20 Apr 2015 16:19:10 +0200

Changed in pulseaudio (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.