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

Stellarium waiting several seconds on 'Audio' at startup #3725

Open
freebrowser1 opened this issue Apr 27, 2024 · 15 comments · May be fixed by #3775
Open

Stellarium waiting several seconds on 'Audio' at startup #3725

freebrowser1 opened this issue Apr 27, 2024 · 15 comments · May be fixed by #3775
Assignees
Labels
infrastructure Infrastructure related issues state: waiting feedback Waiting for user feedback
Milestone

Comments

@freebrowser1
Copy link

When starting Stellarium it shows a splash screen showing what is loading and then it starts Stellarium normally.
The issue is that in the splash screen I see 'Initializing audio...' which takes several seconds. But In don't have audio (and why does a planetarium app need sound ?) so this is completely useless.

Expected Behaviour

No audio loading.

Actual Behaviour

Loading Audio at startup takes several seconds.

Steps to reproduce

Start Stellarium on Ubuntu without sound drivers.
Screenshot 2024-04-27 at 11 01 19

System

  • Stellarium version: 24.1 installed with apt package manager in Ubuntu.
  • Operating system: Ubuntu 22.04.4
  • Graphics Card: ? (it is not a graphics issue)
  • Screen type (if applicable): 1366x768 (it happens at any resolution)

Logfile

stellarium 2>&1 | tee err2 results in attached file.
err2.log

@alex-w
Copy link
Member

alex-w commented Apr 27, 2024

Is it from our PPA?

@alex-w alex-w added this to Needs triage in OS: Linux/UNIX via automation Apr 27, 2024
@freebrowser1
Copy link
Author

Is it from our PPA?

Yes, after installing Ubuntu and Stellarium with apt install stellarium I got Stellarium 20.1 and then I did
sudo add-apt-repository ppa:stellarium/stellarium-releases and reinstalled with apt install stellarium and then I got the latest 24.1 version.

@10110111
Copy link
Contributor

and why does a planetarium app need sound ?

I also thought this first of all. From the code it looks like it's only used in the scripting engine, to make it possible for scripts to emit sounds.

@alex-w alex-w self-assigned this Apr 27, 2024
@gzotti
Copy link
Member

gzotti commented Apr 27, 2024

Yes, audio is required by the scripting engine, so this is required. Just like you have an audio system in a physical planetarium.
Is the actual audio initialisation taking so long, or is the next relevant message just late?
If we want to be greedy with CPU cycles, add yet another config option to disable multimedia modules, and message handling in the scripting engine for the case that the Multimedia part has not been initalized.

@alex-w alex-w moved this from Needs triage to In progress in OS: Linux/UNIX May 11, 2024
@alex-w alex-w added this to the 24.2 milestone May 11, 2024
@alex-w alex-w added the infrastructure Infrastructure related issues label May 11, 2024
@alex-w
Copy link
Member

alex-w commented May 13, 2024

Please check the fresh beta version of Stellarium:
https://code.launchpad.net/~stellarium/+archive/ubuntu/stellarium-beta

@alex-w alex-w added state: in progress The problem is in process of solution... state: waiting feedback Waiting for user feedback labels May 13, 2024
Copy link

Hello @freebrowser1!

We really need your feedback.

@gzotti
Copy link
Member

gzotti commented Jun 20, 2024

@alex-w I strongly believe that disabling media support in the install files on all platforms will make more users unhappy than delaying startup by a few seconds on some systems. A viable solution would be an option (config.ini or command line) to switch off media support, which would prevent loading/initializing of the demanding (?) infrastructure. This may solve or prevent OP's case found in the logfile:

(stellarium:4919): GStreamer-CRITICAL **: 10:53:33.002: gst_element_message_full_with_details: assertion 'GST_IS_ELEMENT (element)' failed

Or maybe @freebrowser1 's Gstreamer is just broken, which takes a few seconds to recover after (or before?) this message.

@alex-w
Copy link
Member

alex-w commented Jun 20, 2024

@gzotti media support is disabled by default now. In any way our official packages for windows and macos provide media support. The media support in linux packages is not important and this task in hands of maintainers.

@10110111
Copy link
Contributor

The media support in linux packages is not important

Why? Do Linux users not use scripting?..

@gzotti
Copy link
Member

gzotti commented Jun 20, 2024

I just wonder, can you still even buy a system without sound support? No AC97, no Intel sound chip on board? I remember my last add-on sound card was in the 1990s. Or is this OP's system deliberately configured without sound support? (Kernel module deliberately disabled?) In the latter case, Stellarium worked as could have been expected: trying to initialize sound subsystem, and giving up after some time, emitting an error message, and starting. If single users want no sound and know how to disable the Kernel module, they also know or can easily find out how to build the program without multimedia support on their systems without the rest of Linux users suffering. And if we are complaisant, we add another runtime option. But don't disable a feature that works well on the vast majority of systems.

@alex-w
Copy link
Member

alex-w commented Jun 20, 2024

Why? Do Linux users not use scripting?..

Media support is important for real planetariums, and who heard about linux there? Windows - definitely yes, sometimes macOS, but not linux.

@alex-w alex-w removed their assignment Jun 20, 2024
@alex-w alex-w removed this from the 24.2 milestone Jun 20, 2024
@alex-w alex-w removed the state: in progress The problem is in process of solution... label Jun 20, 2024
@alex-w alex-w closed this as completed Jun 20, 2024
OS: Linux/UNIX automation moved this from In progress to Done Jun 20, 2024
@10110111
Copy link
Contributor

10110111 commented Jun 20, 2024

I just wonder, can you still even buy a system without sound support?

Not sure about buy, but I've just recently been on a VirtualBox-powered Windows without any emulated sound card (I guess I could have enabled it before trying, but the MS-supplied image has it disabled by default). When running under Dr. Memory the initialization of sound was way too long, so I had to comment out this in the sources to see some progress.

In the latter case, Stellarium worked as could have been expected: trying to initialize sound subsystem, and giving up after some time

This "after some time" is the keyword: there shouldn't be any time to wait if there's no sound device in the system.

@gzotti
Copy link
Member

gzotti commented Jun 20, 2024

Ah, VMs. Did not think of those. But what is "too long"? 10 seconds, or several minutes?
Thanks for default-activating again. If anybody wants to really fix the issue in a "fully compliant" way, that command line (or config.ini) option is still the way to go I think.
BTW, I know one mobile planetarium (inflatable dome, visiting schools) which IIRC runs Stellarium on Linux. Why not?

@10110111
Copy link
Contributor

But what is "too long"? 10 seconds, or several minutes?

Well, under Dr. Memory it took many hours until I decided to take action. But well, this is quite an unusual scenario, I suppose Dr. Memory works as Valgrind, software-emulating each instruction, which, in addition to being under virtualization, does take its toll on performance.

@gzotti gzotti linked a pull request Jun 21, 2024 that will close this issue
13 tasks
@gzotti
Copy link
Member

gzotti commented Jun 21, 2024

I think I have solved this in #3775. At least this disables sound on Windows. @freebrowser1 can you test this (build and run with --no-audio)?

@gzotti gzotti reopened this Jun 21, 2024
OS: Linux/UNIX automation moved this from Done to In progress Jun 21, 2024
@gzotti gzotti self-assigned this Jun 21, 2024
@gzotti gzotti added this to the 24.3 milestone Jun 21, 2024
@gzotti gzotti linked a pull request Jun 21, 2024 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Infrastructure related issues state: waiting feedback Waiting for user feedback
Projects
OS: Linux/UNIX
  
In progress
Development

Successfully merging a pull request may close this issue.

4 participants