Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 435344 - gnome-base/gdm-3.4.1-r1[systemd]: cannot power off the system
Summary: gnome-base/gdm-3.4.1-r1[systemd]: cannot power off the system
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-17 16:30 UTC by Alexander E. Patrakov
Modified: 2013-01-26 16:17 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander E. Patrakov 2012-09-17 16:30:22 UTC
gdm uses UPower to power off or suspend the system. However, since the conversion of plokit to javascript-based rules, there is no rule installed that allows gdm to communicate with UPower. Thus, no poweroff/suspend.

Reproducible: Always

Steps to Reproduce:
1. Boot the system with gdm installed
2. Click the power menu
3. Click Shutdown or Reboot
Actual Results:  
On step 2, I see "Shutdown" and "Reboot", but don't see "Suspend". On step 3, there is no effect.

Expected Results:  
Three menu items ("Shutdown", "Reboot", "Suspend") that work as advetrised.

# emerge --info
Portage 2.1.11.17 (default/linux/x86/10.0/desktop/gnome, gcc-4.6.3, glibc-2.15-r2, 3.4.2-gentoo-r1 i686)
=================================================================
System uname: Linux-3.4.2-gentoo-r1-i686-Intel-R-_Core-TM-2_CPU_6420_@_2.13GHz-with-gentoo-2.2
Timestamp of tree: Sun, 16 Sep 2012 05:15:01 +0000
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.3
sys-devel/binutils:       2.22.90
sys-devel/gcc:            4.5.3-r2, 4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.5 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo x-portage renpy-games
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe -fno-strict-aliasing -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -pipe -fno-strict-aliasing -fomit-frame-pointer"
DISTDIR="/home/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/home/packages/x86"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/home/build"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/gentoo-renpy-games"
SYNC="rsync://mirror.yandex.ru/gentoo-portage"
USE="X a52 aac acl acpi alsa amr avahi bash-completion berkdb bluetooth bluray branding bzip2 cairo cdda cddb cdr cjk cli colord consolekit cracklib crypt cups cxx dbus djvu dri dts dvd dvdr eds emboss encode evo exif ffmpeg firefox flac fontconfig fortran gdbm gif gnome gnome-keyring gnome-online-accounts gphoto2 gstreamer gtk gtk3 iconv icu idn introspection ipv6 jack jpeg lcms ldap libnotify mad matroska mmx mmxext mng modules mp3 mp4 mpeg mudflap musepack nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pppd pulseaudio qt3support readline scanner sdl session socialweb spell sse sse2 sse3 ssl ssse3 startup-notification svg systemd tcpd theora tiff truetype udev udisks unicode upnp upower usb v4l v4l2 vaapi vim-syntax vorbis wavpack webkit wxwidgets x264 x86 xattr xcb xface xinerama xml xv xvid zeitgeist zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="btrfs crypt lvm" DVB_CARDS="tda10046lifeview" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="x86_64 arm cris i386 m68k microblaze mips mips64 mips64el mipsel ppc ppc64 ppcemb sh4 sh4eb sparc sparc64" QEMU_USER_TARGETS="alpha arm armeb cris i386 m68k microblaze mips mipsel ppc ppc64 ppc64abi32 sh4 sh4eb sparc sparc32plus sparc64 x86_64" RUBY_TARGETS="ruby18 ruby19" SANE_BACKENDS="gt68xx" USERLAND="GNU" VIDEO_CARDS="intel nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.2"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Alexander E. Patrakov 2012-09-17 17:01:34 UTC
For me, this rule is sufficient:


polkit.addRule(function(action, subject) {
    if (action.id.indexOf('org.freedesktop.upower.') == 0 && subject.user == 'gdm') return polkit.Result.YES;
});

However, if I also add these two logging statements before the closing "})", there is some other noise that you may want to consider:


    polkit.log("action=" + action);
    polkit.log("subject=" + subject);
Comment 2 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-09-23 00:08:39 UTC
Is this really specific to gdm? For example, can you suspend or power off from your normal user in gnome-shell using the upper-right corner menu? (I remember that when I tried out systemd, I could not suspend or power off from a graphical session.)
Comment 3 Alexander E. Patrakov 2012-09-23 14:20:45 UTC
Yes, it is specific to gdm.

If I allow gdm access to org.freedesktop.upower.* and org.freedesktop.login1.*, then the ordinary user will be able to shut down the system, too, from his session.

I have not tested other display managers, but I don't see the point, as they still use ConsoleKit.
Comment 4 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-09-23 16:51:49 UTC
Please try setting /etc/pam.d/gdm-welcome to

auth       optional    pam_env.so
auth       include     system-local-login
account    include     system-local-login
password   include     system-local-login
session    include     system-local-login

and see if that is sufficient to fix the power-off problem. (In theory, upower's default polkit rules should allow any active user session.)
Comment 5 bjorn 2012-09-24 04:53:58 UTC
(In reply to comment #4)

this 1 work a bit
> auth       include     system-local-login
caus a crash . u see the mouse spinning but black screen

> account    include     system-local-login
> password   include     system-local-login
> session    include     system-local-login
u can reboot/halt . but u need to enter the root passw

can this bug be relation to the fact u can swith users.
same black screen and the spinning mouse visible in all tty consoles ?
Comment 6 Alexander E. Patrakov 2012-09-24 17:15:19 UTC
I confirm that the proposed PAM file leads to a black screen with a spinning cursor.
Comment 7 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-09-27 08:56:13 UTC
Please test whether gdm-3.4.1-r2 fixes the problem
Comment 8 Alexander E. Patrakov 2012-09-28 13:51:38 UTC
Works partially: I can power off the system if nobody ever tried to login. However, if somebody logged in then out, then an authorization dialog is popped up, about needing administrator password when shutting down the system with logged-in users.

As the symptoms are the same as with bug 435042, I think that the remaining parts of these two bugs are duplicates. You can close one of them.
Comment 9 Gilles Dartiguelongue (RETIRED) gentoo-dev 2013-01-22 22:43:04 UTC
Please try with gdm-3.6.
Comment 10 Alexander E. Patrakov 2013-01-26 16:17:50 UTC
Fixed with gdm-3.6