Android Studio - Compatibility settings greyed out in Windows 7 64 - android-studio

I am running Android Studio under Windows 7 64 bit, with a DPI scaling setted up at 150%. The text is of course blurred, and the only thing I could do is to "Disable display scaling on high DPI settings" from the program's properties/compatibility tab: the problem is that the settings are grayed out.
Anybody knows what the problem could be?
Thank you in advance
(I would have added the screenshot but my rank is too low, sorry)

I've managed to solve this problem in the following way.
I am not sure about whether it has caveats, but it's really simple. The settings are greyed out because it's a) a 64-bit application or b) a part of 64-bit Windows distribution
Solution is to use a 32-bit shell with high-DPI disabled to start a 64-bit program. I'm not sure whether it has memory addressing implications, but it should work for any application.
Good candidates are 32-bit versions of bash, or anything else you can find.

Related

Why doesn't Qt::AA_DisableHighDpiScaling disable high DPI scaling, and why does Qt::AA_EnableHighDpiScaling disable it?

I'm working on a Qt application (deploying to Qt 5.11, but I'm testing on Qt 5.14) that needs to run on a variety of projectors. At least one of these projectors reports a physical size of over one metre, which results in only 32.5 dpi reported to the Linux OS (compared to the default of 96 dpi). The effect of this setting on our Qt app is that all text becomes unreadably small:
It can be reproduced on any system by running
xrandr --dpi 32.5
before starting the application.
We could configure the system dpi differently, but there are reasons not to: this dpi is actually in the right ballpark (it's even too high), we may want to use it in other applications, and customers may use their own projector which might break our manual configuration.
The safe approach for this particular use case is to pretend we're still living in the stone age: ignore the system dpi setting and just use a 1:1 mapping between device-independent pixels and device pixels. The High DPI displays documentation says:
The Qt::AA_DisableHighDpiScaling application attribute, introduced in Qt 5.6, turns off all scaling. This is intended for applications that require actual window system coordinates, regardless of environment variables. This attribute takes priority over Qt::AA_EnableHighDpiScaling.
So I added this as the first line in main (before the QApplication is created):
QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
However, it seems to have no effect; text is still unreadably small. I also tried this in various combinations with:
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, false);
QCoreApplication::setAttribute(Qt::AA_Use96Dpi);
Nothing has any visible effect effect.
What does work is setting QT_AUTO_SCREEN_SCALE_FACTOR=1 in the environment. If I understand correctly, this would enable scaling rather than disable it, but setting it to 0 does not work!
Similarly, if I enable Qt::AA_EnableHighDpiScaling in code like this, everything becomes readable:
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
What also works to some extent is hardcoding the font size (found here):
QFont font = qApp->font();
font.setPixelSize(11);
qApp->setFont(font);
However, margins in the layout still seem to be scaled, so this results in a very cramped (albeit usable) layout.
What also works is setting QT_FONT_DPI=96 in the environment (this variable seems to be undocumented, but it works in Qt 5.11 and 5.14 at least).
Either there are bugs in Qt, or more likely, I'm misunderstanding something. How come that enabling the scaling seems to disable it and vice versa?
Edit: just tested on Qt 5.11 too, although it's on another system. There, neither QT_AUTO_SCREEN_SCALE_FACTOR=1 nor QT_AUTO_SCREEN_SCALE_FACTOR=0 works, so it seems we are dealing with Qt bugs to some extent after all. Maybe related:
High DPI scaling not working correctly - CLOSED Out of scope
HighDPi: Update scale factor setting for devicePixelRatio scaling (AA_EnableHighDpiScaling) - CLOSED Done in 5.14
Support of DPI Scaling Level for Displays in Windows 10 - REPORTED Unresolved
Qt uses wrong source for logical DPI on X - REPORTED Unresolved - This may be the root cause of the issue I'm seeing.
Uselessness of setAttribute(Qt::AA_EnableHighDpiScaling) - REPORTED Unresolved
So how can I make it work reliably in all cases?
Here's what I did in the end to forcibly disable any scaling on Qt 5.11:
QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
if (qgetenv("QT_FONT_DPI").isEmpty()) {
qputenv("QT_FONT_DPI", "84");
}

Some tearing on QML animations

I am noticing some tearing with some QML 2 animations with Qt 5.4.2 on my Tegra 3 based embedded Linux board. I doubt if this is a complete vsync issue because most of the animations are smooth but there are some animations that involve a lot of parallel motion and clipping that tear consistently. These animation come out torn as opposed to simply stuttering so I don't think it is completely a performance issue either. Though it might be caused by the system not being able to put out the necessary FPS to sync properly? The exact same application has no such trouble on my Haswell i7 PC.
I have enabled QT_QPA_EGLFS_FORCEVSYNC to no effect and have not yet managed to find anything else that I can try. I should mention though that I am running EGLFS with an X11 backend (http://code.qt.io/cgit/qt/qtbase.git/tree/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp?h=5.4) as a result of the Nvidia drivers dictating the use of X11. I would assume that this means that I can't really use the FB related settings normally available with EGLFS. Is there anything else that I can try to fix this?
PS. By setting QT_QPA_EGLFS_SWAPINTERVAL to 0 I can get the tearing to become a whole lot worse. This again suggests that I most likely do not have a whole system vsync issue.
PPS. I am getting a "QSGContext::initialize: stencil buffer support missing, expect rendering errors" warning at the start of my application.
On a Freescale/NXP imx6 with Vivante GC2000 I see a similar problem even when not using x11.
Setting "export QT_QPA_EGLFS_SWAPINTERVAL=2" seems to reduce the tearing on 3.14.38 kernel.
On 3.14.52 kernel that did not work but "export FB_MULTI_BUFFER=3" does help on both Qt 5.5.1 and 5.6 with imx6.

Android Studio uses too much CPU

I'm running AS 1.2.2. on OSX 10.10.3 The CPU usage swings wildly up and down. Trying to edit anything is a real pain - deleting characters, typing, type-checking - all are slow because Studio is consuming a huge amount of resources. I can press a key and must wait sometimes 5 seconds before it updates on the screen
Anyone else has this problem and figure out how to make Android Studio usable again.

backtrack 5 wont boot

First off, sorry for my english, it is not very good.
I have a Toshiba satellite c885d running windows 8.1. I have a lexar 4 gigabyte usb flashdrive. It says on the back: LJDS50-4GB. I used Linuxlive usb creator and backtrack 5 r3 gnome 32 bit. I downloaded the ISO from backtrack-linux.org.
When I put my usb into my computer, hold f12, and power it on, it takes me to the boot menu, where it gives me 4 options to boot from. after each one, there is a little bit of text. except after "usb" is blank. and then at the bottom is two more options, one taking you to the menu that you can also access by pressing f2 durring startup.
If I hit enter when usb is selected, it takes me to a black screen that says two words (something like checking usb, but I forgot. I will put in an edit that will contain a picture and the exact text.) then after 2 seconds, it says failed, and then launches windows. PLEASE PLEASE PLEASE help me out. I tried researching a solution to the problem, none of which worked. I have successfully run backtrack from the VM thingy that linuxlive has with all of the usb stuff, and It works fine, but it is really slow, as I have too many windows processes running at the same time. If anyone can diagnose me with a problem, awesome. If you can give me a solution, stupendous.
edit: it says "checking media" and then "failed"
images:
Ok, after some discussion in question comments I suspect that the problem is in your install image. If you can't see GRUB menu then you are unable to enter bootloader on your USB drive. It might be several things causing your problem with common denominator - UEFI:
You have written your install image incorrectly and UEFI is not recognizing it.
You have written your install image correctly, but that image is not capable to run on UEFI - see discussion here.
Anyway 100% way to make Backtrack like most of current Linux distros to work on UEFI is to turn UEFI to legacy mode (BIOS), though you have to unninstall Windows 8 ;-)
I would not give lot of hopes to that because Backtrack 5 is based on Ubuntu 10.04 which is way too old - earliest Ubuntu supporting UEFI is 12.04.
I can recommend a few things that might help:
Erase your usb flash drive and write Backtrack image to it again, but with UnetBootIn. There is an official tutorial for that.
Do not try to install Backtrack 5 if don't know what GRUB is. You can install latest Ubuntu that can run on UEFI with SecureBoot (not sure it's easy) and enjoy all of the tools from Backtrack repositories.
Good Luck and have a lot of fun!
I figured it out, just had to follow the tutorial from this page: https://askubuntu.com/questions/221835/installing-ubuntu-on-a-pre-installed-windows-8-64-bit-system-uefi-supported

Visual C++ express 10 using too much memory

I use process explorer (which is a microsoft tool) on windows XP, and often the "physical memory" is being filled at max (3GB) while I use visual C++. At a point, all my programs are slow and are unresponsive, and when it returns to normal, available memory comes back by nearly half ! What is wrong ?
I'm programming some project with Ogre3D, maybe I can deactivate some options in visual, what exactly is it caching that eats that much memory ?
Apparently MSVC is designed to work on big machines, there are many settings in text editor -> C++ to remove some weight, but my guess is that windows xp + recent microsoft apps don't play nice.

Resources