Once Upon a Problem

July 16, 2011

Video playback issues with Ubuntu 11.04 and Radeon HD 4870 card

Filed under: Ubuntu 11.04 — onceuponaproblem @ 1:54 pm
Tags: , , , , , , ,

Long time since I posted last, I guess as I come across many Linux problems just like I did with Windows (now I use Ubuntu Server for my desktop machine), its worth getting back into this. Note that Word Press’ Javascript ‘insert link’ functionality is broken so all links will be in text.

I delayed installing 11.04 for some time due to bugs with kernel power management and the GNOME classic desktop, but this week I finally decided it was time to upgrade.

After fixing the usual minor breakage from the upgrade, one thing became apparent – video playback was fucked using the free software radeon driver. Since practically everything revolves around watching anime  on this machine, that was completely unacceptable. Tearing and stuttering was obvious during pans (mplayer wasnt complaining that the cpu was too slow etc, and since I started in 9.04 video playback has been fine), making anime unwatchable.

Long story short, I read up on Phoronix (http://www.phoronix.com/scan.php?page=article&item=amd_r600g_june10&num=1) to get some familiarity with the current state of X windows rendering and did some work on how to test X configurations without logging out of your main session (which is unacceptable as this machine is essentially a server running some gui apps).

It turns out that the ‘Switch Users’ feature actually allows you to spawn multiple sessions of X running under different users – and when you login as a new user, of course the new X session’s configuration is generated/read in without affecting your normal X session. With this and after reading the radeon manpage, I was able to create the following ‘/etc/X11/xorg.conf’:

Section “Device”
Identifier “devname”
Driver “radeon”
Option “SwapbuffersWait” “off”
Option “ColorTiling” “on”
Option “EXAVSync” “on”
EndSection

SwapbuffersWait and ColorTiling are set as Phoronix said they would make 3D things faster (Minecraft is still shockingly slow – 9-15fps – so I havent really seen that), however the important option is EXAVSync.

This has stopped tearing in video playback, however I still get nasty judders visible during pans. Testing on a separate X instance showed that with the above settings, playback was almost perfect – so I assume that my normal 2D desktop session is too much for radeon to cope with any more (…).

At least I can switch over to a separate user to watch videos with this, I’d rather stick to free software and not use the proprietary driver.

If anyone has ideas of how to fight this issue further, I’m all ears (enabling the xorg-edgers PPA with the above xorg.conf actually lead to performance worse than the stock 11.04 configuration, which worries me greatly for the future).

November 7, 2009

Maintaining Folder Display Options In Explorer

Filed under: Windows XP — onceuponaproblem @ 10:31 pm

Just written up another longstanding problem I’ve had – failure of Explorer to maintain the sort preferences of a folder, even though its told to do this (kept setting sort by Name in my case when it should be by Modified):

When Tools -> Folder Options -> View tab -> Advanced settings: Remember each folder’s view settings is enabled, Explorer saves folder display options (the View setting, sort option etc) in ‘ShellBag’ entries in the registry, see ‘HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\Bags’ and ‘HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags’. There is a maximum number of folders that can have these settings saved for, and this is located at ‘HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\BagMRU Size’ – this defaults to 5,000 in Windows XP SP2 (remember to edit it as a Decimal value).

NirSoft has a useful tool that allows you to see all of the ShellBags currently defined, including their actual path and the ability to hop directly to the associated registry values, called ShellBagsView. Find the folder you are interested in and hop to the registry – the sort method defined for the folder is maintained in the ‘Sort’ key, which can take the following values:

0: Sort by name
1: Sort by size
2: Sort by type
3: Sort by modified

Hopefully this will get Explorer to behave.

Windows Time Failure

Filed under: Windows XP — onceuponaproblem @ 10:22 pm

For some time now, Windows has failed miserably to keep the time accurate on my main machine. After researching into NTP and ensuring UDP traffic to port 123 for svchost.exe was allowed through Sunbelt Personal Firewall a few years ago, I expected the problem to be solved.

However, this didn’t do the trick – Windows still managed to be ~2 minutes slow even after a successful update the prior day duing testing, which is completely unacceptable (its my main time source for catching the bus in the morning).

The lastest attack on this issue revolves around a recent discovery of Windows Time settings in Group Policy:

1. Run gpedit.msc (Group Policy Editing MMC snap-in).
2. Local Computer Policy -> Computer Configuration -> Administrative Templates -> System -> Windows Time Service -> Time Providers:
Enable Windows NTP Client: Enabled.
Configure Windows NTP Client: Enabled.
Type: NTP (NT5DS means that the client attempts to synch with a Domain Controller’s time service, which doesn’t exist on my network).
Special Poll Interval (the setting to determine update frequency): 3600 (seconds, hourly).
EventLogFlags: 1 (log time jump changes – this should give me a proper audit record if the NTP client is doing its job).

See Windows Time Service Tools and Settings, search for Group Policy – provides some documentation on these settings and their associated registry keys.

After making the changes, the Internet Time tab of Date and Time Properties correctly acknowledged that time is synched hourly, so I have my hopes up (I think the default is weekly).

October 3, 2009

New Fork Of Peer Guardian 2: PeerBlock

Filed under: Windows Server 2003,Windows XP — onceuponaproblem @ 4:41 pm
Tags: , , ,

Peer Guardian 2 has long since screwed up on my machines. Years ago it worked perfectly, but at some point various problems appeared like blocking 0 IP addresses for no reason (presumably mass corruption while downloading of all lists it was supposed to manage), random GPFs and then in recent years not spawning a window or systray icon (literally a windowless-process) meaning I have no idea if it is working or not.

(more…)

September 5, 2009

Windows Server 2003 – Unable to run sc.exe?

Recently at work, I’ve had the pleasure of being allowed to mess around with a spare Windows Server 2003 R2 machine. Its much faster compared to similar hardware running XP, so so far its been a joy to use.

However, as usual, it brings its own problems…

When I wanted to enumerate internal Windows services with sc.exe (a commandline program that allows you to create, delete, list etc services), it failed to run. WTF?

In fact, it did execute, but promptly terminated itself. Running the exe on another machine worked, and XP’s sc.exe worked on the Server 2003 machine as well. So why would this fail?

Process Monitor showed that sc was searching for  w03a3409.dll in various PATH places, but not finding anything. Everything (a fantastic file indexer and instant search tool) confirmed that this dll didn’t exist. Searching through the registry however showed it was associated with two hotfixes:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows Server 2003\SP3\KB923561

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows Server 2003\SP3\KB956572

The latter was key – it talked about sc.exe in one of the FAQ answers. I tracked down the installer through Microsoft Download Center (thanks for not directly linking to the installer in the article Microsoft) and installed it on the server (why didn’t it complain that the hotfix had been installed before?).

Low and behold, even before restarting the machine as it requested, sc suddenly worked. Presumably this is another M$ fuckup then… Both before and after this issue, the machine checked out as being completely uptodate according to Microsoft Update.

July 22, 2009

Secondary Machine PSU Failure, Then Mobo Failure

As usual, I try to concentrate on one area of work, and something else catastrophically fails and forces my attention to shift to it.

This time my secondary machine died – I host my database server, wiki and issue tracker on it (and I use the latter two a lot to record issues and try to record and keep progress permanent).

First, the PSU started to whine – prolonged bouts of  a very high pitch tone, just loud enough to hear even with ear defenders. I remembered this had happened in the past, so I put up with it for a while… except this time it didn’t go away. I finally decided to turn the machine off for 5 minutes to give it a ‘rest’ (which means its failed its job of being a permanently-up server), however the POS didn’t turn back on again.

I swapped out the shitty FSP Group PSU for a spare Antec and tried to start the machine up – but no luck, except for one instance where I quickly managed to create fresh images of the drive partitions. Further tests after that failed.

Inspection of the motherboard revealed I had a few leaky capacitors – so presumably it had been afflicted with the Capacitor Plague, which does fit given that it is a 2002-3 era machine. Two more additions to the shitlist in the same day then (FSP for PSUs, MSI for motherboards).

July 10, 2009

Random Application Event Log Corruption On Windows XP Home Machine

This is a good example of a nice typical random issue that happens to me. Seems last night the Application Event Log decided to corrupt itself on my secondary machine:

Windows systray popup detected:

System Event Log
================
Type: Information.
Timestamp: Fri Jul 10 00:12:05 2009.
Event: 0.
Source: Application.
Category: Event Log Corruption.
User: SYSTEM.
SNARE Event Count: 1.
Description:
The event log is corrupt and requires immediate attention

This is an excerpt from an email I was sent by SNARE / Kiwi Syslog Daemon when it apparently happened (SNARE and Kiwi are services I run that allow me to get emailed when important events happen on my machines). The SNARE service promptly died after.

I vaguelly remember having this issue in the past – presumably the only way to ‘solve’ this issue is to clear the event log and start afresh, which I have done. Good thing I don’t usually use old event log data.

July 8, 2009

X11 Forwarding On Steroids: NX Server/NX Technology

Filed under: Linux Server — onceuponaproblem @ 8:49 pm
Tags: , , , , , , ,

While googling on possible solutions to X11′s slowness (see earlier post), I found two main responses – use a faster encryption algortithm with Putty (blowfish rather than AES), or ditch normal X11 forwarding altogether and use NX Server (wikipedia).

(more…)

WINE’d uTorrent 1.8.3 Installation And Seeding Issues

Filed under: Linux Server — onceuponaproblem @ 4:22 pm
Tags: , , , , , ,

Yesterday I upgraded uTorrent to 1.8.3 on my Debian server. Installation intially failed with the final step (presumably starting uTorrent up) failing with a dialog reporting that there is an unresponsive running instance of uTorrent that needs to be stopped before uTorrent can start up (or similar). Thanks to Google and acmelab68′s blog, moving my uTorrent per-user data from the application data folder to uTorrent’s program folder solved this issue, and uTorrent started up successfully without trying to install itself again (‘NOTE: Settings file found in directory of executable; using that.’ turns up in the log, explaining the behaviour). The man himself, Firon, noted that a settings.dat file (blank or otherwise) in the uTorrent program directory is what actually does the trick.

Unfortunately later on I noticed that 1.8.3 seemed to be causing a new problem on my system. The torrents I was seeding should be generating 1.5-2MB/Sec of constant u/l bw (bandwidth), however the u/l speed had gone to hell, with small infrequent spikes:

(more…)

July 7, 2009

Debian Sid, X11 Forwarding, Cygwin/X and Xming

Filed under: Linux Server — onceuponaproblem @ 7:51 pm
Tags: , , , , , ,

I have been inspired ever since reading the section about X11 forwarding in Putty’s help file.

Sending windows that are supposed to exist on your Linux server to your local Windows desktop? Awesome, but surely unpossible?

At least, it was at the start…

My first task was to get Cygwin/X working with a current Cygwin install on my XP machine. Presumably once I had mastered that, I could then pull it off remotely from my Debian server. Unfortunately, whenever I tried this before I constantly got bs errors back saying that Cygwin/X couldnt connect to the display – I remember this put me off when I first discovered X11 forwarding last year. Determined to make a difference this time, I played with an XP VM. I currently use Sunbelt Personal Firewall (SPFW), and from previous googling I suspected that it might be interfering with things.

(more…)

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.