Ubuntu: Difference between revisions
No edit summary |
No edit summary |
||
Line 46: | Line 46: | ||
My sound now works! | My sound now works! | ||
Note: I'd love an easy way to see what is using your sound driver and release it when necessary | |||
== Nvidia == | |||
If you're using an nvidia graphics card, you're probably forced to use the [http://www.nvidia.com/object/unix.html proprietary nvidia drivers]. | |||
If you do "apt-get dist-upgrade" and your kernel gets upgraded, you will find when you reboot you are stuck running VESA instead of the nvidia drivers. | |||
You have to rerun the nvidia installer to build the necessary modules for your kernel. |
Revision as of 18:27, 3 December 2008
I was trying to compile hello world in C:
$ gcc -Wall -o hello hello.c hello.c:1:19: error: stdio.h: No such file or directory hello.c: In function ‘main’: hello.c:5: warning: implicit declaration of function ‘printf’ hello.c:5: warning: incompatible implicit declaration of built-in function ‘printf’
If you plan on doing any programming on ubuntu:
$ sudo apt-get install build-essential
This will install libc-dev, gcc, g++, make and dpkg-dev for C and/or C++ programming. If you intend on programming, you will probably want the development man pages installed. For example, I couldn't find the simple functions:
$ man scanf No manual entry for scanf
$ sudo apt-get install manpages-dev
Sound
$ aplay -l
If it lists your card, awesome. Instead, mine showed:
aplay: device_list:205: no soundcards found...
so on to the next step:
$ lspci -v
Hopefully you see an Audio device: entry. In my case I saw:
00:10.1 Audio device: nVidia Corporation MCP51 High Definition Audio (rev a2)
Subsystem: Dell Unknown device 01f4 Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 11 Memory at fe024000 (32-bit, non-prefetchable) [size=16K]
So I just need the proper module installed:
$ sudo apt-get install linux-ubuntu-modules-2.6.22-14-386
Replace 2.6.22 with the kernel you are using.
$ modprobe snd-hda-intel
Replace snd-hda-intel with the driver for your sound card.
My sound now works!
Note: I'd love an easy way to see what is using your sound driver and release it when necessary
Nvidia
If you're using an nvidia graphics card, you're probably forced to use the proprietary nvidia drivers. If you do "apt-get dist-upgrade" and your kernel gets upgraded, you will find when you reboot you are stuck running VESA instead of the nvidia drivers. You have to rerun the nvidia installer to build the necessary modules for your kernel.