HDMI audio output hell

This is a gigantic PITA. I can’t believe some people still think proprietary software has good support for proprietary hardware – Even with a relatively simple setup like this, many hours of searching forums, installing and reinstalling drivers, fiddling with the BIOS and sound settings still hasn’t produced any sound.

  1. Upgraded the A/V receiver firmware. This was easy since I’ve connected it to the Internet. It’s now got the latest firmware.
  2. Installed, removed and reinstalled the latest video driver – Catalyst Software Suite 12.8. I rebooted after each step.
  3. When I plug in the HDMI cable, a device called Generic PnP Monitor is added to the Devices list. I know it corresponds to the A/V receiver, because it is removed again if I unplug the cable. This messed up the dual-screen display the first time I plugged in the HDMI cable, making only the secondary display active until I managed to move the Catalyst Control Center window from the invisible desktop to the visible one.
  4. Tried to update the driver of the Generic PnP Monitor, but it just says the driver is up to date.
  5. In the Sound → Playback window the AMD HDMI Output playback device is enabled, but it shows simply Not plugged in, so I can’t configure it or set it to the default, as some forum posts instruct.
  6. In the BIOS menu there is a setting called SPDIF OUT Mode Setting [sic], with possible values SPDIF and HDMI. It’s set to SPDIF, according to this cryptic description: Select the [HDMI] option only if you have a video card with HDMI support and are using the SPDIF signal for the high-definition monitor’s speakers. I’m not using monitor speakers.
  7. In the Screen Resolution window there’s a TX-NR509 device. The resolution and orientation can’t be set, and I’ve set Multiple displays to Disconnect this display.
  8. The A/V receiver shows that it’s connected, but not receiving a signal.

In conclusion, both devices know about each other, but Windows 7 seems to think the A/V receiver is a monitor. Any ideas?

How to switch keyboard layouts on the Windows XP login screen

Do you use several keyboard layouts in Windows XP? Ever been annoyed that the layout at the login screen is locked to the installation default? Here’s how to fix it, with a simple registry hack.

Disclaimer: Use at your own risk, yada yada yada…

How to enable multiple keyboard layouts at login:

  1. Back up the registry!
  2. Start the registry editor: Press Windows+R, type regedit, and press Enter.
  3. Click on HKEY_USERS, and locate the key (the things which look like directories) which is your SID – It should be one of the longest. If you have problems finding the SID, you can try MS’ own getsid.
  4. Right-click the sub-key Control Panel\Input Method\Hot Keys and select Export.
  5. Save the file to disk.
  6. Open the file in a text editor.
  7. Leave the first line in the file, but remove all the keys (and their name/value pairs) which don’t end in 10X, where X is a number. These are the keyboard shortcuts for switching between the layouts (if you have set any).
  8. Replace the SIDs in the key names with .DEFAULT, so that they will be applied to the default user.
  9. Export the Keyboard Layout\Preload key to a file, and copy the contents (except the first line) into the file you worked with earlier. These are the layout settings.
  10. Now you should have a working registry file. Before proceeding, you should check that it’s at least similar to the one I ended up with, below.
  11. Save and double-click on the file to insert the data in the registry.

Now you should be able to change the keyboard layout the same way you do it in Windows when logging in.

Code

Windows Registry Editor Version 5.00
; $Id: dvorak-keyboard-layout-at-login.reg 169 2007-09-25 09:31:02Z vengmark $

; Shortcut keys for layouts 1, 2, and 3
[HKEY_USERS\.DEFAULT\Control Panel\Input Method\Hot Keys0000100]
"Virtual Key"=hex:31,00,00,00
"Key Modifiers"=hex:05,c0,00,00
"Target IME"=hex:09,04,02,f0

[HKEY_USERS\.DEFAULT\Control Panel\Input Method\Hot Keys0000101]
"Virtual Key"=hex:32,00,00,00
"Key Modifiers"=hex:05,c0,00,00
"Target IME"=hex:09,04,09,04

[HKEY_USERS\.DEFAULT\Control Panel\Input Method\Hot Keys0000102]
"Virtual Key"=hex:33,00,00,00
"Key Modifiers"=hex:05,c0,00,00
"Target IME"=hex:14,04,14,04

; Remove old settings
[-HKEY_USERS\.DEFAULT\Keyboard Layout]

; Set layouts
[HKEY_USERS\.DEFAULT\Keyboard Layout\Preload]
; US-Dvorak (default)
"1"="00000409"

; US-English
"2"="d0000409"

; Norwegian
"3"="00000414"

; Fallback layouts
[HKEY_USERS\.DEFAULT\Keyboard Layout\Substitutes]
"00000409"="00010409"
"d0000409"="00000409"

; Use Alt-Shift-# (# is 1, 2, or 3) to change between layouts
[HKEY_USERS\.DEFAULT\Keyboard Layout\Toggle]
"Hotkey"="3"
"Language Hotkey"="3"
"Layout Hotkey"="3"

Dvorak in rdesktop

This article is for anyone who is using the Dvorak keyboard layout on Linux, and having problems getting the same to work when connecting to a Windows machine using rdesktop. Jump directly to the solution if you are not interested in the problems encountered.

Problems

First, keymaps are just that – AFAIK they just define a translation from the codes sent from the keyboard (“keycodes”, e.g. “41” for the key marked “F” on a QWERTY keyboard) to a symbolic name (“keysym”, e.g. “0x66” with US English and “0x75” with Dvorak keymap when pressing the key marked “F” on a QWERTY keyboard). The problem in connection with rdesktop seems to be that there is a double translation going on when both Windows and Linux are set to use Dvorak – “asdf” on QWERTY should become “aoeu” when using Dvorak, but instead you get “ar.g” in Windows. Argh indeed.

Second, there is no built in Dvorak support in rdesktop. I googled a bit, but couldn’t find any straight answers for why that is the case. Maybe the “market” is just too small, or everyone else figured out the solution with a lot less trouble than I had.

Solution

The only configuration I could get to work is the following:

  • Linux set up to use Dvorak
  • rdesktop set up to use US English ( -k en-us)
  • Windows set up to use US English

Beware though: Even though you’re using the setup above, your keyboard map will be messed up if the Windows desktop locks, i.e., if you during a session arrive at the login prompt. You should therefore turn off the screen saver, and use the Linux screen lock instead.

Re: Bug #1 in Ubuntu

Ubuntu Linux has become very popular in the open source community in only two years, last confirmed by the 2005 LinuxQuestions.org Members Choice Awards. But being number one in a community of computer literates, nerds, and geeks is not enough to gain a significant market share, as shown by their #1 bug, entitled “Microsoft has a majority market share”.

So here’s a couple of cents worth of musings on why open source (and especially Linux) is not much used, what can be done about it, and where it’s headed.

Ignorance, or being stuck with what you’ve got

AKA, “users don’t know that there are alternatives.” This is a popular reason, but I believe it is a bit off the mark: Users don’t know that there exists alternatives which are both free and good. Most people believe there is no such thing as a free lunch, and free (as in speech and beer) sounds dubious to people who have learned not to trust anything on the Internet.

The “family nerd”, the poor soul which has to fix everybody’s computer problems, has become the forerunner in this mission, because of the empirical evidence of security, stability and usability of some brilliant new software. Already it seems Firefox is spreading around like a wildfire, helped by a host of extensions such as AdBlock and SessionSaver, the latest of which will be part of Firefox 2.0.

The trench wars on the legality of file sharing has also sparked a lot of open source development, such as RevConnect (Direct Connect client) and Azureus (BitTorrent client). These can easily replace the old way of having to jump through elaborate web page hoops to download free software and media files, from web pages you don’t know whether to trust or not. With P2P software, trust is like viral marketing: If something is popular (i.e., many people are sharing / downloading the same files), it’s probably good stuff. That’s also part of the beauty of open source: Since the program and source code is scrutinized by many, any malicious behavior by the developers is likely to be detected, discussed, and resolved, either by a forking of the code or by massive abandon by the users. Closed vs. open source security is a much too big discussion to take on here, suffice to say that both camps have released software with horrible bugs.

Laziness, or work space pragmatics

AKA, “users don’t want to learn something new.” Also not completely true: Users are, for the most part, primarily interested in getting the work done. If Microsoft Office was as broken as Internet Explorer, users would be downloading OpenOffice.org in droves, but as it turns out, current (and older) word processing and email programs are more than adequate for the common user. Hell, I could probably be using WordPerfect at work without anybody noticing.

When your primary goal is to get a bunch of bulleted lists in a presentable format in two hours, it is hardly pragmatic to start thinking about whether you’ll be able to view that same presentation in five years, or convert it into a PDF file in a flash. And from what I’ve heard and read, a lot of people seem to think that keeping to the same level as everybody else is the optimum. Hacking the system to make it conform to your work style will invariably break it sometimes, and that is likely to be more visible than the x% overall productivity gain.

Openness not usually considered, don’t want to “fiddle” with system settings; developers don’t want to put in the extra effort to make software cross-platform

Stupidity, or not thinking (far) ahead

Except among nerds and geeks, the freedom of open source software seems to be ignored. It’s difficult to find good analogies, but that won’t stop me from trying: Food. “Closed source food” would be sold without ingredient or nutrition descriptions (source code & bug databases), it would be physically addicting (vendor lock-in mechanisms), and you would not be allowed to share it, take it with you to a new kitchen or eat it at work (license).

Other points, which are not inherent in closed source, but seem to be the norm in the industry: It would be sold in sealed boxes (retail distribution), nobody actually producing it would be available for help (customer support), for the most part you would have to use special cutlery (OS / hardware) for it, and every so often your recipes incorporating this food would go haywire (incompatible upgrades, bad standards support).

Open source food, on the other hand, would come with a recipe for how to make your own (source code), virtually no expiration date (license allows for porting), and often free help with your recipes (community support).

OpenDocument is a great example of the superiority of open source: If you uncompress an OpenOffice.org Writer file, you’ll find the original images, application settings, contents, and text styles in separate files. If you want to change some detail in the text or an image, you can manipulate the file in a suitable editor, and then compress the files again to have a fully working document. Most of the files are XML, so you can also automate data collection or manipulation in several documents easily. No such luck with Microsoft Word: Everything is saved in a proprietary, secret, binary format, which the OpenOffice.org team has used years to decipher, in order to be able to import MS Office documents.

iPod display bug in software version 1.1

The newest software update for the iPod video has broken part of the playback functionality.

How to trigger the bug

  1. Use the iPod Updater to install software version 1.1
  2. Start playback of music
  3. Double click the center button (quickly) to go to the rating display
  4. Single click the center button

Bug nature

After the last click, you will see the rating display again, instead of the music progress bar. The wheel, however, will work as if you were back to the primary page – It will change the volume.

The result is that the rating display will “overlay” the other displays, even if the controls work as they would if the correct pages had been displayed.

To get out of the rating display, just single click the center button until you see the music progress bar again.

Other information

Platform: PC with Windows XP
Updater version: 2006-01-10
iPod model: 30 GB video (MA146LL/A)

Submitting CAST bugs, a prologue

At work, we’re using CAST 5.0 for Oracle (build 1007). It’s a good product, but as with all software, it has bugs. I wanted to report some of them today, and had a look at the software documentation. There was no “Report bugs” entry under the “How to…” section, but there was plenty of contact information under “Welcome/Contacting CAST – Office Locations”. This linked to a “quick email form” for “Sales, Product Support or General Inquiries”.

Too bad the link was dead. A little unprofessional in 2006, specially since it’s been on Jakob Nielsen’s Top Ten Mistakes of Web Design in 1999.

Well, let’s not have that mess up the road to the grandest goal of all time: Fixing bugs. So we’ll have a go at the referenced “CAST Web Site“… Can anyone say “404”? Dang. Over we go to the base URL. Next stop: The CAST 5 Overview. CTRL-F bug. Nada. Search form “bugs” & click. I got four results, which can be summarized as follows:

A Google “bugs” search delivered essentially no new information. Googling for “contact” on the site finally gave a result. However, the contact form was only linked from relatively obscure pages, required me to submit my full name, function/title, email, and company name, and the selection list for the reason for contacting them had no “Bug reporting” entry. Well, I’ll submit them under “Product support”, and see what happens.