Comments (23)
Dependencies in general are listed in the wiki: https://github.com/mviereck/x11docker/wiki/dependencies#dependencies-of-feature-options
For pulseaudio sound you need libpulse0
, for ALSA there are no dependencies.
from dockerfile-x11docker-deepin.
OK. See my following testing and results.
In install the possible dependencies both on host and client:
$ sudo apt-get install libpulse0 pulseaudio
-
For using pulseaudio,
--pulseaudio
,--pulseaudio=tcp
, or--pulseaudio=socket
will do the trick. -
For using alsa. I still can't figure out how to set the corresponding option. See the output of
aplay -l
:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC888-VD Analog [ALC888-VD Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: ALC888-VD Digital [ALC888-VD Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 10: HDMI 4 [HDMI 4]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 11: HDMI 5 [HDMI 5]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 12: HDMI 6 [HDMI 6]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: Device [USB Audio Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
For my case, the USB audio device is in using and I pass the following option to x11docker but still failed:
--alsa='card 2'
from dockerfile-x11docker-deepin.
Try --alsa=2
or --alsa=Device
. (Either the number before :
or the name behind :
).
This just sets environment variable ALSA_CARD
in container.
from dockerfile-x11docker-deepin.
Try
--alsa=2
or--alsa=Device
.
Neither can do the trick. With these options, the bottom toolbar will twist/disappear in the container of Deepin desktop.
from dockerfile-x11docker-deepin.
Neither can do the trick.
Check the output of aplay -l
in container.
With these options, the bottom toolbar will twist/disappear in the container of Deepin desktop.
deepin crashes? Than rather use --pulseaudio
.
from dockerfile-x11docker-deepin.
Neither can do the trick.
Check the output of
aplay -l
in container.
werner@X10DAi:~/Desktop$ aplay -l
**** List of PLAYBACK Hardware Devices ****
XDG_RUNTIME_DIR (/tmp/XDG_RUNTIME_DIR) is not owned by us (uid 1000), but by uid 0! (This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
card 0: PCH [HDA Intel PCH], device 0: ALC888-VD Analog [ALC888-VD Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: ALC888-VD Digital [ALC888-VD Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 10: HDMI 4 [HDMI 4]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 11: HDMI 5 [HDMI 5]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 12: HDMI 6 [HDMI 6]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: Device [USB Audio Device], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
With these options, the bottom toolbar will twist/disappear in the container of Deepin desktop.
deepin crashes?
The desktop can be started, but the bottom toolbar will disappear and the sound card doesn't take effect.
Than rather use
--pulseaudio
.
from dockerfile-x11docker-deepin.
The desktop can be started, but the bottom toolbar will disappear and the sound card doesn't take effect.
I'd assume, if the bottom toolbar disappears, you cannot start anything to check the card.
Try something different than deepin desktop to check the alsa option.
The output of aplay -l
is the same as on host, that looks good.
If you want to investigate the crash of the toolbar, run x11docker with -V
. There will be lots of output, but maybe you'll find a hint.
from dockerfile-x11docker-deepin.
I'd assume, if the bottom toolbar disappears, you cannot start anything to check the card.
The terminal works as usual which can be used to debug problems.
If you want to investigate the crash of the toolbar, run x11docker with -V. There will be lots of output, but maybe you'll find a hint.
Even I don't use -V, the log on stdout printed by x11docker will refresh/repeat for ever when using alsa as noted previously.
from dockerfile-x11docker-deepin.
The terminal works as usual which can be used to debug problems.
I've checked with terminal only, --alsa=2
just works.
the log on stdout printed by x11docker will refresh/repeat for ever when using alsa as noted previously.
Just checked here, I can reproduce the issue. Is fixed now.
Sound with --alsa
using deepin desktop still fails. It seems to be a pulseaudio issue that is started by deepin.
It seems pulseaudio somehow fails to use the alsa device files.
I have no idea how to fix this.
--alsa
with deepin desktop works if I add --runasroot "rm /usr/bin/pulseaudio"
to brutally avoid the start of pulseaudio at all.
It should be enough to remove /etc/xdg/autostart/pulseaudio.desktop
, but pulseaudio is started nonetheless.
I recommend to just use --pulseaudio
for deepin.
from dockerfile-x11docker-deepin.
Thanks a lot for you systematic analysis.
from dockerfile-x11docker-deepin.
I found a solution:
With --alsa
x11docker now sets up a pulseaudio config file that disables the autostart of pulseaudio. Now the alsa sound works in deepin desktop, too.
Though, a nicer solution would have been to fix the pulseaudio issue itself so that it uses the alsa device files /dev/snd
in container.
from dockerfile-x11docker-deepin.
Tried again but the problem still exists for my case. Though the bottom toolbar appears as usual, but the sound setting button doesn't appear on it. Furthermore, the aplay -l
command in container will take more than 10sec to complete:
$ time aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC888-VD Analog [ALC888-VD Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: ALC888-VD Digital [ALC888-VD Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 10: HDMI 4 [HDMI 4]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 11: HDMI 5 [HDMI 5]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 12: HDMI 6 [HDMI 6]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: Device [USB Audio Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
real 0m10.029s
user 0m0.009s
sys 0m0.009s
from dockerfile-x11docker-deepin.
Tried again but the problem still exists for my case.
Please check if the sound itself works. That is different from possible deepin issues. Check with speaker-test
in terminal.
the sound setting button doesn't appear on it.
The button would need pulseaudio. deepin seems not to be designed to use ALSA only.
Furthermore, the aplay -l command in container will take more than 10sec to complete:
Odd.
from dockerfile-x11docker-deepin.
Please check if the sound itself works. That is different from possible deepin issues. Check with speaker-test in terminal.
The testing succeeded on host but failed in container as shown below:
werner@X10DAi:~/Desktop$ speaker-test
speaker-test 1.1.8
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory
from dockerfile-x11docker-deepin.
Please check the following command on host and in container to make sure the same card is used:
env ALSA_CARD=2 speaker-test
At first check with deepin-terminal
only instead of running the entire desktop in container.
x11docker --alsa=2 x11docker/deepin deepin-terminal
from dockerfile-x11docker-deepin.
This way, the testings will succeed both on host and in container:
werner@adf40ae74f51:~$ env ALSA_CARD=2 speaker-test
speaker-test 1.1.8
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 16384
Period size range from 1024 to 1024
Using max buffer size 16384
Periods = 4
was set period_size = 1024
was set buffer_size = 16384
0 - Front Left
Time per period = 2.662493
0 - Front Left
Time per period = 2.966100
0 - Front Left
Time per period = 3.007849
0 - Front Left
Time per period = 2.986010
0 - Front Left
^CWrite error: -4,Interrupted system call
xrun_recovery failed: -4,Interrupted system call
Transfer failed: Interrupted system call
So, presumably, it's some option(s) used by me that cause the problem.
from dockerfile-x11docker-deepin.
This way, the testings will succeed both on host and in container:
Good! Than check:
x11docker --alsa=2 x11docker/deepin deepin-terminal
In container:
echo $ALSA_CARD
speaker-test
from dockerfile-x11docker-deepin.
Still succeed and the $ALSA_CARD has value of 2 in the container which is expected.
from dockerfile-x11docker-deepin.
Good! Is any issue left?
from dockerfile-x11docker-deepin.
In --desktop mode, the above testing still succeed. Though the menu entry/button for the sound card can't be listed, I still can't use it in app, say, wechat.
That said, the problem is solved/fixed basically. From the use experience point of view, it seems the --pulseaudio
based method is more convenient and efficient.
from dockerfile-x11docker-deepin.
In --desktop mode, the above testing still succeed.
Good. So from an x11docker point of view, the issue is fixed.
Though the menu entry/button for the sound card can't be listed
That is a deepin issue that expects pulseaudio. For sound control you would need some ALSA frontend.
I still can't use it in app, say, wechat.
Likely wine needs a configuration to use ALSA.
From the use experience point of view, it seems the --pulseaudio based method is more convenient and efficient.
Yes. deepin is entirely designed to use pulseaudio.
from dockerfile-x11docker-deepin.
I still can't use it in app, say, wechat.
Sorry for my typo. I should have typed as below:
I still can use it in app, say, wechat.
Likely wine needs a configuration to use ALSA.
from dockerfile-x11docker-deepin.
Good, than all is well.
from dockerfile-x11docker-deepin.
Related Issues (20)
- W: Cannot check Release signature; keyring file not available /usr/share/keyrings/deepin-archive-camel-keyring.gpg HOT 2
- Deepin apricot: inputting the digits included in password with num keyboard will freeze the qq login. HOT 4
- The cleanup script will destroy the cache used by synaptic. HOT 9
- Automate the deepin image building progress on Docker hub by writing a build hook script. HOT 2
- The appstore with codename apricot should be used when extending the base Deepin apricot image. HOT 3
- File transfer with wechat in Deepin paricot docker container started through x11docker using bridge network is inefficient and unstable. HOT 3
- About the echo command used for multiple lines case in the Dockerfile. HOT 5
- The strange behavior when using --share=$HOME. HOT 6
- Install and config the fcitx5/fcitx5-rime/rime as the Chinese characters input method engine in Dockerfile. HOT 5
- The softlink of x11docker folder apprear recursively. HOT 10
- Disscussion on the environment variables setting of fcitx5 once more. HOT 4
- Failed to run `sudo dmidecode -t 4' in container. HOT 1
- Some warning and info given by x11docker when running deepin-wine image. HOT 1
- The strange garbled Chinese character display problem for qq and fcitx-googlepinyin. HOT 1
- A minimalist Dockerfile used to build the `Deepin` base image.
- New Deepin repositories.
- Use centos7 to cause build failure? [udisks2 dpkg error] HOT 4
- debian bootstrap configuration delayed HOT 2
- debootstrap failed with dpkg error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dockerfile-x11docker-deepin.