Wednesday, May 24, 2017

Ubuntu 16.04 suspending from keyboard

I got tired of using the mouse to put the computer into suspend. Wouldn't it be easier to just hit a key on the keyboard?

So I found this webpage that gives you a command to suspend using keyboard shortcuts.

https://askubuntu.com/questions/22054/how-can-i-suspend-using-a-keyboard-shortcut-without-administrator-privileges


Just go to System settings/keyboard make a new custom shortcut, call it suspend and make the command "systemctl suspend".



I have a dell keyboard with a "music key" that doesn't seem to have any purpose (for me anyway) so I use that.

Works pretty well.


Thursday, May 18, 2017

Making ubuntu text black

I like my text black, so I had to find out how to make it so.

https://askubuntu.com/questions/67209/how-can-i-change-font-color

has a helpful post:



To change the system font color of the Ambiance theme from gray to black, you can edit these three files:

/usr/share/themes/Ambiance/gtk-2.0/gtkrc
/usr/share/themes/Ambiance/gtk-3.0/settings.ini
/usr/share/themes/Ambiance/gtk-3.0/gtk.css

In these files change

text_color:#3C3C3C to text_color:#000000

fg_color:#4c4c4c to fg_color:#000000

This should greatly improve contrast and make applications' menu and dialog text much easier to read.

answered Apr 27 '12 at 23:15
user57495


note that the gtkrc is in the gtk-2.0 directory and Leafpad text wouldn't go black until I changed it.

gtk-color-scheme = "base_color:#ffffff\nfg_color:#000000\ntooltip_fg_color:#ffffff\nselected_bg_color:#f07746\nselected_fg_color:#FFFFFF\ntext_color:#000000\nbg_color:#F2F1F0\ntooltip_bg_color:#000000\nlink_color:#DD4814"

Wednesday, May 10, 2017

Optiplex 390 and Ubuntu 16.04 multimonitor problems

A simple idea in theory, 4 monitors simultaneously doesn't seem to work at all. The maximum I've been able to do is 3 monitors, 1 on integrated VGA port and 2 on Radeon 6350 VGA ports out of the DMS-59 dongle.

If I disconnect the integrated HDMI port, everything seems to work properly. (All three monitors come up.)

I'll lose the mouse pointer or one the screens will just freeze (though displaying a static frame of the desktop) or the screen will go weird, and the displays control panel will do crashy things if I have all 4 monitors connected and enabled. Often when configuring the displays the X server will crash and get relaunched so I have to type my password to login.

I sure wish that someday this linux multimonitor will get fixed so that it just works. I guess I'll be happy with 3 monitors. (but that fourth port just sits there and taunts me: "c'mon just try it one more time")

Optiplex 390 and integrated video with discrete video with Ubuntu 16.04

On the Optiplex 390, you CAN use the onboard video along with a discrete card (in my case, the radeon 6350).

You just have to go into the bios setup and enable the Multi-Monitor option under the Video.

If you plug in a single monitor to the onboard video with a discrete card installed and you haven't enabled Multi-Monitor, the computer will respond with "Unsupported Video Configuration. Unplug the cable and plug it into the video card instead. System halted".

The bios message for the Multi-Monitor option says "It should be enabled for Windows 7 32/64 bit. It is not applicable to other operating systems."

You can't even get into the BIOS without swapping the cable to the discrete card, though it will display the boot logo and this message.


So now I can do 4 monitors, 2 on the DMS-59 discrete card + 2 on the onboard video (HDMI+VGA) though I haven't actually hooked everything up yet. No desk space available for all of that yet. 4 monitors does take up a fair bit of room.


Without enabling the Multi-monitor, the onboard doesn't show up in the lspci.

lspci -nn

00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0102] (rev 09)
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cedar [Radeon HD 5000/6000/7350/8350 Series] [1002:68f9]

lspci -vv


00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])
DeviceName: Onboard IGD
Subsystem: Dell 2nd Generation Core Processor Family Integrated Graphics Controller
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cedar [Radeon HD 5000/6000/7350/8350 Series] (prog-if 00 [VGA controller])
Subsystem: Dell Radeon HD 6350

Tuesday, May 9, 2017

Mame compile on Ubuntu 16.04 is pretty easy

I must be getting better at setting up compiling mame on a ubuntu 16.04 system because it seems pretty easy now.

I get the latest 185 version from http://mamedev.org/release.html

Look for mame0185s.zip MAME 0.185 sources in ZIP format (all platforms) and extract it with Archive Manager.


The instructions at:

http://docs.mamedev.org/initialsetup/compilingmame.html
tell you what you need:

sudo apt-get install git build-essential libsdl2-dev libsdl2-ttf-dev libfontconfig-dev qt5-default

and then I edit the makefile,

where the line says

# QT_HOME = /usr/lib64/qt48/

I just add this line underneath:

QT_HOME = /usr/lib/x86_64-linux-gnu/qt5/


I like to see how long it takes so I run with time and -j4 for 4 processes since I have a quad core machine:

time make -j4

and it fails for some reason at the end, probably some race condition:

...
Archiving liboptional.a...
Compiling src/mame/mame.cpp...
Compiling generated/version.cpp...
Assembler messages:
Fatal error: can't create ../../../../linux_gcc/obj/x64/Release/generated/version.o: No such file or directory
mame.make:295: recipe for target '../../../../linux_gcc/obj/x64/Release/generated/version.o' failed
make[2]: *** [../../../../linux_gcc/obj/x64/Release/generated/version.o] Error 2
make[2]: *** Waiting for unfinished jobs....
Makefile:1006: recipe for target 'mame' failed
make[1]: *** [mame] Error 2
makefile:1244: recipe for target 'linux_x64' failed
make: *** [linux_x64] Error 2

real 37m12.567s
user 91m59.028s
sys 6m14.188s

Running the make again is successful:

time make -j4
GCC 5.4.0 detected
Building driver list...
Compiling generated/version.cpp...
34200 driver(s) found
Compiling generated/mame/mame/drivlist.cpp...
Linking mame64...

real 0m45.262s
user 0m19.616s
sys 0m2.536s

It takes me 38 minutes to compile on a quad core i5-2400 (3.1ghz x 4)

An Intel Core i3-2100 CPU @ 3.10GHz × 4 gives takes about 45 minutes.

real 45m22.111s
user 162m59.016s
sys 8m59.484s


and ./mame64 will run the compiled mame.