Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xfce can't control display[solved]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Tue Sep 11, 2012 3:34 pm    Post subject: xfce can't control display[solved] Reply with quote

Hello, this problem has bothered me for a long time.

I am running xfce 4.10 on my laptop. After starting the xfce, the xfce power manager can't control the display by defaul, for example, reducing the brightness, switching off the monitor if the laptop is inactive for the time that I set in the preference.
However there are two ways to make it work:
The first is to open the xfce4 power manager and change the time and close. Then the power manager could reduce the brightness of display, put the monitor on sleep and switch it off.
The second is to unplug in and replug in the laptop the ac adaptor. The function comes back too.

So, I want to know what I could do could make the power manager work properly?

Thanks

Environment:
kernel: gentoo-3.5.2
Desktop: xfce4.10
xfce power manager version: 1.2.0


Last edited by pd1986 on Tue Oct 02, 2012 4:17 pm; edited 4 times in total
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Thu Sep 13, 2012 1:31 pm    Post subject: Reply with quote

If you unplug it and power manager starts working, maybe it's set to not change the display while plugged in?
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Thu Sep 13, 2012 2:26 pm    Post subject: Reply with quote

audiodef wrote:
If you unplug it and power manager starts working, maybe it's set to not change the display while plugged in?

I am afraid not. In fact, if I just unplug it, power manager doesn't work either. It starts working after I re-plugin it.
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Thu Sep 27, 2012 8:52 am    Post subject: Reply with quote

I found the problem but I don't know how to fix it

Here are some other ways to make power manager work properly again.
1. quit xfce4-power-manager and restart it again, it will work well
2. run "session and startup" manager, go to tab "session", and change power manager restart style to never or immediately, then when I log in next session, it will work well
3. if I run xfce4 as root, power management will run it perfectly, smoothly.

so, could anyone have some ideas please?
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Thu Sep 27, 2012 10:39 am    Post subject: Reply with quote

Do you get any interesting messages if you run the power manager from a terminal?
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Thu Sep 27, 2012 10:53 am    Post subject: Reply with quote

Hypnos wrote:
Do you get any interesting messages if you run the power manager from a terminal?


No, there is nothing, after running xfce4-power-manager in terminal, it gives nothing. Programme starts and the cursor comes back.
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Thu Sep 27, 2012 11:00 am    Post subject: Reply with quote

Make sure xfce4-power-manager is not running already using "ps"; kill any instances (you may have to revert your setting for restarting it under session dialog). Then invoke in a terminal:

Code:
# xfce4-power-manager --no-daemon --debug --dump

_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Thu Sep 27, 2012 11:01 am    Post subject: Reply with quote

Hypnos wrote:
Make sure xfce4-power-manager is not running already using "ps"; kill any instances (you may have to revert your setting for restarting it under session dialog). Then invoke in a terminal:

Code:
# xfce4-power-manager --no-daemon --debug --dump


What do you mean by "using ps"?
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Thu Sep 27, 2012 11:05 am    Post subject: Reply with quote

Hypnos wrote:
Make sure xfce4-power-manager is not running already using "ps"; kill any instances (you may have to revert your setting for restarting it under session dialog). Then invoke in a terminal:

Code:
# xfce4-power-manager --no-daemon --debug --dump


I can't where is wrong, anyway, I post all the information as followed

Code:
TRACE[xfpm-main.c:203] xfpm_start(): Starting the power manager
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for general-notification
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for lock-screen-suspend-hibernate
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for power-save-on-battery
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for enable-cpu-freq-control
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for critical-power-level
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for show-brightness-popup
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for change-brightness-on-key-events
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for lid-action-on-ac
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for brightness-level-on-battery
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for dpms-enabled
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for dpms-on-battery-sleep
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for dpms-on-battery-off
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for dpms-sleep-mode
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for inactivity-sleep-mode
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for spin-down-on-ac-timeout
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for spin-down-on-battery-timeout
TRACE[xfpm-power.c:1055] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/line_power_AC
TRACE[xfpm-power.c:1002] xfpm_power_add_device():  device added: ((XfpmDeviceType) XFPM_DEVICE_TYPE_LINE_POWER)
TRACE[xfpm-power.c:1055] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/battery_BAT
TRACE[xfpm-power.c:1002] xfpm_power_add_device():  device added: ((XfpmDeviceType) XFPM_DEVICE_TYPE_BATTERY)
TRACE[xfpm-power.c:1013] xfpm_power_add_device(): Battery device detected at : /org/freedesktop/UPower/devices/battery_BAT: ((XfpmDeviceType) XFPM_DEVICE_TYPE_BATTERY)
TRACE[xfpm-button.c:179] xfpm_button_xevent_key(): Grabbed key 124 : ((XfpmButtonKey) BUTTON_POWER_OFF)

(xfce4-power-manager:30009): xfce4-power-manager-WARNING **: could not map keysym 1008ffa8 to keycode

TRACE[xfpm-button.c:179] xfpm_button_xevent_key(): Grabbed key 213 : ((XfpmButtonKey) BUTTON_HIBERNATE)
TRACE[xfpm-button.c:179] xfpm_button_xevent_key(): Grabbed key 150 : ((XfpmButtonKey) BUTTON_SLEEP)
TRACE[xfpm-button.c:179] xfpm_button_xevent_key(): Grabbed key 233 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-button.c:179] xfpm_button_xevent_key(): Grabbed key 232 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_DOWN)
TRACE[xfpm-button.c:179] xfpm_button_xevent_key(): Grabbed key 244 : ((XfpmButtonKey) BUTTON_BATTERY)
TRACE[xfpm-battery.c:150] xfpm_battery_refresh_visible(): visible=TRUE: ((XfpmShowIcon) SHOW_ICON_WHEN_BATTERY_PRESENT)
TRACE[xfpm-battery.c:286] xfpm_battery_refresh_icon(): Battery state 2
TRACE[xfpm-power.c:1148] 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-power.c:1148] 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-disks.c:170] xfpm_disks_get_is_auth_to_spin(): Is auth to spin down disks : 1
TRACE[xfpm-disks.c:147] xfpm_disks_set_spin_timeouts(): On Battery=0 spin_down_enabled=0 timeout=800

** (xfce4-power-manager:30009): DEBUG: Brightness controlled by xrandr, min_level=0 max_level=7
TRACE[xfpm-backlight.c:324] xfpm_backlight_brightness_on_ac_settings_changed(): Alarm on ac timeout changed 120
TRACE[xfpm-backlight.c:345] xfpm_backlight_brightness_on_battery_settings_changed(): Alarm on battery timeout changed 30
---------------------------------------------------
       Xfce power manager version 1.2.0
Without policykit support
With network manager support
With DPMS support
---------------------------------------------------
Can suspend: True
Can hibernate: True
Can spin down hard disks: True
Authorized to suspend: True
Authorized to hibernate: True
Authorized to shutdown: True
Authorized to spin down hard disks: True
Has battery: True
Has brightness panel: True
Has power button: True
Has hibernate button: True
Has sleep button: True
Has LID: True
TRACE[xfpm-battery.c:286] xfpm_battery_refresh_icon(): Battery state 2
TRACE[xfpm-power.c:1148] 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:1148] xfpm_power_refresh_adaptor_visible(): Tray icon configuration: : ((XfpmShowIcon) SHOW_ICON_WHEN_BATTERY_PRESENT)
[/quote]
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Thu Sep 27, 2012 11:11 am    Post subject: Reply with quote

It quits after this output? What if you run it as root?

If it continues to operate when invoked as root, then the problem is permissions.

In the dump it indicates that it was not built with policykit support. AFAIK, you need this support for xfce4-power-manager to "just work."

Please confirm that the "policykit" USE flag is enabled. If isn't, enable it, and rebuild anything affected by this USE flag. Then log out/log back in and see how it works.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Thu Sep 27, 2012 11:23 am    Post subject: Reply with quote

Hypnos wrote:
It quits after this output? What if you run it as root?

If it continues to operate when invoked as root, then the problem is permissions.

In the dump it indicates that it was not built with policykit support. AFAIK, you need this support for xfce4-power-manager to "just work."

Please confirm that the "policykit" USE flag is enabled. If isn't, enable it, and rebuild anything affected by this USE flag. Then log out/log back in and see how it works.


I though of the permission issue too, but I didn't know there is policykit USE flag for power-manager. I re-emerged with policykit. problem solved. Thanks a lot.
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Fri Sep 28, 2012 6:10 am    Post subject: Reply with quote

Hypnos wrote:
It quits after this output? What if you run it as root?

If it continues to operate when invoked as root, then the problem is permissions.

In the dump it indicates that it was not built with policykit support. AFAIK, you need this support for xfce4-power-manager to "just work."

Please confirm that the "policykit" USE flag is enabled. If isn't, enable it, and rebuild anything affected by this USE flag. Then log out/log back in and see how it works.



I am sorry, I was wrong, it doesn't solve the problem perfectly. In fact, it only solved the problem with brightness control, but it can't turn off the display after the time that I set. here are the information that I got after running the same command you told me

peiding@Gentoo ~ $ xfce4-power-manager --no-daemon --debug --dump
TRACE[xfpm-main.c:203] xfpm_start(): Starting the power manager
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for general-notification
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for lock-screen-suspend-hibernate
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for power-save-on-battery
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for enable-cpu-freq-control
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for critical-power-level
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for show-brightness-popup
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for change-brightness-on-key-events
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for lid-action-on-ac
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for brightness-level-on-battery
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for dpms-enabled
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for dpms-on-battery-sleep
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for dpms-on-battery-off
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for dpms-sleep-mode
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for inactivity-sleep-mode
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for spin-down-on-ac-timeout
TRACE[xfpm-xfconf.c:156] xfpm_xfconf_load(): Using default configuration for spin-down-on-battery-timeout
TRACE[xfpm-power.c:1055] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/line_power_AC
TRACE[xfpm-power.c:1002] xfpm_power_add_device(): device added: ((XfpmDeviceType) XFPM_DEVICE_TYPE_LINE_POWER)
TRACE[xfpm-power.c:1055] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/battery_BAT
TRACE[xfpm-power.c:1002] xfpm_power_add_device(): device added: ((XfpmDeviceType) XFPM_DEVICE_TYPE_BATTERY)
TRACE[xfpm-power.c:1013] xfpm_power_add_device(): Battery device detected at : /org/freedesktop/UPower/devices/battery_BAT: ((XfpmDeviceType) XFPM_DEVICE_TYPE_BATTERY)
TRACE[xfpm-button.c:179] xfpm_button_xevent_key(): Grabbed key 124 : ((XfpmButtonKey) BUTTON_POWER_OFF)

(xfce4-power-manager:3567): xfce4-power-manager-WARNING **: could not map keysym 1008ffa8 to keycode

TRACE[xfpm-button.c:179] xfpm_button_xevent_key(): Grabbed key 213 : ((XfpmButtonKey) BUTTON_HIBERNATE)
TRACE[xfpm-button.c:179] xfpm_button_xevent_key(): Grabbed key 150 : ((XfpmButtonKey) BUTTON_SLEEP)
TRACE[xfpm-button.c:179] xfpm_button_xevent_key(): Grabbed key 233 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-button.c:179] xfpm_button_xevent_key(): Grabbed key 232 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_DOWN)
TRACE[xfpm-button.c:179] xfpm_button_xevent_key(): Grabbed key 244 : ((XfpmButtonKey) BUTTON_BATTERY)
TRACE[xfpm-battery.c:150] xfpm_battery_refresh_visible(): visible=TRUE: ((XfpmShowIcon) SHOW_ICON_WHEN_BATTERY_PRESENT)
TRACE[xfpm-battery.c:286] xfpm_battery_refresh_icon(): Battery state 2
TRACE[xfpm-power.c:1148] 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-polkit.c:368] xfpm_polkit_init_data(): Using unix session polkit subject
TRACE[xfpm-polkit.c:455] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.upower.suspend is authorized=TRUE
TRACE[xfpm-polkit.c:455] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.upower.hibernate is authorized=TRUE
TRACE[xfpm-power.c:1148] 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-polkit.c:455] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.udisks.drive-set-spindown is authorized=TRUE
TRACE[xfpm-disks.c:170] xfpm_disks_get_is_auth_to_spin(): Is auth to spin down disks : 1
TRACE[xfpm-disks.c:147] xfpm_disks_set_spin_timeouts(): On Battery=0 spin_down_enabled=0 timeout=800

** (xfce4-power-manager:3567): DEBUG: Brightness controlled by xrandr, min_level=0 max_level=7
TRACE[xfpm-backlight.c:324] xfpm_backlight_brightness_on_ac_settings_changed(): Alarm on ac timeout changed 11
TRACE[xfpm-backlight.c:345] xfpm_backlight_brightness_on_battery_settings_changed(): Alarm on battery timeout changed 30
TRACE[xfpm-dpms.c:74] xfpm_dpms_set_timeouts(): Settings dpms: standby=60 suspend=0 off=900

---------------------------------------------------
Xfce power manager version 1.2.0
With policykit support
With network manager support
With DPMS support
---------------------------------------------------
Can suspend: True
Can hibernate: True
Can spin down hard disks: True
Authorized to suspend: True
Authorized to hibernate: True
Authorized to shutdown: True
Authorized to spin down hard disks: True
Has battery: True
Has brightness panel: True
Has power button: True
Has hibernate button: True
Has sleep button: True
Has LID: True
TRACE[xfpm-battery.c:286] xfpm_battery_refresh_icon(): Battery state 2
TRACE[xfpm-power.c:1148] 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:363] xfpm_manager_alarm_timeout_cb(): Alarm inactivity timeout id 1
TRACE[xfpm-backlight.c:113] xfpm_backlight_dim_brightness(): Current brightness level before dimming : 7, new 2
TRACE[xfpm-manager.c:363] xfpm_manager_alarm_timeout_cb(): Alarm inactivity timeout id 2
TRACE[xfpm-battery.c:286] xfpm_battery_refresh_icon(): Battery state 2
TRACE[xfpm-power.c:1148] 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-polkit.c:238] xfpm_polkit_free_data(): Destroying Polkit data
TRACE[xfpm-backlight.c:277] xfpm_backlight_reset_cb(): Alarm reset, setting level to 7
TRACE[xfpm-battery.c:286] xfpm_battery_refresh_icon(): Battery state 2
TRACE[xfpm-power.c:1148] 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
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Fri Sep 28, 2012 7:13 am    Post subject: Reply with quote

Can you turn off the screen by invoking

Code:
# xset dpms force off


on the commandline? If that doesn't work, xfce4-power-manager won't be able to turn off the screen as it uses the same method.

You can also double-check that X respects the DPMS timing settings (see the xset man page)
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Fri Sep 28, 2012 7:55 am    Post subject: Reply with quote

Hypnos wrote:
Can you turn off the screen by invoking

Code:
# xset dpms force off


on the commandline? If that doesn't work, xfce4-power-manager won't be able to turn off the screen as it uses the same method.

You can also double-check that X respects the DPMS timing settings (see the xset man page)


yes, of course. this command can turn off the screen.

when I said it doesn't work, I mean, it can't turn off the screen just after restarting a new session. but It works when I restart the xfce4-power-management in the same session.
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Fri Sep 28, 2012 11:27 am    Post subject: Reply with quote

It seems like you're still having a permissions problem originating with xfce4-session, though it's not immediately clear from your debug output what exactly that problem is.

You mentioned that you rebuilt xfce4-power-manager with the "policykit" USE flag; did you remember to rebuild all the packages with this USE flag? This includes xfce4-session.

You may also need to enable the "consolekit" USE flag if you have not already done so. xfce4-session has a USE flag for this as well.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Fri Sep 28, 2012 11:39 am    Post subject: Reply with quote

Hypnos wrote:
It seems like you're still having a permissions problem originating with xfce4-session, though it's not immediately clear from your debug output what exactly that problem is.

You mentioned that you rebuilt xfce4-power-manager with the "policykit" USE flag; did you remember to rebuild all the packages with this USE flag? This includes xfce4-session.

You may also need to enable the "consolekit" USE flag if you have not already done so. xfce4-session has a USE flag for this as well.


Thanks a lot. I will even try to rebuild all packages with these two consolekit.
However, if it's like what you said, why the power-manager works very well. I restart it under normal user.
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Fri Sep 28, 2012 11:45 am    Post subject: Reply with quote

Hypnos wrote:
It seems like you're still having a permissions problem originating with xfce4-session, though it's not immediately clear from your debug output what exactly that problem is.

You mentioned that you rebuilt xfce4-power-manager with the "policykit" USE flag; did you remember to rebuild all the packages with this USE flag? This includes xfce4-session.

You may also need to enable the "consolekit" USE flag if you have not already done so. xfce4-session has a USE flag for this as well.


I just tried, it doesn't fix the problem.

I add consolekit and policykit as the global USE flag and update all packages with them, including xfce4-session. As you mentioned, xfce4-session wasn't compiled with the 2 USE flags last time.
To be sure, I re-emerge again xfce4-power-manager. Then I restart a new session, it still can't turn off the screen.

What's the problem with the forum server?
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Fri Sep 28, 2012 11:53 am    Post subject: Reply with quote

This consolekit/policykit stuff is not so easy to debug.

One theory is that because xfce4-session does not have consolekit/policykit support, the polkit daemon is not being started. However, if you start xfce4-power-manager yourself, that does start the polkit daemon, since it has that support built in now ...

My process listing for polkit:

Code:
# ps awux | grep polkit
root      2345  0.0  0.1 141548  4428 ?        Sl   19:01   0:00 /usr/libexec/polkitd --no-debug
hypnos   2973  0.0  0.1 132224  6036 ?        Sl   19:01   0:00 /usr/libexec/polkit-gnome-authentication-agent-1


and consolekit:

Code:
# ps awux | grep console
root      2275  0.0  0.0 125172  3656 ?        Ssl  19:01   0:00 /usr/sbin/console-kit-daemon


I have consolekit enabled in the default run level.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Fri Sep 28, 2012 12:00 pm    Post subject: Reply with quote

Hypnos wrote:
This consolekit/policykit stuff is not so easy to debug.

One theory is that because xfce4-session does not have consolekit/policykit support, the polkit daemon is not being started. However, if you start xfce4-power-manager yourself, that does start the polkit daemon, since it has that support built in now ...

My process listing for polkit:

Code:
# ps awux | grep polkit
root      2345  0.0  0.1 141548  4428 ?        Sl   19:01   0:00 /usr/libexec/polkitd --no-debug
hypnos   2973  0.0  0.1 132224  6036 ?        Sl   19:01   0:00 /usr/libexec/polkit-gnome-authentication-agent-1


and consolekit:

Code:
# ps awux | grep console
root      2275  0.0  0.0 125172  3656 ?        Ssl  19:01   0:00 /usr/sbin/console-kit-daemon


I have consolekit enabled in the default run level.


I just tried, it doesn't fix the problem.

I add consolekit and policykit as the global USE flag and update all packages with them, including xfce4-session. As you mentioned, xfce4-session wasn't compiled with the 2 USE flags last time.
To be sure, I re-emerge again xfce4-power-manager. Then I restart a new session, it still can't turn off the screen.

I run the command you showed, I got this.
Code:
peiding@Gentoo ~ $ ps awux | grep polkit
root      2084  0.0  0.1 209836  3500 ?        Sl   Sep27   0:00 /usr/libexec/polkitd --no-debug
peiding  18900  0.0  0.3 195160  6328 tty1     Sl   13:46   0:00 /usr/libexec/polkit-gnome-authentication-agent-1
peiding  19790  0.0  0.0  12192   912 pts/0    S+   13:54   0:00 grep --color=auto polkit

I have one more line.

I start X server by startx, is it the source of the problem? In my ".xinitrc", I wrote
Code:
exec ck-launch-session startxfce4
as taught in the guide.

What's the problem with the forum server?
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Fri Sep 28, 2012 12:02 pm    Post subject: Reply with quote

about the consolekit
Code:
peiding@Gentoo ~ $ ps awux | grep consolekit
peiding  20508  0.0  0.0  12188   912 pts/1    S+   14:01   0:00 grep --color=auto consolekit
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Fri Sep 28, 2012 12:19 pm    Post subject: Reply with quote

pd1986 wrote:
Code:
exec ck-launch-session startxfce4

This is no longer correct. You want:

Code:
exec startxfce4 --with-ck-launch


See the updated Gentoo XFCE guide.

pd1986 wrote:
about the consolekit
Code:
peiding@Gentoo ~ $ ps awux | grep consolekit
peiding  20508  0.0  0.0  12188   912 pts/1    S+   14:01   0:00 grep --color=auto consolekit

You need to grep "console-kit" not "consolekit" (note the hyphen). You can ensure it's enabled via

Code:
# rc-update show | grep consolekit
           consolekit |      default


***

pd1986 wrote:
What's the problem with the forum server?

Frustrating, isn't it?
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Fri Sep 28, 2012 12:56 pm    Post subject: Reply with quote

Hypnos wrote:
pd1986 wrote:
Code:
exec ck-launch-session startxfce4

This is no longer correct. You want:

Code:
exec startxfce4 --with-ck-launch


See the updated Gentoo XFCE guide.


Thanks a lot. I didn't know that

pd1986 wrote:
about the consolekit
Code:
peiding@Gentoo ~ $ ps awux | grep consolekit
peiding  20508  0.0  0.0  12188   912 pts/1    S+   14:01   0:00 grep --color=auto consolekit


I corrected the command and run again. That's the output
Code:
peiding@Gentoo ~ $ ps awux | grep console
root      2005  0.0  0.1 1042888 3024 ?        Ssl  Sep27   0:00 /usr/sbin/console-kit-daemon
peiding  23443  0.0  0.0  12192   916 pts/1    S+   14:28   0:00 grep --color=auto console


Quote:

You need to grep "console-kit" not "consolekit" (note the hyphen). You can ensure it's enabled via

Code:
# rc-update show | grep consolekit
           consolekit |      default


Yes, it's on.


Quote:
Frustrating, isn't it?


Yes, absolutely

I corrected the way of xfce start. problem isn't fixed
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Fri Sep 28, 2012 1:15 pm    Post subject: Reply with quote

The last easy thing to check is that you have a valid consolekit seat; my output:

Code:
# ck-list-sessions
Session1:
   unix-user = '1000'
   realname = '(null)'
   seat = 'Seat1'
   session-type = ''
   active = TRUE
   x11-display = ':0.0'
   x11-display-device = '/dev/tty7'
   display-device = ''
   remote-host-name = ''
   is-local = TRUE
   on-since = '2012-09-28T10:01:41.733670Z'
   login-session-id = '10'


The keys here are that "active" and "is-local" are "TRUE" .

If this is consistent, you might have to dig in the xfce4-power-manager code to see exactly what the failure point is ...
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Fri Sep 28, 2012 1:34 pm    Post subject: Reply with quote

Hypnos wrote:
The last easy thing to check is that you have a valid consolekit seat; my output:

Code:
# ck-list-sessions
Session1:
   unix-user = '1000'
   realname = '(null)'
   seat = 'Seat1'
   session-type = ''
   active = TRUE
   x11-display = ':0.0'
   x11-display-device = '/dev/tty7'
   display-device = ''
   remote-host-name = ''
   is-local = TRUE
   on-since = '2012-09-28T10:01:41.733670Z'
   login-session-id = '10'


The keys here are that "active" and "is-local" are "TRUE" .

If this is consistent, you might have to dig in the xfce4-power-manager code to see exactly what the failure point is ...


yes, consistent. my output is
Code:
Session1:
   unix-user = '1000'
   realname = '(null)'
   seat = 'Seat1'
   session-type = ''
   active = FALSE
   x11-display = ''
   x11-display-device = ''
   display-device = '/dev/tty1'
   remote-host-name = ''
   is-local = TRUE
   on-since = '2012-09-28T12:38:25.446302Z'
   login-session-id = '8'
   idle-since-hint = '2012-09-28T12:38:56.831787Z'
Session2:
   unix-user = '1000'
   realname = '(null)'
   seat = 'Seat1'
   session-type = ''
   active = TRUE
   x11-display = ':0'
   x11-display-device = '/dev/tty7'
   display-device = '/dev/tty1'
   remote-host-name = ''
   is-local = TRUE
   on-since = '2012-09-28T12:38:33.230567Z'
   login-session-id = '8'


Apparently, Session2 has active and is-local both TRUE. Is it possible that this issue could disappear if I use graphic login program?
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Fri Sep 28, 2012 1:56 pm    Post subject: Reply with quote

just tried, negative
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum