Mac Mini + DVI Swichbox = Toasted

Posted by: tfabris

Mac Mini + DVI Swichbox = Toasted - 19/03/2007 15:16

The usual story: "Ask Uncle Google" isn't helping me, and Apple's online help is coming up zilch, so let's ask the EmpegBBS braintrust!

My Mac Mini is plugged in to a Polariod FLM-3201 television set via a DVI connection.

Well, that's the way it used to be. But now I'm betatesting Nong's New Toy via a DVI connection. Since my TV set has only the one DVI input, I sweetalked Nong into loaning me a DVI switch box for the duration of the beta test.

I've verified that this isn't related to Nong's New Toy by unplugging it for the following repro steps. It is related to either the switch box and/or disconnecting the Mac Mini from the DVI connection. Anyone else seen this, anyone seen solutions? One guy on the forum for Nong's New Toy has seen this on his macbook pro when plugged into an external monitor. Here is the deal:

- Mac Mini plugged into TV set via the DVI switch box.
- Mac Mini set to go into sleep mode after X minutes/hours/whatever.
- Log out of Mac Mini so that it's sitting back at the login screen (can also leave at main desktop, same result).
- Switch the switchbox over to the other input (the one that is NOT the mac mini, in this case there is nothing else plugged into this other input, just to be sure).
- Wait X + 1 minute. Mac goes into sleep mode. Front panel light changes from steady to pulsing.
- Switch the switchbox back to the Mac Mini's input.
- Wake up the Mac Mini by moving the mouse or pressing a key on the keyboard.

Result: Screen is a checkerboard of corrupted graphics, and/or staticy random pixels. You can still see the original screen through the corruption. Video driver appears to be completely crashed. Mouse actions do nothing on the screen. Keyboard works, but you can't see the results of things you type, screen is completely frozen. You can see the mouse pointer move (because I'm pretty sure on the Mac the mouse pointer is handled by low level hardware), but it doesn't do anything.

The guy who said he saw this on his powerbook said it only happened to the *external* display, and his built-in screen was fine, so he could simply do a "redetect displays" and that'd fix it. Me, I'm on a mac mini with only the one display (the corrupted one), so my only recourse is a full reboot.

Anyone else seen similar, or know of a good work-around?

(Work arounds I have already rejected for unrelated reasons: Do not put mac into sleep mode at all, do not log out of mac when leaving it alone thus allowing possible keyboard command to redetect displays.)
Posted by: mlord

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 15:42

Well, since you've already rejected the sensible option of remap a key to reset the video on command, then how about unplug/replug the DVI-D cable at the iMac? Any joy from that?

Cheers
Posted by: wfaulk

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 15:45

I'd personally be inclined to say that it's the switchbox's fault. My understanding of DVI is that it's bad to disconnect the signal due to handshaking in the DVI protocol, and perhaps the switchbox isn't handling that properly.

Try running a cable straight from the monitor to the Mac, unplug it from the Mac and plug it into the other device. Wait for the sleep mode. Unplug it from the other device and plug it back into the Mac. Wake the Mac up. What happens?
Posted by: tfabris

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 16:39

Mark and Bitt, these are good suggestions. I shall try them both.

Wish there was a way to reset the video at the login screen: That's the reason I can't remap the key; it's gotta be at the login screen.
Posted by: wfaulk

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 16:47

Okay, I have to know why it has to be at the login screen. Also, I know nothing of "reset the video", but is it possible to do it by logging in via SSH?
Posted by: drakino

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 17:10

Via SSH should be possible by killing the WindowServer processes. Thats should respawn the GUI completly, and run whatever is used to talk to the displays. Doing this at the loginwindow should be safe as long as you are logging out and not just switching users. It will have to be killed as root, so "sudo killall WindowServer" should do it. , -9 on killall might be necessary if the process is in a bad state due to this issue.
Posted by: tfabris

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 18:09

Quote:
"sudo killall WindowServer" should do it.


Any way for that to get triggered from the login screen without having to SSH in to the box from another computer?
Posted by: hybrid8

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 18:40

The Mac has Hot-Plug support and it should be fully functional and without such issues at least on ATI chipsets. That mans at any point in time you can unplug one monitor and plug in another one and the display will be recognized and new settings will come up automatically. No need to press any buttons or run any software. The most difficult situation for such a feat is while the computer is fully awake.

During wake from sleep the DVI port is always scanned for changes and any new monitor detected should be brought up properly.

My guess is that in your case it's either the drivers (more correctly the NDRV aka runtime display driver or firmware) for the on-board graphics OR the switchbox is "dodgy." If the computer cannot read the display's EDID (descriptor information) over DDC (display data chanel - pretty standard and present on all computer displays for the last few years), then it's all going to fall apart and at best you'd be left with some generic mode.
Posted by: tfabris

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 18:43

Yeah, that's what I'd expect. But it's not left in a "Generic" mode, it's in the proper 1366x768 mode, but it's corrupted and locked up.
Posted by: mlord

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 18:51

Quote:
Quote:
"sudo killall WindowServer" should do it.


Any way for that to get triggered from the login screen without having to SSH in to the box from another computer?


How about a programmable keyboard -- one-touch login & issue command.
Posted by: hybrid8

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 18:54

I did say "at best" At worst it could damage your TV. So knock on wood.

What happens if you eliminate the sleep out of the whole process? How about:

1. just switching the switcher back and forth (with and without waiting a while)
2. unplug and re-plug DVI switcher while still swtiched to "Mac" input
3. switch to other, unplug, switch back, re-plug?

And also, how about sleep and wake without touching the switcher at all?

If you've covered any of these already, I'll have to apologize. I was trying to eat and drink a really strong beer at the same time.
Posted by: drakino

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 19:14

Keep in mind the SSH command is only for troubleshooting, not as a solution. And I can't think of a way to do that from the login screen, beyond logging in as ">console" to get to the Unix console. At that point it's moot anyway, since you said the login window doesn't respond.

And Bruno, this is an ATI video card he's using, as Tony has the older PowerPC model Mini.
Posted by: tfabris

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 20:02

Thanks, Bruno, I'll try those things next opportunity and report back.
Posted by: hybrid8

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 20:13

If it's a NDRV/firmware issue I can see if ATI is still maintaining that branch of code and report the issue to the appropriate people to find out if anything can be done.
Posted by: tfabris

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 20:38

Excellent.
Posted by: tfabris

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 20:44

Oh. While I'm here. One of the things I forgot to mention because I didn't think it would be a factor, but Bruno, you might know for sure whether it's a factor...

Since the run to the TV ends up being functionally about 10 feet from the AV rack, and since DVI cables only seem to come in 6 foot lengths unless I want to take out a mortgage, the connection to the TV isn't a DVI cable. It's a 10 foot cable I happened to have lying around from another project that's got DVI on one end, and HDMI on the other. At the switchbox end of things there is a DVI-to-HDMI adapter dongle, so that I've got DVI at both ends of the connection.

I was under the impression that such a connection was the same as a DVI connection, because the same signals got carried between the devices. Any comments, Bruno?
Posted by: drakino

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 21:06

Something about HDMI is different enough that my Dell laptop with a Radeon x800 class chipset can detect the DVI to HDMI adapter I use to connect it to my TV. The ATI driver pops up a box warning that no audio is being passed to the HDMI display, and to use a seperate audio path. This may just be due to something in the DCC info though.
Posted by: matthew_k

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 21:14

Quote:
and since DVI cables only seem to come in 6 foot lengths unless I want to take out a mortgage

monoprice.com.

Matthew
Posted by: tfabris

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 21:45

Quote:
The ATI driver pops up a box warning that no audio is being passed to the HDMI display, and to use a seperate audio path.

Oh yeah, there are some important differences between DVI and HDMI plugs, mainly that (if I recall correctly) HDMI doesn't have an audio option, doesn't have an analog-video option, and doesn't have a dual-link option. So I can see how the driver could detect that case. But for situations where none of the above are being used, I was under the impression that the actual digital video data carried on the HDMI cable was the same data and signaling protocol as what's carried on the DVI cable, including all handshaking and device identification.
Posted by: tfabris

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 21:46

Quote:
monoprice.com.

Holy cow. 7.20?
Posted by: matthew_k

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 22:02

Yes. Of course, your ones and zeros won't be as well formed as the $120 monster video cable with hand crocheted nylon sheath and yak butter cable lube, but what are you gonna do?

Matthew
Posted by: mlord

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 23:17

Quote:

Since the run to the TV ends up being functionally about 10 feet from the AV rack, and since DVI cables only seem to come in 6 foot lengths unless I want to take out a mortgage,

I think I posted this once before, but.. I have a distributer who sells DVI, HDMI, and combo cables of pretty much any standard length from 1m to 50' in length. At reasonable prices.

The folks up here in Canada in particular might be interested in this.

Cheers
Posted by: Dignan

Re: Mac Mini + DVI Swichbox = Toasted - 19/03/2007 23:33

Quote:
Quote:
monoprice.com.

Holy cow. 7.20?

Yeah, that site is the greatest. I recently picked up a component video switch from them. Four inputs (with digital audio), and remote controllable, all for about $30. Radio Shack, if they even carried such a thing, would probably try to charge about $180 for something like that. It works perfectly, and since I can remote control it, I merely have it programmed into a macro on my Pronto, and it's just like having those devices hooked directly up to the receiver.

I'm buying as much of my AV accessories from them as I can from now on.
Posted by: tfabris

Re: Mac Mini + DVI Swichbox = Toasted - 20/03/2007 00:00

Quote:
I recently picked up a component video switch from them. Four inputs (with digital audio), and remote controllable, all for about $30.


Holy cow, that's about what I spent on a manual component switch, without digital audio. Damn! I might have to get me one o' those.
Posted by: tfabris

Re: Mac Mini + DVI Swichbox = Toasted - 20/03/2007 00:44

Quote:
Yes. Of course, your ones and zeros won't be as well formed as the $120 monster video cable with hand crocheted nylon sheath and yak butter cable lube, but what are you gonna do?

Nearly spit milk and half-chewed thin mints onto my keyboard by the way. Thanks.
Posted by: drakino

Re: Mac Mini + DVI Swichbox = Toasted - 20/03/2007 00:56

Quote:
Nearly spit milk and half-chewed thin mints onto my keyboard by the way. Thanks.


*wanders off to the kitchen to find the stash of thin mint cookies*
Posted by: Ezekiel

Re: Mac Mini + DVI Swichbox = Toasted - 20/03/2007 01:15


Customer Service
(909)989-6887
[email protected]
Availability
Monday - Friday:
9AM to 5PM Pacific Time


Love monoprice.com's customer service picture!

-Zeke
Posted by: cushman

Re: Mac Mini + DVI Swichbox = Toasted - 20/03/2007 03:30

I have a Joytech AV Control Center 2 that I like a lot, and it fits into my component rack nicely, too. You can get them on eBay or online for about $65. I use my Logitech Harmony remote to control it so it's built into all my macros.
Posted by: tfabris

Re: Mac Mini + DVI Swichbox = Toasted - 20/03/2007 04:54

Quote:
Thanks, Bruno, I'll try those things next opportunity and report back.


Okay, here's some fun facts.

Any combination of putting the mac mini TO SLEEP while the ...
-cable is unplugged
-switch box is switched away from the mac's input
will induce the bug. Doesn't matter if the mac is at the login screen or it's logged in. Doesn't matter how the mac wakes up, either. It's the act of putting it TO SLEEP while DISCONNECTED from its display that causes this.

Any combination of unplugging cable or switching away the switch box are synonymous. I get all the same behaviors no matter which of those I do. So I don't think it's the switchbox, it's the act of being disconnected from mister TV at sleepytime that causes this.

If I force the mac back into sleep mode and awake again after the screen is corrupted: No fix. Once the corruption happens, resleeping doesn't fix it.

No amount of switching or unplugging or replugging or waiting or any combination thereof will fix it once it's happened.

In theory, doing DETECT DISPLAYS should fix it, but executing the keystrokes to do DETECT DISPLAYS doesn't fix it. However, as I'll mention in the next paragraph, I can't be sure that I'm doing the right keystrokes. Because...

When the display is switched away/unplugged/whatever, the keystrokes don't necessarily behave the way you expect them to. Focus goes kinda wonky on the mac if it thinks the display is disconnected. For example. I was doing Ctrl-F2 to activate the finder menu, then up and down arrow keys to select items. Well, those work sometimes, but if I've got the display switched away, do those keystrokes, and then I switch it back, I see that BOTH the finder menu is highlighted AND the item on the desktop that the keys woulda selected is highlighted. You shouldn't be able to do both, but there ya go.

Anyhoo. Even with the above, I don't think DETECT DISPLAYS fixed it. I think it was really doing it and it just didn't work.

Rebooting fixes it of course, but I wanted something quicker than a reboot.

sudo killall WindowServer does, in fact, work to fix it. It basically kills the UI, drops out to the login screen, and reloads the video driver. Is nice. Is lots of keystrokes. Is pain to execute correctly blind. But is nice.

Wonder what's really causing all this? Any ideas Bruno?
Posted by: hybrid8

Re: Mac Mini + DVI Swichbox = Toasted - 20/03/2007 12:06

I still didn't see you mention anything about doing all those tests without putting the machine to sleep.

Since you've explained your dongle and adapter cable scenario, it would also be worth trying the tests with plain DVI cables (no HDMI anything) as well as with plain DVI cable and no switch box (for this you don't have the switch-away case of course).
Posted by: tfabris

Re: Mac Mini + DVI Swichbox = Toasted - 20/03/2007 14:59


I did also do all the plugging and unplugging and switching without sleepies. It's only the sleepytime that makes it happen. Once it's happened, nothing short of the Act Of God (killall) fixes it.

I might do the direct-dvi-connect thingy as a test eventually, but the way things are mounted and wired now, that would take an act of congress. (or a mail order for that 10 foot DVI-only cable.) I agree that I need to test this. I can see that there's a possibility that the problem will go away completely if I use a real DVI cable instead of an HDMI cable. Unfortunately, not gonna happen over the next few days, as I'm generally really busy of late... Last night was an unusually "slow" night (had only 10 things to do instead of 20:) ).