I just realised that the sound on my Futitsu Siemens Li2727 laptop had stopped working - probably when I upgraded to Ubuntu 8.10, but not sure.
All you get when you play sound is crackling.
Dmesg gave the following:
[ 13.411005] HDA Intel 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[ 13.411038] HDA Intel 0000:00:1b.0: setting latency timer to 64
[ 13.442811] hda_codec: Unknown model for ALC268, trying auto-probe from BIOS.
The 'Unknown model' looked like a problem, so I spent a while searching for solutions to do with this, but to no avail.
Found a bug report - https://bugs.launchpad.net/ubuntu/+source/linux/+bug/281322, which sounded like my problem, but was solved by adjusting alsamixer.
When I used alsamixer I only saw a single channel, which I think was the PC speaker, so it didn't sound right. Looked at https://wiki.ubuntu.com/DebuggingSoundProblems which said there was another program, gnome-alsamixer. Tried this and it showed me lots of different sound card channels. The volume of the PCM channel was zero - setting this to full volume cured the problem - Solved!
Descriptions of some of my geeky projects in case I need to remember what I did in the future.
Thursday, 6 November 2008
Fujitsu Li2727 Sound Problems in Ubuntu 8.10
I just realised that the sound on my Futitsu Siemens Li2727 laptop had stopped working - probably when I upgraded to Ubuntu 8.10, but not sure.
All you get when you play sound is crackling.
Dmesg gave the following:
[ 13.411005] HDA Intel 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[ 13.411038] HDA Intel 0000:00:1b.0: setting latency timer to 64
[ 13.442811] hda_codec: Unknown model for ALC268, trying auto-probe from BIOS.
The 'Unknown model' looked like a problem, so I spent a while searching for solutions to do with this, but to no avail.
Found a bug report - https://bugs.launchpad.net/ubuntu/+source/linux/+bug/281322, which sounded like my problem, but was solved by adjusting alsamixer.
When I used alsamixer I only saw a single channel, which I think was the PC speaker, so it didn't sound right. Looked at https://wiki.ubuntu.com/DebuggingSoundProblems which said there was another program, gnome-alsamixer. Tried this and it showed me lots of different sound card channels. The volume of the PCM channel was zero - setting this to full volume cured the problem - Solved!
All you get when you play sound is crackling.
Dmesg gave the following:
[ 13.411005] HDA Intel 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[ 13.411038] HDA Intel 0000:00:1b.0: setting latency timer to 64
[ 13.442811] hda_codec: Unknown model for ALC268, trying auto-probe from BIOS.
The 'Unknown model' looked like a problem, so I spent a while searching for solutions to do with this, but to no avail.
Found a bug report - https://bugs.launchpad.net/ubuntu/+source/linux/+bug/281322, which sounded like my problem, but was solved by adjusting alsamixer.
When I used alsamixer I only saw a single channel, which I think was the PC speaker, so it didn't sound right. Looked at https://wiki.ubuntu.com/DebuggingSoundProblems which said there was another program, gnome-alsamixer. Tried this and it showed me lots of different sound card channels. The volume of the PCM channel was zero - setting this to full volume cured the problem - Solved!
Monday, 3 November 2008
Cross Browser JavaScript
I have been having terrible trouble making my daughter's 'Countdown to Christmas' google gadget work on internet explorer - works fine on firefox, but alas quite a lot of the world use IE, and on IE you just get a blank square.
IE is not helpful with debugging - it seems to be fussier about little problems that firefox let me get away with, so there were quite a few typos (no closing '>' etc.).
One significant issue was that I was attempting to scale the background image in html using width='100%' height='100%' - firefox stretches the image to fit, but within a google gadget at any rate, internet explorer just displays a blank square - no helpful error messages or anything - useful!
This means that my very clever bit of code to put the text in the correct position on the image doesn't work...Cured by forcing the image to a specified size in pixels rather than % - just means you have to size your page to fit it....This was not pretty, so had to solve it. Went for specifying width=100%, which works, and let the height float to preserve the aspect ratio of the image - just had to add yet more code to pick the vertical position of the text correctly.
The last problem was the dates - IE said there were about 600000 days to christmas, which was not quite right - this was because getYear() returns 108 in Firefox and 2008 in IE. Using getFullYear() cured it.
IE is not helpful with debugging - it seems to be fussier about little problems that firefox let me get away with, so there were quite a few typos (no closing '>' etc.).
One significant issue was that I was attempting to scale the background image in html using width='100%' height='100%' - firefox stretches the image to fit, but within a google gadget at any rate, internet explorer just displays a blank square - no helpful error messages or anything - useful!
This means that my very clever bit of code to put the text in the correct position on the image doesn't work...Cured by forcing the image to a specified size in pixels rather than % - just means you have to size your page to fit it....This was not pretty, so had to solve it. Went for specifying width=100%, which works, and let the height float to preserve the aspect ratio of the image - just had to add yet more code to pick the vertical position of the text correctly.
The last problem was the dates - IE said there were about 600000 days to christmas, which was not quite right - this was because getYear() returns 108 in Firefox and 2008 in IE. Using getFullYear() cured it.
Cross Browser JavaScript
I have been having terrible trouble making my daughter's 'Countdown to Christmas' google gadget work on internet explorer - works fine on firefox, but alas quite a lot of the world use IE, and on IE you just get a blank square.
IE is not helpful with debugging - it seems to be fussier about little problems that firefox let me get away with, so there were quite a few typos (no closing '>' etc.).
One significant issue was that I was attempting to scale the background image in html using width='100%' height='100%' - firefox stretches the image to fit, but within a google gadget at any rate, internet explorer just displays a blank square - no helpful error messages or anything - useful!
This means that my very clever bit of code to put the text in the correct position on the image doesn't work...Cured by forcing the image to a specified size in pixels rather than % - just means you have to size your page to fit it....This was not pretty, so had to solve it. Went for specifying width=100%, which works, and let the height float to preserve the aspect ratio of the image - just had to add yet more code to pick the vertical position of the text correctly.
The last problem was the dates - IE said there were about 600000 days to christmas, which was not quite right - this was because getYear() returns 108 in Firefox and 2008 in IE. Using getFullYear() cured it.
IE is not helpful with debugging - it seems to be fussier about little problems that firefox let me get away with, so there were quite a few typos (no closing '>' etc.).
One significant issue was that I was attempting to scale the background image in html using width='100%' height='100%' - firefox stretches the image to fit, but within a google gadget at any rate, internet explorer just displays a blank square - no helpful error messages or anything - useful!
This means that my very clever bit of code to put the text in the correct position on the image doesn't work...Cured by forcing the image to a specified size in pixels rather than % - just means you have to size your page to fit it....This was not pretty, so had to solve it. Went for specifying width=100%, which works, and let the height float to preserve the aspect ratio of the image - just had to add yet more code to pick the vertical position of the text correctly.
The last problem was the dates - IE said there were about 600000 days to christmas, which was not quite right - this was because getYear() returns 108 in Firefox and 2008 in IE. Using getFullYear() cured it.
Sunday, 2 November 2008
Wireless Networking in Linux on Fujitsu Siemens Amilo Li2727 laptop
I have a Fujitsu Siemens Amilo Li2727 laptop, which has a built in wireless network card.
Ubuntu Linux 8.10 detects the card as an AR242X (by typing lspci), but the madwifi driver compatibility page says it should be an AR5007EG.
The symptoms are that wireless networking does not work at all. dmesg reports:
"wifi%d: unable to attach hardware: 'Hardware revision not supported' (HAL status 13)".
No wifi devices present when doing ifconfig, iwconfig etc. There is one odd device (pan0) - I don't know what this is!
There are quite a few forum posts about this problem - they say that the madwifi driver can solve the problem, but you need to download a patch and re-compile the driver. When you download the patch the README file says the instructions are out of date, and you should use the updated madwifi driver as described in http://madwifi.org/ticket/1192. That page gives a link to the driver source code and the compilation instructions are stored in http://madwifi.org/wiki/UserDocs/FirstTimeHowTo. I followed these - they were very easy - first deleting the Ubuntu supplied copy of the madwifi driver, then compiling and installing the new one.
After re-booting I have two devices - wifi0 and ath0. iwconfig reports that ath0 has wifi extensions, so this looks promising.
Tried iwlist ath0 scanning - it reported that the network was down.
did ifconfig ath0 up. Then iwlist ath0 scanning says has no scan results, which is wrong because I am sat next to a wireless router...
Had a look at http://ubuntuforums.org/showthread.php?t=669267.
This got me looking at the Hardware Drivers manager in System/Administration - this said that there was a proprietary driver for the wireless card activated, so maybe this is intefering with things? Deactivated it..and rebooted again..
To start with, no wireless at all, but doing 'modprobe ath-pci' gave the following when I typed dmesg:
ath_hal: module license 'Proprietary' taints kernel.
[ 159.942692] AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, RF2425, RF2417)
[ 160.035904] ath_pci 0000:08:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 160.035939] ath_pci 0000:08:00.0: setting latency timer to 64
[ 160.534217] MadWifi: ath_attach: Switching rfkill capability off.
[ 160.541042] wifi0: Atheros AR2425 chip found (MAC 14.2, PHY SChip 7.0, Radio 10.2)
[ 160.559097] ath_pci: wifi0: Atheros 5424/2424: mem=0xfa000000, irq=18
[ 198.800025] ath0: no IPv6 routers present
At least there are no errors....but still iwlist reports no scan results.
Another thing I have read about is that the Amilo does not power up the wireless adapter automatically - could the radio transmitter be switched off?
The madwifi compatibility page pointed to this article:
http://madwifi.org/wiki/UserDocs/MiniPCI#FujistsuSiemensAmiloLi2727withAtherosAR2425AR5007EG802.11abgPCI-erev01
This talks about downloading the acerhk hotkey driver source and compiling it, but
I found that it is already installed in ubuntu and doing 'modprobe acerhk' ran it without error.
I pressssed Fn-F1 a few times and nothing happened (apparantly), then I realised that to make the wifi led light you have to do that in software (echo on > /proc/driver/acerhk/wirelessled). Doing this put the led on, and iwlist ath0 scanning gave me a list of access points - Success!!!
It seems that the acerhk driver has the code to switch on the wireless transmitter by doing the echo command above, but the Fn-F1 key does not work.
Now the procedure to get wireless networking working after boot is:
modprobe ath-pci
modprobe acerhk
echo on > /proc/driver/acerhk/wirelessled
ifdown ath0
ifup ath0
This needs automating!...
Ubuntu Linux 8.10 detects the card as an AR242X (by typing lspci), but the madwifi driver compatibility page says it should be an AR5007EG.
The symptoms are that wireless networking does not work at all. dmesg reports:
"wifi%d: unable to attach hardware: 'Hardware revision not supported' (HAL status 13)".
No wifi devices present when doing ifconfig, iwconfig etc. There is one odd device (pan0) - I don't know what this is!
There are quite a few forum posts about this problem - they say that the madwifi driver can solve the problem, but you need to download a patch and re-compile the driver. When you download the patch the README file says the instructions are out of date, and you should use the updated madwifi driver as described in http://madwifi.org/ticket/1192. That page gives a link to the driver source code and the compilation instructions are stored in http://madwifi.org/wiki/UserDocs/FirstTimeHowTo. I followed these - they were very easy - first deleting the Ubuntu supplied copy of the madwifi driver, then compiling and installing the new one.
After re-booting I have two devices - wifi0 and ath0. iwconfig reports that ath0 has wifi extensions, so this looks promising.
Tried iwlist ath0 scanning - it reported that the network was down.
did ifconfig ath0 up. Then iwlist ath0 scanning says has no scan results, which is wrong because I am sat next to a wireless router...
Had a look at http://ubuntuforums.org/showthread.php?t=669267.
This got me looking at the Hardware Drivers manager in System/Administration - this said that there was a proprietary driver for the wireless card activated, so maybe this is intefering with things? Deactivated it..and rebooted again..
To start with, no wireless at all, but doing 'modprobe ath-pci' gave the following when I typed dmesg:
ath_hal: module license 'Proprietary' taints kernel.
[ 159.942692] AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, RF2425, RF2417)
[ 160.035904] ath_pci 0000:08:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 160.035939] ath_pci 0000:08:00.0: setting latency timer to 64
[ 160.534217] MadWifi: ath_attach: Switching rfkill capability off.
[ 160.541042] wifi0: Atheros AR2425 chip found (MAC 14.2, PHY SChip 7.0, Radio 10.2)
[ 160.559097] ath_pci: wifi0: Atheros 5424/2424: mem=0xfa000000, irq=18
[ 198.800025] ath0: no IPv6 routers present
At least there are no errors....but still iwlist reports no scan results.
Another thing I have read about is that the Amilo does not power up the wireless adapter automatically - could the radio transmitter be switched off?
The madwifi compatibility page pointed to this article:
http://madwifi.org/wiki/UserDocs/MiniPCI#FujistsuSiemensAmiloLi2727withAtherosAR2425AR5007EG802.11abgPCI-erev01
This talks about downloading the acerhk hotkey driver source and compiling it, but
I found that it is already installed in ubuntu and doing 'modprobe acerhk' ran it without error.
I pressssed Fn-F1 a few times and nothing happened (apparantly), then I realised that to make the wifi led light you have to do that in software (echo on > /proc/driver/acerhk/wirelessled). Doing this put the led on, and iwlist ath0 scanning gave me a list of access points - Success!!!
It seems that the acerhk driver has the code to switch on the wireless transmitter by doing the echo command above, but the Fn-F1 key does not work.
Now the procedure to get wireless networking working after boot is:
modprobe ath-pci
modprobe acerhk
echo on > /proc/driver/acerhk/wirelessled
ifdown ath0
ifup ath0
This needs automating!...
Wireless Networking in Linux on Fujitsu Siemens Amilo Li2727 laptop
I have a Fujitsu Siemens Amilo Li2727 laptop, which has a built in wireless network card.
Ubuntu Linux 8.10 detects the card as an AR242X (by typing lspci), but the madwifi driver compatibility page says it should be an AR5007EG.
The symptoms are that wireless networking does not work at all. dmesg reports:
"wifi%d: unable to attach hardware: 'Hardware revision not supported' (HAL status 13)".
No wifi devices present when doing ifconfig, iwconfig etc. There is one odd device (pan0) - I don't know what this is!
There are quite a few forum posts about this problem - they say that the madwifi driver can solve the problem, but you need to download a patch and re-compile the driver. When you download the patch the README file says the instructions are out of date, and you should use the updated madwifi driver as described in http://madwifi.org/ticket/1192. That page gives a link to the driver source code and the compilation instructions are stored in http://madwifi.org/wiki/UserDocs/FirstTimeHowTo. I followed these - they were very easy - first deleting the Ubuntu supplied copy of the madwifi driver, then compiling and installing the new one.
After re-booting I have two devices - wifi0 and ath0. iwconfig reports that ath0 has wifi extensions, so this looks promising.
Tried iwlist ath0 scanning - it reported that the network was down.
did ifconfig ath0 up. Then iwlist ath0 scanning says has no scan results, which is wrong because I am sat next to a wireless router...
Had a look at http://ubuntuforums.org/showthread.php?t=669267.
This got me looking at the Hardware Drivers manager in System/Administration - this said that there was a proprietary driver for the wireless card activated, so maybe this is intefering with things? Deactivated it..and rebooted again..
To start with, no wireless at all, but doing 'modprobe ath-pci' gave the following when I typed dmesg:
ath_hal: module license 'Proprietary' taints kernel.
[ 159.942692] AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, RF2425, RF2417)
[ 160.035904] ath_pci 0000:08:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 160.035939] ath_pci 0000:08:00.0: setting latency timer to 64
[ 160.534217] MadWifi: ath_attach: Switching rfkill capability off.
[ 160.541042] wifi0: Atheros AR2425 chip found (MAC 14.2, PHY SChip 7.0, Radio 10.2)
[ 160.559097] ath_pci: wifi0: Atheros 5424/2424: mem=0xfa000000, irq=18
[ 198.800025] ath0: no IPv6 routers present
At least there are no errors....but still iwlist reports no scan results.
Another thing I have read about is that the Amilo does not power up the wireless adapter automatically - could the radio transmitter be switched off?
The madwifi compatibility page pointed to this article:
http://madwifi.org/wiki/UserDocs/MiniPCI#FujistsuSiemensAmiloLi2727withAtherosAR2425AR5007EG802.11abgPCI-erev01
This talks about downloading the acerhk hotkey driver source and compiling it, but
I found that it is already installed in ubuntu and doing 'modprobe acerhk' ran it without error.
I pressssed Fn-F1 a few times and nothing happened (apparantly), then I realised that to make the wifi led light you have to do that in software (echo on > /proc/driver/acerhk/wirelessled). Doing this put the led on, and iwlist ath0 scanning gave me a list of access points - Success!!!
It seems that the acerhk driver has the code to switch on the wireless transmitter by doing the echo command above, but the Fn-F1 key does not work.
Now the procedure to get wireless networking working after boot is:
modprobe ath-pci
modprobe acerhk
echo on > /proc/driver/acerhk/wirelessled
ifdown ath0
ifup ath0
This needs automating!...
Ubuntu Linux 8.10 detects the card as an AR242X (by typing lspci), but the madwifi driver compatibility page says it should be an AR5007EG.
The symptoms are that wireless networking does not work at all. dmesg reports:
"wifi%d: unable to attach hardware: 'Hardware revision not supported' (HAL status 13)".
No wifi devices present when doing ifconfig, iwconfig etc. There is one odd device (pan0) - I don't know what this is!
There are quite a few forum posts about this problem - they say that the madwifi driver can solve the problem, but you need to download a patch and re-compile the driver. When you download the patch the README file says the instructions are out of date, and you should use the updated madwifi driver as described in http://madwifi.org/ticket/1192. That page gives a link to the driver source code and the compilation instructions are stored in http://madwifi.org/wiki/UserDocs/FirstTimeHowTo. I followed these - they were very easy - first deleting the Ubuntu supplied copy of the madwifi driver, then compiling and installing the new one.
After re-booting I have two devices - wifi0 and ath0. iwconfig reports that ath0 has wifi extensions, so this looks promising.
Tried iwlist ath0 scanning - it reported that the network was down.
did ifconfig ath0 up. Then iwlist ath0 scanning says has no scan results, which is wrong because I am sat next to a wireless router...
Had a look at http://ubuntuforums.org/showthread.php?t=669267.
This got me looking at the Hardware Drivers manager in System/Administration - this said that there was a proprietary driver for the wireless card activated, so maybe this is intefering with things? Deactivated it..and rebooted again..
To start with, no wireless at all, but doing 'modprobe ath-pci' gave the following when I typed dmesg:
ath_hal: module license 'Proprietary' taints kernel.
[ 159.942692] AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, RF2425, RF2417)
[ 160.035904] ath_pci 0000:08:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 160.035939] ath_pci 0000:08:00.0: setting latency timer to 64
[ 160.534217] MadWifi: ath_attach: Switching rfkill capability off.
[ 160.541042] wifi0: Atheros AR2425 chip found (MAC 14.2, PHY SChip 7.0, Radio 10.2)
[ 160.559097] ath_pci: wifi0: Atheros 5424/2424: mem=0xfa000000, irq=18
[ 198.800025] ath0: no IPv6 routers present
At least there are no errors....but still iwlist reports no scan results.
Another thing I have read about is that the Amilo does not power up the wireless adapter automatically - could the radio transmitter be switched off?
The madwifi compatibility page pointed to this article:
http://madwifi.org/wiki/UserDocs/MiniPCI#FujistsuSiemensAmiloLi2727withAtherosAR2425AR5007EG802.11abgPCI-erev01
This talks about downloading the acerhk hotkey driver source and compiling it, but
I found that it is already installed in ubuntu and doing 'modprobe acerhk' ran it without error.
I pressssed Fn-F1 a few times and nothing happened (apparantly), then I realised that to make the wifi led light you have to do that in software (echo on > /proc/driver/acerhk/wirelessled). Doing this put the led on, and iwlist ath0 scanning gave me a list of access points - Success!!!
It seems that the acerhk driver has the code to switch on the wireless transmitter by doing the echo command above, but the Fn-F1 key does not work.
Now the procedure to get wireless networking working after boot is:
modprobe ath-pci
modprobe acerhk
echo on > /proc/driver/acerhk/wirelessled
ifdown ath0
ifup ath0
This needs automating!...
Thursday, 23 October 2008
framework.system.filesystem
Making a bit of progress now - framework.system.filesystem look like it should do what I want.
I have tried this:
function buttonClicked() {
I have tried this:
function buttonClicked() {
debug.trace("ButtonClicked");It looks promising - oFs is a real native object, which is encouraging, but I get an 'uncaught exception' error - still needs some digging into how it works!
fname=framework.BrowseForFile("*|*.*");
oFs = framework.system.filesystem;
alert("oFs="+oFs);
if oFs.FileExists(fname) {
alert("file exists!");
oFile = oFs.GetFile("/home/graham/Countdown.js");
oStream = oFile.OpenAsTextStream(1,-2);
linstr = oStream.ReadLine;
alert("ofile="+ofile+" linstr="+linstr);
} else {
alert("file "+fname+" does not exist");
}
}
Subscribe to:
Posts (Atom)