# recognisiing new cpu [SOLVED]

## mikefot

Dear Folks,

I have moved the hard dive in my machine to a new box.

It has a different motherboard and cpu.

The motherboard is an asus sabertooth fx 990 and the cpu is an amd FX 8350.

There is an nvidia engt 430 graphics card installed as well.

I am getting read onlly errors when I issue commands.

I have been advised that I will need to recompile the kernel.

I can't do that if I can't open files etc - I think it is a file permission problem.

Suggestions appreciated.

Regards

MFLast edited by mikefot on Sun Nov 27, 2016 4:49 pm; edited 1 time in total

----------

## Tony0945

 *mikefot wrote:*   

> I am getting read onlly errors when I issue commands.

 

Can you log in? What sort of errors? Are they boot errors?  You say you issue commands, so that means you were able to log in?

----------

## mikefot

fstab file is:

/dev/sda2     /boot      ext2     noauto, noatime      1   2

/dev/sda4     /             ext3     noatime                   0   1

/dev/sda3     /none     swap   sw                          0   0

plus entries for cdrom etc

Rgds

MF

----------

## mikefot

Dear Tony,

I can login as a user and root but the username and domain name is unknown.

A new log file is not being made in /var/liog

Regds

MF

----------

## mikefot

When I login as a use and then su to root the prompt looks like this:

(none) mikef#

the sys and proc directories have been updated to today's date.

A whole load of empty files have been created in sys except one: kcore which is a huge file (some kind of core dump?)

Regds

MF

----------

## mikefot

/dev has also been updated.

Regds

MF

----------

## mikefot

I have found a suggestion that could be helpful with the issue here:

http://unix.stackexchange.com/questions/83634/gentoo-mounting-root-as-read-only-why

I will try the root service suggestion.

Regds

MF

----------

## Roman_Gruber

 *mikefot wrote:*   

> Dear Folks,
> 
> I have moved the hard dive in my machine to a new box.
> 
> It has a different motherboard and cpu.
> ...

 

When you change hardware you need to ensure that the instruction set of your old cpu is supported by your new cpu.

It seems you switched from an intel cpu to amd cpu, and the amd cpu does not understand a few of the intel cpu instructions.

What was your old make.conf and cpu?

what is your current cpu and make.conf?

```
cat /proc/cpuinfo 

```

example ...

 *Quote:*   

> 
> 
> ...
> 
> processor	: 7
> ...

 

The important part:

 *Quote:*   

> flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt

 

You will get a similar list for your old cpu. This list has to be supported by your new cpu.

Usually it is safe to upgrade intel -> intel (newer)

amd -> amd (newer)

Regardless of the age (only when you did have set generic flags and optimizations, which i highly doubt)

intel -> amd (not good)

amd -> intel (not good)

When you run march = native or special set, ... same, also not the best settings when you switch intel - amd or vice versa

---

Lets assume you have upgraded the hardware, and the hardware is downcompatible (which i doubt as of now)

 *Quote:*   

> 
> 
> I am getting read onlly errors when I issue commands.
> 
> I have been advised that I will need to recompile the kernel.
> ...

 

BAsically, boot up a livecd, chroot and build the kernel. That should be doable when the hardware is downcompatible (which you need to verify, textwall above what i have written)

or

use the kernel from the sysrescue-cd or any bootble kernel to bootup your box. (bootable implies it has all stuff build in for your hardware)

....

I moved this installation here several times from harddrives to better notebooks. I always stayed on the intel side cpu wise, and always upgraded. so my newer cpu understood all instructions / optimizations of my older cpu. I also stayed on the nvidia-gpu side, so also no hassle on that side(but that is not a requirements, as gpus arenot that essential to boot up).

...

please note. a reinstall is sometimes the faster way because you need to adapt your make.conf anyway for your new hardware and you need to build the toolchian and software anyway for your new hardware. it is a clean new install

you can reuse parts of the make.conf and other config files from your previous installation, which speeds up the process.

I personally recommmend to exchange drives every 2 years or less because of used up write cycles, so you have to move the data anyway. Warranty period in my area is 2 years for generic goods.

when you are unable to fix your installation in a reasonable time you may reuse the configs and do a clean install with the gentoo handbook.

----------

## mikefot

Many thanks for your comments and suggestions.

My old box was also an AMD one: -

AMD A4-3400 APU with Radeon(tm) HD Graphics

​on a Gigabyte F2A78M-HD2 board.

Regards

MF

The make.conf file is here:

https://forums.gentoo.org/viewtopic-t-1004580-postdays-0-postorder-asc-start-50.html

----------

## Roman_Gruber

than you may chroot with a livecd, and build that kernel with your old toolchain when it meets the old cpu optimizations.

----------

## saellaven

are you using an initramfs? is it possible that your drive's device name changed?

----------

## mikefot

Dear Folks,

I decided to reinstall gentoo.

It went OK until I got to the genkernel part.

I did not know what to do with the rc.conf file so I left it unchanged - ie the default one provided in the stage3 tarball.

That is supposed to control system start up and shutdown so maybe that has something to do with it.

Or maybe not.

When I first tried to run genkernel it failed because the directory containing the kernel source has not been created.

I had forgotten to do emerge gentoo-sources.

I did it.

But when I ran genkernel all it started up and ran mrproper and oldconfig etc

and then it said

compiling 4.1.15-gentoo-r1 bzimage.....

and all of a sudden the machine powered down.

At first I thought there was a power failure in my apartment.

Not true.

I then thought e.g. the PC psu had failed etc....

No.

I was running the gentoo installation in a terminal on a debian installation I made and had chrooted into the gentoo root file system to do this.

I rebooted the debian installation and ran it smoothly for  couple of hours doing a variety of things before I decided to mount the gentoo partition and do the chroot again.

I did so and tried running genkernel all again and it did exactly the same shutdown trick again. 

Is it possible that the kernel being created is somehow sending a system shutdown message?

Would the genkernel log file be in /var/log?

What log files and config files would be useful to post on the site to help with this problem?

Regards

MF

----------

## Tony0945

Try /var/log/genkernel.log and /var/log/messages

My guess is that the power supply is insufficient for sustained high CPU use, but I may be way off base. See if those logs shed any light.

----------

## mikefot

Dear Tony,

Many thanks for your response.

The psu is a 350 MW device taken from a much lower spec pc.

But the asus 990 fx board and FX 8350 cpu only need about 150 W or so and the nvidia engt 430 graphics card 40W or so I think.

I will run a power use calc check.

I will get the log files and post them.

Regards

MF

----------

## Tony0945

8350 is a 220W TDP CPU. My Phenom II is 125W TDP. I idle at 120 W total taken from the UPS. When running hard, compiling kernel or a big package like Firefox, it jumps to 220 W from the UPS. PS is a 80% Bronze Seasonic 350W. I'd expect your machine to run 100W higher than mine, which is pushing a 350W PS. PS ratings are a bit slippery as they total all outputs, but some have a lot of 5V capability while 12V is what counts and how much per rail. You may need a 450W supply. 

Try setting genkernel to only use one core and see if it survives. I forget where the setting is.

----------

## mikefot

Dear Tony,

I am struggling with pastebinit.

In gentoo it compiles but when I run it I get this api key error problem

Running it in debian is odd.  It creates a link http://www,paste.debian.net or something similar but NOT the extra number to the posted content.

If you go on the site and try to manually post it it complains the minmum post size is 150 kb and rejects it (even small posts too)

I have put the last 100 lines of the genkernel output in here by hand:

```
root@bong:/home/mikef/Documents/gentoo-stuff# tail -100 genkernel.log

  CC      drivers/acpi/apei/hest.o

  CC      drivers/base/firmware_class.o

  CC      net/802/fc.o

  CC      drivers/base/memory.o

  CC      kernel/trace/trace_export.o

  CC      drivers/acpi/acpica/evxfgpe.o

  CC      kernel/trace/trace_syscalls.o

  CC      kernel/futex.o

  CC      kernel/trace/trace_event_perf.o

  CC      drivers/acpi/acpica/evxfregn.o

  CC      kernel/trace/trace_events_filter.o

  CC      drivers/base/module.o

  CC      drivers/acpi/apei/erst.o

  CC      net/802/fddi.o

  CC      drivers/base/devcoredump.o

  CC      drivers/acpi/acpica/exconfig.o

  CC      drivers/acpi/acpica/exconvrt.o

  CC      fs/compat_ioctl.o

  CC      kernel/trace/trace_events_trigger.o

  CC      drivers/acpi/acpica/excreate.o

  LD      drivers/base/built-in.o

  CC      drivers/acpi/acpica/exdebug.o

  CC      kernel/trace/bpf_trace.o

  CC      kernel/futex_compat.o

  CC      drivers/acpi/acpica/exdump.o

  LD      net/802/built-in.o

  CC      drivers/acpi/apei/ghes.o

  CC      net/8021q/vlan_core.o

  CC      drivers/acpi/acpica/exfield.o

  CC      drivers/acpi/acpica/exfldio.o

  LD      net/9p/built-in.o

  CC      drivers/acpi/acpica/exmutex.o

  CC      kernel/trace/trace_kprobe.o

  CC      kernel/trace/power-traces.o

  CC      kernel/trace/rpm-traces.o

  CC      drivers/acpi/acpica/exnames.o

  CC      drivers/acpi/acpica/exoparg1.o

  CC      drivers/acpi/acpica/exoparg2.o

  LD      drivers/acpi/apei/apei.o

  CC      fs/binfmt_misc.o

  LD      drivers/acpi/apei/built-in.o

  CC      drivers/acpi/acpi_ipmi.o

  CC      drivers/acpi/acpica/exoparg3.o

  CC      drivers/acpi/acpica/exoparg6.o

  LD      net/8021q/built-in.o

  CC      drivers/acpi/acpica/exprep.o

  LD      net/atm/built-in.o

  LD      net/bluetooth/built-in.o

  LD      net/bluetooth/bnep/built-in.o

  LD      net/bluetooth/cmtp/built-in.o

  LD      net/bluetooth/hidp/built-in.o

  CC      drivers/acpi/acpica/exregion.o

  CC      drivers/acpi/acpica/exmisc.o

  LD      net/bluetooth/rfcomm/built-in.o

  CC      kernel/trace/trace_probe.o

  LD      net/bridge/netfilter/built-in.o

  LD      net/bridge/built-in.o

  LD      kernel/trace/libftrace.o

  CC      drivers/acpi/acpica/exresnte.o

  LD      net/can/built-in.o

  CC      fs/binfmt_script.o

  CC      drivers/acpi/ac.o

  CC      net/core/sock.o

  CC      drivers/acpi/acpica/exresolv.o

  CC      fs/binfmt_elf.o

  CC      drivers/acpi/acpica/exstore.o

  CC      drivers/acpi/acpica/exresop.o

  CC      kernel/dma.o

  CC      fs/compat_binfmt_elf.o

  CC      drivers/acpi/acpica/exstoren.o

  CC      drivers/acpi/acpica/exstorob.o

  CC      drivers/acpi/acpica/exsystem.o

  CC      drivers/acpi/button.o

  CC      kernel/smp.o

  LD      kernel/trace/built-in.o

  CC      drivers/acpi/acpica/exutils.o

  CC      kernel/uid16.o

  CC      drivers/acpi/acpica/hwacpi.o

  CC      drivers/acpi/acpica/hwesleep.o

  CC      drivers/acpi/acpica/hwgpe.o

  CC      drivers/acpi/acpica/hwpci.o

  CC      fs/posix_acl.o

  CC      drivers/acpi/acpica/hwregs.o

  CC      kernel/system_keyring.o

Generating X.509 key generation config

  CC      drivers/acpi/acpica/hwsleep.o

  CC      drivers/acpi/acpica/hwvalid.o

  CC      fs/coredump.o

  CC      drivers/acpi/fan.o

  CC      fs/drop_caches.o

  CC      drivers/acpi/pci_slot.o

  CC      drivers/acpi/processor_driver.o

  CC      kernel/module.o

  CC      drivers/acpi/acpica/hwxface.o

  CC      drivers/acpi/acpica/hwxfsleep.o

  CC      fs/fhandle.o

  CC      fs/dcookies.o

  CC      drivers/acpi/processor_throttling.o

  CC      drivers/acpi/processor_idle.o

```

I will look for the dmesg output and post that.

Regds

MF

----------

## mikefot

Dear Tony,

I am struggling with pastebinit.

In gentoo it compiles but when I run it I get this api key error problem

Running it in debian is odd.  It creates a link http://www,paste.debian.net or something similar but NOT the extra number to the posted content.

If you go on the site and try to manually post it it complains the minmum post size is 150 kb and rejects it (even small posts too)

I have put the last 100 lines of the genkernel output in here by hand:

```
root@bong:/home/mikef/Documents/gentoo-stuff# tail -100 genkernel.log

  CC      drivers/acpi/apei/hest.o

  CC      drivers/base/firmware_class.o

  CC      net/802/fc.o

  CC      drivers/base/memory.o

  CC      kernel/trace/trace_export.o

  CC      drivers/acpi/acpica/evxfgpe.o

  CC      kernel/trace/trace_syscalls.o

  CC      kernel/futex.o

  CC      kernel/trace/trace_event_perf.o

  CC      drivers/acpi/acpica/evxfregn.o

  CC      kernel/trace/trace_events_filter.o

  CC      drivers/base/module.o

  CC      drivers/acpi/apei/erst.o

  CC      net/802/fddi.o

  CC      drivers/base/devcoredump.o

  CC      drivers/acpi/acpica/exconfig.o

  CC      drivers/acpi/acpica/exconvrt.o

  CC      fs/compat_ioctl.o

  CC      kernel/trace/trace_events_trigger.o

  CC      drivers/acpi/acpica/excreate.o

  LD      drivers/base/built-in.o

  CC      drivers/acpi/acpica/exdebug.o

  CC      kernel/trace/bpf_trace.o

  CC      kernel/futex_compat.o

  CC      drivers/acpi/acpica/exdump.o

  LD      net/802/built-in.o

  CC      drivers/acpi/apei/ghes.o

  CC      net/8021q/vlan_core.o

  CC      drivers/acpi/acpica/exfield.o

  CC      drivers/acpi/acpica/exfldio.o

  LD      net/9p/built-in.o

  CC      drivers/acpi/acpica/exmutex.o

  CC      kernel/trace/trace_kprobe.o

  CC      kernel/trace/power-traces.o

  CC      kernel/trace/rpm-traces.o

  CC      drivers/acpi/acpica/exnames.o

  CC      drivers/acpi/acpica/exoparg1.o

  CC      drivers/acpi/acpica/exoparg2.o

  LD      drivers/acpi/apei/apei.o

  CC      fs/binfmt_misc.o

  LD      drivers/acpi/apei/built-in.o

  CC      drivers/acpi/acpi_ipmi.o

  CC      drivers/acpi/acpica/exoparg3.o

  CC      drivers/acpi/acpica/exoparg6.o

  LD      net/8021q/built-in.o

  CC      drivers/acpi/acpica/exprep.o

  LD      net/atm/built-in.o

  LD      net/bluetooth/built-in.o

  LD      net/bluetooth/bnep/built-in.o

  LD      net/bluetooth/cmtp/built-in.o

  LD      net/bluetooth/hidp/built-in.o

  CC      drivers/acpi/acpica/exregion.o

  CC      drivers/acpi/acpica/exmisc.o

  LD      net/bluetooth/rfcomm/built-in.o

  CC      kernel/trace/trace_probe.o

  LD      net/bridge/netfilter/built-in.o

  LD      net/bridge/built-in.o

  LD      kernel/trace/libftrace.o

  CC      drivers/acpi/acpica/exresnte.o

  LD      net/can/built-in.o

  CC      fs/binfmt_script.o

  CC      drivers/acpi/ac.o

  CC      net/core/sock.o

  CC      drivers/acpi/acpica/exresolv.o

  CC      fs/binfmt_elf.o

  CC      drivers/acpi/acpica/exstore.o

  CC      drivers/acpi/acpica/exresop.o

  CC      kernel/dma.o

  CC      fs/compat_binfmt_elf.o

  CC      drivers/acpi/acpica/exstoren.o

  CC      drivers/acpi/acpica/exstorob.o

  CC      drivers/acpi/acpica/exsystem.o

  CC      drivers/acpi/button.o

  CC      kernel/smp.o

  LD      kernel/trace/built-in.o

  CC      drivers/acpi/acpica/exutils.o

  CC      kernel/uid16.o

  CC      drivers/acpi/acpica/hwacpi.o

  CC      drivers/acpi/acpica/hwesleep.o

  CC      drivers/acpi/acpica/hwgpe.o

  CC      drivers/acpi/acpica/hwpci.o

  CC      fs/posix_acl.o

  CC      drivers/acpi/acpica/hwregs.o

  CC      kernel/system_keyring.o

Generating X.509 key generation config

  CC      drivers/acpi/acpica/hwsleep.o

  CC      drivers/acpi/acpica/hwvalid.o

  CC      fs/coredump.o

  CC      drivers/acpi/fan.o

  CC      fs/drop_caches.o

  CC      drivers/acpi/pci_slot.o

  CC      drivers/acpi/processor_driver.o

  CC      kernel/module.o

  CC      drivers/acpi/acpica/hwxface.o

  CC      drivers/acpi/acpica/hwxfsleep.o

  CC      fs/fhandle.o

  CC      fs/dcookies.o

  CC      drivers/acpi/processor_throttling.o

  CC      drivers/acpi/processor_idle.o

```

I will look for the dmesg output and post that.

Regds

MF

----------

## mikefot

Dear Tony,

I cannot see any dmesg file in /var/log.

Maybe that would only be created  if I had finished the installation  and was booting gnetoo from the hard disk and not chrooting into it from debian before the installation grub and tidy up stuff has been done.

Regards

MF

----------

## mikefot

Dear Tony,

I think I understand what you are saying about the power supply.

What you mean is that the compilations of e.g. pastebinit and emacs might have boosted the power requirement somewhat when I did them,

but

compiling the kernel using all 8 processors and optimising it to take advantage of them and any dynamic memory requirements alongside could well use up a lot of power 

for short while - but that couldc well be enough to cause a problem and thus the shutdown......................

As the Americans would say "that'll do it"...

You can't fault the gentoo designers for wanting to do the best optimisation job they can with the cpu I have.

They are assuming I would have a power supply that is adequate for the transient requirement needed to produce the best executable obtainable in my case.

I really need to get the old power supply fixed.

It is muscular enough for this box and e.g. a larger graphics card if I would install it.

Regds

MF

----------

## Tony0945

Try wgetpaste as an alternative to pastebinit. The name sounds like "get" but you are really doing a "put".  

Also, try adding --makeopts=-j1  to your genkernel command line. This should force genkernel to use only one core. If that works, definitely we are looking at the PS

If it still crashes with one core only, we are probably looking at something else.

----------

## Syl20

If you have to buy a new PSU, don't be stingy. A good 450 W unit (choose at least a 80+ bronze one) is much more efficient than a 750 W noname one. And the voltages will be more stable, so your hardware will last much more time.

----------

## mikefot

Dear All,

The kernel compiled successfully with makeopts set to -j1.

So there is a problem with the power supply......

My other power supply is a Zalman zm 1250 platinum.

It needs to be repaired.

I will get it fixed and swap it for the current one.

I also emrged wgetpaste.

I will see if I can make it work better than pastebinit.

I will finish off the installation and reboot and then power diown the machine and sort the power supply problem.

Then I will go back to it and do the manual kernel compilation and optimisation.

Thanks

Regds

MF

----------

## Buffoon

 *mikefot wrote:*   

> Dear Tony,
> 
> The psu is a 350 MW device taken from a much lower spec pc.
> 
> But the asus 990 fx board and FX 8350 cpu only need about 150 W or so and the nvidia engt 430 graphics card 40W or so I think.
> ...

 

350 MW !? Megawatts?

Anyhow, total 350 W does not mean it can provide 220 W or even 150 W on 3.3 V rail.

----------

## mikefot

OK, I will get the zalman psu fixed.

It can deliver 45A on one 12V rail and 65A on the other as I recall.

Regds

MF

----------

## Tony0945

By coincidence I inventoried my power supplies today:

my Antec Earthwatts 380 : +3.3V@20A,+5V@20A,+12V1@17A,+12V2@17A,-12V@0.8A,+5VSB@2.5A

my Seasonic S12II 430B: +3.3V@20A, +5V@20A, +12V1@17A, +12V2@17A, -12V@0.8A, +5VSB@2.5A EXACTLY THE SAME BUT RATED 50 WATTS HIGHER

my Antec Earthwatts EA500: +3.3V@25A, +5V@24A, +12V1@22A, +12V2@22A, -12V@0.8A, +5VSB@2.5A

Seasonic is a manufacturer and Antec is a reseller, in fact I believe the Earthwatts series is made by Seasonic, except for the models ending "D" which are made by Delta.

Edit:

The CPU is usually run off it's own 12V rail. The FX-8350 does appear to be 25W, not 220W as I thought. That would be 10A at 12V at 100% efficiency. You don't want to run these supplies on the ragged edge, but a 17A supply should be sufficient. Maybe the supply is a single rail and feeding the video card too?

The Seasonic above has trouble with my Phenom II X6 1090T, also 125W, three hard drives, ethernet card, HVR-1600 TV card EVGA GS8400S video card. What are the specs on your supply?

Also, did you try running genkernel with only one core? What were the results?   

The CPU also may have just got too hot and shut down. Have you blown dust out of the heat sink lately?

----------

## schorsch_76

 *Tony0945 wrote:*   

> 8350 is a 220W TDP CPU.

 

No its not 220W TDP. The FX 9... are 220W. See

https://en.wikipedia.org/wiki/List_of_AMD_FX_microprocessors

----------

## mikefot

Dear Tony,

I ran genkernel with one cpu only as you suggested and the kernel compiled successfully.

You were right.

My casecom 350W power supply is too puny for the box here.

The idle power draw of an FX 8350 is 91W from the wall.

The average power draw for it in use is 182W in the tests done here:

http://www.tomshardware.com/reviews/fx-8350-vishera-review,3328-16.html

Peak power draw is measured as 196W in this review:

http://techreport.com/review/23750/amd-fx-8350-processor-reviewed/4

and with what appears to be some overclocking as much as 350W here

http://www.corsair.com/en/blog/2014/november/fx-8350_power_to_performance

The engt 430 graphics card draws all its power from the motjherboard - a psu of 300W with 18 amps on 12V rail is recommended minimum by NVIDIA.

The power supply I am using is a CASECOM 350W device.

The power supply that needs to be fixed is a Zalman zm 1250 platinum.

Regds

MF

----------

## Tony0945

According to this link http://forums.overclockers.co.uk/showthread.php?t=17897600  it might only be supplying 8A at 12v to the CPU. The Seasonic 380 supplies twice as much power.  Your zalman gives 45A, enough to weld with!

----------

## mikefot

Dear Tony,

Right enough it seems as though the casecom power supply is pretty puny.........

The zalman is reviewed here:

http://www.tweaktown.com/reviews/5144/zalman_zm1250_platinum_1250w_80_plus_platinum_power_supply_review/index.html

It has two 12V rails; one rated at 45A and the other at 65A.

That's enough for Victor Frankenstein......

I'll let you know once I have got it fixed.

Regds

MF

----------

## mikefot

Dear Tony,

I have installed gentoo on a kaveri box I have here while I get the zalman psu fixed for the piledriver box.

It went OK and genkernel seems to have worked.

I used debian annd gparted to make extra partitions on a disk that also had a number of Oses on it.

This worked.

I used the gentoo minimal disk a bit so I could use the mirrorselect package but I probably could have emerged it and carried on with debian.

I switched back to debian after I ran genkernel.

I finished off the install and successfully rebooted.

grub did not see the other OSes but I fixed that using the system boot repair disk I have.

I now want to go back into the gentoo install and try compiling and configuring the latest kernel and then have that kernel supersede the genkernel kernel.

Last time I tried to this in the old AMD 3400 install something went awry and the new kernel went missing in the wrong directory and I ended up being stuck with the genkernel kernel instead.......

This time I am hoping to improve on that.

I am going to read up on the kernel compilation and configuration and in particular on the target directory for the executable etc before attempting it.

Wish me luck,

Regards

MF

----------

## Tony0945

 *mikefot wrote:*   

> I have installed gentoo on a kaveri box I have here while I get the zalman psu fixed for the piledriver box.
> 
> 

  I'm planning a kaveri motherboard to replace my LAN server which is an old Athlon64 X2. I'm looking at an A8-7600 on a GIGABYTE GA-F2A88X-D3HP with 16GB memory for a cheap system with low power (65W TDP on that processor). I'm thinking of replacing the nine year old Antec Smartpower 2.0 with an 80 Plus Platinum since the system runs 24/7, mostly dormant. I put a kill-a-watt on it and found that the PSU draws 6 watts with the the computer shut off! The Smartpower is only 70% efficient at best. The AC draw is 60W when idle and running. That's 15% of rated load for the PSU so it's probably less than 70% efficient. Obviously reliable, though. It's nine years old.

I'd greatly appreciate any tips about the kaveri and kernel modules, along with a mobo rec or warning.

 *Quote:*   

> I used debian and gparted to make extra partitions on a disk that also had a number of Oses on it.
> 
> ...
> 
> I used the gentoo minimal disk a bit so I could use the mirrorselect package but I probably could have emerged it and carried on with debian.
> ...

  I like the sysrescuecd that I learned about on this forum. It's gentoo based and has a GUI with gparted. The instructions on the web site to put it on a USB stick are super easy. I put it on an $8 stick and can now boot anything that has a BIOS usb boot (everything modern?) regardless if it has a CD/DVD drive. https://www.system-rescue-cd.org/SystemRescueCd_Homepage and https://www.system-rescue-cd.org/Howto_install-usb-stick

 *Quote:*   

> Wish me luck,

  Of course!

----------

## mikefot

Dear Tony,

The machine I have uses a Gigabyte F2A78M-HD2 motherboard.

It does not have as many usb ports and other bells and whistles as more upmarket boards.

In think the one you are interested in is probably superior to this one but it does work OK.

I have been using it for a year now.

The pc has a 500W psu in it.

There are a few motherboards that are similar in quality to the one you are interested in. I remembet MSI had a good one.

But I think it is a fair choice.

On with the zalman repair job.......

Now you know about it you won't want a lesser psu.

Regds

MF

----------

## Tony0945

 *mikefot wrote:*   

> Dear Tony,
> 
> The machine I have uses a Gigabyte F2A78M-HD2 motherboard.
> 
> Now you know about it you won't want a lesser psu.
> ...

 

Thank You!  The box to be upgraded has a nine year old Anctec Smartpower 2.0 SP-500 that is reliable but has no PFC and only 70% peak efficiency.

I'm looking to buy this PSU, even though it's a bit pricey, but what does an extra $50 mean on a PSU that's going to last for years?

http://www.newegg.com/Product/Product.aspx?Item=N82E16817371077Last edited by Tony0945 on Sat Apr 02, 2016 2:16 pm; edited 2 times in total

----------

## mikefot

Dear Tony,

I have sent the big power supply unit for the FX8350 box away to get sorted.....

As soon as I get it back I will remove the small 350W casecom psu and install the big beast and have a go at the manual kernel configuration etc.

It does have PFC protection.

I might try getting a psu tester or cheap multimeter like device to check on it.

I now see that a good power supply really is important and computers use more power than you think........

I originally went for the big psu because I wanted to install a e.g. a GTX 970 graphics card in it at some point and I had read that if you used a big powerful psu which 

would not be troubled by it then you would be protecting the motherboard and cpu etc since the electronic components would all run at the correct voltage etc 100% 

of the time........

I now realise that peak power demand can be greater than I had envisaged.

Regds

MF

----------

## mikefot

Dear Tony,

Hello after a while....   The psu in the FX 8350 box has been replaced with an Antec 1300....

I am thinking to try upgrading from the genkernel kernel I have on the kaveri box to the latest kernel which I would compile and manually configure.

If I can make that work I will try the kernel compilation on the FX8350 box using all 8 cpus to check the psu is getting enough juice (should be now) and then do a manual kernel installation there aswell.

I hope you are OK.

Regards

mikefot

----------

## mikefot

Dear Folks,

I logged in to the gentoo install I have on an AMD Kaveri  APU box I have and ran the emerge update deep @world commands etc to update the system which seemed to run well.

I ran emerge depclean a number of times and used the revdep-rebuild command which seemed to run OK as well.

I had originally used genkernel and now want to manually configure and compile the latest kernel from source.

The kernel I have is 4.1.15.

I emerged the kernel source package - it said the kernel I already had was the newest one.  Running eselect kernel list showed this one kernel.

I then googled around for some hints on the correct configuration of the kernel in a kaveri box - in particular the radeon graphics card.

Using the menuconfig tool I set the graphics driver to build the radeon card files into the kernel (I emerged the radeon ucode package).

I did not install the firmware package and/or choose the external firmware option in the compilation.

I checked a number of other kernel settings based on recommendations in the gentoo documentation which seemed to be OK.

It seemed as if the layout of kernel options had changed a lot in version 4 relative to 3 so I couldn't always find certain options to check they were correct.

I did make -j9

then

make install_modules

and then

make install

I should have done make -j5 because the kaveri has 4 cpus not 8.

I am not sure if the compilations were successful.

I can post log files e.g. from/var/log etc using pastebin if anyone would be kind enough to take a look at them and I can rerun the compilation again as necessary.

If I can successfully configure the graphics card in the kernel compilation I would then be looking to install the xserver packages and then e.g. KDE etc.

Suggestions appreciated.

Regards

Michael Fothergill

----------

## Tony0945

Mike,  the Kaveri seems to do a lot better with the 4.7 and up kernels.  I have an A8-7600 on a gigabyte GA-F2A88X-D3HP 

Here is my 4.8.8 config http://pastebin.com/R1katxuC  In make.conf I have set VIDEO_CARDS="amdgpu radeonsi radeon"

I don't know if this is ideal but it works. My buildscript:

```
#!

cd /usr/src/linux

zcat /proc/config.gz >.config

# At this point we should compare kernel versions and make oldconfig if the base version has updated

make oldconfig

make menuconfig   &&  make -j5 && make -j5 modules_install && make -j5 install && echo "Don't forget to update boot loader menu"

emerge --nodeps net-misc/r8168

```

  I found that the kernel r8169 driver doesn't work for my board, so I don't build it in the kernel, either as built-in or module. Your board may be different.

It's idling nicely at 39 watts at the wall, which is probably 30 watts at the board. Peak is somewhere around 70w. Not for gaming but makes a nice samba/apache/minidlna server.

One thing I didn't realize, the 8G memory is only 7G because the GPU  side reserves 1G of main memory for itself.

Just got an SSD and will probably install it tomorrow.

EDIT: Will be glad to look at your pastebins.

----------

## mikefot

Dear Tony

I realised that I might not have mounted the /boot partition when I set up the chroot into gentoo yesterday.

I did it and ran make install again in case it had not put the kernel into the /boot location.

I got this output – the same as when I did it yesterday:

```
(chroot) rhinoceros linux # make install

sh ./arch/x86/boot/install.sh 4.1.15-gentoo-r1 arch/x86/boot/bzImage \

   System.map "/boot"
```

I did not run grub-mkconfig to update the bootloader.- I have now emerged grub 2 and did grub2-mkconfig.  

I also installed the grub os prober package and the ntfs windows sniffing package as well.

At first when I ran eselect kernel list I could only see the one 4.1.15 kernel.

I ran emerge syskernel sources but it didn't alter.

I then googled around and began to think I should run emerge webrsync.  

I then did 

```
emerge --ask --update --deep --with-bdeps=y --newuse sys-kernel/gentoo-sources
```

and

```
emerge --ask --update --deep --with-bdeps=y --newuse @world
```

```
emerge --depclean
```

This resulted in the 4.4.26 kernel being installed IIRC.

I checked the web page listing available kernels.

The latest is 4.8.9.

If I did something like emerge sys/kernel-gentoo-sources.4,8.9

would that fetch me the latest kernel?

I need to update 2 config files apparently.

I will eselect the newest kernel I can obtain and try compiliing it.

Comments appreciated.

Many thanks for posting the tips and hints on this.

I bought an SSD and it died on me so I am not so interested in them nowadays- but maybe yours will be OK.

Regards

Michael

----------

## Tony0945

emerge -av =sys-kernel/gentoo-sources-4.8.9 --autounmask-write

After it runs, you will have to run etc-update and do it again.

If you use your old config be sure to make oldconfig first. If you use mine, give the supplemental name "tony" or something so you can distinguish it from some other kernel.

I run grub legacy, so I'm not sure what all you have to do to update the menu. Updating the menu was confusing so I never went to grub2. Editting the menu in grub legacy is easy.

On the SSD, I plan to try refind which is supposed to find the kernels by itself from the name vmlinuz.

Building your kernel is one of the most important steps in Gentoo, so take it slow and make sure you understand each step.

----------

## mikefot

Dear Tony,

Many thanks for your helpful suggestions.  

I ran the command you gave me for the kernel source as you suggested:

```
 emerge -av =sys-kernel/gentoo-sources-4.8.9 --autounmask-write

 etc-update

 emerge -av =sys-kernel/gentoo-sources-4.8.9 --autounmask-write
```

When I ran eselect again I could see that the new kernel had been downloaded:

```
(chroot) rhinoceros linux # !182

eselect kernel list

Available kernel symlink targets:

  [1]   linux-4.1.15-gentoo-r1 *

  [2]   linux-4.4.26-gentoo

  [3]   linux-4.8.9-gentoo

(chroot) rhinoceros linux # 
```

I found a web page giving advice on the amdgpu package:

[url]https://wiki.gentoo.org/wiki/Amdgpu

[/url]

I have followed the recommendations on it for my case as best I could and ran:

```
emerge --ask sys-firmware/amdgpu-ucode

emerge --ask --changed-use --deep @world

emerge –depclean
```

The commands ran successfully AFAICT.

I then copied the config file from the /boot partition to the /usr/linux/src directory:

```
 cp /boot/config-4.1.15-gentoo-r1 .config
```

I then listed the available kernels:

```
(chroot) rhinoceros linux # !213

eselect kernel list

Available kernel symlink targets:

  [1]   linux-4.1.15-gentoo-r1 *

  [2]   linux-4.8.9-gentoo

```

I then selected the 4.8.9 kernel:

```
(chroot) rhinoceros linux # eselect kernel set 2
```

Then I checked it was ready to be used:

```
(chroot) rhinoceros linux # eselect kernel list

```

```
Available kernel symlink targets:

  [1]   linux-4.1.15-gentoo-r1

  [2]   linux-4.8.9-gentoo *

```

I then ran make oldconfig:

```
(chroot) rhinoceros linux # make oldconfig

  HOSTCC  scripts/basic/fixdep

  HOSTCC  scripts/basic/bin2c

  HOSTCC  scripts/kconfig/conf.o

  HOSTCC  scripts/kconfig/zconf.tab.o

  HOSTLD  scripts/kconfig/conf

scripts/kconfig/conf  --oldconfig Kconfig

#

# configuration written to .config

#

(chroot) rhinoceros linux # 
```

I then ran make menuconfig. For some odd reason it opened the old 4.1.15 kernel not the new 4.8.9 one.........

Then I accidentally deleted the terminal window I had made in debian which I had created the chroot to gentoo with.  Oops.

I opened a new window and then discovered that running the chroot command followed by a few other commands and I reestablished the chroot gentoo environment.

I went back into /usr/src/linux and when I ran make menuconfig again this time it opened the new 4.8.9 kernel......

I then looked at the gentoo amdgpu web page to get some more tips on the correct kernel settings for the graphics card in the new kernel.

I then tried to configure the kernel.

I managed to turn on most of the settings recommended for the graphics card and the sound card.

I was not sure what kind of codec was right for the AMD audio devices I have. So I chose a generic codec parser option.

I did not turn on the amdgpu support for CIK parts because the kaveri chip is not a south sea island device.

I saved the configuration as .config

In the kernel section on the firmware drivers I could turn on the firmware built in option but could not find any submenu that allowed the list of binary files to be entered in.

 *Quote:*   

>   [*] Include in-kernel firmware blobs in kernel binary
> 
>             (amdgpu/<YOUR-MODEL>.bin radeon/<YOUR-MODEL>.bin)
> 
>             (/lib/firmware) Firmware blobs root directory
> ...

 

The compilation was done as follows:

```
make -j5

Kernel: arch/x86/boot/bzImage is ready  (#1)
```

It seemed to go OK 

Then I compiled the modules:

```
(chroot) rhinoceros linux # make modules_install

  INSTALL drivers/gpu/drm/amd/amdgpu/amdgpu.ko

  INSTALL drivers/gpu/drm/ttm/ttm.ko

  INSTALL drivers/mfd/mfd-core.ko

  INSTALL drivers/thermal/x86_pkg_temp_thermal.ko

  INSTALL fs/efivarfs/efivarfs.ko

  INSTALL net/ipv4/netfilter/ipt_MASQUERADE.ko

  INSTALL net/ipv4/netfilter/iptable_nat.ko

  INSTALL net/ipv4/netfilter/nf_log_arp.ko

  INSTALL net/ipv4/netfilter/nf_log_ipv4.ko

  INSTALL net/ipv4/netfilter/nf_nat_ipv4.ko

  INSTALL net/ipv4/netfilter/nf_nat_masquerade_ipv4.ko

  INSTALL net/ipv6/netfilter/nf_log_ipv6.ko

  INSTALL net/netfilter/nf_log_common.ko

  INSTALL net/netfilter/nf_nat.ko

  INSTALL net/netfilter/nf_nat_ftp.ko

  INSTALL net/netfilter/nf_nat_irc.ko

  INSTALL net/netfilter/nf_nat_sip.ko

  INSTALL net/netfilter/xt_LOG.ko

  INSTALL net/netfilter/xt_addrtype.ko

  INSTALL net/netfilter/xt_mark.ko

  INSTALL net/netfilter/xt_nat.ko

  DEPMOD  4.8.9-gentoo
```

I then put the executable in the bootloader:

```
(chroot) rhinoceros linux # make install

sh ./arch/x86/boot/install.sh 4.8.9-gentoo arch/x86/boot/bzImage \

   System.map "/boot"
```

I looked in the boot partition to see if it made it:

```
(chroot) rhinoceros linux # ls -l /boot

total 56627

-rw-r--r-- 1 root root  2908372 Nov 20 16:52 System.map-4.1.15-gentoo-r1

-rw-r--r-- 1 root root  3566723 Nov 21 20:47 System.map-4.8.9-gentoo

-rw-r--r-- 1 root root  2908372 Mar 27  2016 System.map-genkernel-x86_64-4.1.15-gentoo-r1

-rw-r--r-- 1 root root   136612 Nov 20 16:52 config-4.1.15-gentoo-r1

-rw-r--r-- 1 root root   108360 Nov 21 20:47 config-4.8.9-gentoo

drwxr-xr-x 6 root root     1024 Nov 20 17:34 grub

-rw-r--r-- 1 root root 32023496 Mar 27  2016 initramfs-genkernel-x86_64-4.1.15-gentoo-r1

-rw-r--r-- 1 root root  4882992 Mar 27  2016 kernel-genkernel-x86_64-4.1.15-gentoo-r1

drwx------ 2 root root    12288 Mar 26  2016 lost+found

-rw-r--r-- 1 root root  4882864 Nov 20 16:52 vmlinuz-4.1.15-gentoo-r1

-rw-r--r-- 1 root root  6549936 Nov 21 20:47 vmlinuz-4.8.9-gentoo

(chroot) rhinoceros linux # 
```

I think it did.

I then updated grub as follows:

(chroot) rhinoceros linux # grub-mkconfig -o /boot/grub/grub.cfg

When I rebooted into gentoo at first it could only find the old 4.1.15 kernel.

I then rebooted into the debian installation I have alongside the gentoo and ran update-grub.

Then I rebooted and chose the grub option to load gentoo and the debian grub had sniffed out the 4.8.9 gentoo kernel and presented it as an option next to the old kernel.

I booted it up and logged into it and it booted up OK.

At present my main interest is to try to install e.g. the xserver package and eventually a window manager such as KDE.

But that would not be a good idea at all if the graphics card isn't recognised properly by the new kernel etc.

Could you suggest some tests I could do(or output files I could post up on pastebin) to check whether the kernel is kosher enough to proceed to window manager package installation?

Regards and thanks

Michael

PS I also added  the video card entry you used into make.conf and updated it before I compiled the new kernel

----------

## Tony0945

You pretty much have to install X and see if it runs to troubleshoot it. There will be helpful logs in /var/log

----------

## Tony0945

If there are hardware problems, check the settings in the config file I sent. I think the boards are very close in built-in hardware.  Remember r8168 vs r8169. I think r8169 only supports very old Realtek chips.

----------

## mikefot

Dear Tony,

I installed Xorg and then booted up gentoo and ran startx.

It crashed grumblling that the kernel modesetting was not supported.

I began to wonder if I needed to reconfigure the kernel to turn on extra KMS related features etc that I might have missed etc and then recompile the kernel and try again etc.

But when I googled around I noticed that someone had the same error and fixed it by using a command called modprobe.

They used it to turn on a module that could set the KMS for the graphics card.

```
modprobe nvidia 
```

is one example of the command being used that I found.

For the radeon card (my case)  I found the command

```
modprobe radeon modeset=1
```

when I googled around.

If I boot up gentoo and login as root could I run the modprobe command in some way to fix the KMS problem in this case and not necessarily need to reconfigure and recompile the kernel?

Do I need to be in a particular directory e.g. /usr/src/linux etc when I do it?

Comments appreciated.

Regards

Michael

----------

## Tony0945

Yes! Post the results of your modprobe and the results of "grep -i RADEON /usr/src/linux/.config" or "zcat /proc/config.gz | grep -i RADEON" The latter is preferred because it directly examines the running kernel.   

After runni ng startx you should have a file called /var/log/Xorg.0.log , please use wgetpaste on it and and post the URL. " wgetpaste /var/log/Xorg.0.log"

Example  https://paste.pound-python.org/show/bnAfxb6gAZkDrOZqzPeA/

----------

## mikefot

Dear Tony

I ran your command:

```
grep -i RADEON /usr/src/linux/.config
```

and got the following output:

```
# CONFIG_DRM_RADEON is not set

# CONFIG_FB_RADEON is not set

```

I ran modprobe as follows:

```
modprobe -c --showconfig

```

the output is here:

https://paste.debian.net/897811

the Xorg log file output is here:

https://paste.debian.net/897813

When I boot up the gentoo and log into it I can't get the internet connection working with /sbin/dhcpcd - something must be wrong.

So I could not use wgetpaste on it etc.

After running the modprobe and the grep command I logged out and then  I rebooted into debian and 

then set up the chroot into gentoo and copied the output from the modprobe grep and Xorg log files to the paste area using the debian environment.

Comments appreciated

Regards

Michael

----------

## Tony0945

 *mikefot wrote:*   

> 
> 
> When I boot up the gentoo and log into it I can't get the internet connection working with /sbin/dhcpcd - something must be wrong.

 

Try emerge -av r8168 

I bet you have the same Realtek chip that I have.

EDIT: Does lspci give a line like this?

```
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
```

Is it exactly like that?

```
gentoo ~ # equery w r8168

/usr/portage/net-misc/r8168/r8168-8.043.01.ebuild

```

Looks like I'm running the latest version (~amd)Last edited by Tony0945 on Tue Nov 22, 2016 11:05 pm; edited 2 times in total

----------

## Tony0945

On my machine:

```
gentoo ~ # zcat /proc/config.gz |grep -i RADEON                       

CONFIG_EXTRA_FIRMWARE="radeon/kaveri_ce.bin radeon/kaveri_me.bin radeon/kaveri_mec2.bin radeon/kaveri_mec.bin radeon/kaveri_pfp.bin radeon/kaveri_rlc.bin radeon/kaveri_sdma.bin radeon/bonaire_uvd.bin radeon/bonaire_vce.bin "

CONFIG_DRM_RADEON=m

CONFIG_DRM_RADEON_USERPTR=y

# CONFIG_FB_RADEON is not set
```

It looks like you need to rebuild the kernel.

----------

## Tony0945

 *Quote:*   

> (EE) open /dev/dri/card0: No such file or directory

 I think this because you have no Radeon module.

Please post the output of "lscpu".

I think the wiki has some capitalization problems in the firmware. 

Also see this thread. https://forums.gentoo.org/viewtopic-p-7954966.html

----------

## mikefot

Dear Tony,

Many thanks for your response.

I ran lscpu.

The output was:

Architecture:          x86_64

CPU op-mode(s):        32-bit, 64-bit

Byte Order:            Little Endian

CPU(s):                4

On-line CPU(s) list:   0-3

Thread(s) per core:    2

Core(s) per socket:    2

Socket(s):             1

NUMA node(s):          1

Vendor ID:             AuthenticAMD

CPU family:            21

Model:                 48

Model name:            AMD A10-7850K Radeon R7, 12 Compute Cores 4C+8G

Stepping:              1

CPU MHz:               3700.000

CPU max MHz:           3700.0000

CPU min MHz:           1700.0000

BogoMIPS:              7424.93

Virtualization:        AMD-V

L1d cache:             16K

L1i cache:             96K

L2 cache:              2048K

NUMA node0 CPU(s):     0-3

(chroot) rhinoceros ~ # 

Regards

Michael

----------

## mikefot

PS

I forgor to use the code tags:

```
Architecture:          x86_64

CPU op-mode(s):        32-bit, 64-bit

Byte Order:            Little Endian

CPU(s):                4

On-line CPU(s) list:   0-3

Thread(s) per core:    2

Core(s) per socket:    2

Socket(s):             1

NUMA node(s):          1

Vendor ID:             AuthenticAMD

CPU family:            21

Model:                 48

Model name:            AMD A10-7850K Radeon R7, 12 Compute Cores 4C+8G

Stepping:              1

CPU MHz:               3700.000

CPU max MHz:           3700.0000

CPU min MHz:           1700.0000

BogoMIPS:              7424.93

Virtualization:        AMD-V

L1d cache:             16K

L1i cache:             96K

L2 cache:              2048K

NUMA node0 CPU(s):     0-3

(chroot) rhinoceros ~ # 
```

Regards

Michael

----------

## Tony0945

Rebuild your kernel as follows:

```
gentoo ~ # zcat /proc/config.gz |grep -i RADEON                       

CONFIG_EXTRA_FIRMWARE="radeon/kaveri_ce.bin radeon/kaveri_me.bin radeon/kaveri_mec2.bin radeon/kaveri_mec.bin radeon/kaveri_pfp.bin radeon/kaveri_rlc.bin radeon/kaveri_sdma.bin radeon/bonaire_uvd.bin radeon/bonaire_vce.bin "

CONFIG_DRM_RADEON=m

CONFIG_DRM_RADEON_USERPTR=y

# CONFIG_FB_RADEON is not set
```

Your CPU may require more but let's see how close this gets us.

----------

## mikefot

Dear Tony,

Many thanks for your suggestion here once again.

Before booting gentoo and executing your command

```
gentoo ~ # zcat /proc/config.gz |grep -i RADEON                        

CONFIG_EXTRA_FIRMWARE="radeon/kaveri_ce.bin radeon/kaveri_me.bin radeon/kaveri_mec2.bin radeon/kaveri_mec.bin radeon/kaveri_pfp.bin radeon/kaveri_rlc.bin radeon/kaveri_sdma.bin radeon/bonaire_uvd.bin radeon/bonaire_vce.bin " 

CONFIG_DRM_RADEON=m 

CONFIG_DRM_RADEON_USERPTR=y 

# CONFIG_FB_RADEON is not set
```

as root to rebuild/modify the kernel I would like to mention the fact that I tried your earlier zcat command

zcat /proc/config.gz | grep -i RADEON

BUT

it crashed  with an error something like "gzip error - file config.gz does not exist"

I tried changing the directory to /usr/src/linux but this did not help.

I also tried getting rid of the .gz extension and that didn't work either.

I am worried your new command will crash with a similar error.

Comments appreciated.

Regards

Michael

----------

## Tony0945

If /proc/config.gz doesn't exist you need another kernel change.

To make these kernel changes, change directory to /usr/src/linux and make menuconfig:

1. Go to "General setup" and enable " Enable access to .config through /proc/config.gz"

2. Go Back to the top, then "Device Drivers"->"Generic Driver Options" find" Userspace firmware loading support" and enable it.

    Right below this type or copy and paste the filenames that I listed above under "CONFIG_EXTRA_FIRMWARE"

3. Back up to "Device Drivers" and go to "Graphics Support" enable "ATI-RADEON" as a module "M" rather than "x"

A handy trick is to type a "/" slash at almost any time in menuconfig and type the name of the variable you are looking for, i.e. either CONFIG_DRM_RADEON or DRM_RADEON.

This will open a screen with information about the variable and where it is in the hierarchy. I used this to generate the above instructions. I learned h0w to do this on this forum. it's an invaluable tip because the hierarchy changes from time to time and this method will show you where it is now.

After you build and reboot this kernel, re-run startx again and the tests I listed a few entries above. It may not work, but should be closer.

ADDED: I think while you are doing this, you might as well enable (as a Module) AMD GPU which should be on the same page as ATI-RADEON. My APU doesn't use this but your APU might.

Regarding R8168, in case you have R8169 built-in, change it to a module. Then to test R8168, "rmmod R8169 && modprobe -v R8168".  R8169 has to be out for R8168 to work. By trying them both as modules, you can find which works for you.

----------

## mikefot

Dear Tony,

I ran menuconfig and made the changes you recommended.

But when I ran make -j5

I got an error in the firmware file list option:

```
chroot) rhinoceros linux # make -j5

scripts/kconfig/conf  --silentoldconfig Kconfig

  HOSTCC  scripts/basic/bin2c

  CHK     include/config/kernel.release

  CHK     include/generated/uapi/linux/version.h

  CHK     include/generated/utsrelease.h

  CHK     include/generated/timeconst.h

  CHK     include/generated/bounds.h

  CHK     include/generated/asm-offsets.h

  CALL    scripts/checksyscalls.sh

  CHK     include/generated/compile.h

  GZIP    kernel/config_data.gz

  CHK     kernel/config_data.h

  UPD     kernel/config_data.h

  CC [M]  kernel/configs.o

[color=red]make[1]: *** No rule to make target 'firmware/radeon/kaveri_ce.bin', needed by 'firmware/radeon/kaveri_ce.bin.gen.o'.  Stop.

make[1]: *** Waiting for unfinished jobs....

  MK_FW   firmware/radeon/kaveri_ce.bin.gen.S

Makefile:968: recipe for target 'firmware' failed

make: *** [firmware] Error 2

[/color]make: *** Waiting for unfinished jobs....

  LD      drivers/i2c/algos/built-in.o

  CC [M]  drivers/i2c/algos/i2c-algo-bit.o

  LD      drivers/i2c/built-in.o

  CC [M]  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.o

```

The compilation continued further but I did not list any more of the output because I think we can see the problem...

It might be that the list of files I inputted had a character wrong or missing or that I entered an extra blank space at the end of the list of files etc and that caused the problem.

Isn't there supposed to be a directory like /lib/firmware or something where these little files are supposed to live etc - maybe it couldn't find them or I need to emerge some package to put them in there etc?

Stop Press - I have found the /lib/firmware/radeon directory and listed the files and copied them to paste debian.net:

[url] https://paste.debian.net/898165

[/url]

There is also one for the /lib/firmware/amdgpu 

[url] https://paste.debian.net/898167

[/url]

Comments appreciated

Regards

Michael

----------

## mikefot

PS

I tried colouring some lines red but it didn't work so I removed the code:

```
chroot) rhinoceros linux # make -j5 

scripts/kconfig/conf  --silentoldconfig Kconfig 

  HOSTCC  scripts/basic/bin2c 

  CHK     include/config/kernel.release 

  CHK     include/generated/uapi/linux/version.h 

  CHK     include/generated/utsrelease.h 

  CHK     include/generated/timeconst.h 

  CHK     include/generated/bounds.h 

  CHK     include/generated/asm-offsets.h 

  CALL    scripts/checksyscalls.sh 

  CHK     include/generated/compile.h 

  GZIP    kernel/config_data.gz 

  CHK     kernel/config_data.h 

  UPD     kernel/config_data.h 

  CC [M]  kernel/configs.o 

make[1]: *** No rule to make target 'firmware/radeon/kaveri_ce.bin', needed by 'firmware/radeon/kaveri_ce.bin.gen.o'.  Stop. 

make[1]: *** Waiting for unfinished jobs.... 

  MK_FW   firmware/radeon/kaveri_ce.bin.gen.S 

Makefile:968: recipe for target 'firmware' failed 

make: *** [firmware] Error 2 

make: *** Waiting for unfinished jobs.... 

  LD      drivers/i2c/algos/built-in.o 

  CC [M]  drivers/i2c/algos/i2c-algo-bit.o 

  LD      drivers/i2c/built-in.o 

  CC [M]  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.o 

```

----------

## Tony0945

Ah! we are getting somewhere! Looks like that capitalization thing I mentioned. 

```
gentoo ~ # equery b firmware/radeon/kaveri_ce.bin

 * Searching for firmware/radeon/kaveri_ce.bin ...

sys-kernel/linux-firmware-20160331 (/lib/firmware/radeon/kaveri_ce.bin
```

emerge =sys-kernel/linux-firmware-20160331  

or maybe you should go for the latest:

emerge =sys-kernel/linux-firmware-20161005

----------

## mikefot

Dear Tony

I ran 

```
emerge =sys-kernel/linux-firmware-20161005

```

and got the blocked package error

see output:

[url] https://paste.debian.net/898198 [/url]

Comments appreciated

Regards

Michael

----------

## ct85711

```
[ebuild  N    ~] sys-kernel/linux-firmware-20161005  USE="-savedconfig" 

[blocks B      ] sys-kernel/linux-firmware[-savedconfig] ("sys-kernel/linux-firmware[-savedconfig]" is blocking sys-firmware/radeon-ucode-20160628)

[blocks B      ] >sys-kernel/linux-firmware-20150812[-savedconfig] (">sys-kernel/linux-firmware-20150812[-savedconfig]" is blocking sys-firmware/amdgpu-ucode-20160628)

[blocks B      ] sys-firmware/radeon-ucode ("sys-firmware/radeon-ucode" is blocking sys-kernel/linux-firmware-20161005)
```

well, from my understanding with the firmware stuff, radeon-ucode is a subset of the overall firmware package (meaning the linux-firmware contains radeon-ucode and amdgpu-ucode another other firmware)...

----------

## Tony0945

Thank you, ct85711. Based on your info, I modified the radeon_ucode ebuild by removing the DEPEND and changing the install directory to /lib/firmware/radeon/xtra

Then: 

```
gentoo radeon # diff . xtra

Binary files ./bonaire_k_smc.bin and xtra/bonaire_k_smc.bin differ

Binary files ./bonaire_smc.bin and xtra/bonaire_smc.bin differ

Binary files ./hainan_k_smc.bin and xtra/hainan_k_smc.bin differ

Binary files ./hainan_smc.bin and xtra/hainan_smc.bin differ

Binary files ./hawaii_k_smc.bin and xtra/hawaii_k_smc.bin differ

Binary files ./hawaii_smc.bin and xtra/hawaii_smc.bin differ

Binary files ./oland_k_smc.bin and xtra/oland_k_smc.bin differ

Binary files ./oland_smc.bin and xtra/oland_smc.bin differ

Binary files ./pitcairn_k_smc.bin and xtra/pitcairn_k_smc.bin differ

Binary files ./pitcairn_smc.bin and xtra/pitcairn_smc.bin differ

Binary files ./tahiti_k_smc.bin and xtra/tahiti_k_smc.bin differ

Binary files ./tahiti_smc.bin and xtra/tahiti_smc.bin differ

Binary files ./verde_k_smc.bin and xtra/verde_k_smc.bin differ

Binary files ./verde_smc.bin and xtra/verde_smc.bin differ

Only in .: xtra

```

 Since non of those are the files we have been talking about, it will suffice to emerge the latest radeon_code rather than linux-firmware.

So, go ahead and "emerge =sys-firmware/radeon-ucode-20160628" instead of linux-firmware.

P.S. Of interest is:

```
gentoo xtra # ls -l kaveri_ce.bin KAVERI_ce.bin

-rw-r--r-- 1 root root 8832 Nov 23 17:53 kaveri_ce.bin

-rw-r--r-- 1 root root 8576 Nov 23 17:53 KAVERI_ce.bin

```

 So they are not exactly the same.

Have a Happy Thanksgiving. I probably will not be online until later in the day tomorrow.

----------

## mikefot

Dear Tony,

I ran the 

```
emerge =sys-firmware/radeon-ucode-20160628
```

command and it ran successfully.

I then tried the compilation again:

```
(chroot) rhinoceros linux # pwd

/usr/src/linux

(chroot) rhinoceros linux # make -j5

  CHK     include/config/kernel.release

  CHK     include/generated/uapi/linux/version.h

  CHK     include/generated/utsrelease.h

  CHK     include/generated/timeconst.h

  CHK     include/generated/bounds.h

  CHK     include/generated/asm-offsets.h

  CALL    scripts/checksyscalls.sh

  CHK     include/generated/compile.h

  CHK     kernel/config_data.h

make[1]: *** No rule to make target 'firmware/radeon/kaveri_ce.bin', needed by 'firmware/radeon/kaveri_ce.bin.gen.o'.  Stop.

Makefile:968: recipe for target 'firmware' failed

make: *** [firmware] Error 2

make: *** Waiting for unfinished jobs....

make: *** wait: No child processes.  Stop.

(chroot) rhinoceros linux # 

```

Suggestions welcome.

Thanks for both your and CT's help with this.

Regards

Michael

----------

## mikefot

Dear Tony,

I used the gentoo amdgpu web page to guide me when I was configuring the kernel.

```
https://wiki.gentoo.org/wiki/Amdgpu
```

I originally tried to set it up with the built-in option - some extra googling made me choose the radeon ucode package to aid not the firmware package.

I have found a discussion on line where someone had a similar error message to me:

http://www.gossamer-threads.com/lists/gentoo/user/244027

The recommendation there was that I would need to add the following line to the config file

```
CONFIG_PREVENT_FIRMWARE_BUILD=y 

```

There is a chap called Gregory who explains this on that site. He listed the code he had in his config file which apparently worked OK.

The person with the bug (called Lavender) was using the radeon ucode package but wanted to use external firmware blobs (ie the alternative to the built-in option as I understand it) with their graphics card and got the same error

message as I do.

Comments appreciated.

Regards

Michael

----------

## Tony0945

I've got that one too:

```
gentoo ~ # zcat /proc/config.gz | grep FIRMWARE

CONFIG_PREVENT_FIRMWARE_BUILD=y

CONFIG_FIRMWARE_IN_KERNEL=y

CONFIG_EXTRA_FIRMWARE="radeon/kaveri_ce.bin radeon/kaveri_me.bin radeon/kaveri_mec2.bin radeon/kaveri_mec.bin radeon/kaveri_pfp.bin radeon/kaveri_rlc.bin radeon/kaveri_sdma.bin radeon/bonaire_uvd.bin radeon/bonaire_vce.bin "

CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"

CONFIG_DRM_LOAD_EDID_FIRMWARE=y

CONFIG_FIRMWARE_EDID=y

CONFIG_FIRMWARE_MEMMAP=y

# CONFIG_GOOGLE_FIRMWARE is not set

# CONFIG_TEST_FIRMWARE is not set

```

It should be in that pastebin of my config somewhere upthread.

----------

## mikefot

Dear Tony,

Thanks for the reply.

I think I also need this:

```
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware" 
```

Regards

Michael

----------

## mikefot

Dear Tony,

I reconfigured the kernel and found out that the firmware directory was incorrectly specified as

```
 /firmware
```

 not 

```
/lib/firmware.
```

Correcting this error and recompiling the kernel worked this time.....

I am pleased.

I then tried running startx as a user after fixing the bootloader to see the new kernel and rebooting etc.

I think X is beginning to work a bit......

The output from Xorg in var/log is here:

[url] https://paste.debian.net/898480 [/url]

When it ran I didn't see a blank screen with an x in the centre.

Comments appreciated on testing X a bit more.

Regards

Michael

----------

## mikefot

Dear Tony,

I mentioned earlier that something is wrong with the internet connection on the gentoo installation.

I ran 

```
/sbin/dhcpcd 
```

 as root which in the past has worked to allow ping to see e.g. www.google.com etc. thus telling me that the internet connection was working.

But on this install what I get in response was 

 *Quote:*   

> no valid interfaces

 

 *Quote:*   

> no interfaces have a carrier

 

What could be the cause of that problem?

I also seem to be getting an error concerning the locale which I may not have set up properly.

Comments appreciated.

Regards

Michael

----------

## mikefot

Dear Tony

I notice in the X log file that there was an EE type error that was flagged up when the VESA card was not present etc.

In make.conf the entry for the video card is:

```
VIDEO_CARDS="amdgpu radeonsi radeon"
```

Should that not suffice here and if so why would X be looking for the VESA card settings?

Suggestion on this are most welcome.

Regards

Michael

----------

## Tony0945

Looking good!

 Don't worry about the error on fbdev. You need to configure alsa, but that can wait. I'm surprised evdev shut down but maybe you killed startx. Didn't I see in another thread that startx should only be started by a user, not root? I always go straight to xdm which runs startx on it's own. At least I think so. It does produce a /var/log/Xorg.0.log

First let's fix the network.  Post the output of "ifconfig" and " lsmod |grep r8".

I don't use udev or eudev but most people do and it produces "predictable" unpredictable unpronounceable names instead of eth0 et cetera. ifconfig will tell use what interface, if any exists and the lsmod will tell us what device driver is in use.

----------

## mikefot

Dear Tony

Many thanks for your input again.

I ran the 

```
lsmod |grep r8
```

 command in the chroot environment within debian

The output is

```
(chroot) rhinoceros portage # lsmod |grep r8

r8169                  68262  0

mii                    12675  1 r8169

(chroot) rhinoceros portage # ^C

```

I can exit the chroot, logout of debian, reboot directly into the gentoo install and run this command again if needed and get you that output if that is required.  

I don't want the result being influenced by the debian environment if that would be a problem here.

I have run the if config command within the chroot environment again:

```
(chroot) rhinoceros portage # ifconfig

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.124  netmask 255.255.255.0  broadcast 192.168.1.255

        inet6 fe80::76d4:35ff:feb2:d2c  prefixlen 64  scopeid 0x20<link>

        ether 74:d4:35:b2:0d:2c  txqueuelen 1000  (Ethernet)

        RX packets 138809  bytes 135965197 (129.6 MiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 107797  bytes 18454272 (17.5 MiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 0  (Local Loopback)

        RX packets 47  bytes 14437 (14.0 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 47  bytes 14437 (14.0 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

(chroot) rhinoceros portage # 
```

The debian internet connection works.

When I ran X (obviously not as chroot) I did it as a user not root.

Regards

Michael

----------

## mikefot

Dear Tony

I exited the chroot environment, logged out of debian and rebooted into the gentoo install.

I ran the ifconfig command in the native gentoo case and got the following:

```
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 1  (Local Loopback)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
```

The zeros on the packets are not surprising because the internet connection doesn't work yet.

I also ran

```
lsmod |grep r8
```

and the result was nothing ie zillch as user and as root.....

Regards

Michael

----------

## Tony0945

 *mikefot wrote:*   

> 
> 
> ```
> lsmod |grep r8
> ```
> ...

 

You don't have any ethernet driver. In the chroot "emerge -f r8168"  This will fetch the file. Then reboot into your hard drive and "emerge r8168". It has to be emerged while running the kernel it is attached to. Then "modprobe -v r8168" and repeat the lsmod and ifconfig. You may have to reboot but I think the modprobe is sufficient to load the module and have udev do its thing.

EDIT: it looks like r8169 is working on Debian, so your mobo seems supported. Instead of r8168 you could rebuild your kernel once more . make menuconfig and go to Device Drivers->Network device support->Ethernet driver support and click "Realtek devices" That will open up three choices. Select "M" for the third choice,"Realtek 8169 gigabit ethernet support"

----------

## mikefot

Dear Tony,

I ran 

```
emerge -f r8168
```

 as chroot successfully.

I then rebooted into gentoo and ran

```
 emerge r8168
```

 - and it crashed:

https://paste.debian.net/898763

I noticed the following error in it:

```
* Preparing r8168 module

make -j5 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' KERNELDIR=/usr

/src/linux modules 

find: '/lib/modules/4.8.9-gentoo/kernel/drivers/net': No such file or directory
```

Perhaps I have failed to specify a directory path correctly again that the kernel needs - or maybe forgot to choose a particular kernel option???

I also collected the emerge info output for this:

https://paste.debian.net/898765

Maybe it would be better if I rebuilt the kernel again as you suggested.

Comments appreciated

Regards

Michael

----------

## Tony0945

All that the ebuild checks for is that you do not have r8169 enabled. I just checked my config and I do have NETDEVICES=y and ETHERNET=y but have not selected NET_VENDOR_REALTEK. I did try r8169 first and it didn't work for me. 

Go ahead and build r8169 as described above. Then if it doesn't work, you can back off the NET_VENDOR_REALTEK, rebuild the kernel and try emerging r8168 again. It appears the ebuild instructions are incomplete.

----------

## mikefot

Dear Tony,

I used make menuconfig and reconfigured the kernel to turn on the realtek settings as you directed.

I then recompiled the kernel etc.

I rebooted into gentoo and I found that the lsmod found the realtek driver.

Also when I logged in as root and typed 

```
/sbin/dhcpcd 
```

followed by return I got

```
sending commands to master dhcpcd process
```

and then when I pinged google it worked.

I now have an internet connection that works on gentoo.

Many thanks for your help with this.

My next question is:

How do we fix X so that startx runs happily??

Regards

Michael

----------

## Tony0945

Great!  Apparently r8169 works for you. Will get back later about startx. I have to go to the machine and try some things.

----------

## Tony0945

OK, I went to the Kaveri machine and stopped xdm. Then as root I ran startx. It began, gave an error message about .Xinitrc and stopped. The Xorg.0.log looked just like yours. So I logged in successively as user tony and user guest. In both cases, twm launched on TTY 7. It looked good. Then I went to an older machine and did the same thing with the same results for root. Then I ran startx as each of the three users on that machine. In each case, mate-session was launched on TTY 7. The first machine has lumina and twm, but not mate. The second machine has mate and twm.

So I think you should try startx as an ordinary user. If nothing happens, emerge twm, it's small.I really think you should just go ahead and emerge kde and kdm since that's what you are interested in. If you want to go step by step, emerge twm and experiment some more. It's quick, but I feel your X is set up okay, at least good enough to launch a GUI interface. If you are going to be gaming or such, it might need some tweaking, but it's so much more convenient  to have a GUI and run a web browser and mail client than to keep switching between Gentoo and Ubuntu.

----------

## mikefot

Dear Tony,

I tried emerging twm.

i then googled about to find out how to start up the windows by editing xinitrc etc.

When I looked at the code in the xinitrc file it seemed a bit odd to edit it with emacs and just add 

```
exec twm
```

 to it and then try to run it etc.

Then I found a web page in the gentoo forums where a user called the Doctor suggested two useful things that I would recommend to other users.

The first was to test X by running 

```
X -retro
```

.

I did this and it worked and I saw the grey screen with a cross in the center and found the mouse could move a cursor around the screen image.

I then knew X was working - and without having to get some fiddly xinit command to work etc.

The Doctor also suggested installing LXDE.

I checked the Gentoo wiki on it and noticed that the installation process is very simple.

So I emerged it.

A problem I had was that the keyboard I have is a UK one but I think I am using a US keymap.

The problem with this is that the tilda sign you use in e.g. ~/.xinitrc type commands was not easy to find on the keyboard.

Once I did find it it looked rather different to the typeface on the web page and I wondered if it really was the tilda character at first.

I copied a file over to the gentoo from debian with a genuine tilda in it and then used the more command to look at it in gentoo.

I then realised I really had found the tilda character on the keyboard and then typed in (as user) 

```
echo "exec startlxde" >> ~/.initrc

```

I then entered

```
startx
```

and LXDE came to life...........

I am now compiling chromium which is a slog.  I only have 8GB of RAM.

I think I need more.

There some other concerns I have which I will put in a later email.

Thanks for the help with this.

Regards

Michael

----------

## Tony0945

I'm so glad that it is working!  The Doctor is one of the great strengths of this forum and has taught me a lot.

Regarding memory, I also have 8 G using two slots of four on my board. I think you have only two slots, correct?

I was shocked to see from the "free" command that I only have 7G because the APU commandeers 1 G for itself. My other machines either have an onbaord graphic chip or a seperate card. In either case, the chip or board has it's own memory. But I am running a couple of machines with 4G and it only slows down emerging. I have an old AT 32-bit machine with 384Meg but I don't run X on it.

My next project is booting UEFI on a SSD on the A8-7800 server. My first time with both UEFI and SSD.

Now that you have a working system, you should edit the first post in this thread to add [SOLVED} to the title.   Open a new thread if you have new problems or questions.

----------

## mikefot

Dear Tony,

I edited the first post title and added SOLVED to it.

I am having a problem with the sound.

I think I might need to tweak the kernel again.

More on this shortly.

Regards

Michael

----------

## mikefot

Dear Tony,

I installed alsamixer and alsamixer gui.

I also installed alsa utils.

I ran the aplay command at a terminal:

```
rhinoceros etc # aplay -l

**** List of PLAYBACK Hardware Devices ****

card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 1: Generic [HD-Audio Generic], device 0: Generic Analog [Generic Analog]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 1: Generic [HD-Audio Generic], device 1: Generic Digital [Generic Digital]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

```

plus another couple of commands that could be helpful here:

```
rhinoceros etc # cat /proc/asound/cards

 0 [HDMI           ]: HDA-Intel - HDA ATI HDMI

                      HDA ATI HDMI at 0xfeb64000 irq 28

 1 [Generic        ]: HDA-Intel - HD-Audio Generic

```

```
rhinoceros etc # cat /proc/asound/card0/pcm3p/info

card: 0

device: 3

subdevice: 0

stream: PLAYBACK

id: HDMI 0

name: HDMI 0

subname: subdevice #0

class: 0

subclass: 0

subdevices_count: 1

subdevices_avail: 1

 HD-Audio Generic at 0xfeb60000 irq 16
```

Regards

Michael

----------

## mikefot

Dear Tony,

I also tried a command that is supposed to generate a continuous sound from the speakers:

```
rhinoceros etc # cat /dev/urandom | aplay

ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.0.29/work/alsa-lib-1.0.29/src/pcm/pcm_dmix.c:1024:(snd_pcm_dmix_open) unable to open slave

aplay: main:722: audio open error: No such file or directory

```

But it did not work.

If I want to start a new thread, which area of gentoo forums would be appropriate for:

1, Sound problems.

2. Installing precompiled binaries (e.g. for Libreoffice)

3. Problems with grub.

4. Use flags and config updates etc.

Regards and thanks

Michael

----------

