Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 368109 - sys-kernel/gentoo-sources: After upgrade to 2.6.39 the console framebuffer doesn't work anymore.
Summary: sys-kernel/gentoo-sources: After upgrade to 2.6.39 the console framebuffer do...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 7 votes (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard: gentoo-sources-2.6.39-r2
Keywords:
: 368821 370573 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-19 22:28 UTC by Henrique Dias
Modified: 2011-08-30 03:14 UTC (History)
33 users (show)

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


Attachments
gentoo-sources-2.6.39 kernel config (config-2.6.39,60.07 KB, application/octet-stream)
2011-05-20 11:40 UTC, Serge Koksharov
Details
2.6.39 kernel .config (kernel-config-x86_64-2.6.39-gentoo,63.89 KB, application/octet-stream)
2011-05-20 21:02 UTC, Y Liu
Details
4210_fb-reverse.patch (4210_fb-reverse.patch,2.75 KB, patch)
2011-05-23 12:05 UTC, iGentoo
Details | Diff
mutex-unlock.patch (mutex-unlock.patch,1001 bytes, patch)
2011-05-24 14:13 UTC, iGentoo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henrique Dias 2011-05-19 22:28:01 UTC
I'm using a framebuffer console with vesafb but after upgrading my kernel to 2.6.39-gentoo the framebuffer console is not working anymore.

Reproducible: Always

Steps to Reproduce:
1. Boot
Actual Results:  
black screen.

Expected Results:  
Display boot splash image.

Portage 2.1.9.49 (default/linux/amd64/10.0/desktop, gcc-4.5.2, glibc-2.13-r2, 2.6.39-gentoo x86_64)
=================================================================
System uname: Linux-2.6.39-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7250_@_2.00GHz-with-gentoo-2.0.2
Timestamp of tree: Thu, 19 May 2011 18:00:01 +0000
app-shells/bash:          4.2_p10
dev-lang/python:          2.7.1-r1, 3.1.3-r1, 3.2
dev-util/cmake:           2.8.4-r1
sys-apps/baselayout:      2.0.2
sys-apps/openrc:          0.8.2-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21
sys-devel/gcc:            4.5.2
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82
sys-kernel/linux-headers: 2.6.38 (virtual/os-headers)
sys-libs/glibc:           2.13-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA AdobeFlash-10.1 AdobeFlash-10"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://rsync.de.gentoo.org/ 		http://de-mirror.org/distro/gentoo/ 		http://gentoo.mirror.pw.edu.pl/ 		http://gentoo.tiscali.nl/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,--as-needed"
LINGUAS="en pt"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx db dbus dri dts dvd dvdr emboss encode exif fam firefox flac gdbm gdu gif gnome gpm gtk iconv ipv6 jpeg lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support readline sdl session spell sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype udev unicode usb vorbis x264 xcb xml xorg xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" 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="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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 keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en pt" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia%" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Serge Koksharov 2011-05-20 11:39:13 UTC
Confirmed. Got unbootable system too after upgrading kernel to 2.6.39. Version 2.6.38-gentoo-r5 with same kernel config works fine. I have AMD64 system and using radeon Kernel Mode Setting.

Screenshot of the lockup: http://img10.imageshack.us/img10/5489/hangl.jpg

Linux breeze 2.6.38-gentoo-r5 #1 SMP Fri May 13 15:00:28 MSD 2011 x86_64 AMD Athlon(tm) 64 Processor 3000+ AuthenticAMD GNU/Linux

Portage 2.1.9.42 (default/linux/amd64/10.0, gcc-4.4.5, libc-0-r0, 2.6.38-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.38-gentoo-r5-x86_64-AMD_Athlon-tm-_64_Processor_3000+-with-gentoo-2.0.2
Timestamp of tree: Fri, 20 May 2011 07:00:01 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/cmake:      2.8.4-r1
sys-apps/baselayout: 2.0.2
sys-apps/openrc:     0.8.2-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1-r1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
sys-kernel/linux-headers: 2.6.36.1
sys-libs/glibc:      2.12.2
virtual/os-headers:  0
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.bloodhost.ru/ ftp://mirror.bytemark.co.uk/gentoo/ ftp://212.219.56.131/sites/www.ibiblio.org/gentoo/ ftp://ftp.df.lth.se/pub/gentoo/ http://gentoo.mneisen.org/"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac aalib acl acpi alsa amd64 apache2 bash-completion bluetooth bzip2 cairo caps cdda cddb cdparanoia cdr cli consolekit cracklib crypt cscope cups curl cxx dbus dga directfb djvu dri dvd dvdr encode exif fbcon ffmpeg firefox flac fontconfig foomaticdb ftp gdbm ggi gif glut gphoto2 gpm gtk handbook hddtemp iconv icq imap imlib ipv6 javascript jpeg jpeg2k kde lame lcms libcaca libnotify lm_sensors lzma mad maildir matroska mmap mmx mng modules mozilla mp3 mpeg mudflap multilib musicbrainz ncurses nocd nptl nptlonly offensive ogg opengl openmp pam pcre pda pdflib pic pie plasma png policykit posix ppds pppd qt4 readline recode rss sasl sdl semantic-desktop session sharedmem skey sndfile sockets socks5 sqlite sse sse2 ssl startup-notification svg sysfs syslog tcpd theora threads tidy tiff truetype udev unicode usb v4l v4l2 vim-syntax vnc vorbis wmf x264 xattr xcb xcomposite xinetd xorg xosd xpm xprint xscreensaver xv xvid zlib" 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" 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 auth_digest authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache 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" APACHE2_MPMS="worker" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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 keyboard mouse ps2mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIRC_DEVICES="avermedia98" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon v4l" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Serge Koksharov 2011-05-20 11:40:28 UTC
Created attachment 274097 [details]
gentoo-sources-2.6.39 kernel config
Comment 3 Henrique Dias 2011-05-20 14:14:48 UTC
With 2.6.38-gentoo-r5 kernel works fine. To boot with 2.6.39 I add the option video=vesafb:off to the grub.conf.


title=Gentoo Linux (2.6.39-gentoo)
        root (hd0,0)
        kernel (hd0,0)/kernel-genkernel-x86_64-2.6.39-gentoo ro root=LABEL=/ video=vesafb:off splash=silent,theme:natural_gentoo console=tty1 quiet
        initrd (hd0,0)/initramfs-genkernel-x86_64-2.6.39-gentoo
Comment 4 Alon Bar-Lev 2011-05-20 18:05:34 UTC
confirmed.
Comment 5 Y Liu 2011-05-20 21:01:03 UTC
I have the same issue. I followed this thread and also in the forum (http://forums.gentoo.org/viewtopic-t-879077.html) as well, but dont solve the issue for me.

I can boot into the system until I disabled the Framebuffer Console Decorations:
  <*> Framebuffer Console support
      [ ]   Support for the Framebuffer Console Decorations

So now the kernel and initrd can boot, just without and any framebuffer decorations, which is not a big problem for me.

My grub:

kernel /boot/kernel-genkernel-x86_64-2.6.39-gentoo real_root=/dev/sda7 resume=/dev/sda6 \
       splash=silent,fadein,theme:grey,profile CONSOLE=/dev/tty1 quiet \
       rootfstype=ext4 acpi_osi=Linux pci=routeirq,use_crs libahci.ignore_sss=1 \
       i915.powersave=1 i915.lvds_downclock=1 i915.semaphores=1 \
       
initrd /boot/initramfs-genkernel-x86_64-2.6.39-gentoo


I am using genkernel to compile the kernel. (genkernel-3.4.10.907)
Comment 6 Y Liu 2011-05-20 21:02:01 UTC
Created attachment 274159 [details]
2.6.39 kernel .config
Comment 7 Kamil Kamiński 2011-05-21 22:32:04 UTC
Same here on AMD64 / NVidia with vesafb. Kernel doesn't panic, it just hangups with black screen. Turning splash off doesn't seem to help, whenever I try to use vesafb with any resolution - I got only black screen.
Comment 8 Maxime Gervais 2011-05-21 23:38:54 UTC
Same here (~amd64/nouveaufb), compiling kernel without CONFIG_FB_CON_DECOR "solve" the problem.
Comment 9 Marek Vojtko 2011-05-22 03:50:51 UTC
I have the same issue (~x86/nvidia-drivers). The hang happens just as fbcondecor is supposed to start the color frame buffer (for me in resolution 800x600).
Comment 10 Otamay 2011-05-22 07:24:32 UTC
Confirmed, too, with a vanilla kernel + framebuffer decorations. Disabling the decorations in kernel, it boots normally,

2.6.39-rc7 works fine with decorations. I suppose this is a regression, or maybe the fbcondecor needs to be rewritten?
Comment 11 iGentoo 2011-05-23 12:05:59 UTC
Created attachment 274393 [details, diff]
4210_fb-reverse.patch

reference:
http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commit;h=698b368275c3fa98261159253cfc79653f9dffc6

I remove mutex_lock() and mutex_unlock(), fbcondecor seems to work again.
Comment 13 iGentoo 2011-05-24 14:13:50 UTC
Created attachment 274491 [details, diff]
mutex-unlock.patch

diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 5aac00e..6ad4480 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1569,6 +1569,7 @@ static void do_remove_conflicting_framebuffers(struct apertures_struct *a,
 
 static int do_register_framebuffer(struct fb_info *fb_info)
 {
+	mutex_lock(&registration_lock);
 	int i;
 	struct fb_event event;
 	struct fb_videomode mode;
@@ -1624,12 +1625,14 @@ static int do_register_framebuffer(struct fb_info *fb_info)
 	fb_var_to_videomode(&mode, &fb_info->var);
 	fb_add_videomode(&mode, &fb_info->modelist);
 	registered_fb[i] = fb_info;
+	mutex_unlock(&registration_lock);	//1
 
 	event.info = fb_info;
 	if (!lock_fb_info(fb_info))
 		return -ENODEV;
 	fb_notifier_call_chain(FB_EVENT_FB_REGISTERED, &event);
 	unlock_fb_info(fb_info);
+	mutex_unlock(&registration_lock);	//2
 	return 0;
 }
 
@@ -1690,9 +1693,7 @@ register_framebuffer(struct fb_info *fb_info)
 {
 	int ret;
 
-	mutex_lock(&registration_lock);
 	ret = do_register_framebuffer(fb_info);
-	mutex_unlock(&registration_lock);
 
 	return ret;
 }

If I put mutex_unlock() at place 1, fbcondecor works well.
If I put mutex_unlock() at place 2, the hang happens again.
Why ???
Comment 14 Bruno 2011-05-25 19:21:08 UTC
(In reply to comment #10)
> Confirmed, too, with a vanilla kernel + framebuffer decorations. Disabling the
> decorations in kernel, it boots normally,
> 
> 2.6.39-rc7 works fine with decorations. I suppose this is a regression, or
> maybe the fbcondecor needs to be rewritten?

The reason why fbcondecor does not work anymore with 2.6.39 is that is calls a userspace helper from fbcon's handler of framebuffer registration notification.

That userspace handler then opens matching /dev/fb* which not fails.


Note that fbcondecor is already unlocking fb_info->lock just prior to calling its userspace helper in fbcon_modechanged() with a nice comment just before doing so: "HACK: Do this properly at some point.." and taking back the lock once helper has returned. The hack would now need to also release and tack back the new mutex...

A better solution would be to call the helper in non-blocking mode...
Comment 15 Bruno 2011-05-25 19:38:23 UTC
The better fix IMHO is to change
  return call_usermodehelper(fbcon_decor_path, argv, envp, 1);
to
  return call_usermodehelper(fbcon_decor_path, argv, envp, 0);
in fbcon_decor_call_helper()

and to default to disabled fbcondecor unless userspace process did activate it explicitly.
This way return value of fbcon_decor_call_helper() would not matter anymore and userspace process will just wait for framebuffer registration to complete before completing open() of /dev/fb*.

Note that calls to fbcon_decor_disable() and fbcon_decor_enable() are racy against framebuffer (un)registration as they do touch registered_fb[] without any protection! (and I want to see registered_fb[] become private to fbmem.c!)


Could you test above change (change the '1' to '0')? (the result might not be the expected one if no matching userspace tools have been installed)
Comment 16 Michał Ziąbkowski 2011-05-25 22:25:52 UTC
I've just done so and confirm changing 1 to 0 in that call_usermodehelper invocation makes the issue go away. Works like a charm with uvesafb, as well as nouveau + KMS. Seems like the best fix so far. Much obliged.
Comment 17 Fabio Erculiani (RETIRED) gentoo-dev 2011-05-26 10:28:31 UTC
Good job Bruno, thanks a lot for spending your time hunting around! Much appreciated.
Comment 18 Otamay 2011-05-27 05:11:58 UTC
Bruno, thank you!

Changing the value of 

  return call_usermodehelper(fbcon_decor_path, argv, envp, 1);
to
  return call_usermodehelper(fbcon_decor_path, argv, envp, 0);

in drivers/video/console/fbcon.c, as you said, resolved the issue!

So the problem is in fbcondecor patch. Just changing the return value resolves the problem. Tested with uvesafb, but I think with KMS should work, too.
Comment 19 Fabio Erculiani (RETIRED) gentoo-dev 2011-05-28 07:36:09 UTC
Yes it works.
Please gentoo-sources maintainers update 4200_fbcondecor-0.9.6.patch
Comment 20 Bruno 2011-05-28 10:24:06 UTC
To comment #16 and comment #18

My suggestion just hides the issue.

The thing is, fbcondecor (and its userspace companion) do racy/deadlock-prone actions at various fb events. (see also the flag that fbcondecor ioctls use to tell if it should take locks or not)

When the userspace companion runs asynchronously, I'm not sure how well it will behave if/when console status changes while its running (e.g. changing mode while userspace is catching up on previous event).

The whole locking must get reviewed and improved (taking care of not breaking things with older userspace tools).


Did you also check what happens when you remove/rename userspace tools so the kernel does not find them?
Comment 21 Michał Ziąbkowski 2011-05-28 18:00:30 UTC
I've yet to test what happens when there are no userspace tools installed. But this is what I got when switching VTs:

WARNING: at drivers/tty/vt/vt.c:866 vc_do_resize+0x64/0x420()
Hardware name: MS-7360
Modules linked in: act_police sch_ingress cls_u32 sch_sfq sch_htb xt_tcpudp iptable_filter iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 iptable_mangle xt_dscp xt_mark xt_iprange ip_tables x_tables snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss squashfs vhba vboxnetflt vboxdrv coretemp f71882fg hwmon joydev loop snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_pcm snd_timer usb_storage usbhid hid snd uas soundcore snd_page_alloc r8169 mii i2c_i801
Pid: 21692, comm: fbcondecor_help Not tainted 2.6.39 #4
Call Trace:
 [<c1030728>] ? warn_slowpath_common+0x78/0xb0
 [<c11da6a4>] ? vc_do_resize+0x64/0x420
 [<c11da6a4>] ? vc_do_resize+0x64/0x420
 [<c103077b>] ? warn_slowpath_null+0x1b/0x20
 [<c11da6a4>] ? vc_do_resize+0x64/0x420
 [<c10c0302>] ? kfree+0xb2/0x130
 [<c10b8bcd>] ? __vunmap+0x6d/0xf0
 [<c10c0302>] ? kfree+0xb2/0x130
 [<c11daac1>] ? vc_resize+0x11/0x20
 [<c11999aa>] ? fbcon_decor_ioctl+0x67a/0x760
 [<c1199330>] ? fbcon_decor_disable+0xe0/0xe0
 [<c10d40a7>] ? do_vfs_ioctl+0x87/0x600
 [<c105b349>] ? tick_program_event+0x19/0x20
 [<c1050df9>] ? hrtimer_interrupt+0x169/0x2a0
 [<c10d465d>] ? sys_ioctl+0x3d/0x70
 [<c1391991>] ? syscall_call+0x7/0xb
---[ end trace e828d3bda2db514c ]---

Apart from that, everything works as intended. No crashes or hangs.
Comment 22 Bruno 2011-05-28 22:22:19 UTC
(In reply to comment #21)
> I've yet to test what happens when there are no userspace tools installed. But
> this is what I got when switching VTs:
> 
> WARNING: at drivers/tty/vt/vt.c:866 vc_do_resize+0x64/0x420()

This is because the userspace helper is no more running synchronously with kernel-internal notification and thus runs when console semaphore has been released.
What will help against this warning is to make fbcondecor's ioctls always take locks (e.g. make all checks of origin behave as if origin was always FBCON_DECOR_IO_ORIG_USER.)

This is because now there is no guarantee anymore that appropriate locks are held when userspace helper gets to call its ioctls (or rather it's near-certain that locks are NOT taken anymore by that time as opening the fb devices has to wait on kernel notification finishing processing.


When you check behavior in absence of userspace helper, also check how things behave when they are present and you change mode (e.g. change resolution). My guess is that there might be a glitch until userspace helper gets around to call the ioctls to setup new console background/layout.
Comment 23 simon 2011-05-30 19:02:55 UTC
*** Bug 368821 has been marked as a duplicate of this bug. ***
Comment 24 Pryka 2011-06-07 10:36:59 UTC
How long we have to wait for fix in tree?
Comment 25 Uladzimir Bely 2011-06-09 22:11:00 UTC
gentoo-sources-2.6.39-r1 - problem still exists, fbcondecor patch has no changes since 2.6.39
Comment 26 Henrique Dias 2011-06-09 22:50:29 UTC
Right now I tried the new gentoo-sources-2.6.39-r1 kernel and the problem was not fixed.
Comment 27 Pryka 2011-06-10 06:53:05 UTC
And now this solution is not working...
http://bugs.gentoo.org/show_bug.cgi?id=368109#c15
http://bugs.gentoo.org/show_bug.cgi?id=368109#c18

O_o
Comment 28 Uladzimir Bely 2011-06-10 11:06:42 UTC
Solution from #15/#18 works for me in 2.6.39-r1
Comment 29 Billy DeVincentis 2011-06-10 11:19:54 UTC
When the hell is this going to get fixed!!! I can't believe that I upgrade my kernel and a problem this serious still lurks!!
Comment 30 Mike Pagano gentoo-dev 2011-06-10 13:04:40 UTC
(In reply to comment #29)
> When the hell is this going to get fixed!!! I can't believe that I upgrade my
> kernel and a problem this serious still lurks!!

Please adjust your attitude. We are volunteers, if the two guys who work on this do not have the time to fix it, then you have to wait.

I can't imagine this kind of post motivates anyone to fix your problem.
Comment 31 Pryka 2011-06-10 16:08:19 UTC
Anyone know why the "fix" from post #15/#18 is not working for my any more?

I'm just updated kernel to 2.6.39-r1, zero changes... and bum... not working :|

ps. kernel 2.6.39 is runs very well with the same configuration as r1 O_o
Comment 32 Alon Bar-Lev 2011-06-11 16:59:41 UTC
(In reply to comment #30)
> Please adjust your attitude. We are volunteers, if the two guys who work on
> this do not have the time to fix it, then you have to wait.

BTW: Does anyone know what happened to spock? (maintainer of splashutils)
Comment 33 Michal Januszewski (RETIRED) gentoo-dev 2011-06-12 16:01:24 UTC
(In reply to comment #32)
> (In reply to comment #30)
> > Please adjust your attitude. We are volunteers, if the two guys who work on
> > this do not have the time to fix it, then you have to wait.
> 
> BTW: Does anyone know what happened to spock? (maintainer of splashutils)

I just made a new patch for the latest HEAD of the kernel git repository:

http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.6-3.0-rc2.patch

I think this should still apply to 2.6.39.  This patch makes all fbcondecor userspace calls asynchronous (this is the same as what suggested previously in this bug), and also drops fb_info unlocking for modechange events.

BTW, I'm looking for a new maintainer for this project.  Please have a look at:
http://dev.gentoo.org/~spock/projects/fbcondecor/ and if anybody is interested, please drop me a line.
Comment 34 Fabio Erculiani (RETIRED) gentoo-dev 2011-06-15 17:59:19 UTC
spock, I still get this:

[   69.245340] ------------[ cut here ]------------
[   69.245344] WARNING: at drivers/tty/vt/vt.c:395 update_region+0x39/0x74()
[   69.245345] Hardware name: VirtualBox
[   69.245346] Modules linked in: ppdev snd_intel8x0 snd_ac97_codec ac97_bus tpm_tis snd_pcm parport_pc tpm i2c_piix4 snd_timer tpm_bios joydev snd vboxguest i2c_core pcspkr snd_page_alloc iscsi_tcp tg3 e1000 fuse xfs nfs nfs_acl auth_rpcgss lockd sunrpc jfs reiserfs ext4 jbd2 ext3 jbd ext2 mbcache scsi_wait_scan sl811_hcd ohci_hcd uhci_hcd ehci_hcd sx8 imm parport pata_pcmcia pcmcia
[   69.245375] Pid: 6337, comm: fbcondecor_help Tainted: G        W   2.6.39-sabayon #1
[   69.245377] Call Trace:
[   69.245380]  [<ffffffff8103b838>] warn_slowpath_common+0x80/0x98
[   69.245382]  [<ffffffff8103b865>] warn_slowpath_null+0x15/0x17
[   69.245385]  [<ffffffff81283316>] update_region+0x39/0x74
[   69.245387]  [<ffffffff812a8e79>] fbcon_decor_enable+0xe9/0x119
[   69.245390]  [<ffffffff812a9a97>] fbcon_decor_ioctl+0x1d2/0x21f
[   69.245393]  [<ffffffff810e5a37>] do_vfs_ioctl+0x472/0x4b1
[   69.245395]  [<ffffffff811f73b4>] ? aufs_flush_nondir+0x12/0x12
[   69.245398]  [<ffffffff810b0faf>] ? sys_mmap_pgoff+0x124/0x15f
[   69.245400]  [<ffffffff810e5ac7>] sys_ioctl+0x51/0x76
[   69.245403]  [<ffffffff816cda3b>] system_call_fastpath+0x16/0x1b
[   69.245404] ---[ end trace a20c57bab5f90166 ]---
Comment 35 Fabio Erculiani (RETIRED) gentoo-dev 2011-06-15 18:00:15 UTC
*** Bug 370573 has been marked as a duplicate of this bug. ***
Comment 36 Fabio Erculiani (RETIRED) gentoo-dev 2011-06-15 18:05:32 UTC
udevadm settle - timeout of 30 seconds reached, the event queue contains:
  /sys/devices/virtual/tty/ptyr6 (2265)

I looks like there is still some race condition?
Comment 37 Nikos Chantziaras 2011-06-15 18:10:23 UTC
I guess the best thing to do right now is integrate Plymouth into Gentoo's boot system. That one is used by a lot of people and has RedHat as upstream.
Comment 38 Maxime Gervais 2011-06-15 18:54:16 UTC
Plymouth is a console decorator or just boot decorator ?
Comment 39 Nikos Chantziaras 2011-06-15 19:05:18 UTC
(In reply to comment #38)
> Plymouth is a console decorator or just boot decorator ?

I don't think so. But one of the features of KMS, seamless boot into X, is not provided by fbcondecor. It seems it's not aging well and has become unmaintained. I don't believe console decorations are what's important. More important is a nice boot into X.
Comment 40 Fabio Erculiani (RETIRED) gentoo-dev 2011-06-15 19:48:06 UTC
Please don't use bugzilla for off-topic talks. Bugzilla = place to handle bugs. And this one is already getting big enough, do not add more cruft to it please.
Comment 41 Michal Januszewski (RETIRED) gentoo-dev 2011-06-15 20:19:53 UTC
(In reply to comment #34)
> spock, I still get this:
> 
> [   69.245340] ------------[ cut here ]------------
> [   69.245344] WARNING: at drivers/tty/vt/vt.c:395 update_region+0x39/0x74()
> [   69.245345] Hardware name: VirtualBox
> [   69.245346] Modules linked in: ppdev snd_intel8x0 snd_ac97_codec ac97_bus
> tpm_tis snd_pcm parport_pc tpm i2c_piix4 snd_timer tpm_bios joydev snd
> vboxguest i2c_core pcspkr snd_page_alloc iscsi_tcp tg3 e1000 fuse xfs nfs
> nfs_acl auth_rpcgss lockd sunrpc jfs reiserfs ext4 jbd2 ext3 jbd ext2 mbcache
> scsi_wait_scan sl811_hcd ohci_hcd uhci_hcd ehci_hcd sx8 imm parport pata_pcmcia
> pcmcia
> [   69.245375] Pid: 6337, comm: fbcondecor_help Tainted: G        W  
> 2.6.39-sabayon #1
> [   69.245377] Call Trace:
> [   69.245380]  [<ffffffff8103b838>] warn_slowpath_common+0x80/0x98
> [   69.245382]  [<ffffffff8103b865>] warn_slowpath_null+0x15/0x17
> [   69.245385]  [<ffffffff81283316>] update_region+0x39/0x74
> [   69.245387]  [<ffffffff812a8e79>] fbcon_decor_enable+0xe9/0x119
> [   69.245390]  [<ffffffff812a9a97>] fbcon_decor_ioctl+0x1d2/0x21f
> [   69.245393]  [<ffffffff810e5a37>] do_vfs_ioctl+0x472/0x4b1
> [   69.245395]  [<ffffffff811f73b4>] ? aufs_flush_nondir+0x12/0x12
> [   69.245398]  [<ffffffff810b0faf>] ? sys_mmap_pgoff+0x124/0x15f
> [   69.245400]  [<ffffffff810e5ac7>] sys_ioctl+0x51/0x76
> [   69.245403]  [<ffffffff816cda3b>] system_call_fastpath+0x16/0x1b
> [   69.245404] ---[ end trace a20c57bab5f90166 ]---

Could you please verify that the md5sum of the fbcondecor patch that you are using is 865216ca79342c67dc3aa43c18245694?  I accidentally pushed out a broken version of the patch to my website, and only replaced it with the correct one after several hours.
Comment 42 Fabio Erculiani (RETIRED) gentoo-dev 2011-06-15 21:54:24 UTC
5eb38dbd6da554bcdd3bb4717b28566e  fbcondecor-0.9.6-3.0-rc2.patch

you're right..
Comment 43 Mike Pagano gentoo-dev 2011-06-23 18:29:25 UTC
Thanks, Spock. 

This is queued up for the next release of gentoo-sources 2.6.39 (which will be -r2).

This series is waiting for the next 2.6.39 stable patch set.

See: https://lkml.org/lkml/2011/6/21/273
Comment 44 Mike Pagano gentoo-dev 2011-06-24 14:58:43 UTC
gentoo-sources-2.6.39-r2 released. If this problem persists in this version, please reopen.
Comment 45 Alon Bar-Lev 2011-06-25 18:52:12 UTC
drivers/video/console/fbcondecor.c:513: warning: function declaration isn’t a prototype
Comment 46 Mikayel Grigoryan 2011-07-23 11:32:36 UTC
I experience the same issue when I add "video=1024x768" or whatever resolution to grub.conf.

This leads to boot failure.
title=Gentoo 2.6.39-r3
root (hd0,2)
kernel /vmlinuz-2.6.39-gentoo-r3 root=/dev/sda6 video=1024x768

This boot ok, but then when I attach external monitor to my laptop, the upper left part of my external display is utilized only.

title=Gentoo 2.6.39-r3
root (hd0,2)
kernel /vmlinuz-2.6.39-gentoo-r3 root=/dev/sda6.

Messages in dmesg refer to udev resizing console.

=========
[root@gent ~]$ dmesg |grep -i Console
Console: colour VGA+ 80x25
console [tty0] enabled
Console: switching to colour frame buffer device 170x48
=========

[root@gent ~]$ uname -a
Linux gent 2.6.39-gentoo-r3 #1 Fri Jul 22 23:33:28 MSD 2011 x86_64 Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz GenuineIntel GNU/Linux

This seems to be the same bug, or is it?
Comment 47 Jan Hrabe 2011-08-30 03:13:32 UTC
I can confirm that a version of this problem persists on one of my machines running 2.6.39-gentoo-r3 kernel and nvidia driver.  Grub configuration line

kernel /kernel-2.6.39-gentoo-r3 root=/dev/sda3 vga=0x31B video=vesafb:mtrr:3,ywrap

or

kernel /kernel-2.6.39-gentoo-r3 root=/dev/sda3 vga=0x31B video=vesafb:ywrap

freezes the boot process while

kernel /kernel-2.6.39-gentoo-r3 root=/dev/sda3 vga=0xF00

works fine.  In fact, vga=0x31B (without the video=...) works as well but the scrolling is so snail-paced that it is unusable for running, e.g., emerge or rsync with extensive output.

Should this bug be reopened?