Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Screen stays on when I shut the laptop lid

  1. #11
    Join Date
    Feb 2006
    Beans
    17

    Re: Screen stays on when I shut the laptop lid

    Deleted the .cache/sessions as you suggested and then rebooted, but makes no difference I'm afraid.
    Seems that when xfce4-power-manager runs for the first time it isn't initialising properly.

    I have 3 workarounds:
    1. Change something in settings
    2. Run xfce4-power-manager --restart
    3. Use the indicator icon to set Mode -> Normal

    I wonder what these have in common.

    I notice (from reading xfce bug 6515) that setting "Nothing" will "send DPMS off signal to the screen if no external monitor is connected". Perhaps, in my case, it thinks I have an external monitor connected first time through. Wonder how I debug this.
    Last edited by rconway; August 18th, 2013 at 08:26 AM.

  2. #12
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Screen stays on when I shut the laptop lid

    To see debugging info:
    Code:
    xfce4-power-manager --debug

  3. #13
    Join Date
    Jul 2013
    Location
    BC, Canada
    Beans
    28
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Screen stays on when I shut the laptop lid

    If nothing seems to work, a temporary fix could be enabling the screen to do an auto shut off after a couple of minutes of inactivity. This isn't a perfect solution, but it could conserve some more battery.

  4. #14
    Join Date
    Feb 2006
    Beans
    17

    Re: Screen stays on when I shut the laptop lid

    Using xfce4-power-manager --debug have can see that the case which fails (first time after boot) shows...

    --snip--
    TRACE[xfpm-manager.c:317] xfpm_manager_lid_changed_cb(): LID close event: ((XfpmLidTriggerAction) LID_TRIGGER_NOTHING)
    TRACE[xfpm-dpms.c:302] xfpm_dpms_force_level(): start
    TRACE[xfpm-dpms.c:315] xfpm_dpms_force_level(): DPMS is disabled
    TRACE[xfpm-power.c:1149] xfpm_power_refresh_adaptor_visible(): Tray icon configuration: : ((XfpmShowIcon) SHOW_ICON_WHEN_BATTERY_PRESENT)
    TRACE[xfpm-power.c:1113] xfpm_power_hide_adapter_icon(): Hide adaptor icon
    TRACE[xfpm-battery.c:286] xfpm_battery_refresh_icon(): Battery state 2
    TRACE[xfpm-power.c:1149] xfpm_power_refresh_adaptor_visible(): Tray icon configuration: : ((XfpmShowIcon) SHOW_ICON_WHEN_BATTERY_PRESENT)
    TRACE[xfpm-power.c:1113] xfpm_power_hide_adapter_icon(): Hide adaptor icon
    TRACE[xfpm-manager.c:344] xfpm_manager_lid_changed_cb(): LID opened: ((XfpmLidTriggerAction) LID_TRIGGER_NOTHING)
    TRACE[xfpm-dpms.c:302] xfpm_dpms_force_level(): start
    TRACE[xfpm-dpms.c:315] xfpm_dpms_force_level(): DPMS is disabled
    --snip--

    ...whereas after restarting xfce4-power-manager I see...

    --snip--
    TRACE[xfpm-manager.c:317] xfpm_manager_lid_changed_cb(): LID close event: ((XfpmLidTriggerAction) LID_TRIGGER_NOTHING)
    TRACE[xfpm-dpms.c:302] xfpm_dpms_force_level(): start
    TRACE[xfpm-dpms.c:321] xfpm_dpms_force_level(): Forcing DPMS mode 3
    TRACE[xfpm-power.c:1149] xfpm_power_refresh_adaptor_visible(): Tray icon configuration: : ((XfpmShowIcon) SHOW_ICON_WHEN_BATTERY_PRESENT)
    TRACE[xfpm-power.c:1113] xfpm_power_hide_adapter_icon(): Hide adaptor icon
    TRACE[xfpm-manager.c:344] xfpm_manager_lid_changed_cb(): LID opened: ((XfpmLidTriggerAction) LID_TRIGGER_NOTHING)
    TRACE[xfpm-dpms.c:302] xfpm_dpms_force_level(): start
    TRACE[xfpm-dpms.c:321] xfpm_dpms_force_level(): Forcing DPMS mode 0
    --snip--

    So the problem is that DPMS is initially disabled - how does this get started?

  5. #15
    Join Date
    Feb 2006
    Beans
    17

    Re: Screen stays on when I shut the laptop lid

    Thanks for the suggestion, but this then causes other annoyances e.g. if watching a movie etc. then the screen goes off.

  6. #16
    Join Date
    Feb 2006
    Beans
    17

    Re: Screen stays on when I shut the laptop lid

    This workaround seems to work...

    Rename /usr/bin/xfce4-power-manager to _xfce4-power-manager

    Create /usr/bin/xfce4-power-manager as the following script...

    --snip--
    #!/bin/bash
    function turn_on_dpms()
    {
    sleep 5
    xset dpms force on
    }
    turn_on_dpms &
    _xfce4-power-manager "$@"
    --snip--

    It's a bit ropey, but seems to work. Of course it will get overwritten on the next update.

  7. #17
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Screen stays on when I shut the laptop lid

    Quote Originally Posted by rconway View Post
    Using xfce4-power-manager --debug have can see that the case which fails (first time after boot) shows...

    --snip--
    TRACE[xfpm-manager.c:317] xfpm_manager_lid_changed_cb(): LID close event: ((XfpmLidTriggerAction) LID_TRIGGER_NOTHING)
    TRACE[xfpm-dpms.c:302] xfpm_dpms_force_level(): start
    TRACE[xfpm-dpms.c:315] xfpm_dpms_force_level(): DPMS is disabled
    TRACE[xfpm-power.c:1149] xfpm_power_refresh_adaptor_visible(): Tray icon configuration: : ((XfpmShowIcon) SHOW_ICON_WHEN_BATTERY_PRESENT)
    TRACE[xfpm-power.c:1113] xfpm_power_hide_adapter_icon(): Hide adaptor icon
    TRACE[xfpm-battery.c:286] xfpm_battery_refresh_icon(): Battery state 2
    TRACE[xfpm-power.c:1149] xfpm_power_refresh_adaptor_visible(): Tray icon configuration: : ((XfpmShowIcon) SHOW_ICON_WHEN_BATTERY_PRESENT)
    TRACE[xfpm-power.c:1113] xfpm_power_hide_adapter_icon(): Hide adaptor icon
    TRACE[xfpm-manager.c:344] xfpm_manager_lid_changed_cb(): LID opened: ((XfpmLidTriggerAction) LID_TRIGGER_NOTHING)
    TRACE[xfpm-dpms.c:302] xfpm_dpms_force_level(): start
    TRACE[xfpm-dpms.c:315] xfpm_dpms_force_level(): DPMS is disabled
    --snip--

    ...whereas after restarting xfce4-power-manager I see...

    --snip--
    TRACE[xfpm-manager.c:317] xfpm_manager_lid_changed_cb(): LID close event: ((XfpmLidTriggerAction) LID_TRIGGER_NOTHING)
    TRACE[xfpm-dpms.c:302] xfpm_dpms_force_level(): start
    TRACE[xfpm-dpms.c:321] xfpm_dpms_force_level(): Forcing DPMS mode 3
    TRACE[xfpm-power.c:1149] xfpm_power_refresh_adaptor_visible(): Tray icon configuration: : ((XfpmShowIcon) SHOW_ICON_WHEN_BATTERY_PRESENT)
    TRACE[xfpm-power.c:1113] xfpm_power_hide_adapter_icon(): Hide adaptor icon
    TRACE[xfpm-manager.c:344] xfpm_manager_lid_changed_cb(): LID opened: ((XfpmLidTriggerAction) LID_TRIGGER_NOTHING)
    TRACE[xfpm-dpms.c:302] xfpm_dpms_force_level(): start
    TRACE[xfpm-dpms.c:321] xfpm_dpms_force_level(): Forcing DPMS mode 0
    --snip--
    Interesting.

    So the problem is that DPMS is initially disabled - how does this get started?
    Anything in your xorg.conf file about DPMS? If not, try adding:
    Code:
    Option "DPMS" "true"
    ...to the "Monitor" section.

  8. #18
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Screen stays on when I shut the laptop lid

    Quote Originally Posted by rconway View Post
    It's a bit ropey, but seems to work. Of course it will get overwritten on the next update.
    I believe that /usr/local/bin is searched first (you can verify be checking your $PATH variable). If so, you could put your script there, that way it won't get over-written.

  9. #19
    Join Date
    Feb 2006
    Beans
    17

    Re: Screen stays on when I shut the laptop lid

    It seems I don't have an xorg.conf, and the man page states that the default value for Option DPMS is enabled.
    Also recall that when I run xfce4-power-manager --restart then it works, and it also works at the login screen.
    It feels a bit like a timing issue when xfce4-power-manager runs during my login sequence.

  10. #20
    Join Date
    Feb 2006
    Beans
    17

    Re: Screen stays on when I shut the laptop lid

    OK, good idea, I'll give that a try. I'm at work now, so won't be until I'm at home this evening.

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

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