Opened 10 years ago

Closed 8 years ago

#11358 closed bug (fixed)

radeon_hd can't wake screen after DPMS off (regression)

Reported by: vidrep Owned by: kallisti5
Priority: normal Milestone: R1
Component: Drivers/Graphics/radeon_hd Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

hrev48068 Select "blackness" screensaver in preferences After screensaver activates there is no way to recover the desktop with mouse movement or keystrokes.

Attachments (8)

screenshot1.png (136.1 KB ) - added by vidrep 10 years ago.
listdev (3.0 KB ) - added by vidrep 9 years ago.
x86_gcc2_serial.txt (116.7 KB ) - added by vidrep 9 years ago.
x86_gcc2_syslog (130.0 KB ) - added by vidrep 9 years ago.
dpms_encoder_lock.diff (572 bytes ) - added by kallisti5 8 years ago.
A random guess at a fix
previous_syslog (169.0 KB ) - added by vidrep 8 years ago.
syslog (339.7 KB ) - added by vidrep 8 years ago.
listimage (34.7 KB ) - added by vidrep 8 years ago.

Download all attachments as: .zip

Change History (49)

by vidrep, 10 years ago

Attachment: screenshot1.png added

comment:1 by vidrep, 10 years ago

Summary: Blackness screensaver - no recoveryBlackness screensaver - no desktop recovery

comment:2 by anevilyak, 10 years ago

Component: - GeneralAdd-Ons/Screen Savers
Owner: changed from nobody to korli

Could you please at least try to set a component when you file tickets? It's been asked more than once.

comment:3 by pulkomandy, 10 years ago

I don't think blackness is the problem here. Have you tried this with other screensavers? Have you tried unchecking the "turn off screen" checkbox?

I have noticed that when there is a system panic or app_server crash we don't wake up the display from powersaving mode. Can you reach the machine by ssh and get a syslog, ps output, or other useful information after it is crashed?

Also, what is your video card and driver?

comment:4 by vidrep, 9 years ago

My hard drive on this PC has three partitions - alpha 4.1, dev, and x86_64. I have tested the blackness screensaver on alpha 4.1, and it is working normally. Only the hybrid and 64 bit nightly does not work. They are all using the same hardware. So, naturally I assume if something works on alpha 4.1, but does not work on the nightly build, it must be broken due to some change in the software since then. This Haiku PC is also connected to a Windows PC with a serial cable for capturing debugging output. I do not use any emulator - always real hardware. I have attached a listdev. If there is some tests you can suggest, let me know, and I'll do my best to give you the information you need to resolve the problem

by vidrep, 9 years ago

Attachment: listdev added

comment:5 by pulkomandy, 9 years ago

Yes, obviously something got broken here. I'm trying to understand which part of the system, as one of several things can have happened:

  • The video driver has crashed, or
  • There is a bug in DPMS/powersave handling in the video driver and that prevents wakeup, or
  • app server crashed, or
  • there was a kernel panic for an unrelated reason, or
  • the screen_blanker crashed, but the screen was turned off

... and so on.

So here are the things to try:

  • Run the screensaver in test mode from the screen preflet. Does it crash? (if it does, this rules out screen_blanker, as in this case the ScreenSaver preflet handles things directly)
  • Uncheck "turn off screen" checkbox. Wait for screensaver. Does it crash? (if it does, it is not an issue with powersaving)
  • Wait for the crash with serial port connected and the windows machine capturing from it. Is there some output? (if there is, it would be a kernel crash)
  • Configure your machine for ssh use useradd sshd ; passwd. Connect to it from another machine on your network (you can use Putty as an ssh client for windows, or ssh from linux or Haiku). Wait for the crash. Is the ssh session also blocked, or does it still work? If it still work, can we get the output of:
    ps
    cat /var/log/syslog
    

At least one of these tests should point to what/where the crash actually is.

in reply to:  5 comment:6 by vidrep, 9 years ago

Replying to pulkomandy:

  • Run the screensaver in test mode from the screen preflet. Does it crash? YES
  • Uncheck "turn off screen" checkbox. Wait for screensaver. Does it crash? YES
  • Wait for the crash with serial port connected and the windows machine capturing from it. Is there some output? YES (serial debug log attached)

This was tested with hrev48073 x86_gcc2 "Turn Off Screen" checkbox was unchecked during serial debug logging Serial debug logging was started at boot and stopped after shutdown Previous syslogs were deleted before testing. I'll attach syslog from test session.

by vidrep, 9 years ago

Attachment: x86_gcc2_serial.txt added

by vidrep, 9 years ago

Attachment: x86_gcc2_syslog added

comment:7 by vidrep, 9 years ago

Did some experimenting with different hardware and found that this is a problem exclusive to Radeon video. This was reproducable on two different PC's. First PC is Intel core 2 with on-board Intel graphics, which works. Installed Radeon card - not working. Second PC is AMD Athlon X2. Nvidia video works. Install Radeon card - not working. I'll try some different Radeon cards to see if any other types exhibit the same problem.

Last edited 9 years ago by vidrep (previous) (diff)

comment:8 by vidrep, 9 years ago

Here is what I found. RV610 HD 2400 card works in both PC's. RV620 LE HD3450 does not work in either PC. RV620 HD3470 does not work in either PC. So, it appears this issue is exclusive to RV620 Radeon (and later?) video cards.

comment:9 by pulkomandy, 9 years ago

Component: Add-Ons/Screen SaversDrivers/Graphics/radeon_hd
Owner: changed from korli to kallisti5
Status: newassigned
Summary: Blackness screensaver - no desktop recoveryradeon_hd can't wake screen after DPMS off.

comment:10 by vidrep, 9 years ago

Are there any users with Radeon RV620 and later video cards who can test whether the newer cards are affected by this bug as well? This bug is present in both 32 and 64 bit builds. Thanks.

comment:11 by vidrep, 9 years ago

Tried today with a newer Radeon HD 6450/7450/8450 / R5 230 OEM video card. It is working. So, this problem may be limited to a small segmant of Radeon cards (Radeon HD3000 series).

comment:12 by vidrep, 9 years ago

Since kallisti5 is testing newer Radeons this week, how about fixing this bug on an older card...please:)

comment:13 by vidrep, 9 years ago

This is another regression in Haiku. The same video card, on the same PC, is working with Alpha 4.1.

comment:14 by diver, 9 years ago

Maybe you can try to bisect the driver? Or binary search when it has been broken.

comment:15 by vidrep, 9 years ago

I'll give it a try tonight after work. There appears to be a good selection of older images still available for testing.

comment:16 by vidrep, 9 years ago

After 5 hours and at least 20 installs to a spare hard drive partition I have narrowed down the range to between hrev45218 (working) and hrev45326 (not working). The Radeon driver was broken with hrev45219 and then reverted in hrev45325. It appears something was missed during the revert.

Version 2, edited 9 years ago by vidrep (previous) (next) (diff)

comment:17 by vidrep, 9 years ago

Let me know if any further information is required to close this ticket.

comment:18 by vidrep, 8 years ago

Please, can somebody have another look at this ticket? I have had my screensaver disabled for a year waiting for the fix. Please read comment 16 for the commit which broke the driver. Thanks in advance.

comment:19 by vidrep, 8 years ago

Can somebody change the title of the ticket to "radeon_hd can't wake screen after DPMS off (regression)?

comment:20 by diver, 8 years ago

Summary: radeon_hd can't wake screen after DPMS off.radeon_hd can't wake screen after DPMS off (regression)

comment:21 by kallisti5, 8 years ago

hm... Looking over the syslogs... the modesetting DPMS powerdown / powerup performs a lock before powerdown and an unlock after powerup.

KERN: radeon_hd: encoder_output_lock: true
KERN: radeon_hd: display_crtc_lock
KERN: radeon_hd: encoder_dpms_set: power: false
KERN: radeon_hd: encoder_dpms_set_dig: power: false
KERN: radeon_hd: encoder_dpms_set: power: true
KERN: radeon_hd: encoder_dpms_set_dig: power: true
KERN: radeon_hd: transmitter_dig_setup
KERN: radeon_hd: transmitter_dig_setup: table 1.1
KERN: radeon_hd: encoder_pick_dig
KERN: radeon_hd: display_crtc_lock
KERN: radeon_hd: encoder_output_lock: false

However the DPMS call at the end of the syslog doesn't seem to do this lock / unlock. Not 100% sure, however that looks.. "off"

by kallisti5, 8 years ago

Attachment: dpms_encoder_lock.diff added

A random guess at a fix

comment:22 by kallisti5, 8 years ago

patch: 01

comment:23 by kallisti5, 8 years ago

I've attached a drive-by fix. No idea if it will work... please test and share results ;-)

comment:24 by vidrep, 8 years ago

Thanks for having a look. I'll try it out as soon as I get home from work tonight. In the event it still doesn't work, is there some test I can do to get better information?

comment:25 by kallisti5, 8 years ago

Just the syslogs, those give us the most information.

Thanks for testing this patch! This is the kind of off-loading of testing that really helps us churn fixes out faster.

comment:26 by vidrep, 8 years ago

Quick question: What is the best way to test this patch? Do I have to build the radeon driver from source?

comment:27 by kallisti5, 8 years ago

Yup. You'll need to compile from source after patching the sources.

https://www.haiku-os.org/guides/building

To patch haiku sources:

patch -p1 < dpms_encoder_lock.diff

comment:28 by vidrep, 8 years ago

I patched the driver and built the bin. Now, where to put it? I tried /boot/home/config/non-packaged/add-ons/kernel/drivers/bin, but the driver is not being used, even though I blacklisted the radeon_hd driver.

comment:29 by waddlesplash, 8 years ago

Wherever the radeon_hd driver is + "non-packaged/" right after "system/". "home/config" won't work (pretty sure this is by design, for security reasons.)

comment:30 by anevilyak, 8 years ago

The patch in question is against the accelerant, not the driver. You'll want to build radeon_hd.accelerant and replace that.

comment:31 by vidrep, 8 years ago

Built the radeon_hd.accelerant against the patch. Put it into /boot/system/non-packaged/add-ons/accelerants/. Listimage says it is now being used. However, it does not fix the problem, sorry to say.

comment:32 by vidrep, 8 years ago

I know this is a hack, but I thought I'd try it anyway. I copied the radeon_hd.accelerant from Alpha 4.1 to /boot/system/non-packaged/add-ons/accelerants/ and now everything works.

comment:33 by kallisti5, 8 years ago

so.... did you grab the syslogs from the failed patch?

comment:34 by vidrep, 8 years ago

Sorry, I'll post them tonight after work.

comment:35 by vidrep, 8 years ago

Attached are the syslog(s) and a listimage.

Last edited 8 years ago by vidrep (previous) (diff)

by vidrep, 8 years ago

Attachment: previous_syslog added

by vidrep, 8 years ago

Attachment: syslog added

by vidrep, 8 years ago

Attachment: listimage added

comment:36 by vidrep, 8 years ago

Have you had a chance to look at the attached syslogs yet?

comment:37 by vidrep, 8 years ago

Looking at this ticket again today with hrev50544 x86_gcc2. Radeon HD3450 - I tried each available video output interface (DVI, S-VID, VGA) Screensaver Preferences set to the following: Start Screensaver 30 seconds; Turn Off Screen 1 minute VGA - screen turns back on with mouse movement or keyboard input DVI - screen does NOT turn back on with mouse movement or keyboard input after screen is turned off S-VID - not supported on this graphics card Do you want syslogs for each scenario?

comment:38 by vidrep, 8 years ago

I also tested a Radeon HD3470 as well. It only has DVI and DP (no VGA). The behavior is the same as the HD3450 when connecting the monitor through DVI

comment:39 by pulkomandy, 8 years ago

You can use the "dpms" command to test this more easily. "dpms off" puts the screen to sleep. "dpms on" wakes it up.

Usually I do something like this from Terminal:

dpms off ; sleep 2 ; dpms on

You can also check the "suspend" and "standby" states if available (but don't forget the "dpms on" or you'll have to type it while the screen is black!)

comment:40 by vidrep, 8 years ago

Tested Radeon HD3450 and HD3470 today with Haiku hrev50575 x86_gcc2. I am very happy to report that this issue is now resolved.

comment:41 by pulkomandy, 8 years ago

Resolution: fixed
Status: assignedclosed

thanks for reporting!

Note: See TracTickets for help on using tickets.