LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 09-18-2016, 06:34 PM   #1
plasmonics
Member
 
Registered: Jan 2009
Distribution: Fedora, Gentoo, LFS
Posts: 224

Rep: Reputation: 69
Problem setting up AMD graphics on HP Envy m6-1105dx laptop


I successfully built LFS/BLFS on a desktop with nvidia graphics. Rather than rebuild LFS/BLFS on my HP Envy laptop with an AMD HD 7660G graphics card, I copied the desktop image over to my laptop using Clonezilla. Then from a chroot environment (using Fedora as a host), I recompiled the kernel with support for the various laptop components. Since AMD no longer supports their proprietary driver, I compiled support for the open source AMD GPU. Based on the BLFS book, you also have to include DRI. There is also a radeon option in "make menuconfig". However, if I include the radeon module, the laptop freezes on boot. Therefore, it seems to require the AMD (not radeon) kernel module. I also recompiled all of chapter VI in BLFS, including the xf86-video-ati-7.70.tar.bz2 driver. It appears, though, that this driver is not used, since, if I delete it, the outcome is the same.

The laptop boots up. The graphical boot environment with lxdm works, and I can login to xfce4. All of the components work, including sound and wifi. It correctly detected the resolution as 1366x768. There are no pixel anomalies and font distortions.

The problem is, I cannot dim the LCD screen from the power manager applet. I included all of the back light LCD options in the kernel config.

My hunch is that Kernel Mode Setting (KMS) is not being loaded on boot. The kernel version is 4.7.4. My boot process has a vmlinuz file as well as a initramfs file made with the BLFS initramfs Bash script. The grub version is the latest in the BLFS book.

Based on past experience, setting up AMD graphics is extremely difficult. On the other hand, setting up nvidia graphics is ridiculously easy. Short of getting an nvidia laptop, I am stuck with it.

If anyone has set up LFS on a laptop with AMD graphics, I would appreciate some insight.

Last edited by plasmonics; 09-18-2016 at 06:37 PM.
 
Old 09-19-2016, 01:50 PM   #2
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
AMD graphics requires firmware. Did you check dmesg for any missing firmware hints? If the driver is built into kernel, then the firmware needs to be builtin, too (see BLFS Xorg ATI Driver instructions).

If you are still unable to get it to work, post your "dmesg" output and "/var/log/Xorg.0.log" (or ~/.local/share/xorg/Xorg.0.log on systemd systems) contents, so someone could assist you further.
 
1 members found this post helpful.
Old 09-20-2016, 07:30 AM   #3
plasmonics
Member
 
Registered: Jan 2009
Distribution: Fedora, Gentoo, LFS
Posts: 224

Original Poster
Rep: Reputation: 69
Krejzi put me on the right track. AMD gpu needs extra firmware. I downloaded the firmware from Gentoo. Then using the Gentoo radeon wiki as a guide, I saw that my gpu uses ARUBA and TAHITI firmware. The wiki shows how to include extra firmware inside menuconfig. Now the LCD dimming works from the power manager applet.

One problem remains. glxinfo gives the following error
Code:
name of display: :0.0
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  35
  Current serial number in output stream:  36
Does this mean I have to recompile elfutils, libva, llvm, and Mesa?
 
Old 09-20-2016, 10:08 AM   #4
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
Quote:
Originally Posted by plasmonics View Post
Krejzi put me on the right track. AMD gpu needs extra firmware. I downloaded the firmware from Gentoo. Then using the Gentoo radeon wiki as a guide, I saw that my gpu uses ARUBA and TAHITI firmware. The wiki shows how to include extra firmware inside menuconfig. Now the LCD dimming works from the power manager applet.

One problem remains. glxinfo gives the following error
Code:
name of display: :0.0
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  35
  Current serial number in output stream:  36
Does this mean I have to recompile elfutils, libva, llvm, and Mesa?
I don't know what it means, but you should report a bug upstream. You don't need llvm, your GPU should use r600, and that driver requires neither llvm nor elfutils.
 
Old 09-21-2016, 04:11 PM   #5
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 1,255

Rep: Reputation: 220Reputation: 220Reputation: 220
Quote:
Originally Posted by Krejzi View Post
I don't know what it means, but you should report a bug upstream. You don't need llvm, your GPU should use r600, and that driver requires neither llvm nor elfutils.
r600 uses llvm

.
 
Old 09-21-2016, 04:12 PM   #6
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
Quote:
Originally Posted by zk1234 View Post
r600 uses llvm

.
No, unless you pass --enable-r600-llvm-compiler, which you shouldn't - SB is much more mature.

r300 and radeonsi, on the other hand, require llvm, and later also requires elfutils.
 
Old 09-21-2016, 04:15 PM   #7
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 1,255

Rep: Reputation: 220Reputation: 220Reputation: 220
Quote:
Originally Posted by Krejzi View Post
No, unless you pass --enable-r600-llvm-compiler, which you shouldn't - SB is much more mature.

r300 and radeonsi, on the other hand, require llvm, and later also requires elfutils.
Do you know at least one mainstream distro, which distributes r600 without llvm support?

.
 
Old 09-21-2016, 04:47 PM   #8
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
Quote:
Originally Posted by zk1234 View Post
Do you know at least one mainstream distro, which distributes r600 without llvm support?

.
All of them. As I said, llvm is required for r300 and radeonsi, that's why all distros depend on it.
 
Old 09-22-2016, 04:04 AM   #9
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 1,255

Rep: Reputation: 220Reputation: 220Reputation: 220
Quote:
Originally Posted by Krejzi View Post
All of them. As I said, llvm is required for r300 and radeonsi, that's why all distros depend on it.
Hi,

This is a LFS forum, isn't it? Have a look here:
http://www.linuxfromscratch.org/blfs...vn/x/mesa.html
llvm is required by default. One must slightly "hack" LFS to compile r600 without llvm.

This is what you said: "You don't need llvm, your GPU should use r600, and that driver requires neither llvm nor elfutils." And that is not correct.
You could say: "r600 requires both llvm and elfutils by default. However you can change this by applying the following changes ..." And this would be correct.

.
 
Old 09-22-2016, 04:10 AM   #10
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
Quote:
Originally Posted by zk1234 View Post
Hi,

This is a LFS forum, isn't it? Have a look here:
http://www.linuxfromscratch.org/blfs...vn/x/mesa.html
llvm is required by default. One must slightly "hack" LFS to compile r600 without llvm.

This is what you said: "You don't need llvm, your GPU should use r600, and that driver requires neither llvm nor elfutils." And that is not correct.
You could say: "r600 requires both llvm and elfutils by default. However you can change this by applying the following changes ..." And this would be correct.

.
That's incorrect. It's required by llvmpipe, swr, radeonsi, r300 *and* r600 but *only* if --enable-r600-llvm-compiler has been passed, which no one sane should do.

https://cgit.freedesktop.org/mesa/me...igure.ac#n2409

See that under r600 check, llvm isn't required (no gallium_require_llvm/radeon_llvm_check calls like for r300 and radeonsi). r600 only needs llvm if you enable open source OpenCL, which blfs doesn't even support building, as it requires additional, unreleased dependencies and is disabled by default.
 
Old 09-22-2016, 04:16 AM   #11
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 1,255

Rep: Reputation: 220Reputation: 220Reputation: 220
Quote:
Originally Posted by Krejzi View Post
That's incorrect. It's required by llvmpipe, swr, radeonsi, r300 *and* r600 but *only* if --enable-r600-llvm-compiler has been passed, which no one sane should do.

https://cgit.freedesktop.org/mesa/me...igure.ac#n2409

See that under r600 check, llvm isn't required (no gallium_require_llvm/radeon_llvm_check calls like for r300 and radeonsi). r600 only needs llvm if you enable open source OpenCL, which blfs doesn't even support building, as it requires additional, unreleased dependencies and is disabled by default.
So you found a bug in the LFS book. Don't forget to file it !

.
 
Old 09-22-2016, 04:18 AM   #12
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
Quote:
Originally Posted by zk1234 View Post
So you found a bug in the LFS book. Don't forget to file it !

.
I used to maintain mesa and friends in the past, but people who think know better than upstream developers liked to philosophise and come up with wrong statements. Which is why you get what you get now.

http://wiki.linuxfromscratch.org/blfs/ticket/8341
 
Old 09-22-2016, 04:24 AM   #13
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 1,255

Rep: Reputation: 220Reputation: 220Reputation: 220
Quote:
Originally Posted by Krejzi View Post
I used to maintain mesa and friends in the past, but people who think know better than upstream developers liked to philosophise and come up with wrong statements. Which is why you get what you get now.

http://wiki.linuxfromscratch.org/blfs/ticket/8341
Unfortunately, it looks that I am one of the "people who think know better than upstream developers". The llvm support is enabled by default in my distro (4MLinux). Also in Debian, Slackware, Fedora, ...

 
Old 09-22-2016, 06:17 AM   #14
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
Quote:
Originally Posted by zk1234 View Post
Unfortunately, it looks that I am one of the "people who think know better than upstream developers". The llvm support is enabled by default in my distro (4MLinux). Also in Debian, Slackware, Fedora, ...

Yes, because distros ship all drivers, and as already stated several times, llvm is required for r300 and radeonsi.
 
Old 09-23-2016, 09:43 AM   #15
plasmonics
Member
 
Registered: Jan 2009
Distribution: Fedora, Gentoo, LFS
Posts: 224

Original Poster
Rep: Reputation: 69
Following up on this, I examined Fedora's kernel config file. They did not compile extra firmware for R600, Tahiti, and Aruba. Yet the same GPU I mentioned at the start of the thread works perfectly. LCD dimming works, and glxinfo and glxgears show no errors. Glxinfo shows that the driver is Gallium. Also their /etc/X11/xorg.conf.d directory is empty and /usr/share/X11/xorg.conf.d directory just has keyboard and synaptics files, no gpu files.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
hp envy laptop sundersen Linux - Laptop and Netbook 6 09-26-2016 06:10 AM
hp envy laptop sundersen Linux - Hardware 3 09-19-2016 11:43 PM
A good distro for AMD A6-6310 APU with AMD Radeon R4 Graphics NintenAkira Linux - Hardware 2 03-26-2016 06:55 AM
LXer: Intel Haswell HD Graphics 4600 vs. AMD Radeon Graphics On Linux LXer Syndicated Linux News 0 06-17-2013 12:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 03:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration