How to force X to use a specific GPU / output
Vlad D. Markov
dvoich at aim.com
Sat Nov 30 20:38:34 UTC 2019
On Sat, 30 Nov 2019 21:02:39 +0100
Polytropon <freebsd at edvax.de> wrote:
> With a HP Pavilion dm-1 "netbook" laptop I got, I have a problem
> since I connected a HDMI display: There are now several green
> pixels on the screen, in areas where the color is nearly black.
> They also appear in videos and make the "compression squares"
> Note: Those are _not_ defective pixels on the display.
> When the system boots up, everything is fine. As soon as the
> system enters X, color isn't displayed properly as before.
> The video output on both HDMI and VGA, even at the same time,
> shows the colors correctly.
> During searches related to that problem, I once found an image
> that looked like what I'm seeing, and I read an article, even
> though regarding a Macbook, that this problem occurs due to
> internal switching between graphics hardware depending on if
> the internal screen should be driven or an external one. Sadly,
> I cannot find any of those again...
> However, I found this:
> You can see "green clouds" around the curves, and the colors
> look slightly distorted. Everything that is "nearly black" now
> looks green - the _same_ green. The image above shows that
> problem on something that looks like "Windows 7".
> In the laptop here, there is an AMD CPU with graphics APU, if
> my information regarding the device is correct. From "pciconf -lv":
> vgapci0 at pci0:0:1:0: class=0x030000
> card=0x1611103c chip=0x98021002 rev=0x00 hdr=0x00
> vendor = 'Advanced Micro Devices, Inc. [AMD/ATI]'
> device = 'Wrestler [Radeon HD 6310]'
> class = display
> subclass = VGA
> For X, xf86-video-ati and xf86-video-radeon packages are installed.
> X automatically loads a working driver; from /var/log/Xorg.0.log:
> [ 25.256] (II) LoadModule: "ati"
> [ 25.256] (II) Loading /usr/local/lib/xorg/modules/drivers/ati_drv.so
> [ 25.257] (II) Module ati: vendor="X.Org Foundation"
> [ 25.257] compiled for 1.18.4, module version = 19.0.1
> [ 25.257] Module class: X.Org Video Driver
> [ 25.257] ABI class: X.Org Video Driver, version 20.0
> [ 25.259] (II) LoadModule: "radeon"
> [ 25.259] (II) Loading /usr/local/lib/xorg/modules/drivers/radeon_drv.so
> [ 25.276] (II) Module radeon: vendor="X.Org Foundation"
> [ 25.276] compiled for 1.18.4, module version = 19.0.1
> [ 25.276] Module class: X.Org Video Driver
> [ 25.276] ABI class: X.Org Video Driver, version 20.0
> [ 25.282] (II) RADEON: Driver for ATI/AMD Radeon chipsets:
> AMD Radeon HD 6310 Graphics, AMD Radeon HD 6250 Graphics,
> [ 25.293] (==) RADEON(0): Depth 24, (--) framebuffer bpp 32
> [ 25.293] (II) RADEON(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
> [ 25.293] (==) RADEON(0): Default visual is TrueColor
> [ 25.293] (==) RADEON(0): RGB weight 888
> [ 25.293] (II) RADEON(0): Using 8 bits per RGB (8 bit DAC)
> [ 25.293] (--) RADEON(0): Chipset: "AMD Radeon HD 6310 Graphics" (ChipID = 0x9802)
> [ 26.364] (II) RADEON(0): Output LVDS has no monitor section
> [ 26.364] (II) RADEON(0): Output HDMI-0 has no monitor section
> [ 26.370] (II) RADEON(0): Output VGA-0 has no monitor section
> [ 26.370] (WW) RADEON(0): 3 ZaphodHeads crtcs unavailable. Some outputs will stay off.
> [ 26.381] (II) RADEON(0): Output LVDS connected
> [ 26.381] (II) RADEON(0): Output HDMI-0 disconnected
> [ 26.381] (II) RADEON(0): Output VGA-0 disconnected
> When I copied those messages, only the laptop's display was active with
> a size of 1366x768, which is its exact physical size. When connecting
> a HDMI or VGA display (I'm using a TV which offers all those inputs),
> the output is colorful and exact, as it should be. I assume LVDS refers
> to the laptop's own screen.
> I also had X create a configuration file. The relevant section
> is this one:
> Section "Device"
> Identifier "Card0"
> Driver "radeon"
> BusID "PCI:0:1:0"
> So there seems to be only _one_ "graphics card", even though there
> are three outputs (internal, VGA analog, HDMI).
> What worries me most:
> The display was _fine_ before connecting a HDMI TV as external monitor!
> Combing back to what I once read (sorry, no source available, I cannot
> find it anymore): A suggestion was to use a specific tool (on the Mac)
> to force one of the two graphic "cards" to make the problem go away.
> Is this possible with X? If yes, what specific settings need to be
> applied? Any suggestions what to try? What to search for - maybe this
> kind of problem has a specific name?
> I have no idea what I should do, other than abusing this laptop as a
> poor desktop (external display, keyboard, mouse)...
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...
> freebsd-questions at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
I use a little script to select which monitor to use. Is that what you are looking for?
if xrandr | grep -q "$extern connected"; then
xrandr --output "$intern" --off --output "$extern" --auto
# echo "turning on external"
xrandr --output "$extern" --off --output "$intern" --auto
# echo "turning on internal"
Every gun that is made, every warship launched, every rocket fired
signifies in the final sense, a theft from those who hunger and are not
fed, those who are cold and are not clothed. This world in arms is not
spending money alone. It is spending the sweat of its laborers, the
genius of its scientists, the hopes of its children. This is not a way
of life at all in any true sense. Under the clouds of war, it is
humanity hanging on a cross of iron.
-- Dwight D. Eisenhower, April 16, 1953
More information about the freebsd-questions