Cannot run on dedicated graphics card; annot force on with vga switcheroo & errors using DRI_PRIME

I’m running Xubuntu 18.04 on my Dell Inpiron 15 7548. Machine has integrated HD 5500 graphics, and a dedicated AMD R7 card. I’ve tried getting access to my dedicated card several times, but always ended up giving up, so I would really like to try and get to the bottom of this so I can actually use my hardware.

First off, both cards are detected just fine: narameh@Hydrogen:~$ lspci | grep VGA 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09) 08:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Opal XT [Radeon R7 M265/M365X/M465] (rev ff)

I’ve tried following Dell’s own guide on how to use switcheroo to just switch the entire system to the dedicated card, found here: https://www.dell.com/support/article/uk/en/ukbsdt1/sln298475/a-guide-to-hybrid-video-on-dell-pcs-with-an-ubuntu-operating-system?lang=en

Here’s some output:

VGA switcheroo is enabled:

narameh@Hydrogen:~$   grep -i switcheroo /boot/config-* /boot/config-4.15.0-50-generic:CONFIG_VGA_SWITCHEROO=y /boot/config-4.15.0-51-generic:CONFIG_VGA_SWITCHEROO=y 

Switch file exists:

narameh@Hydrogen:~$   sudo ls -l /sys/kernel/debug/vgaswitcheroo/switch -rw-r--r-- 1 root root 0 Jun 12 16:07 /sys/kernel/debug/vgaswitcheroo/switch 

Default state:

narameh@Hydrogen:~$   sudo cat /sys/kernel/debug/vgaswitcheroo/switch 0:IGD:+:Pwr:0000:00:02.0 1:DIS: :DynOff:0000:08:00.0 

The tutorial assumes it’s either Pwr or Off, but since this is meant to be a hybrid system, for me it’s DynOff. Hence, when I try to turn on the disconnected GPU as per instructions, nothing happens, as it’s not really disconnected, just dynamically turned off. This has to happen as root, otherwise I cannot echo due to lack of permissions.

narameh@Hydrogen:~$   sudo su root@Hydrogen:/home/narameh# echo ON > /sys/kernel/debug/vgaswitcheroo/switch root@Hydrogen:/home/narameh# cat /sys/kernel/debug/vgaswitcheroo/switch 0:IGD:+:Pwr:0000:00:02.0 1:DIS: :DynOff:0000:08:00.0 

Next I tried to use DRI_PRIME to run something on my AMD card to see if I could get it to turn on at all. I can for a second, by running

DRI_PRIME=1 glxinfo 

in one terminal window, and spamming

narameh@Hydrogen:~$   sudo cat /sys/kernel/debug/vgaswitcheroo/switch 

in the other. However, the first terminal then spits out a load of errors and we go back to DynOff. Pastebin of error output: https://pastebin.com/gJ4StVLS

Googling the error code got me this topic with a similar issue: https://www.linuxquestions.org/questions/slackware-14/current-14-2-and-dri-3-and-dri_prime-ain%27t-working-4175578108/ More info on what this poster is doing here: https://kaosx.us/docs/hybrid_gfx/

Following the steps there gets me the following

DRI seems to be fine:

narameh@Hydrogen:~$   cat /var/log/Xorg.0.log | grep DRI [    45.527] (II) RADEON(G0): [DRI2] Setup complete [    45.527] (II) RADEON(G0): [DRI2]   DRI driver: radeonsi [    45.527] (II) RADEON(G0): [DRI2]   VDPAU driver: radeonsi [    46.672] (II) modeset(0): [DRI2] Setup complete [    46.672] (II) modeset(0): [DRI2]   DRI driver: i965 [    46.672] (II) modeset(0): [DRI2]   VDPAU driver: i965 [    46.704] (II) GLX: Initialized DRI2 GL provider for screen 0   narameh@Hydrogen:~$   xrandr --listproviders Providers: number : 2 Provider 0: id: 0x66 cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 2 associated providers: 1 name:modesetting Provider 1: id: 0x41 cap: 0x6, Sink Output, Source Offload crtcs: 2 outputs: 0 associated providers: 1 name:OLAND @ pci:0000:08:00.0 narameh@Hydrogen:~$   xrandr --setprovideroffloadsink 0x41 0x66 narameh@Hydrogen:~$    

Note that it throws no errors, so this command seems to work fine. When I then try to run on either card, the intel onboard works fine:

narameh@Hydrogen:~$   DRI_PRIME=0 glxinfo | grep "OpenGL vendor string" OpenGL vendor string: Intel Open Source Technology Center 

But the AMD still throws the same errors: https://pastebin.com/W56z6z3L

In the end, the user in the thread traces his problems to a bad kernel commit and rolls back, but as this is a) a thread from 2016 and b) I am not an advanced enough user to go messing with my kernel, that is not an option for me.

I can find multiple other similar errors that seem related to kernel versions (e.g. https://bugs.freedesktop.org/show_bug.cgi?id=102800 on Ubuntu 17.01 or this one https://bugs.freedesktop.org/show_bug.cgi?id=94874)

In both topics, adding radeon.nopm=0 to the kernel boot is suggested, but I am hesitant to try this without some guidance as I don’t know enough about what I’m doing.

I hope it’s clear from this post I have put in the work to try and solve this on my own, but am running into the limits of my knowledge and don’t want to mess up my system by changing things I don’t understand or cannot undo if I end up booting into a black screen because of it. Some help from someone more advanced would be extremely appreciated.

tldr: discrete AMD is in DynOff can’t be forced on with VGA_switcheroo. DRI_PRIME can talk to discrete card, but errors with what seems to be a kernel issue? User is at the end of her knowledge and afraid to break stuff. Help appreciated.

How to force SharePoint Office 365 to show new item form in a dialogue instead of full window?

Clicking on new item link on a list for most of my lists are showing popup but one of the list, which actually is exact copy of other lists, shows new item form in full window instead of a dialogue. I checked list settings and the new form in dialogue option is set to “YES”. Any other idea? Any help is greatly appreciated.

Force display cursor/pointer on Android

I bought a graphics tablet (Huion HS64) that works wonderfully with my S10. Only problem is that I can’t see where I’m about to tap due to no cursor display. Is there any way I could force the mouse pointer to always be on or have my phone recognize the tablet as a mouse?

I could try and connect both a mouse and the tablet with a USB hub, but I’d rather a coding solution. My phone isn’t rooted, but I’m not opposed to rooting to solve the problem. Thank you in advance!

How to force empty Trash if it has system files?

The question title may seem a duplicate, but this case of mine is unique. This happened because of this problem, which I was able to answer/solve. https://superuser.com/questions/1447825/will-re-installing-mojave-through-internet-recovery-delete-data

And now the system files of the Previous Content, from the previous installed OS cannot be deleted. It seems the MacOS sees these files as legitimate system files, while in fact, they’re not.

enter image description here

I’m using Mojave now btw.

Is there a way to force Google Photos to recognize new faces?

I have “Face grouping” enabled in my Google account and I can see around 10 faces successfully tagged when I go to my Albums. However there’s a lot of other people who are not tagged, as well as some unrecognized photos of people who are already tagged.

Is there a way to force Google Photos to run the facial recognition algorithm on a given photo, so that it adds new faces or maps a new photo to an existing face?

Is it a good security practice to force employees hide their employer to avoid being targeted?

A young tech company which operates on sensitive data has employees that fall victim to phishing/porting scams despite its best efforts to instill security fobs, vpn, password managers, non-sms 2FA, limited email access and so on.

Is it a good practice to force employees to hide their employment status from the public to avoid being targeted for hacking (e.g. remove the employer from LinkedIn)?

How would I force app store to save my password indefinitely, rather than for 15 minutes?

I’d like to either force app store to save my password, or have it automatically entered (just for the mac app store password prompt) when it asks for my password. I want this because “require after 15 minutes” is far too limiting, since it’s a pain to get my password. How can I force app store to extend the duration of saving to indefinite, despite that it’s designed to save the password for 15 minutes?

Note that I know this isn’t the case for free apps. I want to purchase apps without having to enter my password. Is there a way to do this?

Does veracrypt encrpyted volume has any kind of brute force protection?

I have a 10mb encrypted volume which I made with veracrypt and was planning to upload it to internet. I have a pretty strong password but was worried about its protection against brute force attacks. After searching this SE it seems like a veracrypt encrypted volume can be easily brute forced ref1, ref2. If thats the case then given enough resources we can crack any encrypted volume with any length of password(>100) in mere days with parallel brute-forcing instead of years.

My question is, Does veracrypt encrypted volume has any kind of brute force protection built into it? Didn’t veracrypt creators know about this issue? Is there any other strong encrypting system which has brute force protection?