Showing posts with label medion. Show all posts
Showing posts with label medion. Show all posts

2011/06/12

Fixing the rt2860 wifi chipset under Ubuntu 11.4

I have a Medion Akoya MD96888 that ran ubuntu just fine from day 1. Unfortunately, with the latest Ubuntu versions the wifi connection is really unstable, unreliable and very slow. This post explains how to identify the problem and how to resolve it.

Diagnosis
The following commands will identify which driver ubuntu uses for your wifi card:
nm-tool
...
- Device: wlan0 ----------------------------------------------------------------
Type: 802.11 WiFi
Driver: rt2800pci
State: disconnected
Default: no
HW Address: 00:22:43:13:7F:7B

Capabilities:

Wireless Properties
WEP Encryption: yes
WPA Encryption: yes
WPA2 Encryption: yes ...

 lsmod | grep rt2800pci
rt2800pci 18159 0
rt2800lib 43824 1 rt2800pci
rt2x00pci 13986 1 rt2800pci
rt2x00lib 39075 3 rt2800pci,rt2800lib,rt2x00pci
eeprom_93cx6 12653 1 rt2800pci

sudo lshw -C network
*-network
description: Ethernet interface
product: RTL8101E/RTL8102E PCI Express Fast Ethernet controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:01:00.0
logical name: eth0
version: 02
serial: 00:21:85:4c:75:cc
size: 100Mbit/s
capacity: 100Mbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full ip=192.168.1.60 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
resources: irq:42 ioport:d000(size=256) memory:ffd10000-ffd10fff memory:ffd00000-ffd0ffff memory:dfd00000-dfd0ffff
*-network
description: Wireless interface
product: RT2860
vendor: Ralink corp.
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
Conclusion: ubuntu uses the rt2800pci driver for accessing the RT2860 wifi chipset. This driver causes the instability.

Solution
Currently the only solution is to download the driver directly from Ralink and manually compiling and installing it. Although the command line steps are quite tedious, I did get a stable wifi back. The following steps are copied and slightly updated from http://ubuntuforums.org/showthread.php?t=1592731.

  1. Download latest RT2860 driver source code from Ralink at http://www.ralinktech.com/support.php?s=2. The driver is tagged RT2860PCI/mPCI/CB/PCIe(RT2760/RT2790/RT2860/RT2890). Put the tar into your home directory.

  2. Extract the tar file and go to the expanded directory (ignore the bz2 extensions, bunzip2 won't work):
    tar -xvf ~/2010*
    cd ~/2010*
  3. Edit the config.mk file:
    gedit ./os/linux/config.mk 
    Find the following lines (by default set to "n") and set them to be "y":
    HAS_WPA_SUPPLICANT=y
    HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
    Save and close the file.

  4. Back in the terminal window perform the following command
    gedit ./common/cmm_wpa.c
    For the warning message choose "Western" then "Retry".

    Use the find command to locate "MIX_CIPHER_NOTUSE". Replace the entire line with this code:
    WPA_MIX_PAIR_CIPHER FlexibleCipher = WPA_TKIPAES_WPA2_TKIPAES;
    Save and close the file.

  5. Make sure gcc is installed (usually is by default but if not install it via synaptic) then from the terminal window perform the following commands:
    sudo make
    sudo make install
    sudo ifconfig wlan0 down (on some hardware it is ra0)
    sudo rmmod rt2860sta
    sudo mv /lib/modules/$(uname -r)/kernel/drivers/staging/rt2860/rt2860sta.ko /lib/modules/$(uname -r)/kernel/drivers/staging/rt2860/rt2860sta.ko.dist
  6. Still in the terminal window perform the following commands:
    sudo depmod -a
    sudo modprobe rt2860sta
    sudo ifconfig wlan0 up (on some hardware it is ra0)
  7. Check that network manager can now select networks and connect to them.

  8. Back in the terminal window perform the following command:
    sudo cp ./os/linux/rt2860sta.ko /lib/modules/$(uname -r)/kernel/drivers/staging/rt2860/
  9. In the terminal window perform the following command:
    gksudo gedit /etc/modules
    Add "rt2860sta" on a line at the end of the file then save and close it.

  10. Reboot and check that wifi still works


2008/06/20

Getting Compiz to run on Ubuntu 8.04 with an ATI X700 chipset

One of my laptops, a Medion md96500, I couldn't start Compiz after I upgraded it from Ubuntu Gutsy to Hardy (8.04). I remember that when I installed 7.04, I had to do some tweaking to get the video working. Luckily, since Ubuntu 7.10, the display configuration goes really well 'out of the box', but maybe some of my tweaks of last year did survive in my current Hardy install (8.04). This is the video chipset in my MD96500:
$ lspci | grep VGA
01:00.0 VGA compatible controller: ATI Technologies Inc M26 [Radeon Mobility X700 XL (PCIE)]

I tried to play with the "Hardware Drivers" dialog-box, but this didn't help. Luckily, fixing was rather easy:
  • I removed the proprietary fglrx-driver of ATI and switched back to the open-source driver. This is well documented in: https://help.ubuntu.com/community/RadeonDriver. The switch went rather smoothly, but compiz still failed when trying to activate it.
  • Next, I ran the excellent compiz-check script http://forlong.blogage.de/article/pages/Compiz-Check. As you can see in the output, compiz-check not only detects that my x700 is blacklisted, but it also fixes it by letting Compiz ignore the blacklist:
$ ./compiz-check

Gathering information about your system...

Distribution: Ubuntu 8.04
Desktop environment: GNOME
Graphics chip: ATI Technologies Inc M26 [Radeon Mobility X700 XL (PCIE)]
Driver in use: radeon
Rendering method: AIGLX

Checking if it's possible to run Compiz on your system...

Checking for texture_from_pixmap... [ OK ]
Checking for non power of two support... [
OK ]
Checking for composite extension... [
OK ]
Checking for FBConfig... [
OK ]
Checking for hardware/setup problems... [FAIL]

There has been (at least) one error detected with your setup:
Error: Laptop using radeon driver.

Would you like to know more? (Y/n) Y

It has been detected, that you are running a laptop with an ATI chip.
The radeon driver supports Compiz out-of-the-box but because of a nasty bug
in the driver that causes X to freeze on some cards, this particular
combination had to be blacklisted in Ubuntu "Hardy Heron".

In case you already used Compiz successfully on Ubuntu 7.10 (Gutsy), it is
safe to skip the blacklist.

Do you want to skip blacklist checks by Compiz? (y/N) y


$ ./compiz-check

Gathering information about your system...

Distribution: Ubuntu 8.04
Desktop environment: GNOME
Graphics chip: ATI Technologies Inc M26 [Radeon Mobility X700 XL (PCIE)]
Driver in use: radeon
Rendering method: AIGLX

Checking if it's possible to run Compiz on your system...

Checking for texture_from_pixmap... [
OK ]
Checking for non power of two support... [
OK ]
Checking for composite extension... [
OK ]
Checking for FBConfig... [
OK ]
Checking for hardware/setup problems... [
OK ]
Compiz is now fully functional on my laptop, and till now, it seems stable. gr8 :-)

2008/06/02

Sound in Ubuntu

On one of my laptops (Medion MD96290) I noticed that the sound wasn't working any more under Ubuntu 8.04. A while ago, I managed to get sound going in Ubuntu7.10 (http://forum.ubuntu-fr.org/viewtopic.php?pid=1290804)

After some research (http://ubuntuforums.org/archive/index.php/t-765671.html) I added the following line to /etc/modprobe.d/alsa_base:
options snd-hda-intel model=6stack-dig

This didn't help. In the same forum, they suggest to enable surround. In Edit/Preferences you can display the Surround slider.

And the magic happened: the sound workz :-). Setting up sound can be quite complex in Ubuntu...

update 15/11/2008: I had to repeat the same actions after upgrading to Ubuntu 8.10: add line to alsa-base file and enable the surround slider.