Short story: after a lot of xrandr executions it stop working and leave screen in last used mode. chgres and Ctrl-Alt-+/- doesn't help. Restarting X solve issue for some time, then it happens again. Long story: I'm using X configured to simulate a lot of open consoles using different virtual desktops, some with full-screen xterms, some with graphic app like Opera. Main mode is 1280x1024@85, but for one virtual desktop (with Opera) I use 1024x768@85 because 1280x1024 is uncomfortable mode for most websites optimized for 800x600 or 1024x768. To switch video mode automatically I run: xrandr -s 1024x768 -r 85 when I'm switching into virtual desktop with opera and xrandr -s 1280x1024 -r 85 when I'm switching from that virtual desktop to any another. I'm also aware about chgres utility and Ctrl-Alt-+/-, but they doesn't disable scrolling "real 1280x1024" window inside small 1024x768 window when mouse near screen edges, so I prefer to use xrandr. After 3-4 hours of work with a lot of switching to and from virtual desktop with Opera xrandr stop doing anything and leave me in last used mode. It doesn't return error status in $?, it doesn't print any messages in stderr or system log files or Xorg log files. Emerging xrandr with USE=debug doesn't change anything. But I notice chgres show some error information, so here it is: home ~ # chgres set 1280x1024@157500 X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 134 (XFree86-VidModeExtension) Minor opcode of failed request: 10 (XF86VidModeSwitchToMode) Value in failed request: 0xca Serial number of failed request: 14 Current serial number in output stream: 17 home ~ # chgres list 1280x1024@157500 1024x768@100940 1152x864@119650 1152x864@108000 1152x864@96770 1152x864@81620 1152x864@64680 1152x864@58290 1152x864@143470 800x600@56250 800x600@49500 800x600@50000 800x600@45500 800x600@40000 800x600@36000 800x600@116410 800x600@83950 800x600@68180 800x600@60060 640x480@36000 640x480@31500 640x480@31500 640x480@25180 640x480@72850 640x480@52410 640x480@43160 640x480@37890 640x400@28070 640x400@24920 512x384@19680 400x300@24750 400x300@22330 320x240@15750 320x240@12590 320x200@13100 320x200@12590 home ~ # xrandr -q SZ: Pixels Physical Refresh 0 1280 x 1024 ( 271mm x 217mm ) 85 *1 1024 x 768 ( 271mm x 217mm ) *85 2 1152 x 864 ( 271mm x 217mm ) 85 75 70 60 47 43 100 3 800 x 600 ( 271mm x 217mm ) 85 75 72 70 60 56 160 120 100 90 4 640 x 480 ( 271mm x 217mm ) 85 75 72 60 160 120 100 90 5 640 x 400 ( 271mm x 217mm ) 75 60 6 512 x 384 ( 271mm x 217mm ) 75 7 400 x 300 ( 271mm x 217mm ) 75 60 8 320 x 240 ( 271mm x 217mm ) 75 60 9 320 x 200 ( 271mm x 217mm ) 75 60 Current rotation - normal Current reflection - none Rotations possible - normal Reflections possible - none home ~ # xrandr -s 0 # doesn't change anything home ~ # xrandr -s 1280x1024 -r 85 # also doesn't change anything I'm using: x11-base/xorg-x11-7.0-r1 x11-apps/xrandr-1.0.2 x11-libs/libXrandr-1.1.1 Gentoo Base System version 1.6.15 Portage 2.1-r1 (hardened/x86/2.6, gcc-3.4.6, glibc-2.3.6-r4, 2.6.14-hardened-r8 i686) ================================================================= System uname: 2.6.14-hardened-r8 i686 AMD Athlon(tm) XP 3000+ app-admin/eselect-compiler: [Not Present] dev-lang/python: 2.3.5-r2, 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-xp -pipe -ftracer -fprefetch-loop-arrays" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /service /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -march=athlon-xp -pipe -ftracer -fprefetch-loop-arrays" DISTDIR="/usr/portage-distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo/ http://130.59.10.34/mirror/gentoo/ http://gentoo.zie.pg.gda.pl" LANG="ru_RU.KOI8-R" LINGUAS="en ru" PKGDIR="/usr/portage-packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage-power /usr/local/portage-rusxmms" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X Xaw3d aac acpi aim alsa apache2 arts asf avi bash-completion berkdb bitmap-fonts bzip2 cdr crypt cscope curl dga divx4linux dlloader dri dts dvd dvdr dvdread encode ffmpeg flac flash gd gdbm gif gnutls gpgme gtk gtk2 hardened icq idn imagemagick imap imlib irc jabber javascript jpeg kdeenablefinal lirc lm_sensors lzo mad mailbox mbox mmx mmxext mng motif mp3 mpeg msn mysql ncurses nls nptl nptlonly ogg opengl oss pam pcre perl pic png pwdb qt quicktime rcc readline rss rtc samba sdl silc slang spell sse ssl svg sysfs tcltk tcpd tiff truetype truetype-fonts type1-fonts userlocales vorbis win32codecs x86 xinetd xmms xorg xv xvid yahoo zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_en linguas_ru lirc_devices_serial userland_GNU video_cards_vesa video_cards_fbdev video_cards_radeon video_cards_fglrx" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
If you aren't using any binary drivers, could you add xorg-server and all the drivers to package.keywords and try 7.1?
Nooo, sorry. I'm using ati-drivers-8.20.8 and my X is too slooow with default 'radeon' driver and doesn't support TvOut (at least this was true for previous non-modular Xorg). :(
Maybe you've any ideas about how to run xrandr (or X) in debug mode, so we get any information about what's going wrong?
I'd rather move this upstream once you can try it on 7.1, though who knows when ATI will release compatible drivers...
Some additional info. Some time ago I've installed ati-drivers-8.26.18-r1, and with these drivers when this bug happens my X and kernel hangs (keyboard don't work at all, POWER button also not work so I think kernel completelly hangs and I forced to reboot using RESET button). After disgrade to ati-drivers-8.23.7 bug behaviour restored - xrandr doesn't change video modes anymore, but nothing hangs. I've also tried ati-drivers-8.27.10, but looks like this driver doesn't compatible with xorg-7.0 - is it for 7.1?
Update: after my last comment this bug happens twice: first time it result in kernel hang (even SysRq not work, I'm using USB keyboard) and second time it just stop switching video resolution, without hangs. Interesting thing here is what with older drivers (8.20.8) this bug happens a lot of times and NEVER hangs, with newer drivers (8.26.18-r1) it also happens a lot of times and ALWAYS hangs, with current drivers (8.23.7) it happens 3 times for now, 1 with hangs and 2 without. P.S. While xrandr don't change anything now, Ctrl-Alt-[+/-] is still working.
I've compared strace output for successful and failed xrandr runs. Only significant difference is last value returned by X server - here is last 3 commands from both strace outputs: --- failed xrandr output: --- write(3, "\x02\x00\x04\x00\xca\x00\x00\x00\x00\x08\x00\x00\x00\x00"..., 52) = 52 read(3, "\x01\x01\x0d\x00\x00\x00\x00\x00\x63\x6a\xa0\xe9\x1c\x19"..., 32) = 32 exit_group(0) = ? --- successful xrandr output: --- write(3, "\x02\x00\x04\x00\xca\x00\x00\x00\x00\x08\x00\x00\x00\x00"..., 52) = 52 read(3, "\x74\x01\x0c\x00\x93\x3e\xf3\xe9\xcd\xa5\xf3\xe9\xca\x00"..., 32) = 32 read(3, "\x74\x01\x0d\x00\x93\x3e\xf3\xe9\xcd\xa5\xf3\xe9\xca\x00"..., 32) = 32 read(3, "\x16\xc1\x0d\x00\xca\x00\x00\x00\xca\x00\x00\x00\x00\x00"..., 32) = 32 read(3, "\x01\x00\x0d\x00\x00\x00\x00\x00\xd6\xa5\xf3\xe9\xcd\xa5"..., 32) = 32 exit_group(0) = ? Maybe xrandr doesn't check value returned by last executed X command for possible error and doesn't output error code/message? Can somebody familiar with C and X programming check xrandr source and, if I'm right about this, give me small patch which give a chance to see error code/message next time this bug happens?
Ok, I've important update. I've just upgraded from Radeon 9800 Pro to GeForce 7950 GT and so switched from ati-drivers to xorg's driver 'nv' (because nvidia-drivers masked in hardened profile). This bug is still exists! After working some time and executing xrandr to switch between 1280x1024@85 and 1024x768@85 many times xrandr just stop working leaving me is current video mode. Ctrl-Alt-[+/-] stop working too, so I can't even manually change video mode. So, this bug isn't related to ATI or NVIDIA drivers, it's related to Xorg and xrandr. My versions (current x86): x11-apps/xrandr-1.0.2 x11-base/xorg-server-1.1.1-r1 x11-base/xorg-x11-7.1 Maybe this bug should be reported to Xorg developers?
(In reply to comment #8) > Maybe this bug should be reported to Xorg developers? Yeah, probably. Find/file a bug at https://bugs.freedesktop.org and post the link here, please.
https://bugs.freedesktop.org/show_bug.cgi?id=6502
Thanks, good find!