Friday, September 30, 2011

screen after fresh install of Debian with Radeon

After base install and reboot, we can type commands but cannot see what we have typed because of missing firmware.
(most parts of the screen cover by white screen)

/var/log/syslog
Sep 29 11:35:25 fusion kernel: [ 6.255126] [drm] radeon defaulting to kernel modesetting.
Sep 29 11:35:25 fusion kernel: [ 6.255133] [drm] radeon kernel modesetting enabled.
Sep 29 11:35:25 fusion kernel: [ 6.255425] VGA switcheroo: detected switching method \_SB_.PCI0.VGA_.ATPX handle
Sep 29 11:35:25 fusion kernel: [ 6.410310] HDMI status: Pin=3 Presence_Detect=0 ELD_Valid=0
Sep 29 11:35:25 fusion kernel: [ 6.410815] input: HD-Audio Generic HDMI/DP as /devices/pci0000:00/0000:00:01.1/sound/card0/input11
Sep 29 11:35:25 fusion kernel: [ 6.411084] HDA Intel 0000:00:14.2: PCI INT A -> GSI 16 (level, low) -> IRQ 16
Sep 29 11:35:25 fusion kernel: [ 6.468644] hda_codec: ALC269VB: BIOS auto-probing.
Sep 29 11:35:25 fusion kernel: [ 6.472302] input: HDA ATI SB Mic as /devices/pci0000:00/0000:00:14.2/sound/card1/input12
Sep 29 11:35:25 fusion kernel: [ 6.472463] input: HDA ATI SB Headphone as /devices/pci0000:00/0000:00:14.2/sound/card1/input13
Sep 29 11:35:25 fusion kernel: [ 6.472736] radeon 0000:00:01.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
Sep 29 11:35:25 fusion kernel: [ 6.472746] radeon 0000:00:01.0: setting latency timer to 64
Sep 29 11:35:25 fusion kernel: [ 6.473051] [drm] initializing kernel modesetting (PALM 0x1002:0x9806 0x1043:0x100C).
Sep 29 11:35:25 fusion kernel: [ 6.473190] [drm] register mmio base: 0xFEB00000
Sep 29 11:35:25 fusion kernel: [ 6.473193] [drm] register mmio size: 262144
Sep 29 11:35:25 fusion kernel: [ 6.473481] ATOM BIOS: Asus
Sep 29 11:35:25 fusion kernel: [ 6.473533] radeon 0000:00:01.0: VRAM: 384M 0x0000000000000000 - 0x0000000017FFFFFF (384M used)
Sep 29 11:35:25 fusion kernel: [ 6.473539] radeon 0000:00:01.0: GTT: 512M 0x0000000018000000 - 0x0000000037FFFFFF
Sep 29 11:35:25 fusion kernel: [ 6.473552] mtrr: type mismatch for b0000000,10000000 old: write-back new: write-combining
Sep 29 11:35:25 fusion kernel: [ 6.473557] [drm] Detected VRAM RAM=384M, BAR=256M
Sep 29 11:35:25 fusion kernel: [ 6.473560] [drm] RAM width 32bits DDR
Sep 29 11:35:25 fusion kernel: [ 6.474131] [TTM] Zone kernel: Available graphics memory: 1835316 kiB.
Sep 29 11:35:25 fusion kernel: [ 6.474137] [TTM] Initializing pool allocator.
Sep 29 11:35:25 fusion kernel: [ 6.474199] [drm] radeon: 384M of VRAM memory ready
Sep 29 11:35:25 fusion kernel: [ 6.474203] [drm] radeon: 512M of GTT memory ready.
Sep 29 11:35:25 fusion kernel: [ 6.474238] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
Sep 29 11:35:25 fusion kernel: [ 6.474242] [drm] Driver supports precise vblank timestamp query.
Sep 29 11:35:25 fusion kernel: [ 6.474306] radeon 0000:00:01.0: irq 42 for MSI/MSI-X
Sep 29 11:35:25 fusion kernel: [ 6.474315] radeon 0000:00:01.0: radeon: using MSI.
Sep 29 11:35:25 fusion kernel: [ 6.474368] [drm] radeon: irq initialized.
Sep 29 11:35:25 fusion kernel: [ 6.474378] [drm] GART: num cpu pages 131072, num gpu pages 131072
Sep 29 11:35:25 fusion kernel: [ 6.476479] [drm] Loading PALM Microcode
Sep 29 11:35:25 fusion kernel: [ 6.565713] r600_cp: Failed to load firmware "radeon/PALM_pfp.bin"
Sep 29 11:35:25 fusion kernel: [ 6.565771] [drm:evergreen_startup] *ERROR* Failed to load firmware!
Sep 29 11:35:25 fusion kernel: [ 6.565822] radeon 0000:00:01.0: disabling GPU acceleration
Sep 29 11:35:25 fusion kernel: [ 6.566928] radeon 0000:00:01.0: ffff880148920000 unpin not necessary
Sep 29 11:35:25 fusion kernel: [ 6.566934] radeon 0000:00:01.0: ffff880148920000 unpin not necessary
Sep 29 11:35:25 fusion kernel: [ 6.567708] [drm] Radeon Display Connectors
Sep 29 11:35:25 fusion kernel: [ 6.567711] [drm] Connector 0:
Sep 29 11:35:25 fusion kernel: [ 6.567714] [drm] LVDS
Sep 29 11:35:25 fusion kernel: [ 6.567717] [drm] HPD1
Sep 29 11:35:25 fusion kernel: [ 6.567721] [drm] DDC: 0x6430 0x6430 0x6434 0x6434 0x6438 0x6438 0x643c 0x643c
Sep 29 11:35:25 fusion kernel: [ 6.567725] [drm] Encoders:
Sep 29 11:35:25 fusion kernel: [ 6.567728] [drm] LCD1: INTERNAL_UNIPHY
Sep 29 11:35:25 fusion kernel: [ 6.567731] [drm] Connector 1:
Sep 29 11:35:25 fusion kernel: [ 6.567733] [drm] HDMI-A
Sep 29 11:35:25 fusion kernel: [ 6.567736] [drm] HPD2
Sep 29 11:35:25 fusion kernel: [ 6.567739] [drm] DDC: 0x6440 0x6440 0x6444 0x6444 0x6448 0x6448 0x644c 0x644c
Sep 29 11:35:25 fusion kernel: [ 6.567742] [drm] Encoders:
Sep 29 11:35:25 fusion kernel: [ 6.567745] [drm] DFP1: INTERNAL_UNIPHY
Sep 29 11:35:25 fusion kernel: [ 6.567747] [drm] Connector 2:
Sep 29 11:35:25 fusion kernel: [ 6.567750] [drm] VGA
Sep 29 11:35:25 fusion kernel: [ 6.567753] [drm] DDC: 0x64d8 0x64d8 0x64dc 0x64dc 0x64e0 0x64e0 0x64e4 0x64e4
Sep 29 11:35:25 fusion kernel: [ 6.567756] [drm] Encoders:
Sep 29 11:35:25 fusion kernel: [ 6.567759] [drm] CRT1: INTERNAL_KLDSCP_DAC1
Sep 29 11:35:25 fusion kernel: [ 6.624255] [drm] Radeon display connector LVDS-1: Found valid EDID
Sep 29 11:35:25 fusion kernel: [ 6.634361] [drm] Radeon display connector HDMI-A-1: No monitor connected or invalid EDID
Sep 29 11:35:25 fusion kernel: [ 6.644460] [drm] Radeon display connector VGA-1: No monitor connected or invalid EDID
Sep 29 11:35:25 fusion kernel: [ 6.644498] [drm] Internal thermal controller without fan control
Sep 29 11:35:25 fusion kernel: [ 6.644608] [drm] radeon: power management initialized
Sep 29 11:35:25 fusion kernel: [ 7.108965] [drm] fb mappable at 0xB0040000
Sep 29 11:35:25 fusion kernel: [ 7.108969] [drm] vram apper at 0xB0000000
Sep 29 11:35:25 fusion kernel: [ 7.108972] [drm] size 4325376
Sep 29 11:35:25 fusion kernel: [ 7.108975] [drm] fb depth is 24
Sep 29 11:35:25 fusion kernel: [ 7.108978] [drm] pitch is 5632
Sep 29 11:35:25 fusion kernel: [ 7.109124] fbcon: radeondrmfb (fb0) is primary device
Sep 29 11:35:25 fusion kernel: [ 7.662144] Console: switching to colour frame buffer device 170x48
Sep 29 11:35:25 fusion kernel: [ 7.668034] fb0: radeondrmfb frame buffer device
Sep 29 11:35:25 fusion kernel: [ 7.668037] drm: registered panic notifier
Sep 29 11:35:25 fusion kernel: [ 7.668050] [drm] Initialized radeon 2.10.0 20080528 for 0000:00:01.0 on minor 0
Sep 29 11:35:25 fusion kernel: [ 7.668162] radeon 0000:01:00.0: enabling device (0000 -> 0003)
Sep 29 11:35:25 fusion kernel: [ 7.668176] radeon 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
Sep 29 11:35:25 fusion kernel: [ 7.668187] radeon 0000:01:00.0: setting latency timer to 64
Sep 29 11:35:25 fusion kernel: [ 7.668561] [drm] initializing kernel modesetting (CAICOS 0x1002:0x6760 0x1043:0x100C).
Sep 29 11:35:25 fusion kernel: [ 7.668649] [drm] register mmio base: 0xFEA20000
Sep 29 11:35:25 fusion kernel: [ 7.668652] [drm] register mmio size: 131072
Sep 29 11:35:25 fusion kernel: [ 7.668657] vga_switcheroo: enabled
Sep 29 11:35:25 fusion kernel: [ 7.669047] radeon atpx: version is 1
Sep 29 11:35:25 fusion kernel: [ 7.899023] input: PS/2 Logitech Wheel Mouse as /devices/platform/i8042/serio1/input/input14
Sep 29 11:35:25 fusion kernel: [ 8.159762] ATOM BIOS: Asus
Sep 29 11:35:25 fusion kernel: [ 8.160188] radeon 0000:01:00.0: VRAM: 1024M 0x0000000000000000 - 0x000000003FFFFFFF (1024M used)
Sep 29 11:35:25 fusion kernel: [ 8.160195] radeon 0000:01:00.0: GTT: 512M 0x0000000040000000 - 0x000000005FFFFFFF
Sep 29 11:35:25 fusion kernel: [ 8.160208] mtrr: type mismatch for c0000000,10000000 old: write-back new: write-combining
Sep 29 11:35:25 fusion kernel: [ 8.160213] [drm] Detected VRAM RAM=1024M, BAR=256M
Sep 29 11:35:25 fusion kernel: [ 8.160217] [drm] RAM width 64bits DDR
Sep 29 11:35:25 fusion kernel: [ 8.160255] [drm] radeon: 1024M of VRAM memory ready
Sep 29 11:35:25 fusion kernel: [ 8.160259] [drm] radeon: 512M of GTT memory ready.
Sep 29 11:35:25 fusion kernel: [ 8.160266] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
Sep 29 11:35:25 fusion kernel: [ 8.160269] [drm] Driver supports precise vblank timestamp query.
Sep 29 11:35:25 fusion kernel: [ 8.160342] radeon 0000:01:00.0: irq 42 for MSI/MSI-X
Sep 29 11:35:25 fusion kernel: [ 8.160352] radeon 0000:01:00.0: radeon: using MSI.
Sep 29 11:35:25 fusion kernel: [ 8.160437] [drm] radeon: irq initialized.
Sep 29 11:35:25 fusion kernel: [ 8.160450] [drm] GART: num cpu pages 131072, num gpu pages 131072
Sep 29 11:35:25 fusion kernel: [ 8.162389] [drm] Loading CAICOS Microcode
Sep 29 11:35:25 fusion kernel: [ 8.166859] ni_cp: Failed to load firmware "radeon/CAICOS_pfp.bin"
Sep 29 11:35:25 fusion kernel: [ 8.166942] [drm:evergreen_startup] *ERROR* Failed to load firmware!
Sep 29 11:35:25 fusion kernel: [ 8.167007] radeon 0000:01:00.0: disabling GPU acceleration
Sep 29 11:35:25 fusion kernel: [ 8.168165] radeon 0000:01:00.0: ffff88014a445000 unpin not necessary
Sep 29 11:35:25 fusion kernel: [ 8.168171] radeon 0000:01:00.0: ffff88014a445000 unpin not necessary
Sep 29 11:35:25 fusion kernel: [ 8.168570] [drm] Radeon Display Connectors
Sep 29 11:35:25 fusion kernel: [ 8.168577] [drm] Internal thermal controller with fan control
Sep 29 11:35:25 fusion kernel: [ 8.168645] [drm] radeon: power management initialized
Sep 29 11:35:25 fusion kernel: [ 8.168744] No connectors reported connected with modes
Sep 29 11:35:25 fusion kernel: [ 8.168750] [drm] Cannot find any crtc or sizes - going 1024x768
Sep 29 11:35:25 fusion kernel: [ 8.174014] [drm] fb mappable at 0xC0040000
Sep 29 11:35:25 fusion kernel: [ 8.174017] [drm] vram apper at 0xC0000000
Sep 29 11:35:25 fusion kernel: [ 8.174020] [drm] size 3145728
Sep 29 11:35:25 fusion kernel: [ 8.174023] [drm] fb depth is 24
Sep 29 11:35:25 fusion kernel: [ 8.174025] [drm] pitch is 4096
Sep 29 11:35:25 fusion kernel: [ 8.174154] fb1: radeondrmfb frame buffer device
Sep 29 11:35:25 fusion kernel: [ 8.174167] [drm] Initialized radeon 2.10.0 20080528 for 0000:01:00.0 on minor 1


Solution
=======
I reboot to a live cd (http://www.playoss.com/node/179)
mount internal hdd
download http://packages.debian.org/firmware-linux-nonfree
and extract the radeon to {mount-directory-of-debian-root}/lib/firmware


Useful commands
===============
apt-cache search PALM_pfp.bin

No sound on Realtek ALC269VB under Linux

As of 30/09/2011, ALC269VB is not the support model listed in
www.realtek.com/downloads/downloadsview.aspx?langid=1&pfid=24&level=4&conn=3&downtypeid=3

I thought it must be a key (e.g. laptop-amic) to define in /etc/modprobe.d/alsa-base.conf
for the sound card to work properly like
https://help.ubuntu.com/community/HdaIntelSoundHowto
and http://siripong-computer-tips.blogspot.com/2011/07/82801i-vostro-v13-debian-no-sound.html

After hours of trial and error changing snd-hda-intel model=auto, basic, asus
and reboots, there were no sounds from Realtek ALC269VB of ASUS X43B Series.


Finally, I found that the root cause was that
"the modern video-cards have an little audio support built-in, for HDMI.
In some cases, ALSA misunderstand where is the 'main' sound hardware".
From http://www.linuxquestions.org/questions/slackware-14/no-sound-with-flash-player-in-firefox-after-adding-nvidia-gt-220-graphics-card-809773/


$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: SB [HDA ATI SB], device 0: ALC269VB Analog [ALC269VB Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0


Solution
======
The solution is simply set the default PCM device.


How to do that
===========
Big Thanks to: http://alsa.opensrc.org/.asoundrc

# Using aplay -L you can get a List of existing PCM output devices.

$ aplay -L
....
front:CARD=SB,DEV=0
HDA ATI SB, ALC269VB Analog
Front speakers
......

# To set the default device, place a pcm.!default line in the .asoundrc

$ echo 'pcm.!default front:SB' > ~/.asoundrc

While aplay is still error, there are sounds from vlc and iceweasel.

$ aplay /usr/share/sounds/alsa/Noise.wav
Playing WAVE '/usr/share/sounds/alsa/Noise.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1071: Channels count non available

In newer version, simply try 'pavucontrol'.

My Environment
============
ASUS X43BY-VX036D
Linux debian wheezy 3.0.0-1-amd64
Advanced Linux Sound Architecture Driver Version 1.0.24.

$ lspci -k
00:00.0 Host bridge: Advanced Micro Devices [AMD] Family 14h Processor Root Complex
    Subsystem: Advanced Micro Devices [AMD] Pavilion DM1Z-3000 Host bridge
00:01.0 VGA compatible controller: ATI Technologies Inc Device 9806
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: radeon
00:01.1 Audio device: ATI Technologies Inc Wrestler HDMI Audio [Radeon HD 6250/6310]
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: HDA Intel
00:04.0 PCI bridge: Advanced Micro Devices [AMD] Family 14h Processor Root Port
    Kernel driver in use: pcieport
00:11.0 SATA controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] (rev 40)
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: ahci
00:12.0 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: ohci_hcd
00:12.2 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB EHCI Controller
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: ehci_hcd
00:13.0 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: ohci_hcd
00:13.2 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB EHCI Controller
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: ehci_hcd
00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 42)
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: piix4_smbus
00:14.1 IDE interface: ATI Technologies Inc SB7x0/SB8x0/SB9x0 IDE Controller (rev 40)
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: pata_atiixp
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA) (rev 40)
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: HDA Intel
00:14.3 ISA bridge: ATI Technologies Inc SB7x0/SB8x0/SB9x0 LPC host controller (rev 40)
    Subsystem: ASUSTeK Computer Inc. Device 100c
00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge (rev 40)
00:14.5 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: ohci_hcd
00:15.0 PCI bridge: ATI Technologies Inc SB700/SB800 PCI to PCI bridge (PCIE port 0)
    Kernel driver in use: pcieport
00:15.1 PCI bridge: ATI Technologies Inc SB700/SB800 PCI to PCI bridge (PCIE port 1)
    Kernel driver in use: pcieport
00:16.0 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: ohci_hcd
00:16.2 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB EHCI Controller
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: ehci_hcd
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 0 (rev 43)
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 3
    Kernel driver in use: k10temp
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 6
00:18.6 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 5
00:18.7 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 7
01:00.0 VGA compatible controller: ATI Technologies Inc NI Seymour [AMD Radeon HD 6470M]
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: radeon
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
    Subsystem: ASUSTeK Computer Inc. Device 100c
    Kernel driver in use: r8169
04:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
    Subsystem: Lite-On Communications Inc Device 6623
    Kernel driver in use: ath9k


Useful commands + output
=====================
$ aplay /usr/share/sounds/alsa/Noise.wav
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
aplay: main:666: audio open error: No such file or directory

$ sudo alsamixer

$ dmesg | grep -i hda
[ 8.100103] HDA Intel 0000:00:01.1: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[ 8.100259] HDA Intel 0000:00:01.1: irq 42 for MSI/MSI-X
[ 8.100298] HDA Intel 0000:00:01.1: setting latency timer to 64
[ 8.442707] HDA Intel 0000:00:14.2: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 8.588950] hda_codec: ALC269VB: BIOS auto-probing.
[ 8.592614] input: HDA ATI SB Mic as /devices/pci0000:00/0000:00:14.2/sound/card1/input13
[ 8.592763] input: HDA ATI SB Headphone as /devices/pci0000:00/0000:00:14.2/sound/card1/input14

$ cat /proc/asound/card1/codec* | grep Codec
Codec: Realtek ALC269VB

$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
hdmi:CARD=Generic,DEV=0
    HD-Audio Generic, HDMI 0
    HDMI Audio Output
front:CARD=SB,DEV=0
    HDA ATI SB, ALC269VB Analog
    Front speakers
surround40:CARD=SB,DEV=0
    HDA ATI SB, ALC269VB Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=SB,DEV=0
    HDA ATI SB, ALC269VB Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=SB,DEV=0
    HDA ATI SB, ALC269VB Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=SB,DEV=0
    HDA ATI SB, ALC269VB Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=SB,DEV=0
    HDA ATI SB, ALC269VB Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers


$ sudo modinfo -p snd_hda_intel
index:Index value for Intel HD audio interface. (array of int)
id:ID string for Intel HD audio interface. (array of charp)
enable:Enable Intel HD audio interface. (array of bool)
model:Use the given board model. (array of charp)
position_fix:DMA pointer read method.(0 = auto, 1 = LPIB, 2 = POSBUF, 3 = VIACOMBO). (array of int)
bdl_pos_adj:BDL position adjustment offset. (array of int)
probe_mask:Bitmask to probe codecs (default = -1). (array of int)
probe_only:Only probing and no codec initialization. (array of int)
single_cmd:Use single command to communicate with codecs (for debugging only). (bool)
enable_msi:Enable Message Signaled Interrupt (MSI) (int)
patch:Patch file for Intel HD audio interface. (array of charp)
beep_mode:Select HDA Beep registration mode (0=off, 1=on, 2=mute switch on/off) (default=1). (array of int)
power_save:Automatic power-saving timeout (in second, 0 = disable). (int)
power_save_controller:Reset controller in power save mode. (bool)

vi /etc/modprobe.d/alsa-base.conf

options snd cards_limit=1
options snd-hda-intel model=auto position_fix=0

alias snd-card-1 snd-hda-intel

Install Linux on ASUS X43BY-VX036D

AMD E450 1.65GHz.
4GB DDR3 1066MHz.
AMD Radeon HD 6470M (Seymour XT) 1GB DDR3
RTL8111/8168B PCI Express Gigabit Ethernet controller
AR9285 Wireless Network Adapter (PCI-Express)
Sound: Realtek ALC269VB

http://kmuto.jp/debian/hcl/ASUS/X43BY-VX036D


lubuntu 15.10
==========
Disable nomodeset, the Live usb will not hang.

    The newest kernels have moved the video mode setting into the kernel. So all the programming of the hardware specific clock rates and registers on the video card happen in the kernel rather than in the X driver when the X server starts.. This makes it possible to have high resolution nice looking splash (boot) screens and flicker free transitions from boot splash to login screen. Unfortunately, on some cards this doesnt work properly and you end up with a black screen. Adding the nomodeset parameter instructs the kernel to not load video drivers and use BIOS modes instead until X is loaded.
http://askubuntu.com/questions/207175/what-does-nomodeset-do

The easiest way to install AMD Radeon Driver is to use the built in "Addional Drivers" manager in Ubuntu.
https://help.ubuntu.com/community/BinaryDriverHowto/AMD

to set default sound device go to ....

opensuse lxde Leap 42.1
==================
for build-in wireless
using YaST2 to install b43-fwcutter


Debian Wheezy
===========
1) After base install and reboot, we can type commands but cannot see what we have typed because of missing firmware.
(most parts of the screen cover by white screen)
The solution is rebooting to a live cd (http://www.playoss.com/node/179)
, mount internal hdd
, download http://packages.debian.org/firmware-linux-nonfree
, and extract the radeon to {mount-directory-of-debian-root}/lib/firmware

Detail at http://siripong-computer-tips.blogspot.com/2011/09/screen-after-fresh-install-of-debian.html

2) No sound
ALSA misunderstand where is the 'main' sound hardware.
and the solution is simply set the default PCM device.
Detail at http://siripong-computer-tips.blogspot.com/2011/09/no-sound-on-realtek-alc269vb-under.html

Thursday, September 29, 2011

AMD/ATI Catalyst RADEON driver in Linux

# Enable Kernel Mode Setting http://www.reddeadresolve.com/2009/12/installing-debian-squeeze.html
more at https://wiki.ubuntu.com/X/KernelModeSetting

ไดรเวอร์ของ Radeon มีสองตัวให้เลือกคือ
- fglrx ซึ่งเป็น Proprietary ไดรเวอร์ (ปิดซอร์ส) ของ AMD
- xserver-xorg-video-ati‏, xserver-xorg-video-radeon

http://www.x.org/wiki/radeonhd


Debian
======
http://wiki.debian.org/AtiHowTo
http://wiki.debian.org/ATIProprietary

grep DRM_RADEON /boot/config-$(uname -r)
grep AGP /boot/config-$(uname -r)

Debian - Squeeze
=============
sudo apt-get install fglrx-control fglrx-driver


Debian - Wheezy
=============
The fglrx-control and fglrx-driver packages are not available in wheezy non-free
but binary firmware of

 * Radeon HD 6800-family MC microcode (radeon/BARTS_mc.bin)
 * Radeon HD 6800-family ME microcode (radeon/BARTS_me.bin)
 * Radeon HD 6800-family PFP microcode (radeon/BARTS_pfp.bin)
 * Radeon HD 6300/6500/6800-family RLC microcode (radeon/BTC_rlc.bin)
 * Radeon HD 6300-family MC microcode (radeon/CAICOS_mc.bin)
 * Radeon HD 6300-family ME microcode (radeon/CAICOS_me.bin)
 * Radeon HD 6300-family PFP microcode (radeon/CAICOS_pfp.bin)
 * Radeon HD 6900-family MC microcode (radeon/CAYMAN_mc.bin)
 * Radeon HD 6900-family ME microcode (radeon/CAYMAN_me.bin)
 * Radeon HD 6900-family PFP microcode (radeon/CAYMAN_pfp.bin)
 * Radeon HD 6900-family RLC microcode (radeon/CAYMAN_rlc.bin)
 * Radeon HD 5400-family ME microcode (radeon/CEDAR_me.bin)
 * Radeon HD 5400-family PFP microcode (radeon/CEDAR_pfp.bin)
 * Radeon HD 5400-family RLC microcode (radeon/CEDAR_rlc.bin)
 * Radeon HD 5800/5900-family ME microcode (radeon/CYPRESS_me.bin)
 * Radeon HD 5800/5900-family PFP microcode (radeon/CYPRESS_pfp.bin)
 * Radeon HD 5800/5900-family RLC microcode (radeon/CYPRESS_rlc.bin)
 * Radeon HD 5700-family ME microcode (radeon/JUNIPER_me.bin)
 * Radeon HD 5700-family PFP microcode (radeon/JUNIPER_pfp.bin)
 * Radeon HD 5700-family RLC microcode (radeon/JUNIPER_rlc.bin)
and much more 
are available in http://packages.debian.org/wheezy/firmware-linux-nonfree.


Troubleshooting
============
ถ้ามีปัญหา ลองพิมพ์คำสั่ง fglrxinfo
และเพิ่มเติมที่ http://wiki.cchtml.com/index.php/Debian_Installation_Guide


Enabling 3D acceleration
===================
It is necessary to install driver libraries in order to utilize the card's 3D capabilities:
aptitude install libgl1-mesa-dri


More
====
http://support.amd.com/us/gpudownload/linux/Pages/radeon_linux.aspx

apt-pinning

Apt-Pinning for Beginners
==========================
allow you to run a mostly-Stable system,
but also track the latest and greatest of those packages that you are most keenly interested in.


กำหนดลำดับ ว่าระบบจะติดตั้งโปรแกรมจาก repo ไหน
===============================
vi /etc/apt/preferences

Package: *
Pin: release n=squeeze-backports
Pin-Priority: 1001

Package: *
Pin: release n=squeeze-updates
Pin-Priority: 950

Package: *
Pin: release n=squeeze
Pin-Priority: 900

Package: *
Pin: release n=stable
Pin-Priority: 800

Package: *
Pin: release a=testing
Pin-Priority: 700

apt-cache policy {package-name}
apt-get -t testing install --no-install-recommends xorg xfce4

more info at http://jaqque.sbih.org/kplug/apt-pinning.html

commands for wireless lan in debian

After a fresh install of wheezy

sudo ifconfig -a
sudo ifconfig wlan0 up
SIOCSIFFLAGS: Operation not possible due to RF-kill

#rfkill : tool for enabling and disabling wireless devices
sudo apt-get install rfkill

$ sudo rfkill list
0: asus-wlan: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: asus-bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no
2: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no


sudo rfkill unblock 0
sudo rfkill unblock 2

sudo rfkill unblock wifi
sudo rfkill unblock wlan

sudo ifconfig -a
sudo ifconfig wlan0 up

# iwconfig modu = force the card to only use the specific set of modulations
sudo iwconfig wlan0 modu 11g

sudo iwlist wlan0 scanning

sudo iwconfig wlan0 mode Managed

sudo iwconfig wlan0 essid {name}

#eg: sudo iwconfig wlan0 essid "My Router"

sudo iwconfig wlan0 channel {channel number}

# WEP encryption
sudo iwconfig wlan0 key {hex digit}

#eg: sudo iwconfig wlan0 key 0123-4567-89

sudo iwconfig

# dhclient -r : to avoid "RTNETLINK answers: File exists" when reconnect network after standby or hibernate
sudo dhclient -r wlan0

sudo dhclient wlan0
sudo ifconfig wlan0



To avoid soft blocked again after reboot add

options ath_pci rfkill=0
options ath_pci rfkill=1
options ath_pci rfkill=2
... (depend on rfkill list)

to /etc/modprobe.d/ath.conf
(any new file with .conf extension)

or
insert 'rfkill unblock wlan' in /etc/rc.local


ifup - ifdown
==========
# my /etc/network/interfaces is
auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet dhcp
wpa-ssid my_ssid
wpa-psk my_password_shared_key
wpa-key-mgmt WPA-PSK

# now we can bring our interface up and down with the usual ifup and ifdown commands
sudo ifup wlan0
sudo ifdown wlan0

# The "auto" stanza will bring your interface up at system startup.
# If not desired, remove or comment this line.

wpa useful command
================
sudo wpa_cli
zcat /usr/share/doc/wpasupplicant/README.modes.gz | less


Thanks:
Google
http://axcoto.com/blog/article/tag/siocsifflags-operation-not-possible-due-to-rf-kill
http://www.project4fun.com/node/36 shows commands and outputs
http://wiki.debian.org/WiFi/HowToUse#wpasupplicant

Wednesday, September 21, 2011

enable lightdm autologin debian wheezy


alter /etc/lightdm/lightdm.conf to be

[SeatDefaults]
autologin-user={YOUR USER NAME}
autologin-user-timeout=0
pam-service=lightdm-autologin


create /etc/pam.d/lightdm-autologin (if not exist)
#%PAM-1.0
auth requisite pam_nologin.so
auth required pam_env.so readenv=1
auth required pam_env.so readenv=1 envfile=/etc/default/locale
auth required pam_succeed_if.so user != root quiet_success
auth required pam_permit.so
@include common-account
session required pam_limits.so
@include common-session
@include common-password


thanks
=======
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636104
http://ubuntuforums.org/showthread.php?t=1801335


my environment
==============
lightdm (0.9.2-3)
xfce4 (4.8.0.3)

# I in fact apt-get install --no-install-recommends gdm3
to see the content of /etc/pam.d/gdm3-autologin