You are not logged in.
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=Generic_1
HD-Audio Generic, ALCS1200A Analog
Default Audio Device
sysdefault:CARD=Generic_1
HD-Audio Generic, ALCS1200A Analog
Default Audio Device
front:CARD=Generic_1,DEV=0
HD-Audio Generic, ALCS1200A Analog
Front output / input
surround21:CARD=Generic_1,DEV=0
HD-Audio Generic, ALCS1200A Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic_1,DEV=0
HD-Audio Generic, ALCS1200A Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic_1,DEV=0
HD-Audio Generic, ALCS1200A Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic_1,DEV=0
HD-Audio Generic, ALCS1200A Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic_1,DEV=0
HD-Audio Generic, ALCS1200A Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic_1,DEV=0
HD-Audio Generic, ALCS1200A Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Generic_1,DEV=0
HD-Audio Generic, ALCS1200A Digital
IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=Generic,DEV=0
HD-Audio Generic, HDMI 0
HDMI Audio Output
hdmi:CARD=Generic,DEV=1
HD-Audio Generic, HP E243d
HDMI Audio Output
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: Generic_1 [HD-Audio Generic], Gerät 0: ALCS1200A Analog [ALCS1200A Analog]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 0: Generic_1 [HD-Audio Generic], Gerät 1: ALCS1200A Digital [ALCS1200A Digital]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 1: Generic [HD-Audio Generic], Gerät 3: HDMI 0 [HDMI 0]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 1: Generic [HD-Audio Generic], Gerät 7: HDMI 1 [HP E243d]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
If I play with
$mpv cdda://
on TTY3 and switch to TTY1 (kodi), same behavior.
Is it normal that there is no jump to next track if TTY is inactive?
Offline
I dug out an optical drive, created a dummy user w/ essentially no rights whatsoever, logged into another TTY and had the dummy user mpv play a CD (first one I could get hold on - not a good idea) and moved back to the main TTY as regular user and checked that the ACLs for sr0 had changed to that user as expected.
Then I endured the first track of the disc I picked, noticed too late that I could just have muted the sound… and it moved on to the next track w/o problems, so no: that's not normal.
(It also had been going on to cache the first 5 tracks, it's also not /that/ surprising since the device gets opened only once at the start)
Sorry if you'd mentioned that before but how is the optical drive attached? SATA or USB?
Offline
Sorry if you'd mentioned that before but how is the optical drive attached? SATA or USB?
USB
Big thanks for your advice :-)
Offline
https://wiki.archlinux.org/title/Power_ … utosuspend
usbcore.autosuspend=-1 will disable it, but nb. that tools like TLP will override that at runtime and you'll have to configure it there (ad well)
---
"sacrifice", the discs that are not in a box in the attic are delegated as scarecrows...
Offline
I tried vlc with mp3 album on TTY3 openbox and switched to TTY2 midnightcommander with same user. The track jumping was working!
But: If switch to TTY1 kodi or TTY2 not logged in vlc says:
Audio output failed: The audio device "iec958:CARD=Generic_1,DEV=0" could not be used: No matching device found.
Interessting: The mp3 track will be played, I switch to TTY1 kodi or not-logged-in-shell the sound stops after track end. But if I switch back to TTY with same user, track was started it plays/sounds the track "forwarded".
So maybe there is a problem with finding correct audiodevice while switching TTYs ?! Seems to be that mp3 album uses different audio device after TTY-switching...
With AudioCD theres no forwarded playing, it is playing tracks from beginning after switching to "correct" TTY.
Last edited by realmatrix (2023-09-28 17:49:16)
Offline
Ok, so I added all involved user to the group 'audio' and now
a) Sound started in TTY3 jumping is working in ALL TTYs with different users
b) But sound started on TTY1 kodi is not available to ALL TTYs with different users, so kodi user has not enough rights!!!
Sorry for my slowly insights... I just working with try and error :-)
Offline
What's the output of
id kodi
and did you re-login as "kodi" on tty1? Do you log-in as kodi at all or do you just start a service (that ends up running a process as kodi)?
Offline
id kodi
results:
uid=971(kodi) gid=971(kodi) Gruppen=971(kodi),996(audio),990(optical),985(video)
I started kodi as service, here is the systemd:
[Unit]
Description=Kodi standalone (X11)
After=remote-fs.target systemd-user-sessions.service network-online.target nss-lookup.target sound.target bluetooth.target polkit.service upower.service mysqld.service lircd.service
Wants=network-online.target polkit.service upower.service
Conflicts=getty@tty1.service
[Service]
User=kodi
Group=kodi
EnvironmentFile=-/etc/conf.d/kodi-standalone
PAMName=login
TTYPath=/dev/tty1
ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -quiet -nolisten tcp vt1
ExecStop=/usr/bin/killall --user kodi --exact --wait kodi.bin
Restart=on-abort
StandardInput=tty
StandardOutput=journal
[Install]
Alias=display-manager.service
Offline
Try to add
SupplementaryGroups=audio optical
Did you restart the service after adding it to optical & audio groups?
Offline
This doesn't work:
[Unit]
Description=Kodi standalone (X11)
After=remote-fs.target systemd-user-sessions.service network-online.target nss-lookup.target sound.target bluetooth.target polkit.service upower.service mysqld.service lircd.service
Wants=network-online.target polkit.service upower.service
Conflicts=getty@tty1.service
[Service]
User=kodi
Group=kodi
EnvironmentFile=-/etc/conf.d/kodi-standalone
SupplementaryGroups=audio optical
PAMName=login
TTYPath=/dev/tty1
ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -quiet -nolisten tcp vt1
ExecStop=/usr/bin/killall --user kodi --exact --wait kodi.bin
Restart=on-abort
StandardInput=tty
StandardOutput=journal
[Install]
Alias=display-manager.service
I restarting the service normally with
$systemctl daemon-reload + $systemctl restart kodi-x11
Offline
According to https://bbs.archlinux.org/viewtopic.php … 4#p2122554 kodi had actually run w/ those groups anyway
If you login as kodi (you might have to unlock the account and add a password) and run "/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -quiet -nolisten tcp vt1" from there, can you make it keep playing audio?
Offline
Tested
/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -quiet -nolisten tcp vt1
playing mp3 album
with user machine
uid=1003(machine) gid=1003(machine) Gruppen=1003(machine),108(vboxusers)
=>working
with user woody
uid=1000(woody) gid=984(users) Gruppen=984(users),998(wheel),996(audio),985(video),666(vdr),971(kodi),1003(machine)
=>working
with user kodi (via systemd)
uid=971(kodi) gid=971(kodi) Gruppen=971(kodi),996(audio),990(optical),985(video)
=> not working
correction: after jumping between TTY1, TTY2 and TTY3 more than one times
=> not working
it seems that after jumping the system cannot find the correct alsa-card !?
Last edited by realmatrix (2023-09-29 16:52:21)
Offline
correction: after jumping between TTY1, TTY2 and TTY3 more than one times
=> not working
This is for kodi (only)?
logind juggles permissions, though I don't see how that would be a problem except that kodi isn't in the users group (which I btw. also set as defauld and only group for the dummy user…) - doesn't fit w/ the observation for the "machine" user, though
Offline
@OP - you appear to be using my kodi-standalone-service. I am not closely following this thread, but if you arrive at a solution to your problem, please let me know if my files need to be modified to satisfy this use case.
Last edited by graysky (2023-09-29 18:36:25)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
This is for kodi (only)?
No, it is also for vlc playing mp3 album...
First switching from TTY3 woody vlc playing to another TTY => track jump is working
Second switching back to TTY3 woody
Third switching to another TTY => track jump is not working anymore
@OP - you appear to be using my kodi-standalone-service. I am not closely following this thread, but if you arrive at a solution to your problem, please let me know if my files need to be modified to satisfy this use case.
Ok :-)
Offline
I meant the user "kodi", not the process.
Offline
I think it is broken after switching to TTY1 (kodi)
First switch from TTY3 (user woody) to TTY4 (user woody) > working
Second switch back from TTY4 to TTY3
Third switch from TTY3 to TTY4 > working
Fourth switch back from TTY4 to TTY3
Fifth switch from TTY3 to TTY1 (user kodi) > not working
This was tested with vlc mp3 album started on TTY3 (user woody).
---
Switch from TTY1 (user kodi) to any other TTY > not working
This was tested with kodi-standalone mp3 album started on TTY1 (user kodi)
---
So in the end: Only with user woody track jumping on different TTYs (with user woody) is working.
Last edited by realmatrix (2023-09-29 19:44:59)
Offline
Starting
/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -quiet -nolisten tcp vt2
on TTY2 (user machine).
First playing mp3 album
Second switch to TTY3 (user woody) > track jumping works
Third switch back to TTY2
Fourth switch to TTY3 again (user woody) > track jumping don't work anymore
Offline
Correction:
playing vlc mp3 album, started on TTY3 (user woody) => works as it should be now, I can switch to any TTY with any user or not logged in AND the track jumping works !!!
id woody
=
uid=1000(woody) gid=984(users) Gruppen=984(users),998(wheel),996(audio),985(video),666(vdr),1003(machine)
So the question should be: What I have to change in case of user 'kodi'?
id kodi
=
uid=971(kodi) gid=971(kodi) Gruppen=971(kodi),996(audio),990(optical),985(video)
user kodi is for the software media center "kodi-standalone" and should have minimal rights. The idea is a working media center in background on TTY1, which automatically jumps from one to next track with mp3 and AudioCD.
Thanks for your advice.
Last edited by realmatrix (2023-09-30 11:28:42)
Offline
I tried this modified kodi-standalone:
[Unit]
Description=Kodi standalone (X11)
After=remote-fs.target systemd-user-sessions.service network-online.target nss-lookup.target sound.target bluetooth.target polkit.service upower.service mysqld.service lircd.service
Wants=network-online.target polkit.service upower.service
Conflicts=getty@tty1.service
[Service]
User=kodi
Group=kodi
EnvironmentFile=-/etc/conf.d/kodi-standalone
PAMName=login
TTYPath=/dev/tty1
#ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -quiet -nolisten tcp vt1
ExecStart=/usr/bin/xinit /usr/bin/vlc -- :0 -quiet -nolisten tcp vt1
ExecStop=/usr/bin/killall --user kodi --exact --wait kodi.bin
Restart=on-abort
StandardInput=tty
StandardOutput=journal
[Install]
Alias=display-manager.service
and after setting vlc to use ALSA IEC958 digital device it works perfectly!
=> So the problem is kodi-software !!! Anybody knows how I can force kodi to use a custom soundcard?
Offline
Offline
@seth: Thanks for your great support!!!
For radio, mp3 and AudioCD now I am using mediaplayer "QMPlay2" with the limited kodi-account on TTY1. Everything works fine.
For TV and movies using vlc on openbox TTY3 now.
Here's my systemd if somebody is interested:
[Unit]
Description=QMPlay2 Radio/AudioCD
After=remote-fs.target systemd-user-sessions.service network-online.target nss-lookup.target sound.target bluetooth.target polkit.service upower.service mysqld.service lircd.service
Wants=network-online.target polkit.service upower.service
Conflicts=getty@tty1.service
[Service]
User=kodi
Group=kodi
PAMName=login
TTYPath=/dev/tty1
ExecStart=/usr/bin/xinit /usr/bin/QMPlay2 /var/lib/kodi/radio.xspf -- :1 -quiet -nolisten tcp vt1
ExecStop=/usr/bin/killall --user kodi
Restart=on-abort
StandardInput=tty
StandardOutput=journal
[Install]
Alias=display-manager.service
have a nice day
realmatrix
[solved]
Offline
Mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline