FedoraForum.org - Fedora Support Forums and Community
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 38
  1. #16
    PabloTwo's Avatar
    PabloTwo is offline "Fedora User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    8,919
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)

    Re: tvtime: remembering volume across restarts

    Then it appears the "bug" that prevents the alsa mixer settings from being saved on shutdown from a user account is worse in F13 than in F12. At least in F12 I was able to fix it (well, do the work-a-round) with the commands I gave you earlier. Since I don't run F13, I can't help sniff out what's still causing that to fail in F13.

  2. #17
    Join Date
    Aug 2009
    Location
    College Station, TX
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: tvtime: remembering volume across restarts

    Very strange.. I just tried a reboot here on another system, this time from the console/GUI and it was updated here:

    $ ls -al /etc/asound.state
    -rw-r--r--. 1 root root 2614 Jul 21 12:38 /etc/asound.state
    $ ls -al /var/lib/random-seed
    -rw-------. 1 root root 512 Jul 21 12:38 /var/lib/random-seed

    I also list /var/lib/random-seed because it gets touched by the halt script just after the alsactrl is done. If neither of those files on your system is updating on reboot then something weird is going on. If only the latter is being updated, then a) you don.t have an /etc/asound.state (which you do), b) you don't have an /etc/alsa/alsactl.conf (which you do if you have the alsa-utils package installed that provides alsactl), c) you don't have an /sbin/alsactl (which, again, you do if you have alsa-utils installed).

    Very strange.

    SS

  3. #18
    Join Date
    Jul 2005
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: tvtime: remembering volume across restarts

    Quote Originally Posted by SiliconSlick
    Very strange.. I just tried a reboot here on another system, this time from the console/GUI and it was updated here:

    $ ls -al /etc/asound.state
    -rw-r--r--. 1 root root 2614 Jul 21 12:38 /etc/asound.state
    $ ls -al /var/lib/random-seed
    -rw-------. 1 root root 512 Jul 21 12:38 /var/lib/random-seed

    I also list /var/lib/random-seed because it gets touched by the halt script just after the alsactrl is done. If neither of those files on your system is updating on reboot then something weird is going on. If only the latter is being updated, then a) you don.t have an /etc/asound.state (which you do), b) you don't have an /etc/alsa/alsactl.conf (which you do if you have the alsa-utils package installed that provides alsactl), c) you don't have an /sbin/alsactl (which, again, you do if you have alsa-utils installed).

    Very strange.

    SS
    OK, I get:
    Code:
    $ ls -al /etc/asound.state
    -rw-rw-rw-. 1 root root 10074 Jul 20 17:40 /etc/asound.state
    $ ls -al /var/lib/random-seed
    -rw-------. 1 root root 512 Jul 21 17:19 /var/lib/random-seed
    And I have all the files you've mentioned. So this also seems to suggest that the "alsactl store" in the halt script isn't doing what it's supposed to.

  4. #19
    Join Date
    Aug 2009
    Location
    College Station, TX
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: tvtime: remembering volume across restarts

    Very strange... try this:

    Code:
    test -s /etc/alsa/alsactl.conf ; echo $?
    test -x /sbin/alsactl ; echo $?
    test -w /etc/asound.state ; echo $?
    (which are the tests the halt script does in the 'if' statement you played with earlier but since returned to its proper state (as indicated by just the T on the rpm -V you showed above))

    All those should return 0. The test are:

    1) check that /etc/alsa/alsactl.conf exists and isn't size 0
    2) test existence of /sbin/alsactl
    3) test existence and writability of /etc/asound.state

    Is your alsactl.conf empty? If not, and nothing returns 1 above, I'm at a loss.

    SS
    Last edited by SiliconSlick; 21st July 2010 at 08:12 PM. Reason: fix code block formatting

  5. #20
    Join Date
    Jul 2005
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: tvtime: remembering volume across restarts

    Quote Originally Posted by SiliconSlick
    Very strange... try this:

    Code:
    test -s /etc/alsa/alsactl.conf ; echo $?
    test -x /sbin/alsactl ; echo $?
    test -w /etc/asound.state ; echo $?
    (which are the tests the halt script does in the 'if' statement you played with earlier but since returned to its proper state (as indicated by just the T on the rpm -V you showed above))

    All those should return 0. The test are:

    1) check that /etc/alsa/alsactl.conf exists and isn't size 0
    2) test existence of /sbin/alsactl
    3) test existence and writability of /etc/asound.state

    Is your alsactl.conf empty? If not, and nothing returns 1 above, I'm at a loss.

    SS
    All return 0:
    Code:
    $ test -s /etc/alsa/alsactl.conf ; echo $?
    0
    $ test -x /sbin/alsactl ; echo $?
    0
    $ test -w /etc/asound.state ; echo $?
    0
    And the contents of /etc/alsa/alsactl.conf:
    Code:
    #
    # ALSA library configuration file for alsactl tool
    # (/usr/share/alsa tree is not necessary for alsactl)
    #
    
    ctl.hw {
    	@args [ CARD ]
    	@args.CARD {
    		type string
    		default "0"
    	}
    	type hw
    	card $CARD
    }
    Thanks again for all your suggestions.

    I even tried the exact line that was in the halt script and it seems to work when run manually:
    Code:
    $ /sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --ignore store
    $ ls -al /etc/asound.state
    -rw-rw-rw-. 1 root root 10074 Jul 21 20:33 /etc/asound.state
    So I really have no idea why it doesn't work on shutdown/reboot.

  6. #21
    Join Date
    Aug 2009
    Location
    College Station, TX
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: tvtime: remembering volume across restarts



    Very strange indeed... I'm running out of ideas... some last things to try:

    ls -al /etc/rc.d/rc0.d/S01halt

    and make sure it points to /etc/rc.d/init.d/halt.

    If so, create a file named /sbin/halt.local. In it put the following:

    Code:
    #!/bin/sh
    echo "running halt `date`" >> /sbin/DEBUGhalt-DELETEME
    #EOF
    then do:

    chmod 755 /sbin/halt.local # has to have execute permission

    then reboot.

    I noticed that the /var/lib/random-seed get changed on bootup too so it isn.t the best indicator that halt is actuall running. If this works, on reboot you should have a file called /sbin/DEBUGhalt-DELETEME. e.g.

    $ cat /sbin/DEBUGhalt-DELETEME
    running halt Wed Jul 21 14:58:06 CDT 2010

    If not, then it would seem halt isn.t being run at all (which would be unlikely).

    SS

  7. #22
    Join Date
    Jul 2005
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: tvtime: remembering volume across restarts

    Quote Originally Posted by SiliconSlick


    Very strange indeed... I'm running out of ideas... some last things to try:

    ls -al /etc/rc.d/rc0.d/S01halt

    and make sure it points to /etc/rc.d/init.d/halt.

    If so, create a file named /sbin/halt.local. In it put the following:

    Code:
    #!/bin/sh
    echo "running halt `date`" >> /sbin/DEBUGhalt-DELETEME
    #EOF
    then do:

    chmod 755 /sbin/halt.local # has to have execute permission

    then reboot.

    I noticed that the /var/lib/random-seed get changed on bootup too so it isn.t the best indicator that halt is actuall running. If this works, on reboot you should have a file called /sbin/DEBUGhalt-DELETEME. e.g.

    $ cat /sbin/DEBUGhalt-DELETEME
    running halt Wed Jul 21 14:58:06 CDT 2010

    If not, then it would seem halt isn.t being run at all (which would be unlikely).

    SS
    That all does what you'd expect:
    Code:
    $ cat /sbin/DEBUGhalt-DELETEME
    running halt Wed Jul 21 21:56:06 BST 2010
    running halt Wed Jul 21 22:02:44 BST 2010
    running halt Wed Jul 21 22:16:04 BST 2010
    running halt Wed Jul 21 22:18:15 BST 2010
    (those were all the times I restarted since creating the halt.local file)
    But if I try to add "/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --ignore store" to halt.local, it still has no effect on asound.state. Is it possible that something (i.e. PulseAudio) locks the file before it gets to that part of the halt script?

  8. #23
    Join Date
    Aug 2009
    Location
    College Station, TX
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: tvtime: remembering volume across restarts

    Quote Originally Posted by ADW
    But if I try to add "/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --ignore store" to halt.local, it still has no effect on asound.state. Is it possible that something (i.e. PulseAudio) locks the file before it gets to that part of the halt script?
    You could try two things in /sbin/halt.local then:

    1) add just before your alsactl line:

    fuser /etc/asound.state &>> /sbin/DEBUGhalt-DELETEME

    That might give an idea if a process has the file open/locked already.

    2) change your line above to:

    /sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf store &>> /sbin/DEBUGhalt-DELETEME

    That tosses the --ignore and logs any error messages to the debug file.

    SS

  9. #24
    Join Date
    Jul 2005
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: tvtime: remembering volume across restarts

    Quote Originally Posted by SiliconSlick
    You could try two things in /sbin/halt.local then:

    1) add just before your alsactl line:

    fuser /etc/asound.state &>> /sbin/DEBUGhalt-DELETEME

    That might give an idea if a process has the file open/locked already.

    2) change your line above to:

    /sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf store &>> /sbin/DEBUGhalt-DELETEME

    That tosses the --ignore and logs any error messages to the debug file.
    OK, I'm even more confused now. I modified /sbin/halt.local so that it reads:
    Code:
    #!/bin/sh
    echo "running halt (modified1-start) `date`" >> /sbin/DEBUGhalt-DELETEME
    fuser /etc/asound.state &>> /sbin/DEBUGhalt-DELETEME
    /sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf store &>> /sbin/DEBUGhalt-DELETEME
    echo "running halt (modified1-end) `date`" >> /sbin/DEBUGhalt-DELETEME
    #EOF
    And when I reboot the following is added to /sbin/DEBUGhalt-DELETEME:
    Code:
    running halt (modified1-start) Wed Jul 21 23:46:20 BST 2010
    running halt (modified1-end) Wed Jul 21 23:46:20 BST 2010
    and nothing in between. I guess this means the lines in between ran without any errors/output. But still /etc/asound.state hasn't been modified (the timestamp is unchanged).

  10. #25
    Join Date
    Aug 2009
    Location
    College Station, TX
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: tvtime: remembering volume across restarts

    Very perplexing...

    I took a look at the code for alsactl.c and state.c and don't see where it might bail without some error message. One "last" thing to try is update to the halt.local you have as such:

    Code:
    #!/bin/sh
    echo "running halt (modified1-start) `date`" > /sbin/DEBUGhalt-DELETEME
    ls -al  /etc/asound.state >>  /sbin/DEBUGhalt-DELETEME
    fuser /etc/asound.state &>> /sbin/DEBUGhalt-DELETEME
    /sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf store &>> /sbin/DEBUGhalt-DELETEME
    /usr/sbin/strace /sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf store >& /sbin/DEBUGhalt-DELETEME-strace
    ls -al  /etc/asound.state >>  /sbin/DEBUGhalt-DELETEME
    echo "running halt (modified1-end) `date`" >> /sbin/DEBUGhalt-DELETEME
    #EOF
    (note that the strace line uses a different DEBUG file)

    Then maybe post the output from the following:

    /sbin/lspci | grep Audio
    grep state /etc/asound.state
    grep -A5 asound.state /sbin/DEBUGhalt-DELETEME-strace

    e.g.
    Code:
    # /sbin/lspci | grep Audio
    00:05.0 Audio device: nVidia Corporation MCP61 High Definition Audio (rev a2)
    
    # grep state /etc/asound.state 
    state.NVidia {
    
    # grep -A5 asound.state /tmp/foo
    open("/etc/asound.state", O_RDONLY)     = 3
    fstat(3, {st_mode=S_IFREG|0644, st_size=7652, ...}) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa8ffdbd000
    read(3, "state.NVidia {\n\tcontrol.1 {\n\t\tco"..., 4096) = 4096
    read(3, "comment.dbmax 3000\n\t\tiface MIXER"..., 4096) = 3556
    read(3, "", 4096)                       = 0
    --
    open("/etc/asound.state", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
    fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa8ffdbd000
    write(3, "state.NVidia {\n\tcontrol.1 {\n\t\tco"..., 4096) = 4096
    write(3, "comment.dbmax 3000\n\t\tiface MIXER"..., 3556) = 3556
    close(3)                                = 0
    The added "ls"s are just sanity check make sure they agree. The strace line requires the strace package to be installed first and assumes that /usr isn't unmounted yet (which it might be if /usr is on a different filesystem/partition than /sbin).

    SS

  11. #26
    Join Date
    Jul 2005
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: tvtime: remembering volume across restarts

    Quote Originally Posted by SiliconSlick
    Then maybe post the output from the following:

    /sbin/lspci | grep Audio
    grep state /etc/asound.state
    grep -A5 asound.state /sbin/DEBUGhalt-DELETEME-strace
    Right, I get:
    Code:
    # /sbin/lspci | grep Audio
    00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)
    05:00.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 02)
    # grep state /etc/asound.state
    state.Intel {
    state.Bt878 {
    # grep -A5 asound.state /sbin/DEBUGhalt-DELETEME-strace
    #
    /sbin/DEBUGhalt-DELETEME:
    Code:
    running halt (modified1-start) Thu Jul 22 15:52:14 BST 2010
    -rw-rw-rw-. 1 root root 10074 Jul 21 20:33 /etc/asound.state
    -rw-rw-rw-. 1 root root 10074 Jul 21 20:33 /etc/asound.state
    running halt (modified1-end) Thu Jul 22 15:52:14 BST 2010
    /sbin/DEBUGhalt-DELETEME-strace:
    Code:
    /sbin/halt.local: line 6: /usr/sbin/strace: No such file or directory
    which suggests I haven't got strace, but "yum install strace" gives:
    Code:
    Package strace-4.5.20-1.fc13.x86_64 already installed and latest version
    Nothing to do
    But 'strace' isn't in either /sbin or /usr/sbin.

  12. #27
    Join Date
    Aug 2009
    Location
    College Station, TX
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: tvtime: remembering volume across restarts

    My bad... it is in /usr/bin not /usr/sbin.

    $ which strace
    /usr/bin/strace
    $ whereis strace
    strace: /usr/bin/strace /usr/share/man/man1/strace.1.gz

    SS

  13. #28
    Join Date
    Jul 2005
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: tvtime: remembering volume across restarts

    Quote Originally Posted by SiliconSlick
    My bad... it is in /usr/bin not /usr/sbin.

    $ which strace
    /usr/bin/strace
    $ whereis strace
    strace: /usr/bin/strace /usr/share/man/man1/strace.1.gz

    SS
    This is looking more promising:
    Code:
    # grep -A5 asound.state /sbin/DEBUGhalt-DELETEME-strace
    open("/etc/asound.state", O_RDONLY)     = 3
    fstat(3, {st_mode=S_IFREG|0666, st_size=10074, ...}) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f794113c000
    read(3, "state.Intel {\n\tcontrol.1 {\n\t\tcom"..., 4096) = 4096
    read(3, "omment.count 1\n\t\tcomment.item.0 "..., 4096) = 4096
    read(3, "00000000000000000000000000000000"..., 4096) = 1882
    --
    open("/etc/asound.state", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EACCES (Permission denied)
    write(2, "/sbin/alsactl: save_state:1532: ", 32) = 32
    write(2, "Cannot open /etc/asound.state fo"..., 60) = 60
    write(2, "\n", 1)                       = 1
    exit_group(13)                          = ?
    So it seems to be a permissions issue with /etc/asound.state as you originally thought.

  14. #29
    PabloTwo's Avatar
    PabloTwo is offline "Fedora User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    8,919
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)

    Re: tvtime: remembering volume across restarts

    Don't know if this will help, but it's something more to try... making that file set userID
    Code:
    chmod 4666 /etc/asound.state

  15. #30
    Join Date
    Jul 2005
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: tvtime: remembering volume across restarts

    Quote Originally Posted by PabloTwo
    Don't know if this will help, but it's something more to try... making that file set userID
    Code:
    chmod 4666 /etc/asound.state
    Still no effect, but thanks for the suggestion.

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Replies: 4
    Last Post: 18th August 2009, 01:19 AM
  2. TVTIME - volume stuck at zero
    By cuios in forum Using Fedora
    Replies: 2
    Last Post: 24th June 2009, 09:39 PM
  3. Gnome Restarts,and Restarts, Restarts
    By starfly in forum Using Fedora
    Replies: 1
    Last Post: 11th July 2006, 04:30 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •