<SOLVED> Intel - AMD Radeon switchable graphics problem

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
senjoz
Level 5
Level 5
Posts: 901
Joined: Tue Jun 09, 2020 3:55 am
Location: Kamnik

<SOLVED> Intel - AMD Radeon switchable graphics problem

Post by senjoz »

My Wife has a notebook HP ProBook 4540s. She uses only Windows 10, which is installed on the internal SSD.

I wish to see how this notebook behaves under the Linux environment. I booted it from the SSD in the external USB 3.1 enclosure, where, according to pbear's tutorial, hybrid bios/uefi installation of LM 20.3 Xfce is present. Notebook has switchable graphics, Intel + AMD Radeon. In UEFI firmware switchable graphics is enabled. I wish to switch graphics from the Intel to the AMD Radeon. I followed SMG's tutorial, applied command DRI_PRIME=1 but I cannot get AMD Radeon graphics to be the primary renderer.

Output of glxinfo -B before terminal command DRI_PRIME=1

Code: Select all

~$ glxinfo -B
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel Open Source Technology Center (0x8086)
    Device: Mesa DRI Intel(R) HD Graphics 4000 (IVB GT2) (0x166)
    Version: 21.2.6
    Accelerated: yes
    Video memory: 1536MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.2
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 4000 (IVB GT2)
OpenGL core profile version string: 4.2 (Core Profile) Mesa 21.2.6
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.0 Mesa 21.2.6
OpenGL shading language version string: 1.30
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 21.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

Output of glxinfo -B after terminal command DRI_PRIME=1

Code: Select all

~$ glxinfo -B
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel Open Source Technology Center (0x8086)
    Device: Mesa DRI Intel(R) HD Graphics 4000 (IVB GT2) (0x166)
    Version: 21.2.6
    Accelerated: yes
    Video memory: 1536MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.2
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 4000 (IVB GT2)
OpenGL core profile version string: 4.2 (Core Profile) Mesa 21.2.6
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.0 Mesa 21.2.6
OpenGL shading language version string: 1.30
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 21.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
I ask forum members to help me regarding how I can get that AMD Radeon card to be primary renderer!

Regards, Jože



Verbose output of inxi:

Code: Select all

~$ inxi -v8 -z
System:
  Kernel: 5.4.0-121-generic arch: x86_64 bits: 64 compiler: gcc v: 9.4.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.4.0-121-generic
    root=UUID=6598930e-4475-4e79-b85f-88ba105ca86e ro
  Desktop: Xfce v: 4.16.0 tk: Gtk v: 3.24.20 info: xfce4-panel wm: xfwm
    v: 4.16.1 dm: LightDM v: 1.30.0 Distro: Linux Mint 20.3 Una
    base: Ubuntu 20.04 focal
Machine:
  Type: Laptop System: Hewlett-Packard product: HP ProBook 4540s
    v: A1019D110B serial: <filter> Chassis: type: 10 serial: <filter>
  Mobo: Hewlett-Packard model: 17F6 v: KBC Version 58.21 serial: <filter>
    UEFI: Hewlett-Packard v: 68IRR Ver. F.67 date: 05/30/2018
Battery:
  ID-1: BAT0 charge: 30.6 Wh (96.2%) condition: 31.8/31.8 Wh (100.0%)
    volts: 12.2 min: 10.8 model: Hewlett-Packard Primary type: Li-ion
    serial: <filter> status: N/A
  Device-1: hidpp_battery_0 model: Logitech M510 serial: <filter>
    charge: 55% (should be ignored) rechargeable: yes status: discharging
Memory:
  RAM: total: 7.66 GiB used: 1.18 GiB (15.5%)
  Array-1: capacity: 16 GiB slots: 2 EC: None max-module-size: 8 GiB
    note: est.
  Device-1: Bottom-Slot 1(top) type: DDR3 detail: synchronous size: 4 GiB
    speed: 1600 MT/s volts: N/A width (bits): data: 64 total: 64
    manufacturer: Kingston part-no: 99U5469-041.A00LF serial: <filter>
  Device-2: Bottom-Slot 2(under) type: DDR3 detail: synchronous size: 4 GiB
    speed: 1600 MT/s volts: N/A width (bits): data: 64 total: 64
    manufacturer: Hynix/Hyundai part-no: HMT351S6CFR8C-PB serial: <filter>
PCI Slots:
  Slot: 1 type: PCI bits: 32 status: available length: long volts: 3.3
    bus-ID: N/A
CPU:
  Info: model: Intel Core i5-3210M socket: U3E1 bits: 64 type: MT MCP
    arch: Ivy Bridge gen: core 3 built: 2012-15 process: Intel 22nm family: 6
    model-id: 0x3A (58) stepping: 9 microcode: 0x21
  Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
    L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
    L3: 3 MiB desc: 1x3 MiB
  Speed (MHz): avg: 1197 min/max: 1200/3100 base/boost: 2500/4000 scaling:
    driver: intel_pstate governor: powersave volts: 1.2 V ext-clock: 100 MHz
    cores: 1: 1197 2: 1197 3: 1197 4: 1197 bogomips: 19954
  Flags: acpi aes aperfmperf apic arat arch_perfmon avx bts clflush cmov
    constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept
    erms est f16c flexpriority flush_l1d fpu fsgsbase fxsr ht ibpb ibrs ida
    lahf_lm lm mca mce md_clear mmx monitor msr mtrr nonstop_tsc nopl nx pae
    pat pbe pcid pclmulqdq pdcm pebs pge pln pni popcnt pse pse36 pti pts
    rdrand rdtscp rep_good sep smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3
    stibp syscall tm tm2 tpr_shadow tsc tsc_deadline_timer vme vmx vnmi vpid
    x2apic xsave xsaveopt xtopology xtpr
  Vulnerabilities:
  Type: itlb_multihit status: KVM: Vulnerable
  Type: l1tf mitigation: PTE Inversion
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: conditional, RSB filling
  Type: srbds status: Vulnerable: No microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: Hewlett-Packard
    driver: i915 v: kernel arch: Gen7 process: Intel 22nm built: 2012-13 ports:
    active: LVDS-1 empty: DP-1,HDMI-A-1,VGA-1 bus-ID: 00:02.0
    chip-ID: 8086:0166 class-ID: 0300
  Device-2: AMD Thames [Radeon HD 7550M/7570M/7650M]
    vendor: Hewlett-Packard driver: radeon v: kernel arch: TeraScale 2
    code: Evergreen process: TSMC 32-40nm built: 2009-15 pcie: gen: 2
    speed: 5 GT/s lanes: 16 ports: active: none empty: VGA-2 bus-ID: 01:00.0
    chip-ID: 1002:6841 class-ID: 0300
  Device-3: Sunplus Innovation type: USB driver: uvcvideo bus-ID: 1-1.3:3
    chip-ID: 1bcf:2c29 class-ID: 0e02
  Display: x11 server: X.Org v: 1.20.13 with: Xwayland compositor: xfwm
    v: 4.16.1 driver: X: loaded: modesetting unloaded: fbdev,radeon,vesa
    gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.21x7.99")
    s-diag: 414mm (16.31")
  Monitor-1: LVDS-1 model: Chi Mei Opto 0x15a1 built: 2011 res: 1366x768
    hz: 60 dpi: 101 gamma: 1.2 chroma: red: x: 0.620 y: 0.341 green: x: 0.322
    y: 0.600 blue: x: 0.161 y: 0.082 white: x: 0.314 y: 0.329
    size: 344x193mm (13.54x7.6") diag: 394mm (15.5") ratio: 16:9
    modes: 1366x768
  EDID-Warnings: 1: parse_edid: unknown flag 2
  OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2)
    v: 4.2 Mesa 21.2.6 compat-v: 3.0 direct render: Yes
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio
    vendor: Hewlett-Packard 7 driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
    chip-ID: 8086:1e20 class-ID: 0403
  Sound Server-1: ALSA v: k5.4.0-121-generic running: yes
  Sound Server-2: PulseAudio v: 13.99.1 running: yes
Network:
  Device-1: Intel Centrino Wireless-N 1000 [Condor Peak] driver: iwlwifi
    v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 04:00.0
    chip-ID: 8086:0083 class-ID: 0280
  IF: wlo1 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8169 v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: 2000 bus-ID: 05:00.0 chip-ID: 10ec:8168
    class-ID: 0200
  IF: enp5s0 state: down mac: <filter>
  WAN IP: <filter>
Bluetooth:
  Message: No bluetooth data found.
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 344.68 GiB used: 8.39 GiB (2.4%)
  ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 250GB
    family: based SSDs size: 232.89 GiB block-size: physical: 512 B
    logical: 512 B sata: 3.1 speed: 6.0 Gb/s type: SSD serial: <filter>
    rev: 2B6Q temp: 28 C scheme: GPT
  SMART: yes state: enabled health: PASSED on: 249d 19h cycles: 1330
    written: 2.21 TiB
  ID-2: /dev/sdb maj-min: 8:16 type: USB model: SATA SSD
    family: Driven OEM SSDs size: 111.79 GiB block-size: physical: 512 B
    logical: 512 B sata: 3.2 speed: 6.0 Gb/s type: SSD serial: <filter>
    rev: SBFM61.0 temp: 33 C scheme: GPT
  SMART: yes state: enabled health: PASSED on: 23d 0h cycles: 629
  Optical-1: /dev/sr0 vendor: hp model: DVD A DS8A8SH rev: KH62
    dev-links: cdrom,cdrw,dvd,dvdrw
  Features: speed: 24 multisession: yes audio: yes dvd: yes
    rw: cd-r,cd-rw,dvd-r,dvd-ram state: running
Partition:
  ID-1: / raw-size: 32 GiB size: 31.25 GiB (97.65%) used: 8.39 GiB (26.8%)
    fs: ext4 block-size: 4096 B dev: /dev/sdb3 maj-min: 8:19 label: lm20xfce
    uuid: 6598930e-4475-4e79-b85f-88ba105ca86e
Swap:
  Kernel: swappiness: 5 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 1.48 GiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Unmounted:
  ID-1: /dev/sda1 maj-min: 8:1 size: 128 MiB fs: vfat label: EFI
    uuid: 2D9E-C996
  ID-2: /dev/sda2 maj-min: 8:2 size: 63.4 GiB fs: ntfs label: W10H
    uuid: 53C2BCF377738111
  ID-3: /dev/sda3 maj-min: 8:3 size: 615 MiB fs: ntfs label: N/A
    uuid: F22E0FB62E0F7341
  ID-4: /dev/sda4 maj-min: 8:4 size: 64 GiB fs: ntfs label: PODATKI
    uuid: 417B000C2C05B7F9
  ID-5: /dev/sdb1 maj-min: 8:17 size: 2 MiB fs: N/A label: N/A uuid: N/A
  ID-6: /dev/sdb2 maj-min: 8:18 size: 200 MiB fs: vfat label: EFI
    uuid: 2612-4AE6
  ID-7: /dev/sdb4 maj-min: 8:20 size: 32 GiB fs: ntfs label: zacasno
    uuid: 68FC23EFFC23B66A
USB:
  Hub-1: 1-0:1 info: Full speed or root hub ports: 2 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002 class-ID: 0900
  Hub-2: 1-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0
    speed: 480 Mb/s chip-ID: 8087:0024 class-ID: 0900
  Device-1: 1-1.3:3 info: Sunplus Innovation type: Video driver: uvcvideo
    interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA chip-ID: 1bcf:2c29
    class-ID: 0e02
  Hub-3: 2-0:1 info: Full speed or root hub ports: 2 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-4: 2-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0
    speed: 480 Mb/s chip-ID: 8087:0024 class-ID: 0900
  Hub-5: 3-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 3-4:3 info: Logitech Unifying Receiver type: Keyboard,Mouse,HID
    driver: logitech-djreceiver,usbhid interfaces: 3 rev: 2.0 speed: 12 Mb/s
    power: 98mA chip-ID: 046d:c52b class-ID: 0300
  Hub-6: 4-0:1 info: Super-speed hub ports: 4 rev: 3.0 speed: 5 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Device-1: 4-2:2 info: ASMedia Name: ASM1051E SATA 6Gb/s bridge ASM1053E
    ASM1153 3Gb/s ASM1153E bridge
    type: Mass Storage driver: uas interfaces: 1 rev: 3.0 speed: 5 Gb/s
    chip-ID: 174c:55aa class-ID: 0806 serial: <filter>
Sensors:
  System Temperatures: cpu: 46.0 C mobo: N/A gpu: radeon temp: 43.5 C
  Fan Speeds (RPM): N/A
Repos:
  Packages: apt: 1918 lib: 966
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb http://packages.linuxmint.com una main upstream import backport
    2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
    3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
    4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
    5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
    6: deb http://archive.canonical.com/ubuntu/ focal partner
Processes:
  CPU top: 5 of 191
  1: cpu: 15.5% command: firefox pid: 1827 mem: 299.4 MiB (3.8%)
  2: cpu: 4.3% command: xorg pid: 597 mem: 75.9 MiB (0.9%)
  3: cpu: 3.3% command: firefox-bin pid: 2042 mem: 121.3 MiB (1.5%)
  4: cpu: 2.6% command: firefox-bin pid: 2034 mem: 140.1 MiB (1.7%)
  5: cpu: 0.5% command: sudo pid: 2698 mem: 5.53 MiB (0.0%)
  Memory top: 5 of 191
  1: mem: 299.4 MiB (3.8%) command: firefox pid: 1827 cpu: 15.5%
  2: mem: 140.1 MiB (1.7%) command: firefox-bin pid: 2034 cpu: 2.6%
  3: mem: 121.3 MiB (1.5%) command: firefox-bin pid: 2042 cpu: 3.3%
  4: mem: 111.6 MiB (1.4%) command: firefox-bin pid: 2037 cpu: 0.3%
  5: mem: 77.0 MiB (0.9%) command: firefox-bin pid: 1978 cpu: 0.1%
Info:
  Processes: 191 Uptime: 14m wakeups: 3 Init: systemd v: 245
  target: graphical (5) default: graphical tool: systemctl Compilers:
  gcc: 9.4.0 alt: 9 Shell: Bash (sudo) v: 5.0.17 running-in: xfce4-terminal
  inxi: 3.3.19
Last edited by LockBot on Tue Jan 03, 2023 11:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
senjoz
Level 5
Level 5
Posts: 901
Joined: Tue Jun 09, 2020 3:55 am
Location: Kamnik

Re: Intel - AMD Radeon switchable graphics problem

Post by senjoz »

I booted with kernel 5.15.0-33-generic. Inxi output for graphics is slightly different than with kernel 5.4.0-121-generic.

Kernel 5.4:

Code: Select all

Display: x11 server: X.Org v: 1.20.13 with: Xwayland compositor: xfwm
    v: 4.16.1 driver: X: loaded: modesetting unloaded: fbdev,radeon,vesa
    gpu: i915 display-ID: :0.0 screens: 1

Kernel 5.15:

Code: Select all

Display: x11 server: X.Org v: 1.20.13 with: Xwayland compositor: xfwm
    v: 4.16.1 driver: X: loaded: modesetting,radeon unloaded: fbdev,vesa
    gpu: i915 display-ID: :0.0 screens: 1
Now in the Display section also the radeon driver is loaded. But, after DRI_PRIME=1, glxinfo -B still shows that HD Graphics 4000 is the primary renderer.
User avatar
SMG
Level 25
Level 25
Posts: 31966
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Intel - AMD Radeon switchable graphics problem

Post by SMG »

senjoz wrote: Sun Jul 03, 2022 12:05 pm I booted with kernel 5.15.0-33-generic. Inxi output for graphics is slightly different than with kernel 5.4.0-121-generic.
Do you know why Xwayland is being mentioned? Wayland is not supported in Linux Mint.

Display: x11 server: X.Org v: 1.20.13 with: Xwayland compositor: xfwm
v: 4.16.1 driver: X: loaded: modesetting unloaded: fbdev,radeon,vesa
gpu: i915 display-ID: :0.0 screens: 1

Additionally, I'm not yet sure if Xwayland words with Nvidia (which is where the DRI_PRIME variable is normally used).

If you have an LM20.3 usb available, try booting to a live session and see if the DRI_PRIME=1 environment variable can be set to switch the primary renderer. If it can not, you may want to review the link at the end of the tutorial under the issues section. It discusses setting providers which must be done for some laptops.

You can check the Xorg log to see if both renders are being loaded (or check to see the differences as to why radeon is not loading with the 5.4 kernel). If you want us to help you review it, run the following to send it to termbin and let us know the url.

Code: Select all

cat /var/log/Xorg.0.log | nc termbin.com 9999
You would be looking for the glamor X acceleration messages to determine if the renderers are loading. There will be one for Intel and another for radeon.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
senjoz
Level 5
Level 5
Posts: 901
Joined: Tue Jun 09, 2020 3:55 am
Location: Kamnik

Re: Intel - AMD Radeon switchable graphics problem

Post by senjoz »

Thank you, SMG, for your reply!

SMG wrote: Sun Jul 03, 2022 3:59 pm Do you know why Xwayland is being mentioned?
I did not install anything related to the Wayland. After checking the history in the Synaptic Package manager I believe that package xwayland is installed by default during Mint installation. inxi's output "with: Xwayland" must be a new output in the latest version of inxi. I checked this on my other three machines with LM 20.3 Cinnamon. With inxi 3.3.19 I got output "with: Xwayland" on all three machines.

I booted ProBook 4540s to the live session LM 20.3 Xfce more times. I got inconsistent outputs in the Display section of inxi. Once the radeon driver was loaded, on other boot it was not. On yet another boot ati, modesetting and radeon drivers were loaded. In this boot I tested the solution in the link at the end of the tutorial. Unfortunately, without success. Maybe I made something wrong. I will test it again.

I am not sure I understand inxi's outputs correctly for ports in the Graphics section.
senjoz wrote: Sun Jul 03, 2022 10:41 am Device-1: Intel 3rd Gen Core processor Graphics vendor: Hewlett-Packard
driver: i915 v: kernel arch: Gen7 process: Intel 22nm built: 2012-13 ports:
active: LVDS-1 empty: DP-1,HDMI-A-1,VGA-1
bus-ID: 00:02.0
chip-ID: 8086:0166 class-ID: 0300
Device-2: AMD Thames [Radeon HD 7550M/7570M/7650M]
vendor: Hewlett-Packard driver: radeon v: kernel arch: TeraScale 2
code: Evergreen process: TSMC 32-40nm built: 2009-15 pcie: gen: 2
speed: 5 GT/s lanes: 16 ports: active: none empty: VGA-2 bus-ID: 01:00.0
chip-ID: 1002:6841 class-ID: 0300
Is maybe there something wrong?

I booted ProBook 4540s from the SSD in the external USB enclosure with kernel 5.15 again. After 5 minutes I executed commands DRI_PRIME=1 and cat /var/log/Xorg.0.log | nc termbin.com 9999. The URL is https://termbin.com/tmr1.
User avatar
senjoz
Level 5
Level 5
Posts: 901
Joined: Tue Jun 09, 2020 3:55 am
Location: Kamnik

Re: Intel - AMD Radeon switchable graphics problem

Post by senjoz »

I booted ProBook 4540s to the live session LM 20.3 Xfce two times more. Second time I got ati, modesetting and radeon drivers loaded. I tested the solution in the link at the end of the tutorial. Again without success. Terminal session was:

Code: Select all

mint@mint:~$ inxi -xxxG
Graphics:  Device-1: Intel 3rd Gen Core processor Graphics vendor: Hewlett-Packard driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:0166 
           Device-2: Advanced Micro Devices [AMD/ATI] Thames [Radeon HD 7550M/7570M/7650M] vendor: Hewlett-Packard 
           driver: radeon v: kernel bus ID: 01:00.0 chip ID: 1002:6841 
           Display: x11 server: X.Org 1.20.11 driver: ati,modesetting,radeon unloaded: fbdev,vesa resolution: 1366x768~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2) v: 4.2 Mesa 21.0.3 compat-v: 3.0 direct render: Yes 
mint@mint:~$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x46 cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 4 associated providers: 1 name:modesetting
Provider 1: id: 0xc0 cap: 0x6, Sink Output, Source Offload crtcs: 6 outputs: 1 associated providers: 1 name:TURKS @ pci:0000:01:00.0
mint@mint:~$ xrandr --setprovideroffloadsink 0xc0 0x46
mint@mint:~$ env DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
OpenGL renderer string: AMD TURKS (DRM 2.50.0 / 5.4.0-91-generic, LLVM 12.0.0)
mint@mint:~$ xrandr --setprovideroffloadsink 1 0
mint@mint:~$ inxi -xxxG
Graphics:  Device-1: Intel 3rd Gen Core processor Graphics vendor: Hewlett-Packard driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:0166 
           Device-2: Advanced Micro Devices [AMD/ATI] Thames [Radeon HD 7550M/7570M/7650M] vendor: Hewlett-Packard 
           driver: radeon v: kernel bus ID: 01:00.0 chip ID: 1002:6841 
           Display: x11 server: X.Org 1.20.11 driver: ati,modesetting,radeon unloaded: fbdev,vesa resolution: 1366x768~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2) v: 4.2 Mesa 21.0.3 compat-v: 3.0 direct render: Yes 
mint@mint:~$ DRI_PRIME=1
mint@mint:~$ inxi -xxxG
Graphics:  Device-1: Intel 3rd Gen Core processor Graphics vendor: Hewlett-Packard driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:0166 
           Device-2: Advanced Micro Devices [AMD/ATI] Thames [Radeon HD 7550M/7570M/7650M] vendor: Hewlett-Packard 
           driver: radeon v: kernel bus ID: 01:00.0 chip ID: 1002:6841 
           Display: x11 server: X.Org 1.20.11 driver: ati,modesetting,radeon unloaded: fbdev,vesa resolution: 1366x768~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2) v: 4.2 Mesa 21.0.3 compat-v: 3.0 direct render: Yes 
Xorg.0.log is on https://termbin.com/3ps8
User avatar
SMG
Level 25
Level 25
Posts: 31966
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Intel - AMD Radeon switchable graphics problem

Post by SMG »

senjoz wrote: Mon Jul 04, 2022 11:02 am inxi's output "with: Xwayland" must be a new output in the latest version of inxi. I checked this on my other three machines with LM 20.3 Cinnamon. With inxi 3.3.19 I got output "with: Xwayland" on all three machines.
I'll have to read through the inxi release notes again to understand why it might be doing that. There had been quite a few additions/changes to inxi since I last read the notes so it was a lot to absorb. (I went through it a couple of weeks ago.)
senjoz wrote: Mon Jul 04, 2022 11:02 amI booted ProBook 4540s to the live session LM 20.3 Xfce more times. I got inconsistent outputs in the Display section of inxi. Once the radeon driver was loaded, on other boot it was not.
I do not understand why this is happening unless there is some kind of hardware issue where the dGPU(AMD) is not being seen by the kernel on all boots. I will check the logs after submitting this post.

With regards to your question about the ports, this information should reflect how the hardware is wired. Usually, in dual-graphics laptops, not all ports are wired to both GPUs. It is often the case that only some are wired to the dGPU. This is an article based on Windows Everything You Need To Know About The MUX Switch, but it explains the different types of hardware available for switchable graphics. The differences at the hardware level determines which ports are wired to which GPUs and what is or is not possible to change with software.

The data you posted would seem to indicate the onboard Intel GPU works with all ports, but the Radeon only works with the VGA port. That seems rather odd, but I'd need to check the inxi release notes to get an idea from exactly where that information is being obtained.

The "active" port is one which currently has a display/screen running from it. Many laptop screens are either LVDS or eDP. So the laptop screen is active. The "empty" ports are ones which could have a display being run by the Intel GPU, but they are not currently being used. If you attached an external monitor to the laptop then you would be using one of the "empty" ports and the output would show two active ports.

In the case of the AMD, there are currently no screens using AMD, but there is one possible which could use it. (Based on the data. As I indicated, that seems odd to me.)
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
SMG
Level 25
Level 25
Posts: 31966
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Intel - AMD Radeon switchable graphics problem

Post by SMG »

The X server is seeing both GPUs in both cases. (The below is from the installed version of LM20.3.)

Code: Select all

[    11.152] (II) xfree86: Adding drm device (/dev/dri/card0)
[    11.203] (II) xfree86: Adding drm device (/dev/dri/card1)
[    11.283] (--) PCI:*(0@0:2:0) 8086:0166:103c:17f4 rev 9, Mem @ 0xd0000000/4194304, 0xc0000000/268435456, I/O @ 0x00004000/64, BIOS @ 0x????????/131072
[    11.283] (--) PCI: (1@0:0:0) 1002:6841:103c:17f4 rev 0, Mem @ 0xb0000000/268435456, 0xd0900000/131072, I/O @ 0x00003000/256, BIOS @ 0x????????/131072
Radeon driver is loadedin both.

Code: Select all

[    11.295] (II) Applying OutputClass "Radeon" to /dev/dri/card0
[    11.295] 	loading driver: radeon
The first line is the installed version while the second is from your live session log so it appears those setprovider lines did make a change.

Code: Select all

[    11.386] (II) modeset(0): using drv /dev/dri/card1
[    14.026] (II) modeset(0): using drv /dev/dri/card0
Same output for both logs for the below. Renderers for both GPUs are enabled, but because Intel shows first, I presume it is the primary. Note X Server is seeing Intel(modeset) as having four possible connections for screens while AMD only has the one possible connection.

Code: Select all

[    11.568] (II) modeset(0): glamor X acceleration enabled on Mesa DRI Intel(R) HD Graphics 4000 (IVB GT2)
[    11.568] (II) modeset(0): glamor initialized

[    11.568] (II) modeset(0): Output LVDS-1 has no monitor section
[    11.570] (II) modeset(0): Output VGA-1 has no monitor section
[    11.571] (II) modeset(0): Output HDMI-1 has no monitor section
[    11.571] (II) modeset(0): Output DP-1 has no monitor section

[    12.048] (II) RADEON(G0): glamor X acceleration enabled on AMD TURKS (DRM 2.50.0 / 5.15.0-33-generic, LLVM 12.0.0)
[    12.048] (II) RADEON(G0): glamor detected, initialising EGL layer.

[    12.132] (II) RADEON(G0): Output VGA-1-1 has no monitor section

[    12.274] (II) modeset(0): [DRI2] Setup complete
[    12.274] (II) modeset(0): [DRI2]   DRI driver: i965
[    12.274] (II) modeset(0): [DRI2]   VDPAU driver: va_gl
[    12.274] (II) RADEON(G0): [DRI2] Setup complete
[    12.274] (II) RADEON(G0): [DRI2]   DRI driver: r600
[    12.274] (II) RADEON(G0): [DRI2]   VDPAU driver: r600

[    12.274] (II) RADEON(G0): Direct rendering enabled
[    12.286] (II) RADEON(G0): Use GLAMOR acceleration.
[    12.286] (II) RADEON(G0): Acceleration enabled
senjoz wrote: Mon Jul 04, 2022 12:38 pm I booted ProBook 4540s to the live session LM 20.3 Xfce two times more. Second time I got ati, modesetting and radeon drivers loaded. I tested the solution in the link at the end of the tutorial. Again without success. Terminal session was:
Going back to the link in the original MXLinux post, that person had an HP ProBook 4340s which I think would be wired the same way as your computer. :? (Although HP did have variations in how they implemented Intel-AMD graphics.)

The only difference in your output versus their output is they did not separate the following two lines. (They said they ran DRI_PRIME=1 inxi -G) My understanding is that should not matter, but perhaps because of the way this laptop is wired that it does? Just a guess on my part.

Code: Select all

mint@mint:~$ DRI_PRIME=1
mint@mint:~$ inxi -xxxG
This link HP Notebook PCs - Switchable Graphics on Notebooks Configured with Intel and ATI GPUs is all Windows based (Catalyst no longer applies in Linux-based distros), but it does mention of there being a difference with regards to switching when one is running on battery versus running with the AC power adapter attached. I don't know if that might be a variable in your testing.

I did a search on HP ProBook 4540s switchable graphics to find that link and also found lots of links where people were having issues with switching in Windows. (There were lots of questions on the HP forums which have been archived and are no longer available to read. :( )

Do you have the option in BIOS/UEFI to switch to the discrete AMD GPU?
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
senjoz
Level 5
Level 5
Posts: 901
Joined: Tue Jun 09, 2020 3:55 am
Location: Kamnik

Re: Intel - AMD Radeon switchable graphics problem

Post by senjoz »

SMG wrote: Mon Jul 04, 2022 2:44 pm Do you have the option in BIOS/UEFI to switch to the discrete AMD GPU?
No. I can only enable or disable switchable graphics.

ProBook 4540s has VGA and HDMI ports. I booted from the SSD in the external USB enclosure to the installed LM 20.3 Xfce, connected VGA monitor and TV set to these ports and applied the solution in the link at the end of the tutorial again. Last command was DRI_PRIME=1 inxi -xxxG. Immediately after that I ran inxi -xxxG again. Terminal session was:

Code: Select all

user@usbboot:~$ inxi -xxxG
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: Hewlett-Packard
    driver: i915 v: kernel arch: Gen7 ports: active: LVDS-1,VGA-1 off: HDMI-A-1
    empty: DP-1 bus-ID: 00:02.0 chip-ID: 8086:0166 class-ID: 0300
  Device-2: AMD Thames [Radeon HD 7550M/7570M/7650M]
    vendor: Hewlett-Packard driver: radeon v: kernel arch: TeraScale 2 pcie:
    speed: 5 GT/s lanes: 16 ports: active: none empty: VGA-2 bus-ID: 01:00.0
    chip-ID: 1002:6841 class-ID: 0300
  Device-3: Sunplus Innovation type: USB driver: uvcvideo bus-ID: 1-1.3:3
    chip-ID: 1bcf:2c29 class-ID: 0e02
  Display: x11 server: X.Org v: 1.20.13 with: Xwayland compositor: xfwm
    v: 4.16.1 driver: X: loaded: modesetting,radeon unloaded: fbdev,vesa
    gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 4310x1080 s-dpi: 96 s-size: 1140x286mm (44.88x11.26")
    s-diag: 1175mm (46.27")
  Monitor-1: HDMI-A-1 mapped: HDMI-1 note: disabled model: Philips FTV
    serial: 16843009 res: N/A dpi: 76 size: 640x360mm (25.2x14.17")
    diag: 734mm (28.9") modes: max: 1920x1080 min: 640x480
  Monitor-2: LVDS-1 pos: primary,left model: Chi Mei Opto 0x15a1
    res: 1366x768 hz: 60 dpi: 101 size: 344x193mm (13.54x7.6")
    diag: 394mm (15.5") modes: 1366x768
  Monitor-3: VGA-1 pos: right model: EIZO NANAO L557 serial: 76494083
    res: 1024x768 dpi: 77 size: 337x270mm (13.27x10.63") diag: 432mm (17")
    modes: max: 1280x1024 min: 720x400
  OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2)
    v: 4.2 Mesa 21.2.6 compat-v: 3.0 direct render: Yes
user@usbboot:~$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x46 cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 4 associated providers: 1 name:modesetting
Provider 1: id: 0xc0 cap: 0x6, Sink Output, Source Offload crtcs: 6 outputs: 1 associated providers: 1 name:TURKS @ pci:0000:01:00.0
user@usbboot:~$ xrandr --setprovideroffloadsink 0xc0 0x46
user@usbboot:~$ env DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
OpenGL renderer string: AMD TURKS (DRM 2.50.0 / 5.15.0-33-generic, LLVM 12.0.0)
user@usbboot:~$ xrandr --setprovideroffloadsink 1 0
user@usbboot:~$ inxi -xxxG
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: Hewlett-Packard
    driver: i915 v: kernel arch: Gen7 ports: active: LVDS-1,VGA-1 off: HDMI-A-1
    empty: DP-1 bus-ID: 00:02.0 chip-ID: 8086:0166 class-ID: 0300
  Device-2: AMD Thames [Radeon HD 7550M/7570M/7650M]
    vendor: Hewlett-Packard driver: radeon v: kernel arch: TeraScale 2 pcie:
    speed: 5 GT/s lanes: 16 ports: active: none empty: VGA-2 bus-ID: 01:00.0
    chip-ID: 1002:6841 class-ID: 0300
  Device-3: Sunplus Innovation type: USB driver: uvcvideo bus-ID: 1-1.3:3
    chip-ID: 1bcf:2c29 class-ID: 0e02
  Display: x11 server: X.Org v: 1.20.13 with: Xwayland compositor: xfwm
    v: 4.16.1 driver: X: loaded: modesetting,radeon unloaded: fbdev,vesa
    gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 4310x1080 s-dpi: 96 s-size: 1140x286mm (44.88x11.26")
    s-diag: 1175mm (46.27")
  Monitor-1: HDMI-A-1 mapped: HDMI-1 note: disabled model: Philips FTV
    serial: 16843009 res: N/A dpi: 76 size: 640x360mm (25.2x14.17")
    diag: 734mm (28.9") modes: max: 1920x1080 min: 640x480
  Monitor-2: LVDS-1 pos: primary,left model: Chi Mei Opto 0x15a1
    res: 1366x768 hz: 60 dpi: 101 size: 344x193mm (13.54x7.6")
    diag: 394mm (15.5") modes: 1366x768
  Monitor-3: VGA-1 pos: right model: EIZO NANAO L557 serial: 76494083
    res: 1024x768 dpi: 77 size: 337x270mm (13.27x10.63") diag: 432mm (17")
    modes: max: 1280x1024 min: 720x400
  OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2)
    v: 4.2 Mesa 21.2.6 compat-v: 3.0 direct render: Yes
user@usbboot:~$ DRI_PRIME=1 inxi -xxxG
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: Hewlett-Packard
    driver: i915 v: kernel arch: Gen7 ports: active: LVDS-1,VGA-1 off: HDMI-A-1
    empty: DP-1 bus-ID: 00:02.0 chip-ID: 8086:0166 class-ID: 0300
  Device-2: AMD Thames [Radeon HD 7550M/7570M/7650M]
    vendor: Hewlett-Packard driver: radeon v: kernel arch: TeraScale 2 pcie:
    speed: 5 GT/s lanes: 16 ports: active: none empty: VGA-2 bus-ID: 01:00.0
    chip-ID: 1002:6841 class-ID: 0300
  Device-3: Sunplus Innovation type: USB driver: uvcvideo bus-ID: 1-1.3:3
    chip-ID: 1bcf:2c29 class-ID: 0e02
  Display: x11 server: X.Org v: 1.20.13 with: Xwayland compositor: xfwm
    v: 4.16.1 driver: X: loaded: modesetting,radeon unloaded: fbdev,vesa
    gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 4310x1080 s-dpi: 96 s-size: 1140x286mm (44.88x11.26")
    s-diag: 1175mm (46.27")
  Monitor-1: HDMI-A-1 mapped: HDMI-1 note: disabled model: Philips FTV
    serial: 16843009 res: N/A dpi: 76 size: 640x360mm (25.2x14.17")
    diag: 734mm (28.9") modes: max: 1920x1080 min: 640x480
  Monitor-2: LVDS-1 pos: primary,left model: Chi Mei Opto 0x15a1
    res: 1366x768 hz: 60 dpi: 101 size: 344x193mm (13.54x7.6")
    diag: 394mm (15.5") modes: 1366x768
  Monitor-3: VGA-1 pos: right model: EIZO NANAO L557 serial: 76494083
    res: 1024x768 dpi: 77 size: 337x270mm (13.27x10.63") diag: 432mm (17")
    modes: max: 1280x1024 min: 720x400
  OpenGL: renderer: AMD TURKS (DRM 2.50.0 / 5.15.0-33-generic LLVM 12.0.0)
    v: 3.3 Mesa 21.2.6 compat-v: 3.1 direct render: Yes
user@usbboot:~$ inxi -xxxG
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: Hewlett-Packard
    driver: i915 v: kernel arch: Gen7 ports: active: LVDS-1,VGA-1 off: HDMI-A-1
    empty: DP-1 bus-ID: 00:02.0 chip-ID: 8086:0166 class-ID: 0300
  Device-2: AMD Thames [Radeon HD 7550M/7570M/7650M]
    vendor: Hewlett-Packard driver: radeon v: kernel arch: TeraScale 2 pcie:
    speed: 5 GT/s lanes: 16 ports: active: none empty: VGA-2 bus-ID: 01:00.0
    chip-ID: 1002:6841 class-ID: 0300
  Device-3: Sunplus Innovation type: USB driver: uvcvideo bus-ID: 1-1.3:3
    chip-ID: 1bcf:2c29 class-ID: 0e02
  Display: x11 server: X.Org v: 1.20.13 with: Xwayland compositor: xfwm
    v: 4.16.1 driver: X: loaded: modesetting,radeon unloaded: fbdev,vesa
    gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 4310x1080 s-dpi: 96 s-size: 1140x286mm (44.88x11.26")
    s-diag: 1175mm (46.27")
  Monitor-1: HDMI-A-1 mapped: HDMI-1 note: disabled model: Philips FTV
    serial: 16843009 res: N/A dpi: 76 size: 640x360mm (25.2x14.17")
    diag: 734mm (28.9") modes: max: 1920x1080 min: 640x480
  Monitor-2: LVDS-1 pos: primary,left model: Chi Mei Opto 0x15a1
    res: 1366x768 hz: 60 dpi: 101 size: 344x193mm (13.54x7.6")
    diag: 394mm (15.5") modes: 1366x768
  Monitor-3: VGA-1 pos: right model: EIZO NANAO L557 serial: 76494083
    res: 1024x768 dpi: 77 size: 337x270mm (13.27x10.63") diag: 432mm (17")
    modes: max: 1280x1024 min: 720x400
  OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2)
    v: 4.2 Mesa 21.2.6 compat-v: 3.0 direct render: Yes
Outputs of DRI_PRIME=1 inxi -xxxG and inxi -xxxG show different OpenGL renderers. That looks very suspicious to me. I doubt that that solution works.

Xorg.0.log is on https://termbin.com/w5i5
User avatar
SMG
Level 25
Level 25
Posts: 31966
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Intel - AMD Radeon switchable graphics problem

Post by SMG »

senjoz wrote: Tue Jul 05, 2022 5:49 pm
SMG wrote: Mon Jul 04, 2022 2:44 pm Do you have the option in BIOS/UEFI to switch to the discrete AMD GPU?
No. I can only enable or disable switchable graphics.
If you disable switchable graphics, then I would presume either only Intel is being used or only AMD is being used for that one VGA port. I do not know which one it might be. I could not find HP documentation to indicate what happens.
senjoz wrote: Tue Jul 05, 2022 5:49 pm ProBook 4540s has VGA and HDMI ports. I booted from the SSD in the external USB enclosure to the installed LM 20.3 Xfce, connected VGA monitor and TV set to these ports and applied the solution in the link at the end of the tutorial again.
Looking at the data posted, it appears the VGA monitor is connected to the Intel GPU.

The AMD GPU inxi info indicates AMD runs the VGA-2 and that port is empty.

Device-2: AMD Thames [Radeon HD 7550M/7570M/7650M]
vendor: Hewlett-Packard driver: radeon v: kernel arch: TeraScale 2 pcie:
speed: 5 GT/s lanes: 16 ports: active: none empty: VGA-2 bus-ID: 01:00.0
chip-ID: 1002:6841 class-ID: 0300

The monitor connected to the VGA port is connected to VGA-1.

Monitor-3: VGA-1 pos: right model: EIZO NANAO L557 serial: 76494083
res: 1024x768 dpi: 77 size: 337x270mm (13.27x10.63") diag: 432mm (17")
modes: max: 1280x1024 min: 720x400

VGA-1 is showing as an active port for Intel.

Device-1: Intel 3rd Gen Core processor Graphics vendor: Hewlett-Packard
driver: i915 v: kernel arch: Gen7 ports: active: LVDS-1,VGA-1 off: HDMI-A-1
empty: DP-1 bus-ID: 00:02.0 chip-ID: 8086:0166 class-ID: 0300

I have no idea why the discrete GPU would only be wired to one port, but that is what the data seems to suggest. Without knowing more about the specifics of how the hardware is wired, I'm not sure there is much more to be gained by doing any testing. I would suggest researching to see if you can find out what disabling switchable graphics does. Or what the AMD GPU was supposed to do in Windows.

The below info is still showing the VGA-2 port as empty. It's possible there may be a hardware issue? I did see a lot of people posting they could not get the AMD drivers to work in Windows.

Code: Select all

user@usbboot:~$ DRI_PRIME=1 inxi -xxxG
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: Hewlett-Packard
    driver: i915 v: kernel arch: Gen7 ports: active: LVDS-1,VGA-1 off: HDMI-A-1
    empty: DP-1 bus-ID: 00:02.0 chip-ID: 8086:0166 class-ID: 0300
  Device-2: AMD Thames [Radeon HD 7550M/7570M/7650M]
    vendor: Hewlett-Packard driver: radeon v: kernel arch: TeraScale 2 pcie:
    speed: 5 GT/s lanes: 16 ports: active: none empty: VGA-2 bus-ID: 01:00.0
    chip-ID: 1002:6841 class-ID: 0300
  Device-3: Sunplus Innovation type: USB driver: uvcvideo bus-ID: 1-1.3:3
    chip-ID: 1bcf:2c29 class-ID: 0e02
  Display: x11 server: X.Org v: 1.20.13 with: Xwayland compositor: xfwm
    v: 4.16.1 driver: X: loaded: modesetting,radeon unloaded: fbdev,vesa
    gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 4310x1080 s-dpi: 96 s-size: 1140x286mm (44.88x11.26")
    s-diag: 1175mm (46.27")
  Monitor-1: HDMI-A-1 mapped: HDMI-1 note: disabled model: Philips FTV
    serial: 16843009 res: N/A dpi: 76 size: 640x360mm (25.2x14.17")
    diag: 734mm (28.9") modes: max: 1920x1080 min: 640x480
  Monitor-2: LVDS-1 pos: primary,left model: Chi Mei Opto 0x15a1
    res: 1366x768 hz: 60 dpi: 101 size: 344x193mm (13.54x7.6")
    diag: 394mm (15.5") modes: 1366x768
  Monitor-3: VGA-1 pos: right model: EIZO NANAO L557 serial: 76494083
    res: 1024x768 dpi: 77 size: 337x270mm (13.27x10.63") diag: 432mm (17")
    modes: max: 1280x1024 min: 720x400
  OpenGL: renderer: AMD TURKS (DRM 2.50.0 / 5.15.0-33-generic LLVM 12.0.0)
    v: 3.3 Mesa 21.2.6 compat-v: 3.1 direct render: Yes
I'm sorry, but I do not have any more ideas.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
senjoz
Level 5
Level 5
Posts: 901
Joined: Tue Jun 09, 2020 3:55 am
Location: Kamnik

Re: Intel - AMD Radeon switchable graphics problem

Post by senjoz »

It looks like starting applications in terminal with prepended DRI_PRIME=1 initiate use of Radeon HD 7550M graphic card for rendering those applications and this works without any prior intervention in installed LM 20.3 Xfce. I checked this with glmark2 and DRI_PRIME=1 glmark2.

Code: Select all

user@usbboot:~$ glmark2
=======================================================
    glmark2 2021.02
=======================================================
    OpenGL Information
    GL_VENDOR:     Intel Open Source Technology Center
    GL_RENDERER:   Mesa DRI Intel(R) HD Graphics 4000 (IVB GT2)
    GL_VERSION:    3.0 Mesa 21.2.6
=======================================================
.
.
=======================================================
                                  glmark2 Score: 886 
=======================================================

Code: Select all

user@usbboot:~$ DRI_PRIME=1 glmark2
=======================================================
    glmark2 2021.02
=======================================================
    OpenGL Information
    GL_VENDOR:     X.Org
    GL_RENDERER:   AMD TURKS (DRM 2.50.0 / 5.15.0-33-generic, LLVM 12.0.0)
    GL_VERSION:    3.1 Mesa 21.2.6
=======================================================
.
.
=======================================================
                                  glmark2 Score: 1562 
=======================================================
Results are not very impressive. Intel HD Graphics 620 in Core i5-7200U is faster.

But, I cannot get Radeon HD 7550M graphic card to be the primary renderer for the operating system.
User avatar
SMG
Level 25
Level 25
Posts: 31966
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Intel - AMD Radeon switchable graphics problem

Post by SMG »

senjoz wrote: Thu Jul 07, 2022 12:30 pm It looks like starting applications in terminal with prepended DRI_PRIME=1 initiate use of Radeon HD 7550M graphic card for rendering those applications and this works without any prior intervention in installed LM 20.3 Xfce.
...
But, I cannot get Radeon HD 7550M graphic card to be the primary renderer for the operating system.
My guess it that has something to do with how the system was designed. I do not know enough about the hardware specifics to be able to say what that might be.
senjoz wrote: Thu Jul 07, 2022 12:30 pmResults are not very impressive. Intel HD Graphics 620 in Core i5-7200U is faster.
That can happen. I seem to recall others mentioning their onboard graphics was better at certain tasks than the discrete GPU.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
senjoz
Level 5
Level 5
Posts: 901
Joined: Tue Jun 09, 2020 3:55 am
Location: Kamnik

Re: Intel - AMD Radeon switchable graphics problem

Post by senjoz »

I believe I found a way to set Radeon HD 7550M graphic card to be the primary renderer in GUI desktop. I changed boot target to multiuser mode with systemctl set-default multi-user.target. I rebooted in tty1, ran commands export DRI_PRIME=1 and startx. After that Xfce GUI uses Radeon HD 7550M as primary renderer.

Command DRI_PRIME=1 startx in tty1 also works, but not commands DRI_PRIME=1 and startx.

Code: Select all

~$ inxi -G
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics driver: i915 v: kernel
  Device-2: AMD Thames [Radeon HD 7550M/7570M/7650M] driver: radeon v: kernel
  Device-3: Sunplus Innovation type: USB driver: uvcvideo
  Display: server: X.Org v: 1.20.13 with: Xwayland driver: X:
    loaded: modesetting,radeon unloaded: fbdev,vesa gpu: i915 resolution: 1366x768~60Hz
  OpenGL: renderer: AMD TURKS (DRM 2.50.0 / 5.4.0-121-generic LLVM 12.0.0) v: 3.3 Mesa 21.2.6

Code: Select all

~$ glxinfo | grep "OpenGL renderer"
OpenGL renderer string: AMD TURKS (DRM 2.50.0 / 5.4.0-121-generic, LLVM 12.0.0)

Code: Select all

~$ glmark2
=======================================================
    glmark2 2021.02
=======================================================
    OpenGL Information
    GL_VENDOR:     X.Org
    GL_RENDERER:   AMD TURKS (DRM 2.50.0 / 5.4.0-121-generic, LLVM 12.0.0)
    GL_VERSION:    3.1 Mesa 21.2.6
=======================================================
.
.
=======================================================
                                  glmark2 Score: 1524 
=======================================================
User avatar
SMG
Level 25
Level 25
Posts: 31966
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Intel - AMD Radeon switchable graphics problem

Post by SMG »

Glad you were able to find a solution (even though it appears to be a very manual one).

Does it provided better performance for you?
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
senjoz
Level 5
Level 5
Posts: 901
Joined: Tue Jun 09, 2020 3:55 am
Location: Kamnik

Re: Intel - AMD Radeon switchable graphics problem

Post by senjoz »

SMG wrote: Sat Jul 09, 2022 5:14 pm Glad you were able to find a solution (even though it appears to be a very manual one).
Probably adding export DRI_PRIME=1 in ~/.bashrc or creating a .sh file in /etc/profile.d with that variable would be less manual. But, I do not wish to add permanent changes to hybrid bios/uefi Mint installation on SSD in USB enclosure. Purpose of this install is to boot Mint on any machine.

SMG wrote: Sat Jul 09, 2022 5:14 pm Does it provided better performance for you?
Above mentioned benchmarking results with glmark2 (HD Graphics 4000: 886, AMD TURKS: 1562) showed significant differences in OpenGL. Otherwise performance is similar.

Thank you, SMG, for your cooperation!
User avatar
SMG
Level 25
Level 25
Posts: 31966
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Intel - AMD Radeon switchable graphics problem

Post by SMG »

senjoz wrote: Sun Jul 10, 2022 4:59 amAbove mentioned benchmarking results with glmark2 (HD Graphics 4000: 886, AMD TURKS: 1562) showed significant differences in OpenGL. Otherwise performance is similar.
I wonder at times how much the difference seen in benchmarking actually translates to a noticeable difference in operating system performance which is why I asked.

If you are no longer seeking help on this issue, go ahead and edit the title. Maybe what you found will help someone else in the future.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
Locked

Return to “Graphics Cards & Monitors”