Gå til innhold

Lyd avskrudd etter hver reboot (xubuntu)


Anbefalte innlegg

Hei.

 

All lyd på pcen min blir dempet til minimum hver gang jeg restarter pcen og jeg må manuelt skru lyden opp igjen. Dette er intet stort problem, men ganske irriterende likevel.

 

Jeg har gjort følgende for å løse problemet, uten noen suksess:

alsamixer (setter alt på full pupp)m

sudo alsactl store;

sudo alsactl restore (når jeg taster inn denne kommandoen skrus volumet opp til riktig nivå)

sudo gedit /etc/rc.local (her legger ejg inn alsactl restore over exit 0 kommandoen)

 

Lydkortet: HDA-Intel - HDA NVidia Conexant CX20549 (Venice)

 

Vet ikke om det har noen relevans for dette temaet, men her er hva som står i .asound.state-filen min.

 

state.NVidia {

control.1 {

comment.access 'read write'

comment.type ENUMERATED

comment.count 1

comment.item.0 IntMic

comment.item.1 ExtMic

iface MIXER

name 'Capture Source'

value IntMic

}

control.2 {

comment.access 'read write'

comment.type INTEGER

comment.count 2

comment.range '0 - 23'

comment.dbmin 0

comment.dbmax 3450

iface MIXER

name 'Int Mic Capture Volume'

value.0 0

value.1 0

}

control.3 {

comment.access 'read write'

comment.type BOOLEAN

comment.count 2

iface MIXER

name 'Int Mic Capture Switch'

value.0 true

value.1 true

}

control.4 {

comment.access 'read write'

comment.type INTEGER

comment.count 2

comment.range '0 - 23'

comment.dbmin 0

comment.dbmax 3450

iface MIXER

name 'Ext Mic Capture Volume'

value.0 0

value.1 0

}

control.5 {

comment.access 'read write'

comment.type BOOLEAN

comment.count 2

iface MIXER

name 'Ext Mic Capture Switch'

value.0 true

value.1 true

}

control.6 {

comment.access 'read write'

comment.type INTEGER

comment.count 2

comment.range '0 - 20'

comment.dbmin -3000

comment.dbmax 0

iface MIXER

name 'PCM Playback Volume'

value.0 20

value.1 20

}

control.7 {

comment.access 'read write'

comment.type BOOLEAN

comment.count 2

iface MIXER

name 'PCM Playback Switch'

value.0 true

value.1 true

}

control.8 {

comment.access 'read write'

comment.type INTEGER

comment.count 2

comment.range '0 - 20'

comment.dbmin -3000

comment.dbmax 0

iface MIXER

name 'Int Mic Playback Volume'

value.0 20

value.1 20

}

control.9 {

comment.access 'read write'

comment.type BOOLEAN

comment.count 2

iface MIXER

name 'Int Mic Playback Switch'

value.0 false

value.1 false

}

control.10 {

comment.access 'read write'

comment.type INTEGER

comment.count 2

comment.range '0 - 20'

comment.dbmin -3000

comment.dbmax 0

iface MIXER

name 'Ext Mic Playback Volume'

value.0 20

value.1 20

}

control.11 {

comment.access 'read write'

comment.type BOOLEAN

comment.count 2

iface MIXER

name 'Ext Mic Playback Switch'

value.0 false

value.1 false

}

control.12 {

comment.access 'read write'

comment.type INTEGER

comment.count 2

comment.range '0 - 43'

comment.dbmin -6450

comment.dbmax 0

iface MIXER

name 'Master Playback Volume'

value.0 43

value.1 43

}

control.13 {

comment.access 'read write'

comment.type BOOLEAN

comment.count 1

iface MIXER

name 'Master Playback Switch'

value true

}

control.14 {

comment.access read

comment.type IEC958

comment.count 1

iface MIXER

name 'IEC958 Playback Con Mask'

value '0fff000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 000'

}

control.15 {

comment.access read

comment.type IEC958

comment.count 1

iface MIXER

name 'IEC958 Playback Pro Mask'

value '0f00000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 000'

}

control.16 {

comment.access 'read write'

comment.type IEC958

comment.count 1

iface MIXER

name 'IEC958 Playback Default'

value '0400000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 000'

}

control.17 {

comment.access 'read write'

comment.type BOOLEAN

comment.count 1

iface MIXER

name 'IEC958 Playback Switch'

value true

}

control.18 {

comment.access 'read write'

comment.type BOOLEAN

comment.count 1

iface MIXER

name 'IEC958 Default PCM Playback Switch'

value true

}

}

 

Lenke til kommentar
Videoannonse
Annonse
Spørsmålet er hvordan man justerer volumet via kommandolinja, vis vi hvet dette kan vi legge til x-term -e "command" til startopp og dermed ha den på hva du vil ha den til.

Om en setter volumet en ønsker i "alsamixer" og taster "sudo alsactl store;", blir lyden lagret og skal bli satt tilbake til ønsket volum når en taster inn "sudo alsactl restore". Så å få "sudo alsactl restore" til å kjøre automatisk ved boot ville nok det løst problemet. Jeg har som sagt prøvd å legge kommandoen i "rc.local" som såvidt jeg forstår skal gjøre at kommandoen blir kjørt under boot, men dette ser ikke ut til å fungere.

 

startes alsa-utils under boot?

Aner ikke, hvordan kan jeg sjekke det? Er ny i xubuntu.

Lenke til kommentar

Ja, her er det jeg får opp:

eivind@eivind-laptop:~$ amixer

Simple mixer control 'Master',0

Capabilities: pvolume pswitch pswitch-joined

Playback channels: Front Left - Front Right

Limits: Playback 0 - 43

Mono:

Front Left: Playback 43 [100%] [0.00dB] [on]

Front Right: Playback 43 [100%] [0.00dB] [on]

Simple mixer control 'PCM',0

Capabilities: pvolume pswitch

Playback channels: Front Left - Front Right

Limits: Playback 0 - 20

Mono:

Front Left: Playback 20 [100%] [0.00dB] [on]

Front Right: Playback 20 [100%] [0.00dB] [on]

Simple mixer control 'IEC958',0

Capabilities: pswitch pswitch-joined

Playback channels: Mono

Mono: Playback [on]

Simple mixer control 'IEC958 Default PCM',0

Capabilities: pswitch pswitch-joined

Playback channels: Mono

Mono: Playback [on]

Simple mixer control 'Ext Mic',0

Capabilities: pvolume cvolume pswitch cswitch

Playback channels: Front Left - Front Right

Capture channels: Front Left - Front Right

Limits: Playback 0 - 20 Capture 0 - 23

Front Left: Playback 20 [100%] [0.00dB] [off] Capture 0 [0%] [0.00dB] [on]

Front Right: Playback 20 [100%] [0.00dB] [off] Capture 0 [0%] [0.00dB] [on]

Simple mixer control 'ExtMic',0

Capabilities: cswitch cswitch-joined cswitch-exclusive

Capture exclusive group: 0

Capture channels: Mono

Mono: Capture [off]

Simple mixer control 'Int Mic',0

Capabilities: pvolume cvolume pswitch cswitch

Playback channels: Front Left - Front Right

Capture channels: Front Left - Front Right

Limits: Playback 0 - 20 Capture 0 - 23

Front Left: Playback 20 [100%] [0.00dB] [off] Capture 0 [0%] [0.00dB] [on]

Front Right: Playback 20 [100%] [0.00dB] [off] Capture 0 [0%] [0.00dB] [on]

Simple mixer control 'IntMic',0

Capabilities: cswitch cswitch-joined cswitch-exclusive

Capture exclusive group: 0

Capture channels: Mono

Mono: Capture [on]

 

"man amixer"

AMIXER(1) AMIXER(1)

 

NAME

amixer - command-line mixer for ALSA soundcard driver

 

SYNOPSIS

amixer [-option] [cmd]

 

DESCRIPTION

amixer allows command-line control of the mixer for the ALSA soundcard

driver. amixer supports multiple soundcards.

 

amixer with no arguments will display the current mixer settings for

the default soundcard and device. This is a good way to see a list of

the simple mixer controls you can use.

 

COMMANDS

help Shows syntax.

 

info Shows the information about a mixer device.

 

scontrols

Shows a complete list of simple mixer controls.

 

scontents

Shows a complete list of simple mixer controls with their con‐

tents.

 

set or sset <SCONTROL> <PARAMETER> ...

Sets the simple mixer control contents. The parameter can be the

volume either as a percentage from 0% to 100% with % suffix, a

dB gain with dB suffix (like -12.5dB), or an exact hardware

value. The dB gain can be used only for the mixer elements with

available dB information. When plus(+) or minus(-) letter is

appended after volume value, the volume is incremented or decre‐

mented from the current value, respectively.

 

The parameters cap, nocap, mute, unmute, toggle are used to

change capture (recording) and muting for the group specified.

 

The optional modifiers can be put as extra parameters to specify

the stream direction or channels to apply. The modifiers play‐

back and capture specify the stream, and the modifiers front,

rear, center, woofer are used to specify channels to be changed.

 

A simple mixer control must be specified. Only one device can be

controlled at a time.

 

get or sget <SCONTROL>

Shows the simple mixer control contents.

 

A simple mixer control must be specified. Only one device can be

controlled at a time.

 

controls

Shows a complete list of card controls.

 

contents

Shows a complete list of card controls with their contents.

 

cset <CONTROL> <PARAMETER> ...

Sets the card control contents. The identifier has these compo‐

nents: iface, name, index, device, subdevice, numid. The next

argument specifies the value of control.

 

cget <CONTROL>

Shows the card control contents. The identifier has same syntax

as for the cset command.

OPTIONS

-c card

 

Select the card number to control. The device name created from

this parameter has syntax ’hw:N’ where N is specified card num‐

ber.

 

-D device

 

Select the device name to control. The default control name is

’default’.

 

-s | --stdin

 

Read from stdin and execute the command on each line sequen‐

tially. When this option is given, the command in command-line

arguments is ignored.

 

Only sset and cset are accepted. Other commands are ignored.

The commands to unmatched ids are ignored without errors too.

 

-h Help: show syntax.

 

-q Quiet mode. Do not show results of changes.

 

EXAMPLES

amixer -c 1 sset Line,0 80%,40% unmute cap

will set the second soundcard’s left line input volume to 80%

and right line input to 40%, unmute it, and select it as a

source for capture (recording).

 

amixer -c 1 -- sset Master playback -20dB

will set the master volume of the second card to -20dB. If the

master has multiple channels, all channels are set to the same

value.

amixer -c 1 set PCM 2dB+

will increase the PCM volume of the second card with 2dB. When

both playback and capture volumes exist, this is applied to both

volumes.

 

amixer -c 2 cset iface=MIXER,name=’Line Playback Volume",index=1 40%

will set the third soundcard’s second line playback volume(s) to

40%

 

amixer -c 2 cset numid=34 40%

will set the 34th soundcard element to 40%

 

BUGS

None known.

 

AUTHOR

amixer is by Jaroslav Kysela <[email protected]>. This document is by

Paul Winkler <[email protected]> and Jaroslav Kysela <[email protected]>.

 

11 Aug 2000 AMIXER(1)

Forslag?

Lenke til kommentar

Hvordan finner jeg ut hvilke kanaler som må fikses da? Jeg spør jo her fordi jeg ikke har peiling selv. Og hva skal jeg legge inn i rc.local? Selve koden, da f.eks "mixer set Master 80%"?

 

edit:

Tenkte jeg skulle teste ut forslaget ditt anders, og da skjedde dette:

eivind@eivind-laptop:~$ mixer set Master 80%

virtual_keyboard real time MIDI plugin for Csound

PortMIDI real time MIDI plugin for Csound

PortAudio real-time audio module for Csound

util mixer:

soundin cannot open set

80%: error while opening (null)

Endret av Nyhus
Lenke til kommentar

Ah, beklager, det var en skriveleif fra min side, skulle selvfølgelig være "amixer" og ikke "mixer".

 

Når jeg taster inn "amixer" får jeg denne beskjeden:

eivind@eivind-laptop:~$ sudo amixer set Master 100%

Simple mixer control 'Master',0

Capabilities: pvolume pswitch pswitch-joined

Playback channels: Front Left - Front Right

Limits: Playback 0 - 43

Mono:

Front Left: Playback 43 [100%] [0.00dB] [on]

Front Right: Playback 43 [100%] [0.00dB] [on]

og volumet havner på valgte nivå. Trenger jeg ha med "sudo" i rc.local? Har uansett skrevet inn kommandoen med og uten sudo, rebooter nå og ser hva som skjer.

 

Edit:

ARG! Det fungerte heller ikke. Har dere andre gode forslag? Dette er nå hva rc.local-filen min inneholder:

#!/bin/sh -e

#

# rc.local

#

# This script is executed at the end of each multiuser runlevel.

# Make sure that the script will "exit 0" on success or any other

# value on error.

#

# In order to enable or disable this script just change the execution

# bits.

#

# By default this script does nothing.

sudo alsactl restore

sudo amixer set Master 100%

amixer set Master 100%

exit 0

 

Og for å være sikker på at jeg er inne i rette fil - "sudo gedit /etc/rc.local". Korrekt? Jeg har nemlig en følelse av at OSet ikke kjører kommandoene jeg har skrevet i rc.local.

Endret av Nyhus
Lenke til kommentar

Kan ikke tenke meg at sudo er nødvendig i filene som kjøres under oppstart. Man trenger jo root tilgang for å gjøre endringer i dem til å begynne med, og det ville være dumt om oppstarten må stoppe opp og spørre om passord for å kunne fortsette. Har ikke sett noen guider som noen gang har nevt noe slikt.

Lenke til kommentar

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
×
×
  • Opprett ny...