Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Can't disable power manager in some cases

    I am having a weird problem where if I don't touch the mouse or keyboard after logging on, the power manager settings are being ignored. I disabled turning off the display and screen saver from the Gnome utilities, but after about 20 minutes my screen blanks and my wireless network connection gets disconnected. This is on an HTPC, so I'm usually not near the mouse or keyboard, and unfortunately button presses from the remote control don't count. Media players like MPlayer will prevent the screen from blanking, but if I'm listening to music (where the music is served over the network from another computer), this means that the screen will go blank and the music playback will freeze as the network connection is lost. If I touch the keyboard just after booting it doesn't blank the screen or disconnect my wireless, but when I forget it's very disruptive.

    I am running Debian Testing (Squeeze) with a Gnome desktop environment. I'm using gdm3 to log in, but I have it set up to automatically log me on. (I use gdm on my desktop, also with Squeeze, with it configured to show login screen instead of automatically logging me on and it still displays that behavior) I have attempted the following to resolve this issue to no avail:
    Disable DPMS for my screen and monitor in /etc/X11/Xorg.conf
    Set all the timeouts for blanking, power down, etc. to 0 in /etc/X11/Xorg.conf
    Flat out disabling the DPMS extension. (so it's still blanking, even if it's not actually turning on power saving mode)
    Putting "xset s off" in ~/.xinitrc
    Disabling powersave with setterm in ~/.xinitrc
    Removing gnome-screensaver and gnome-power-manager from the startup items.

    Any help would be appreciated.

    Edit: Actually, the wireless issue seems to not be related. It disconnected again, and after some searching with the error message I saw in dmesg, it looks like others have been having the same issue. It seems to have been coincidental that it was acting up when I was testing the screen blanking issue, and hasn't given me as much trouble lately, so it seemed like it was correlated.
    Last edited by akb825; 10-25-2010 at 04:00 AM.

  2. #2
    I believe I have found the problem and the solution.

    It appears that the power manager settings were being inherited from gdm until the first keyboard or mouse input was received. I was able to edit /etc/gdm3/greeter.gconf-defaults to include the following lines:

    /apps/gnome-power-manager/timeout/sleep_computer_ac 0
    /apps/gnome-power-manager/timeout/sleep_display_ac 0
    /apps/gnome-screensaver/idle_activation_enabled 0

    These disable the computer sleep, display sleep, and screen saver activation when the login screen is active. (even though I set that computer to automatically log on, it was still applying those settings) It's been over a half an hour since applying these and rebooting, where it normally sleeps the display after 20 minutes, so it seems to have worked.

  3. #3
    After trying again to make sure the first time wasn't a fluke, it appears that solution didn't work. The mouse must have shifted slightly after it started up or something.

    After consulting Google, I was able to strip out Gnome from my login, and have it log into my main account automatically on startup.

    1. Remove gdm3 from the startup with
    sudo update-rc.d gdm3 remove
    2. Create ~/.xinitrc with the following contents:
    #Turn off screen blanking
    xset dpms 0 0 0
    xset s 0 0
    #Start the X session
    3. Add the following to /etc/rc.local:
    su - <user> -c startx
    4. Remove gnome-screensaver and gnome-power-manager from the startup applications

    Once again, this appears to work, but it will take a few more logins and waits tomorrow to double check that it's working and that it isn't a fluke with the mouse moving slightly due to the cord shifting. It did actually execute my .xinitrc file this time (from the errors I got trying to set it up, it was obvious it wasn't being executed when I tried it before) so it seems promising that this is actually working properly.

    Note that I don't consider this an ideal solution. I had to remove a lot of gnome components and it's most likely impossible to log out and log on as a different user graphically. I can't imagine logging yourself in through /etc/rc.local is particularly a good idea in most configurations, either. However, since this is an HTPC, and the whole purpose is to start it and have it log into the default user and be immediately useable, I would consider it acceptable for this particular configuration.

  4. $spacer_open
  5. #4
    After trying again to make sure the first time wasn't a fluke, it appears that

Posting Permissions

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