Return to Level1Techs.com

The small linux problem thread

linux
helpdesk

#1541

Was I correct that the setting I would set to make it hibernate to be in " /etc/systemd/logind.conf" ?


#1542

You would have to be specific about what you put there. logind may not deal with the issue that you are looking for which is actually on a kernel and initramfs level.

Take a look at the archwiki link. And give couple of those things a try.

If you are running SystemD, then this may be a better solution.
https://wiki.archlinux.org/index.php/Power_management#Sleep_hooks


#1543

I believe ubuntu 18.04 is systemd could be wrong again dont linux much


#1544

It is


#1545

It is. Look at those links and read them. Try some things. Remember what you tried. If you are still having issue, then let us know what you have actually tried.

Since you are new to the *nix world, there are many ways to solve issues, some better than others. So you will need to be detailed of what you did, like the commands you used, the files you edited, and what you put in those files.

Also dmesg and journalctl are your friends. These daemons detail what is going on with your system and log errors.


#1546

What is the best way to view Ryzen CPU clock speed? So that I can see if boost and downclocking is working


#1547

Try watch -n1 "cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq"

And/or CoreFreq


#1548

I am using Ubuntu 18.04 and have a Ryzen 1600
For reasons I needed to change the scaling governor to Performance.

I had a “Permission Denied” result so I did “sudo -i” and attempted to change the governor again - This then worked.

But after this (and even after a reboot) When I open up a terminal window I now get this at the top…

bash: /home/james/.bashrc: line 97: unexpected EOF while looking for matching `)’
bash: /home/james/.bashrc: line 118: syntax error: unexpected end of file

I’m new to Linux so confused why this is now appearing


#1549

What does your .bashrc look like?

Mind posting it here?

The system does not like what’s going on with those line numbers it is telling you about.


#1550
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color|*-256color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
        # We have color support; assume it's compliant with Ecma-48
 # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
        # a case would tend to support setf rather than setaf.)
        color_prompt=yes
    else
        color_prompt=
    fi
fi

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\[email protected]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\[email protected]\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to [email protected]:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\[email protected]\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi

# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF''

# Add an "alert" alias for long running commands.  Use like so:
#   sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

#1551

If I counted correctly line 97 is

Add an “alert” alias for long running commands. Use like so:

and line 118 is fi the fi above the last fi, Not the last fi. As the last fi is line 119


#1552

The thing is, I haven’t edited the .bashrc file myself - So I don’t know why this has happened


#1553

@jrwagh333 How about pasting the file as preformated text (edit original post) so it’s easier to read and count lines.


#1554

To make sure my counting was right, I used pastebin.

Pastebin also does syntax highlighting.


#1555

https://pastebin.com/SjWiUeYa

Just made a paste. It will expire in a week.

I wish I could find the bashrc that Ubuntu uses in 18,04 online so I can compare. ( I don’t Ubuntu )

The fi that the error is complaining about belongs to bash autocompletion.


#1557

I edited your post to make it more readable.
You can post code blocks by nesting inside three backticks like this

```
Paste Code here
```


#1558

Browser gpu decoding hd4000 series
#1559

#1560

Debian Stretch:

Install nvidia 390.xx drivers from backports
Install steam, install fails: needs 32-bit drivers
Install libgl1-nvidia-glx:i386, install fails: needs nvidia 384 dependencies
Install dependencies, dependencies fail: you have 390.XX drivers
Remove 390.xx drivers
Reinstall nouveau
Blackscreen, add nomodeset to boot
Back in

granted this is my own fault for pulling the new drivers from the backports and expecting no hiccups, but 7-months on debian with zero issues; my confidence was high. lesson learned.


#1561

Decided to play around with lxc. It doesn’t seem to be going well. Host is Fedora 28. After some searching it appears to either be an issue with SELinux or a bug or a combination of the two.

Basically this is what I get when trying to create a Fedora container:

[[email protected]]$ sudo lxc-create -t fedora -n fedora-c1
Host CPE ID from /etc/os-release: cpe:/o:fedoraproject:fedora:28
Checking cache download in /var/cache/lxc/fedora/x86_64/28/rootfs ... 
Cache found. Updating...
chroot: failed to run command ‘yum’: No such file or directory
Update finished
Copy /var/cache/lxc/fedora/x86_64/28/rootfs to /var/lib/lxc/fedora-c1/rootfs ... 
Copying rootfs to /var/lib/lxc/fedora-c1/rootfs ...
Storing root password in '/var/lib/lxc/fedora-c1/tmp_root_pass'
chpasswd: cannot open /etc/passwd
Expiring password for user root.
passwd: Libuser error at line: 425 - Error replacing `/etc/passwd': Permission denied.
passwd: Error
installing fedora-release package
chroot: failed to run command ‘yum’: No such file or directory
sed: can't read /var/lib/lxc/fedora-c1/rootfs/etc/sysconfig/init: No such file or directory

Container rootfs and config have been created.
Edit the config file to check/enable networking setup.

The temporary root password is stored in:

        '/var/lib/lxc/fedora-c1/tmp_root_pass'


The root password is set up as expired and will require it to be changed
at first login, which you should do as soon as possible.  If you lose the
root password or wish to change it without starting the container, you
can change it from the host by running the following command (which will
also reset the expired flag):

        chroot /var/lib/lxc/fedora-c1/rootfs passwd

I can’t log in to the container using the temporary password, and I can’t change the password from the host.

Anyone have experience doing this?