Bug 14236 - [965GM] Virtual terminals corrupted after hibernation
Summary: [965GM] Virtual terminals corrupted after hibernation
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Jesse Barnes
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks: 15000
  Show dependency treegraph
 
Reported: 2008-01-24 11:42 UTC by Erik Andren
Modified: 2008-03-21 09:26 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Post hibernate and vt switch (42.66 KB, text/plain)
2008-01-24 11:43 UTC, Erik Andren
no flags Details
xorg.conf (2.38 KB, text/plain)
2008-01-24 11:43 UTC, Erik Andren
no flags Details
dmesg before hibernate (36.75 KB, text/plain)
2008-03-03 12:38 UTC, Erik Andren
no flags Details
dmesg after hibernate (44.96 KB, text/plain)
2008-03-03 12:38 UTC, Erik Andren
no flags Details
xorg log with modedebug before hibernate (98.88 KB, text/plain)
2008-03-03 12:39 UTC, Erik Andren
no flags Details
xorg log with modedebug after hibernate (122.19 KB, text/plain)
2008-03-03 12:39 UTC, Erik Andren
no flags Details

Description Erik Andren 2008-01-24 11:42:36 UTC
After a hibernation-cycle the terminal is fully corrupted. Nothing except a full reboot returns the virtual state to normal.

Steps to reproduce:
1. Boot the system, switching to a virtual terminal works fine
2. Hibernate the system
3. Resume the system
4. Switch to a virtual terminal which now displays garbage. X works just fine, if you switch back.

All versions 2.1.0 - 2.2.1 are affected, I couldn't go more back as the driver failed to compile with my current setup. XAA nor EXA changes the situation.

This is on a 64-bit system using a 965GM chip.
Comment 1 Erik Andren 2008-01-24 11:43:12 UTC
Created attachment 13911 [details]
Post hibernate and vt switch
Comment 2 Erik Andren 2008-01-24 11:43:41 UTC
Created attachment 13912 [details]
xorg.conf
Comment 3 Erik Andren 2008-01-24 11:44:19 UTC
This is when using the ubuntu hardy 2.6.24-rc8 kernel and without any framebuffer driver.
Comment 4 Gordon Jin 2008-01-24 18:46:03 UTC
Does it matter if you are in X or VT just before the hibernation?
Comment 5 Erik Andren 2008-01-24 22:48:22 UTC
The system fails to resume when hibernated from the console, this holds for suspend to ram too.
Comment 6 Jesse Barnes 2008-02-06 15:41:51 UTC
I just fixed this last week.  Please try the latest DRM bits and reopen if you still have problems.
Comment 7 Erik Andren 2008-02-06 23:49:29 UTC
I tried the latest tip of the drm, it did _not_ resolve the issue for me. 
Comment 8 Jesse Barnes 2008-02-07 09:29:14 UTC
Can you reproduce this problem from a VT in text mode?  If so, please use the intel_reg_dumper tool to get a register dump from before your hibernate call and one from afterwards.  E.g.
  $ intel_reg_dumper > pre-hibernate.out
  $ echo disk > /sys/power/state
  $ intel_reg_dumper > post-resume.out
or similar, all from text mode.
Comment 9 Erik Andren 2008-02-07 09:40:03 UTC
(In reply to comment #8)
> Can you reproduce this problem from a VT in text mode?  If so, please use the
> intel_reg_dumper tool to get a register dump from before your hibernate call
> and one from afterwards.  E.g.
>   $ intel_reg_dumper > pre-hibernate.out
>   $ echo disk > /sys/power/state
>   $ intel_reg_dumper > post-resume.out
> or similar, all from text mode.
> 

Thanks for spending your time trying to debug this issue.
As I stated in #5, the machine never successfully resumes when initiated in text mode; regardless of doing a suspend-to-disk or suspend-to-ram.
Would some logs with ModeDebug activated be useful?

Comment 10 Jesse Barnes 2008-02-07 09:44:26 UTC
Oh I missed that comment, sorry.  Maybe the patch in #14249 will help with that, assuming it resumes w/o video enabled rather than crashing anyway...
Comment 11 Michael Fu 2008-02-13 16:50:04 UTC
(In reply to comment #5)
> The system fails to resume when hibernated from the console, this holds for
> suspend to ram too.
> 

Erik, would you please explain more about the failure? I mean:

1) Is the machine totally hang? can you switch to X? Can you access it from a ssh?
2) What if you didn't start X at all and then do a suspend/resume cycle from a text console?

Also could you attach your dmesg too? thanks.
Comment 12 Erik Andren 2008-02-14 12:30:01 UTC
(In reply to comment #11)
> (In reply to comment #5)
> > The system fails to resume when hibernated from the console, this holds for
> > suspend to ram too.
> > 
> 
> Erik, would you please explain more about the failure? I mean:
> 
> 1) Is the machine totally hang? can you switch to X? Can you access it from a
> ssh?
> 2) What if you didn't start X at all and then do a suspend/resume cycle from a
> text console?
> 
> Also could you attach your dmesg too? thanks.
> 

Ok, I've investigated this a bit more.
My current platform is Ubuntu Hardy current using a 2.6.24 kernel

If I hibernate from the console the system fails to resume during the splash screen, even if I boot with vga=normal (which I usually do).
If I explicitly remove the splash screen from the grub command line the kernel resumes properly (to a console).

If I hibernate from X and resume normally (with a splash screen) the terminal becomes corrupt. This holds if I resume with vga=normal too.

So, It seems like the splash screen is the villain in the drama.



Comment 13 Jesse Barnes 2008-02-14 12:46:47 UTC
Ah yeah, the Ubuntu splash screen uses the fb drivers, which are known to be incompatible with the 2D X driver...
Comment 14 Erik Andren 2008-02-14 12:50:32 UTC
Then why doesn't it work when I disable the framebuffer using the vga=normal command on the kernel command line?
Comment 15 Jesse Barnes 2008-02-14 13:08:47 UTC
I don't think vga=normal totally disables the framebuffer layer.  In other reports, people have had to totally disable CONFIG_FB in their kernel before things worked right.
Comment 16 Erik Andren 2008-02-14 13:09:56 UTC
(In reply to comment #15)
> I don't think vga=normal totally disables the framebuffer layer.  In other
> reports, people have had to totally disable CONFIG_FB in their kernel before
> things worked right.
> 

I'll build a test kernel and report back. Not today, though.
Comment 17 Michel Dänzer 2008-02-14 13:52:02 UTC
(In reply to comment #13)
> Ah yeah, the Ubuntu splash screen uses the fb drivers, [...]

Actually, it doesn't - at least not (always) in current versions of Ubuntu.
Comment 18 Michael Fu 2008-02-18 18:56:54 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > I don't think vga=normal totally disables the framebuffer layer.  In other
> > reports, people have had to totally disable CONFIG_FB in their kernel before
> > things worked right.
> > 
> 
> I'll build a test kernel and report back. Not today, though.
> 

Erik, any update for the test?
Comment 19 Erik Andren 2008-02-19 07:25:04 UTC
(In reply to comment #18)
> (In reply to comment #16)
> > (In reply to comment #15)
> > > I don't think vga=normal totally disables the framebuffer layer.  In other
> > > reports, people have had to totally disable CONFIG_FB in their kernel before
> > > things worked right.
> > > 
> > 
> > I'll build a test kernel and report back. Not today, though.
> > 
> 
> Erik, any update for the test?
> 

There's currently a bug in Ubuntu hardy hindering custom kernel upgrades.
I booted a 2.6.24.2 kernel with CONFIG_FB not set and it still showed the graphics corruption in the terminal upon resuming. 
Comment 20 Erik Andren 2008-02-27 12:41:48 UTC
Any ideas on how to take this forward?
Comment 21 Jesse Barnes 2008-02-27 13:30:40 UTC
Sorry for neglecting this Erik, I'm travelling right now so I haven't been looking at bugs much.

It does sound like there's something going on with the splash screen, given that you can correctly resume w/o it.  Can you get more details on how that works in Ubuntu (if not using fb, then what?)?

Thanks,
Jesse
Comment 22 Michael Fu 2008-02-29 16:38:30 UTC
> 
> There's currently a bug in Ubuntu hardy hindering custom kernel upgrades.
> I booted a 2.6.24.2 kernel with CONFIG_FB not set and it still showed the
> graphics corruption in the terminal upon resuming. 
> 

Erik, could you please attach your dmesg and xorg.log ( with modedebug option turns on ) here? thanks.

Comment 23 Erik Andren 2008-03-03 12:38:05 UTC
Created attachment 14793 [details]
dmesg before hibernate
Comment 24 Erik Andren 2008-03-03 12:38:31 UTC
Created attachment 14794 [details]
dmesg after hibernate
Comment 25 Erik Andren 2008-03-03 12:39:08 UTC
Created attachment 14795 [details]
xorg log with modedebug before hibernate
Comment 26 Erik Andren 2008-03-03 12:39:33 UTC
Created attachment 14796 [details]
xorg log with modedebug after hibernate
Comment 27 Michael Fu 2008-03-14 06:12:16 UTC
(In reply to comment #21)
> Sorry for neglecting this Erik, I'm travelling right now so I haven't been
> looking at bugs much.
> 
> It does sound like there's something going on with the splash screen, given
> that you can correctly resume w/o it.  Can you get more details on how that
> works in Ubuntu (if not using fb, then what?)?
> 
> Thanks,
> Jesse
> 

I remember someone said it calls bios service directly... Jesse, any hint from the last several attachment?

Comment 28 Jesse Barnes 2008-03-18 18:45:23 UTC
Erik, when you said you tested the tip of DRM, did you mean just the library?  If you built the kernel modules, did you make sure to remove the old ones from your system first (both rmmod drm, rmmod i915, then removing the files themselves) before installing the new ones?
Comment 29 Erik Andren 2008-03-19 14:11:59 UTC
(In reply to comment #28)
> Erik, when you said you tested the tip of DRM, did you mean just the library? 
> If you built the kernel modules, did you make sure to remove the old ones from
> your system first (both rmmod drm, rmmod i915, then removing the files
> themselves) before installing the new ones?
> 

You are correct, I must have failed last time on how to properly modprobe the new drm modules. With git current, terminals are properly restored; even after hibernation.

The machine still fails to resume after suspending via the terminal. This is a minor issue though. Close?
Comment 30 Jesse Barnes 2008-03-19 14:54:47 UTC
As long as the i915 driver is loaded, it should suspend/resume from the console correctly as well.  Which kernel are you running?  What happens exactly?  Does it just hang on resume?
Comment 31 Jesse Barnes 2008-03-21 09:26:12 UTC
Ok, I guess we can close, I'll assume the other suspend/resume problem you had is another bug (please open another bug if you can reproduce the problem and have some more details).  Thanks a lot for testing.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.