While using the stated versions of emacs under the GTK+-3 toolkit, attempting to maximize the initial window results in the editor not updating properly. Emacs acts like the window is maximized, but doesn't display the screen properly (using the previous screen contents) aside from a top-left corner of the same size as the un-maximized window. This problem does not exist when using the Motif or Athena toolkits. $ emerge --info Portage 2.3.0 (python 3.5.2-final-0, default/linux/amd64/13.0/desktop/plasma/systemd, gcc-5.4.0, glibc-2.23-r2, 4.7.2-gentoo x86_64) ================================================================= System uname: Linux-4.7.2-gentoo-x86_64-AMD_Athlon-tm-_Dual_Core_Processor_4450B-with-gentoo-2.2 KiB Mem: 4029516 total, 661100 free KiB Swap: 8388604 total, 8387280 free Timestamp of repository gentoo: Wed, 24 Aug 2016 07:00:01 +0000 sh bash 4.3_p46 ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1 app-shells/bash: 4.3_p46::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.24.0-r1::gentoo dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo, 3.5.2::gentoo dev-util/cmake: 3.6.1::gentoo dev-util/pkgconfig: 0.29.1::gentoo sys-apps/baselayout: 2.2-r1::gentoo sys-apps/openrc: 0.21.3::gentoo sys-apps/sandbox: 2.10-r2::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r2::gentoo sys-devel/automake: 1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo sys-devel/binutils: 2.26.1::gentoo sys-devel/gcc: 4.9.3::gentoo, 5.4.0::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r2::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.7::gentoo (virtual/os-headers) sys-libs/glibc: 2.23-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 mytestbed location: /usr/local/portage masters: gentoo kde location: /var/lib/layman/kde sync-type: laymansync sync-uri: git://anongit.gentoo.org/proj/kde.git masters: gentoo priority: 50 Installed sets: @kde-frameworks, @kde-plasma ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/angband/gamedata/ /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.osuosl.org/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran gdbm gif glamor gtk iconv ipv6 jack jpeg kde kipi lcms ldap libnotify mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qml qt3support qt4 qt5 readline sdl seccomp semantic-desktop session spell sse sse2 ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vdpau vorbis widgets wxwidgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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="sheets" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse sse2 sse3" 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 ublox ubx" INPUT_DEVICES="mouse keyboard wacom evdev joystick vesa" KERNEL="linux" L10N="en-US en de fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4 python3_5" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="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" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Can you report this upstream please?
I was having similar issues, but for me, the problem also occurred even when using the Motif toolkit and additionally caused random segfaults when specifying a custom font using the xft font backend in an init.el containing only: (setq default-frame-alist '((font-backend . "xft") (font . "DejaVu Sans Mono-9")) The culprit seems to be the cairo use-flag. Building emacs from git master using only the --with-cairo configure flag appears to be enough to reproduce the issues. Starting emacs -Q when compiled with cairo reproduces the window resizing problems mentioned in the this bug-report and running emacs --no-site-file --no-site-lisp --no-splash --no-x-resources with the aforementioned elisp statement in init.el makes the segfaults easily reproducible. For example by running M-x report-emacs-bug, M-x package-list-packages or simply by C-x C-f and trying to tab-complete a few folders. The segfaults occur either in the string_hash function in fns.c or somewhere in libfreetype. I can post the GDB backtraces if anyone is interested, but as I'm not sure this is even a Gentoo related issue, I'm submitting the bug upstream. But the bottom-line, for now at least, is that removing the cairo use-flag seems to make Emacs 25 work.
(In reply to Truls Asheim from comment #2) Again, report this upstream, please. They are late in the release process for Emacs 25, but a segmentation fault might be severe enough still to be fixed before the release. > But the bottom-line, for now at least, is that removing the cairo use-flag > seems to make Emacs 25 work. We can use this as a stopgap solution, but the underlying bug should be fixed.
@rnddim, @Truls: Can you please post the value of the system-configuration-options variable in Emacs (C-h v system-configuration-options RET)? Or alternatively, attach the build.log?
(In reply to Ulrich Müller from comment #4) > @rnddim, @Truls: Can you please post the value of the > system-configuration-options variable in Emacs (C-h v > system-configuration-options RET)? Or alternatively, attach the build.log? Sure, here's mine, for 25.1_rc2 with the athena toolkit: system-configuration-options is a variable defined in ‘C source code’. Its value is "--prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/emacs-25.1_rc2 --htmldir=/usr/share/doc/emacs-25.1_rc2/html --libdir=/usr/lib64 --program-suffix=-emacs-25 --infodir=/usr/share/info/emacs-25 --localstatedir=/var --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp --with-gameuser=:gamestat --without-compress-install --with-file-notification=inotify --enable-acl --with-dbus --without-gpm --without-hesiod --without-kerberos --without-kerberos5 --without-xml2 --without-selinux --with-gnutls --without-wide-int --with-zlib --with-sound=alsa --with-x --without-ns --without-gconf --with-gsettings --with-toolkit-scroll-bars --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm --without-imagemagick --with-xft --with-cairo --without-libotf --without-m17n-flt --with-x-toolkit=lucid --without-xaw3d GENTOO_PACKAGE=app-editors/emacs-25.1_rc2 'CFLAGS=-march=native -O2 -pipe' CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed'" And as an aside, I've been able to successfully use 25.1_rc2 with athena for a while now, so that at least works for me.
There are issues with screen updates also with the Athena/Lucid toolkit, therefore I have masked the cairo flag in the base profile now: +# Ulrich Müller <ulm@gentoo.org> (15 Oct 2016) +# The --with-cairo option is considered as experimental by upstream +# and causes problems with updating the X window, bug #592238 +app-editors/emacs cairo +app-editors/emacs-vcs cairo +
I have lifted the cairo use mask for app-editors/emacs-vcs:27 some time ago, see bug 691830. At the same time, for app-editors/emacs the mask is restricted to slots 25 and 26, so it won't affect a future slot 27. There is not much that we can do for slots 25 and 26 on the distro level, therefore closing.